Mounting host drive from Windows 7.

Asked by Dylan Lawrence Moore

I've been attempting to mount my drives from my Windows 7 using the following directions:

https://help.ubuntu.com/community/MountingWindowsPartitions

Following the instructions, I've been able to mount my RECOVERY and SYSTEM drives, but the one I want is my HOST drive. My available drives are:

/dev/sda1 (/media/SYSTEM)
/dev/sda2 (/host)
/dev/sda3 (/media/RECOVERY)

This is how I configued my fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda2 /host ntfs-3g defaults,nosuid,nodev,locale=en_US.utf8 0 0
/dev/sda3 /media/RECOVERY ntfs-3g defaults,locale=en_US.utf8 0 0
/dev/sda1 /media/SYSTEM ntfs-3g defaults,locale=en_US.utf8 0 0
/dev/sda2 /host ntfs-3g defaults,user,locale=en_US.utf8 0 0
/host/ubuntu/disks/root.disk / ext4 loop,errors=remount-ro 0 1
/host/ubuntu/disks/swap.disk none swap loop,sw 0 0

I'm aware I screwed something up (I have two sda2's), but I don't really know what I'm doing so I don't want to go removing stuff without someone telling me it's okay. I think I've enabled the /host drive with the NTFS configuration Tool; when I click on it to enable I'm told it's busy, but afterward it's checked. Can anyone tell me what piece I'm missing here to make this work?

Question information

Language:
English Edit question
Status:
Answered
For:
Wubi Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#1

You really never need to edit your fstab in order to make your Windows drive mountable.

Did you install Ubuntu inside Windows using Wubi, or alongside Windows by booting from the Ubuntu install CD?

Since you have /dev/sda2 present twice and its mount point is /host in both instances, one of them was probably there before. If that is the case, then you have a Wubi system (since only on a Wubi system does the Windows partition get automatically configured to be mounted at /host), and in that case, you should just be able to go to /host in Nautilus (the file browser) and access your Windows partition.

I recommend that you comment out (i.e. prefix with a # character) the second line in /etc/fstab that talks about /dev/sda2. Also, when editing configuration files, it's a good idea to create backups, so that if you forget what content you created and what content was there originally, you can easily check.

If the above advice does not solve your problem, please go to the Terminal and run this command:

cat /etc/fstab; df -h; mount; sudo fdisk -l

Then select all the text in the Terminal (Edit > Select All), copy it to the clipboard (Edit > Copy), and paste it here. Please note, again, that you only need to do that if you try the above advice and it does not enable you to access your Windows partition. Please note, also, that if that happens, you should also include information about what *did* happen, including the full and exact text of any error messages.

Revision history for this message
bcbc (bcbc) said :
#2

/host is mounted by lupin - you should remove all references to /dev/sda2 in your /etc/fstab.

If you need special permissions on /host you have to use the rootfs= kernel boot option (something like that - I'll look it up if you require it). If you don't need special permissions then there's absolutely no reason to reference it at all. You can create a shortcut to /host instead and place it on your desktop or Places menu.

Revision history for this message
Dylan Lawrence Moore (arcenez) said :
#3

1. I installed Ubuntu by downloading the .iso and mounting it using DAEMONTOOLS in Windows.

2. I'm pretty sure I installed it alongside Windows; every time I start the computer it asks for me to choose between Windows and Ubuntu.

3. Ubuntu came with Mozilla, not Nautilus. I can just download it, right?

4. The reason /dev/sda2 is in there twice is because it was already there and I didn't know what I was doing and I stuck it in there again. I created a backup file--how do I access it? I saved it using the following command:

sudo cp /etc/fstab /etc/fstab.orig

Now before I go around editing stuff and hacking things up, is there any way I can permanently screw up the data stored in my hard drives through this?

Thanks again!

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

"1. I installed Ubuntu by downloading the .iso and mounting it using DAEMONTOOLS in Windows."

Then you installed with Wubi, and it is installed INSIDE, rather than ALONGSIDE, Windows. Whichever way it is installed, you will see a menu asking you to choose operating systems (though the menus will look different).

"2. I'm pretty sure I installed it alongside Windows; every time I start the computer it asks for me to choose between Windows and Ubuntu."

When we say that it is installed INSIDE WIndows, we mean that it is installed in a writable disk image located inside your Windows partition. We do not mean that Windows is running when Ubuntu is running.

"3. Ubuntu came with Mozilla, not Nautilus. I can just download it, right?"

Mozilla Firefox (which is, I presume, what you mean when you say it came with Mozilla) is not the same kind of program as Nautilus. Their functionality overlaps only slightly. Firefox is a web browser. Nautilus is a *file* browser. When you have a window representing the contents of a folder, showing you your files, that's Nautilus. There are other file browsers, but you would only have them if you had manually installed them or if your Ubuntu system is really a Kubuntu, Xubuntu, Lubuntu, or other derivative system.

In Ubuntu (or any of its variants), you can press Alt+F2, type "nautilus" (without the quotes) in the text box, and press enter. The program that runs as a consequence of this is Nautilus. If no program is able to run, *then* that would indicate that you likely don't have Nautilus. Another way to find out if you're running Nautilus is to go to Help > About in a folder window. That will identify which application is acting as your file browser.

However, it does not really matter whether your file browser is Nautilus or something else. Whatever application it is, you should be able to access the folder /host with it, and that folder represents your Windows partition.

"I created a backup file--how do I access it?"

To view the backup file, just find it in your file browser. If you have trouble doing this, please ask us for help.

To restore the backup, run this command in the Terminal--make sure to get it *exactly* right (i.e., you should copy and paste it):

sudo mv /etc/fstab /etc/fstab.new; sudo cp /etc/fstab.orig /etc/fstab

That will back up the modified version, and restore the old version (while still retaining the backup copy of the old version, as well).

"Now before I go around editing stuff and hacking things up, is there any way I can permanently screw up the data stored in my hard drives through this?"

That depends what you mean by "this." Performing operations on your fstab file can render your Ubuntu system unbootable if you make a mistake, though it is possible to fix that. (Since you have a Wubi system, it is a bit harder to fix it than if you had made that mistake on a fully-fledged Ubuntu system, but still not too hard.) It would not affect the bootability of your Windows system. As for modifying your Windows system, there is no likely mistake you'd make following these instructions, or reasonable instructions online, that would cause data loss in your Windows system. But since you do (or will) have full read and write access to your Windows partition, you certainly *could* mess it up. There is nothing stopping you from modifying or deleting content in your Windows system so as to break it. But there is no reason to think that you would accidentally do that.

Revision history for this message
Dylan Lawrence Moore (arcenez) said :
#5

Awesome, thanks for being so clear and patient.

The Nautilus thing worked and I was able to access everything on my hard drive.

One last problem arose to which I'm sure the answer is pretty simple. In an attempt to copy my whole folder to to desktop, I was informed I only have 12.4 GB available when I have a 500 GB hard drive. I'm guessing this is because the desktop is associated with a 12.4 GB partition of my hard drive. If that's the case, how do I change my desktop to associate with my larger partition. and if not the case, what do I do to rectify this?

Thanks again!

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#6

You're correct about the reason you cannot fit a folder so big on your Ubuntu desktop. To be more specific, the partition for your Wubi system is about 12.4 GB large. This partition actually represents the contents of a disk image file contained in your Windows system's partition, which it itself 500 GB large.

You could theoretically associate your desktop with a folder inside the 500 GB Windows partition by removing the folder /home/your-username/Desktop and replacing it with a symbolic link to a folder inside the Windows partition (i.e. a folder inside /host). I'll provide details about how to do that if you decide that you really want to do this. But you should really not do this, because some applications that put things on your desktop might assume that your desktop is on a volume that supports Unix-style file permissions and file ownership (or you might yourself want to perform some action, like unpacking an archive containing an installer, that requires this).

If you explain why it is that you want something so huge on your desktop, it might be possible to provide an alternative solution. Remember, you can still open and edit files (and play music, and watch videos) in your Ubuntu system, while they are on your Windows partition (i.e., inside /host) -- you do not need to move them into your Ubuntu partition in order to use them.

Revision history for this message
Dylan Lawrence Moore (arcenez) said :
#7

Yea, I just realised I could make a link to the folder instead of just putting the whole damn thing into my Wubi partition. So this solves that problem.

My next question is one of understanding:

When I download something new, where does it go? Onto this new Wubi partition, or into my 500 GB Windows partition?

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#8

That depends where you download it to. ;-)

By default, most browsers in Ubuntu download files to the Downloads folder inside your home folder. Your home folder is located inside your home directory, so that's on the 12.5 GB volume. But you can change where your web browser downloads things, or even make it ask you to select the target folder each time. If you really wanted, you could even make /home/your-username/Downloads a symbolic link to a folder inside /host (which would potentially carry some of the same problems as doing that with your desktop folder...but not really, because if you had a problem, you could always move things to your Desktop or somewhere else before extracting them).

If you're just asking what happens when you're in Ubuntu and you download something *into* a folder on your desktop which is really a symbolic link to a folder inside /host, the answer is that it goes into the target folder, which is inside /host, and thus on the 500 GB partition.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#9

Sorry, correction needed. I said:
"Your home folder is located inside your home directory, so that's on the 12.5 GB volume."

"Home folder" and "home directory" mean the same thing. What I meant to say was:
"Your home folder is located inside /home, so that's on the 12.5 GB volume." (/home is the folder that contains users' home folders. Since it is not inside /host and it is not a symbolic link to /host or a folder inside /host, it is on the 12.5 GB volume.)

Can you help with this problem?

Provide an answer of your own, or ask Dylan Lawrence Moore for more information if necessary.

To post a message you must log in.