Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some problems with mounting an ext3 usb-device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Adna rim
n00b
n00b


Joined: 24 Nov 2007
Posts: 10

PostPosted: Mon Dec 10, 2007 3:41 pm    Post subject: Some problems with mounting an ext3 usb-device Reply with quote

Hi folks,
I have a little problem here with mounting an ext3 partition (usb-device). I had this usb-device fat-formatted before I changed it to ext3. With fat I mounted it this way:
Code:
sudo mount -t vfat -o sync,uid=0,gid=46,umask=007 /dev/sdc1 /media/usb-stick

Which is correct. My user-account is member of plugdev(46) so I had rwx-rights in this device.

Now I wanted to change it to ext2 so I plugged it in and executed:
Code:

fdisk -l

Disk /dev/sdc: 1051 MB, 1051721728 bytes
32 heads, 63 sectors/track, 1018 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1018     1026112+   6  FAT16


You see it is on /dev/sdc1 so I executed sudo mkfs.ext2 /dev/sdc1 which runs without any errors.

But now there are two problems I have:
1.) How do I mount an ext2 partition with rights like I did with the fat-partition?
Code:

[16:32:44]bash:/$ sudo mount -t auto -o rw /dev/sdc1 /media/usb-stick
[16:35:05]bash:/$ ls -al /media/usb-stick/
insgesamt 24
drwxr-xr-x 3 root root  4096 2007-12-10 16:31 .
drwxr-xr-x 7 root root  4096 2007-12-10 10:38 ..
drwx------ 2 root root 16384 2007-12-10 16:31 lost+found
[16:35:41]bash:/$ touch /media/usb-stick/testfile
touch: can't touch „/media/usb-stick/testfile“ : Permission denied

So it seems like -o rw doesn't impress it :) How can I tell an ext2 partition while mounting which user/group shall have which rights?

2.) You see that after formatting I have the lost+found folder on the device which indicates more or less that it's ext2 formated. But if I execute fdisk -l it still shows FAT16 as System. Why is this so?

greets
Back to top
View user's profile Send private message
chanakam2000
Tux's lil' helper
Tux's lil' helper


Joined: 14 Sep 2006
Posts: 76

PostPosted: Mon Dec 10, 2007 4:11 pm    Post subject: Re: Some problems with mounting an ext3 usb-device Reply with quote

Try this

Code:
mke2fs  /dev/sdc1
Back to top
View user's profile Send private message
Adna rim
n00b
n00b


Joined: 24 Nov 2007
Posts: 10

PostPosted: Mon Dec 10, 2007 5:06 pm    Post subject: Reply with quote

I think mke2fs and mkfs.ext2 are the same. Theres no difference while executing them.
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Mon Dec 10, 2007 5:48 pm    Post subject: Re: Some problems with mounting an ext3 usb-device Reply with quote

Adna rim wrote:
drwxr-xr-x 3 root root 4096 2007-12-10 16:31 .


sudo chmod ag+w /media/usb-stick
or
sudo chown myuser /media/usb-stick
sudo chgrp users /media/usb-stick

By default the root dir of a partition will be formatted with the user (in this case root) who has started the mkfs program as owner and by his umask and you can only change.
In old unix system there are a special group of user allowed to write on removable device and nobody for those cases.
If you found it, the -g and -u options of tune2fs will be set only the owner of the reseved percentage (-m option)
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum