Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mounting a DOS partition in Linux

2 views
Skip to first unread message

Ian St. John

unread,
Oct 14, 2005, 10:33:31 PM10/14/05
to
Please help me, I'm rusty. I've partitioned my hard drive with a FAT
partition so that I can transfer files between WinXP and Linix. What lines
do I need to put into fstab and what mount commands do I use to access the
FAT partition in Linux.


Unruh

unread,
Oct 15, 2005, 2:38:13 AM10/15/05
to

/dev/hda7 /mnt/fat vfat rw,user,umask=0 0 0

And make sure that the directory /mnt/fat exists and is rwx for all.

It will mount automatically at boot.

Or do mount /mnt/fat


Robert Newson

unread,
Oct 15, 2005, 5:13:25 AM10/15/05
to
Ian St. John wrote:

----------------------------------------------------------------------------

Subject: Re: Write permission on Fat-Partition to Users

Tobias Portmann wrote:
> I have Debian 3.1 installed on my computer. I have also M$ XP. That I
> can use the MP3-Collection on both OS I made an FAT-Partition. On Debian
> the users have no write permition to the partition. How can I change
> this? edit the fstab File? This ist the fstab-entry for my Partition:
>
>>/dev/hda7 /music vfat defaults,user 0 2
>
> How can I change the permission, that every user can read and write?
>
> Thanks.

Question asked many times...

$ man mount
...
FILESYSTEM SPECIFIC MOUNT OPTIONS
...
Mount options for fat
(Note: fat is not a separate filesystem, but a common part
of the msdos, umsdos and vfat filesystems.)
...
uid=value and gid=value
Set the owner and group of all files. (Default: the
uid and gid of the current process.)

umask=value
Set the umask (the bitmask of the permissions that
are not present). The default is the umask of the
current process. The value is given in octal.

At boot time, the process that uses /etc/fstab to mount the fs's is running
as root, thus any [v]fat partition is mounted as uid=root, gid=root with
the default umask (usually 022 - meaning rwxr-xr-x).

If you don't care about anyone being able to write, use option umask=0
(rwxrwxrwx):

/dev/hda7 /mnt/fat vfat umask=0 0 2

Or if you want to allow only selected users to be able to write there (as I
have), create a vfat group on a free gid (eg 499) and add that with
umask=002 (rwxrwxr-x):

/dev/hda7 /mnt/fat vfat uid=0,gid=499,umask=002 0 2

and add users you want to write to the vfat partition to the vfat group.
-----------------------------------------------------------------------------
The 'user' option allows any user to mount the partition ('users' as per
user, but also allows any other user to umount the partition once a user has
mount'ed it). So unless you have option 'noauto' as well, 'user' isn't
much use as at boot time the partition is [effectively] mounted by root
(unless you umount it at some time).

Ian St. John

unread,
Oct 15, 2005, 4:53:13 PM10/15/05
to
"Unruh" <unruh...@physics.ubc.ca> wrote in message
news:diq84l$ekq$2...@nntp.itservices.ubc.ca...

Thanks very much for the help. That's about as I remember. Unfortunately,
this did not work in the current context which is Fedora Core 4. hda7 is not
recognized by HAL. The entries in fstab relate to 'Volumes'. I cannot find
relevant documentation within the Fedora Core Linux partition. I have no
Linux connectivity to the outside world. Linux Google is no help to me. At
this point I am completely stupid.


Enrique Perez-Terron

unread,
Oct 15, 2005, 9:40:02 PM10/15/05
to

I have FC4, and I have a fat partition which I mount like this:

sudo mount -o umask=0 /dev/hda1 /boot

If I want to mount it at boot time, I use

/dev/hda1 /boot vfat umask=0 0 0

in fstab.

I have no problems with HAL, and I think you should not have either.
What error messages do you get? What partition is it that holds your
fat file system? (I mean, what partition number on what disk?)

Would you mind posting the output of the comand

fdisk -l /dev/hda

or whatever disk you have partitioned?

What does your fstab look like?

What is the output of "lvscan"?

-Enrique

John Thompson

unread,
Oct 15, 2005, 11:05:08 PM10/15/05
to
["Followup-To:" header set to comp.os.linux.setup.]

On 2005-10-15, Ian St. John <ist...@noemail.usa> wrote:
> "Unruh" <unruh...@physics.ubc.ca> wrote in message
> news:diq84l$ekq$2...@nntp.itservices.ubc.ca...

>> /dev/hda7 /mnt/fat vfat rw,user,umask=0 0 0


>>
>> And make sure that the directory /mnt/fat exists and is rwx for all.
>>
>> It will mount automatically at boot.
>>
>> Or do mount /mnt/fat

> Thanks very much for the help. That's about as I remember. Unfortunately,
> this did not work in the current context which is Fedora Core 4. hda7 is not
> recognized by HAL.

You'll want to customize the line to match your system. What does "fdisk
-l /dev/hda" show? It will tell you which device holds your DOS
filesystem:

# fdisk -l /dev/hda

Disk /dev/hda: 12.0 GB, 12072517632 bytes
255 heads, 63 sectors/track, 1467 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 260 2088418+ b W95 FAT32
/dev/hda2 261 1467 9695227+ 5 Extended
/dev/hda5 261 746 3903763+ 83 Linux
/dev/hda6 747 989 1951866 83 Linux
/dev/hda7 990 1232 1951866 83 Linux
/dev/hda8 1233 1263 248976 82 Linux swap
/dev/hda9 1264 1467 1638598+ 83 Linux

On this machine, device /dev/hda1 has a FAT32 filesystem, so to mount this
automatically from /etc/fstab I use the line:

/dev/hda1 /mnt/win vfat umask=0000,rw,users 0 0

> The entries in fstab relate to 'Volumes'. I cannot find
> relevant documentation within the Fedora Core Linux partition.

fdisk can identify partitions either by volume name or device name. I use
device names here, thus "/dev/hda[nn]"


--

John (jo...@os2.dhs.org)

Harry Phillips

unread,
Oct 18, 2005, 9:09:06 AM10/18/05
to

Step 1. Open a web browser
Step 2. Type in the URL www.google.com
Step 3. Search for the terms "DOS mount linux"
Step 4. Think before you post again.

--
Regards,
Harry Phillips

Eric Moors

unread,
Oct 18, 2005, 10:36:32 AM10/18/05
to
Ian St. John wrote:

> "Unruh" <unruh...@physics.ubc.ca> wrote in message
> news:diq84l$ekq$2...@nntp.itservices.ubc.ca...
>> "Ian St. John" <ist...@noemail.usa> writes:
>>
>>>Please help me, I'm rusty. I've partitioned my hard drive with a FAT
>>>partition so that I can transfer files between WinXP and Linix. What
>>>lines do I need to put into fstab and what mount commands do I use to
>>>access the FAT partition in Linux.
>>
>> /dev/hda7 /mnt/fat vfat rw,user,umask=0 0 0
>>
>> And make sure that the directory /mnt/fat exists and is rwx for all.
>>
>> It will mount automatically at boot.
>>
>> Or do mount /mnt/fat
>
> Thanks very much for the help. That's about as I remember. Unfortunately,
> this did not work in the current context which is Fedora Core 4. hda7 is
> not recognized by HAL. The entries in fstab relate to 'Volumes'. I cannot

The volumes are linux lvm volumes I suppose.
If you have made an lvm volume with FAT, I doubt XP will be able to access
that. So get the proper partition from fdisk -l /dev/hda. It will have a
partition type called FAT-something or maybe HPFS/NTFS in the system column.

replace hda7 with whatever show up in the device column.

Eric

DenverD

unread,
Oct 18, 2005, 12:13:58 PM10/18/05
to
Harry Phillips wrote:

> Step 4. Think before you post again.

i'm new around..
sure hope i'm here long enough for you to ask a question needing
help..

i already have a helpful answer in mind..

DD

Harry Phillips

unread,
Oct 19, 2005, 9:59:32 AM10/19/05
to

Oh please, as if *that* question hasn't been asked, answered and
archived on Google groups ten thousand times already. If they can't find
the answer to the question they asked using Google they have no hope and
should slit their wrists now.

New around here, well I hope you stick around and answer the morons that
don't know Googles URL. Me, I never ask questions that I can find the
answer too using Google, this has two side effects:

1. I rarely ask questions,
2. Any I do ask you would have no hope of answering them.

In fact heres one, and yes I have tried Google already.

1. Machine is running an XP SOE loaded using Ghost 7.5 from a Ghost server.
2. The image was from a machine that had no Linux on it at all.
3. When I was loading the XP image I set the partition it was creating
to be smaller than the size of the HDD.
4. I installed Ubuntu from the 5.10 CD in the spare HDD space.
5. It can boot into Ubuntu over and over again, no problems,
6. It will boot into XP the first time no problems.
7. The next reboot (whether I login to the Novell network or not), the
machine cycles through the BIOS screen and a black screen.

Ok, Mr DenverD what is happening to my MBR? What is causing GRUB to hard
reboot the PC?

I already have the *workaround* of loading GRUB to a floppy and sticking
that in when I want to boot Linux, but that is not a solution.

--
Regards,
Harry Phillips

Simon.

unread,
Oct 19, 2005, 5:08:41 PM10/19/05
to
on Wed, 19 Oct 2005 23:59:32 +1000, Harry Phillips <tera...@tux.com.au> wrote
this wisdom:

Can you tell the BIOS to activate the virus check of the MBR and see exactly
what is changing it?

I suspect M$ of re-writing the MBR but YMMV.

--
Simon.

'Be Seeing You.
Who is number one?
I will not be pushed, filed, stamped, indexed, briefed, de-briefed or numbered.
Registered Linux User #300464 Machine Id #188886
Linux Counter - http://counter.li.org/
Remove the s.p.a.m to reply

goo...@tux.com.au

unread,
Oct 19, 2005, 7:01:59 PM10/19/05
to
Hi Simon,

No I can't, but I don't think it is XP itself. I have installed Ubuntu
many times on machines where I have used Ghost to get the current info
onto another HDD and back reducing the size of the partition. Most of
them have been XP and I have had no problems at all.

Two things are different on this machine that I suspect could be
related to the problem:
1. The Novell client is installed and I suspect that the IT dept have
it doing stuff in the background even if you have not logged on.
2. It has the Ghost client loaded, they can select your machine from a
remote location and it will reboot and ghost itself.

My money is on the second one because the PC has some sort of hidden
partition that it will use when ghosting using the remote method.

--
Regards,
Harry Phillips

haphzrd

unread,
Oct 27, 2005, 10:06:54 AM10/27/05
to
Ian St. John <ist...@noemail.usa> wrote:

Add to your /etc/fstab :

...

/dev/hda1 /mnt/windows vfat defaults 1 0

...

Obviously, make sure you replace "hda1" with the appropriate drive and
partition - as well you can specify your own mount point. Once you've
added this to your fstab, your FAT partition will be added automatically
to the mount you specified.

--
: :: : [ haphzrd ] : :: :

Harry Phillips

unread,
Oct 27, 2005, 4:15:08 PM10/27/05
to
haphzrd wrote:
> Ian St. John <ist...@noemail.usa> wrote:
>
>>Please help me, I'm rusty. I've partitioned my hard drive with a FAT
>>partition so that I can transfer files between WinXP and Linix. What lines
>>do I need to put into fstab and what mount commands do I use to access the
>>FAT partition in Linux.
>
>
> Add to your /etc/fstab :
>
> ...
>
> /dev/hda1 /mnt/windows vfat defaults 1 0
>

Hey look here is number 10,001 in the archive that the next person can
ignore and repeat the question.

--
Regards,
Harry Phillips

Enrique Perez-Terron

unread,
Oct 27, 2005, 6:04:48 PM10/27/05
to

Any particular one of the 10,000 earlier threads you would recommend reading?

-Enrique

onehapp...@yahoo.com

unread,
Oct 27, 2005, 6:12:27 PM10/27/05
to
Oh there are more than 10,001 posts...

http://groups.google.com/group/comp.os.linux.setup/about: at least
484,676 posts since the year 1994.

Activity has actually decreased to about half of what it used to be
since 2002.

Simon.

unread,
Oct 28, 2005, 12:56:10 PM10/28/05
to

Group as listed doesn't work - try removing the colon (:) at the end

0 new messages