[HLUG] mounting EXT2

Mark Broadbent markb at wetlettuce.com
Tue Jan 17 20:26:24 GMT 2006


Emon wrote:

>Hi all
>
>I had the following line in my /etc/fstab
>
>/dev/hda14  /mnt/hd/MAGIC-STORE vfat  uid=1000,gid=100,fmask=133
> 1  0
>
>but I just converted the partition to EXT2, and now the line is
>
>/dev/hda14  /mnt/hd/MAGIC-STORE ext2  defaults  1  0
>
>but now I get read-only access to the partition; one way around
>it is to change the "defaults" option to "noauto,user" but then
>I will have to manually mount the partition every time.
>
>So is there any way to mount it automatically at boot time &
>also give me read-write access??
>
>I tried reading the man pages for "mount" & "tune2fs" but failed
>to notice anything helpful, may be I missed something......
>  
>

I suspect that your trying to write to the device as a user rather than 
root.  As vfat has no concept of user ids you supplied it with one that 
set the user and group id for the whole partition.  As ext2 is a native 
UNIX type filesystem it understands ids that Linux uses and by default 
the root directory will be owned by uid 0 (i.e. root) so if you want to 
use from a normal user account then you'll have change that id.  Put 
simply, with the partition mounted execute the following command (as root):

# chown -r 1000.100 /mnt/hd/MAGIC-STORE

Then it'll behave exactly as before.

As has been mentioned by other people, ext3 is much preferred over ext2 
in most situations and there is no significant performance impact (at 
least not with the difference in performance of hard disks and 
processors at present).

Thanks
Mark



More information about the Herefordshire mailing list