Auto Mounting windows partitions

Here is a small and useful tip. Most of us use linux and windows in a dual boot combination, and sometimes its annoying to mount the windows partitions every time u login to ur linux box. Remember the first primary partition on first fixed disk is hda1.

Everything Linux 1798 This topic was started by ,


data/avatar/default/avatar34.webp

52 Posts
Location -
Joined 2004-01-17
Here is a small and useful tip. Most of us use linux and windows in a dual boot combination, and sometimes its annoying to mount the windows partitions every time u login to ur linux box.
 
Remember the first primary partition on first fixed disk is hda1. As most of us never create a secondary, third or fourth primary partition on the same harddisk so there is no hda2, hda3 or hda4. The first logical drive in the extended partition is hda5 (D drive on windows).
 
For example, in windows if u have partitions like C:,D:,E:
that means your drive C: is hdc1, drive D: is hdc5 and drive E: is hdc6.
 
So if you want to automount all of your windows partitions in linux when you boot into linux. Just update the /etc/fstab file with the appropriate entries. here is how my /etc/fstab looks after up[censored] it.
 
 
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda9 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda1 /mnt/CDrive vfat defaults 0 0
/dev/hda5 /mnt/DDrive vfat defaults 0 0
/dev/hda6 /mnt/EDrive vfat defaults 0 0
 
 
now the last three lines are the new lines i have put in my /etc/fstab. before putting these lines in i created the directories /CDrive,/DDrive and /EDrive in my /mnt/.now everytime i boot up, it automatically mounts my windows drives into the above given directories.

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar25.webp

156 Posts
Location -
Joined 1999-11-30
Don't forget that if you're using NTFS on your Windows partitions to put "ntfs" instead of "vfat"... (and make sure the ntfs module is functioning on your kernel... but on most modern distros it's there).

data/avatar/default/avatar40.webp

1 Posts
Location -
Joined 2004-01-26
Wow! That was bulls eye outstream
 
Never thought that was so easy. All the tips I got from the net were so confusing. This one was just three steps. Cool.
 
Thanks also to Vermyn for the NTFS tip. would be helpful sometime.

data/avatar/default/avatar34.webp

52 Posts
Location -
Joined 2004-01-17
OP
Quote:Wow! That was bulls eye outstream

Never that that was so easy. All the tips I got from the net were so confusing. This one was just three steps. Cool.

Thank you

Quote:Thanks also to Vermyn for the NTFS tip. would be helpful sometime

Yeah, i forgot to mention that NTFS thing. Thanks to Vermyn, he made life easier for people having NTFS partitions

data/avatar/default/avatar27.webp

6 Posts
Location -
Joined 2004-01-29
I installed fedora 1.0 dual boot with win98se after clearing some partitions. I am a mainstream (non-techie) user who sees the advantages of linux. I considered installing Mandrake, but as it now costs to post on their official support forums, and I happened to see the 'new' community supported redhat fedora advertised on a coverdisc I thought I'd try it, as redhat are the most well-known brand. The install went smoothly, but for about a week I have been wrestling with two crucial operations which I think would be important to get clear and smooth for wider mainstream uptake. I suppose I should and will post the second - persistent difficulty in broadband internet access - in the networking forum, but this thread addresses the first. I have found different versions of how to modify fstab to automount windows partitions. I eventually found the bash shell and used mkdr so that i now have three directories/folders in my mnt directory, (then realised I could have just used Gnome, like windows explorer). My current 3 new fstab lines which I added as 'root' using gedit are according to instructions in the redhat 9 manual:
 
/dev/hda1 /mnt/windows vfat auto,umask=0 0 0
 
where in place of 'hda1' I have put three of my windows partitions as labelled in the linux hardware browser:e.g. 'hda10', and in place of 'windows', I have put the name of each directory I created as a mount point, e.g. 'a10'. On rebooting, i saw a message scroll past, something like 'vfat - no such mount point'. I'm puzzled that fedora seems to think 'vfat' in the line is a directory when I assume by its position it is meant to recognise it as a filesystem instruction, unless there is some special way of indicating this that i don't yet know about. Previously I had tried a version from redhat 7 manual, pointed to in another thread -
 
/dev/hda1 /mnt/vfat vfat noauto,owner,users 0 0
 
which also did not work. I'm now going to try the version recommended by outstream above in this thread -
 
/dev/hda1 /mnt/CDrive vfat defaults 0 0
 
substituting my partition and mount/sub-directory names for his 'hda1' and 'CDrive'.
 
although I recognise that his post was a general linux instruction not specific to fedora 1.
 
I had high hopes for fedora from reviews i had read and when it installed so smoothly, so it is a pity about these persistent glitches. After registering on the mandrake site and finding i had to pay to post support queries i reasoned that this would be a deterrent to many new linux users, as it is to me. In order to make really significant inroads on the home desktop, a linux distro, in my view, will have to
 
a) have free installation cds widely advertised/available (or be pre-installed on home pcs - but this is unlikely because most new games are designed for windows - the 'qwerty' catch22 legacy problem)
 
have free, friendly support available in online forums
 
c) be smoothly/easily installed as dual boot with windows (still needed for gaming and legacy file access) partitions and
 
d)be easily configured for internet access.
 
Fedora core 1 fulfills a) but has so far failed to fully deliver c) and d) for me after about a week's tinkering. After searching the fedora-list archives and trying IRC #fedora without real success I found this site, and it seems to fulfill - but of course this is not exclusive to fedora and applies to all distributions/brands. Good reports of Debian, but seems a little too tech. for me, I seriously considered Mandrake which seems to be ahead in things like pre-configured auto-mounting of windows partitions, but the much more successful flotation of Redhat and its pole position as a known brand means Fedora may have one of the best chances of mainstream home user adoption if the kind of lack of clarity/simplicity which has prevented me from getting online through fedora or mounting windows partitions can be cleared up and clear configuration instructions posted in prominent places.
 
So I will now try your fstab solution, outstream, and report back here. Sorry for the long post, but it's my first on a linux site, and i wanted to express some of the frustrations and problems of a new non-technical would be linux user.

data/avatar/default/avatar37.webp

213 Posts
Location -
Joined 2004-01-02
Quote:/dev/hda1 /mnt/windows vfat auto,umask=0 0 0

'vfat - no such mount point'. I'm puzzled that fedora seems to think 'vfat' in the line is a directory when I assume by its position it is meant to recognise it as a filesystem instruction

This could be because there is not enough white space between the mount point and the file system name.

Quote:I considered installing Mandrake, but as it now costs to post on their official support forums,

There are Mandrake users who created their own forums when the fee was required. Here is one: http://mandrakeusers.org/

There are a number of forums similar to this one that cover many distros.
I go to http://linuxiso.org/forums/ as well as this one. I have seen many others. You do not need to pay for asking questions from Linux users...
8)

data/avatar/default/avatar27.webp

6 Posts
Location -
Joined 2004-01-29
The response when i put outstream's line:
 
dev/hd*/mnt/*** vfat defaults 0 0
(modified with my partitions and mount point/directories in place of the stars)
into my fstab file was as follows on reboot of Fedora:
 
mounting other file systems: mount:
mount point vfat does not exist
 
(three times, one response for each of my three fstab lines, then
 
starting automount: No mount point defined
 
I've also spent another couple of hours wrestling with redhat-config-network, trying to get my ethernet broadband connection , which works fine in windows, working, but I'll leave that for another thread when I've got more time.
 
Thanks for your response, Maillion, I've tried the various versions of the auto-mount line with a tab between the directories and vfat, and I even tried it with a tab between /dev/hda* and /mnt/******* as well, but that didn't work either. However Fedora's response does fit with your advice so I'll have another look at it.
 
Thanks to anyone else who may respond, it will probably be a few days before I can get back to this and plough on trying to get things set up, hopefully with a bit more advice, and I'll also try the other forums you mention Maillion, thanks.

data/avatar/default/avatar37.webp

213 Posts
Location -
Joined 2004-01-02
fezblog,
 
Well, I'm lost now! I hope you find the correct answer. good luck. 8)

data/avatar/default/avatar27.webp

6 Posts
Location -
Joined 2004-01-29
Not yet, thanks, but I'm still trying.
 
If anyone has successfully got fstab to auto-mount the windows fat32 partitions of their dual-boot system in Fedora Core 1.0, would you please be kind enough to post a copy of the fstab lines they are using, also, where they have created the mount point directories (I have tried sub-directories under mount, or in root under /).
 
Thanks.

data/avatar/default/avatar13.webp

39 Posts
Location -
Joined 2004-01-02
Code:
LABEL=/1                /                       ext3    defaults        1 1LABEL=/boot1            /boot                   ext3    defaults        1 2none                    /dev/pts                devpts  gid=5,mode=620  0 0LABEL=/home             /home                   ext3    defaults        1 2none                    /proc                   proc    defaults        0 0none                    /dev/shm                tmpfs   defaults        0 0LABEL=/tmp              /tmp                    ext3    defaults        1 2LABEL=/usr              /usr                    ext3    defaults        1 2/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0/dev/cdrom1             /mnt/cdrom1             udf,iso9660 noauto,owner,kudzu,ro 0 0/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0none                    /var/lib/jack/tmp       tmpfs   defaults         0 0/dev/hda1         /mnt/windows            vfat    defaults        0 0


Hi Fezblog,

Did this just now, I made sure that my windows partition was /dev/hda1, checked to make sure that /mnt/windows existed (forgot the first time I rebooted) :x and jsut to be on the safe side I did the editing in Vi, but I guess gedit should do the trick. The code is cut and pasted exactly as it appears - I can't remember if the spacing is significant, I'm not sure that it is.

Unfortunately for you, I can't see any difference here between the lines that Outstream posted and mine, I assume you made the changes to /etc/fstab as root.

hope you find the cause, coz it's worth it, fedora is pretty reasonable really for your everyday work and more if you are up to fiddling about.

data/avatar/default/avatar34.webp

52 Posts
Location -
Joined 2004-01-17
OP
fezblog would you paste your /etc/fstab here, so that we can see the real contents it has. i havent used fedora core yet but we all here will try to help u out.

data/avatar/default/avatar27.webp

6 Posts
Location -
Joined 2004-01-29
Hi y'all!
 
I haven't been online for a couple of days, thank you all so much for your helpful comments... I can't actually paste my automounting lines here although I have got that working now, because of my other problem - still can't get my broadband connection working through Fedora. So I can see, read and copy linux apps. and manuals I have downloaded from windows from my fat32 partitions, but I can't of course read things like my fstab file from win98. I don't know exactly why it suddenly started to work, but I think as someone suggested it was to do with leaving enough space between the items of the lines. I've just remembered what I actually did to get it working - *I copied the spacing of the cdrom automount line* when typing my hda(whatever) lines below. I had been using TAB to space the columns, but realised that the other lines used only several spaces between items - this seemed to be needed to make them work.
 
So thank you all, and if anyone has any thoughts on my network connection problem (broadband through a NIC) I've posted it here:
 
http://www.linuxcompatible.org/forums/viewtopic.php?t=1212
 
Thanks again to everyone.