Page 1 of 1

HDD not recognized...

Posted: 26. Feb 2017, 18:50
by Jim@HiTek
Ubuntu 16.04LTS host with Win7 as guest in VB.

I have a HDD with my bootable Win10 on it as a 2nd drive on this computer, my 1st drive boots Ubuntu. Oracle (latest ver) VB opens correctly and I can start Win7 easily. Installed it from my owned Win7 disk. I did not care for Win10 at all and installed Ubuntu on a new HDD to avoid having it, then in Ubuntu setup VB to run Win7. Win10 may have done something to the HDD, but I doubt it.

Win7 does not show the NTFS drive at all. However, Ubuntu sees it and I can open files etc. I need to be able to find it in Win7 in order to use a large (and expensive) piece of software I've had for 10 years that's no longer supported, and was never usable in Linux. Without being able to access the HDD it's on, I can't using it in Win7.

I've tried installing the HDD using 'Settings' in VB but that method didn't work. Tried to simply navigate to the drive using \media\Jim\Jim@HiTek in Win7 but that just opens a browser with a 'Can't find' error message. Tired following advice found here on the forum but it was too advanced for me I guess as I couldn't get it to work.

I am an old hand at Windows, but novice level with Ubuntu.

Any help or suggestions on how to get the HDD visible in VirtualBox? Thanks.

Re: HDD not recognized...

Posted: 27. Feb 2017, 07:55
by socratis
Jim@HiTek wrote:Win7 does not show the NTFS drive at all.
Good! That's expected behavior. A guest should never have access to the host's resources (and your Win10 HD is a storage resource on your host), unless given explicit permission. There are three ways to do this. From easier to hardest:
  • Shared folders: You designate the Win10 HD as a shared folder in the VM settings and then see it as a pseudo-network folder. For more details, see Ch. 4.3 Shared folders. It's the easiest way of moving/copying files around, but not the most compatible. You may face issues depending on what your application is doing (file locking, security/permissions, network paths, etc.)
  • Windows network folders: You share the Win10 HD as a SaMBa share from your Ubuntu host and then you connect from your Win7 VM to that share, using the Windows network. More compatible than the VirtualBox shared folders, but it might need some work to get it going.
  • Raw disk access: I'm just putting it out there for completion. Advanced, plenty of room for error and destroyed data and hard drives if not done properly. If you're new to virtualization, or your computer level expertise in not high enough, I wouldn't mess with it. Not unless I have a complete, verified backup of all of my system.

Re: HDD not recognized...

Posted: 28. Feb 2017, 22:16
by Jim@HiTek
Spent an hour on Shared Folders to no avail. I am missing some critical piece of info. Setting up the Shared Folder in 'Settings' for VB only gets me a Not Found error no matter what path I give it. When I drill down, it only shows the one drive in Ubuntu, not the /dev/sda that's there. I've also tried /media/jim.

The drive is there, but VB doesn't believe it.

I did open Win7 and try to set up network share in there, but again, it never shows the HDD.

I don't know what sharing Win10 HD as a SaMBa share means...is there a white paper on how to set that up? Google didn't help.

Re: HDD not recognized...

Posted: 1. Mar 2017, 03:33
by socratis
Jim@HiTek wrote:Setting up the Shared Folder in 'Settings' for VB only gets me a Not Found error no matter what path I give it.
Did you try the "Select Directory" dialog box to choose an existing directory? And it still gave you a "Not found" error? Or did you manually try to enter a directory?
Jim@HiTek wrote: When I drill down, it only shows the one drive in Ubuntu, not the /dev/sda that's there.
That would be correct, because "/dev/sda" (you're sure about the "a" part?) is not a directory, it's a device. Mounted as a directory (probably) somewhere under the root tree.

In your Ubuntu search for "Disks" (it's typically under "Installed Applications"). Make sure that your Win10 HD is mounted and make a note of the mount point. If it's not mounted a "Play" icon should be there to allow you to mount it. Then take a look at the "Mounted at" information. That's where you should be pointing your "Select Directory" dialog box.

For example, I did a quick test (attached 2nd NTFS Win10 HD and it was mounted in "/media/socratis/Win10".
Jim@HiTek wrote:I don't know what sharing Win10 HD as a SaMBa share means...is there a white paper on how to set that up? Google didn't help.
Did you actually search for "Samba share" and came up empty handed? Do you honestly want me to believe that?

BTW, the weird capitalization is because they are called SMB shares and the people that implemented it in Linux thought it would be catchy to give it an easier to remember name.

Re: HDD not recognized...

Posted: 1. Mar 2017, 05:45
by Jim@HiTek
Did you try the "Select Directory" dialog box to choose an existing directory? And it still gave you a "Not found" error? Or did you manually try to enter a directory?
Yes, I did try to choose an existing directory...but that drive and it's directories are not shown. So I switch to manually entering a directory. I think though, that that was before I finally saw the 'mount' button. Not sure though. Also, trying to be economical with my words. Walls of text are often frowned upon on forums...

I know my explanations are confusing, probably due to me being confused and rapid fire trying things.
That would be correct, because "/dev/sda" (you're sure about the "a" part?) is not a directory, it's a device. Mounted as a directory (probably) somewhere under the root tree.

My Win10 disk is device /dev/sda. (sda1 is the system partition - not mounted, sda2 is the Jim@HiTek partition #2 - mounted). I am mounted at /media/jim/Jim@HiTek. I have rebooted several times since it was mounted.

If I right click /sda2, and drill down to permissions, it seems I've got permissions to the disk. 'Owner' and 'Group' have permission to r&w Files, and c&d Folders. 'Others' it's RO and Access Files. 'Local Network Share' is also turned on.

FYI, the Ubuntu boot disk is (I just noticed) sdb, so that means I've connected the boot disk on the 2nd SATA channel? Hmm. Maybe I'll swap the drives. Couldn't hurt. Hasn't been an issue in over a year that I know of.

Moving to 'Settings' in the VB front porch, 'Shared Folders', the /media/jim/Jim@HiTek is shown as 'Auto-mount' & 'Full' access. But when I start Win7, the drive is not there. The folder is not there. I can't find it in network config either.

So I try to find it using my fading skills with Windows networking and so far no luck. I retired 12 years ago after running my own computer consulting firm for 16 years but I'm getting rusty. I'm looking at 'Network' in Win7 right now, and it only shows the VM drive. And a media device...the DVD/CD. I have run network help several times and get nothing from that.
Did you actually search for "Samba share" and came up empty handed? Do you honestly want me to believe that?

BTW, the weird capitalization is because they are called SMB shares and the people that implemented it in Linux thought it would be catchy to give it an easier to remember name.
This just meant that I couldn't find an explanation in google for samba that would help me with my problem. I wasn't to enthused about installing another app or program without knowing why I needed it. And a quick search wasn't helpfull.

Anyway, thanks for your help so far. Much appreciated.

Re: HDD not recognized...

Posted: 1. Mar 2017, 06:37
by socratis
Jim@HiTek wrote:Walls of text are often frowned upon on forums...
So are Twitter-like posts. Not yours, generally speaking... ;)
Jim@HiTek wrote:I know my explanations are confusing, probably due to me being confused and rapid fire trying things.
You know what I do in similar cases? I go for a walk then and revisit the problem. Or for a smoke or two. ;)
Jim@HiTek wrote:sda2 is the Jim@HiTek partition
Is the partition actually named "Jim@HiTek"? I have a bad feeling about this...™
Jim@HiTek wrote:the /media/jim/Jim@HiTek is shown as 'Auto-mount' & 'Full' access. But when I start Win7, the drive is not there.
OK then, you most probably don't have the Guest Additions installed, or they're out of date.

With the VM shut down completely (not paused or saved), right-click on the VirtualBox Manager and select "Show Log". Save the first "VBox.log" only, ZIP it and attach it in your response (see the "Upload attachment" tab below the reply form).

Re: HDD not recognized...

Posted: 1. Mar 2017, 07:47
by Jim@HiTek
As requested...log file attached. Wow, it's long.
Is the partition actually named "Jim@HiTek"? I have a bad feeling about this...™
Yes, it is named Jim@...I don't usually name disks or files or folders that way, normally, I only use it as a handle on forums and such, that one slipped through my computing filter I'm afraid. I didn't consider that as an issue until just now...
OK then, you most probably don't have the Guest Additions installed, or they're out of date.
I'll check into that tomorrow.

Re: HDD not recognized...

Posted: 1. Mar 2017, 08:14
by socratis
00:00:01.327831 Host path '/media/jim/Jim@HiTek', map name 'Jim@HiTek', writable,
                automount=true, create_symlinks=false, missing=false
So, your folder is there, alive and kicking. It's the fact that you don't have the GAs installed that's preventing you from seeing it. Install them and ye shall receive the VirtualBox shared folders.

Re: HDD not recognized...

Posted: 1. Mar 2017, 18:16
by Jim@HiTek
That worked! THANKS!

Whew. Was beginning to think I would never get to work with my CAD programs again (schematic and PCB creating programs).

One curious thing about it though, in Win7...the D: drive now shows the Guest Additions programs and files as though it were a CD with only that on it. I can't access a regular CD anymore. I did try reinstalling Guest Additions, I did reboot. I did shut down Oracle and restarted it.

Any ideas why Guest Additions took over the roll of "Devices with Removable Storage"? It's the only one shown, it was there just as a CD drive before installing GA. It's shown with a File System: CDFS

The little icon bar on the bottom of the VM screen does show the CD icon.

When I go to VB Manager 'Settings' for Storage, it shows VBoxGuestAdditions.iso in the storage tree, but the remove icon (along with the others) is greyed out so I can't remove it.

Any ideas how I can restore the CD drive?

Thanks!

[On Edit: Oh, wait, found the trick. In the VB taskbar above Win7 window, clicked on Devices, and then the Optical Drive and chose the CD, so, all is well.]

Re: HDD not recognized...

Posted: 1. Mar 2017, 18:24
by mpack
The GAs come on a virtual CD, an ISO, and that's whats currently mounted in the VM. As with any install CD, it's good practice (and necessary if you want to use the drive for something else) to eject that virtual CD after you've installed the software that's on it.