Mounting of USB sticks (not formatted as FAT32/NTFS)
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mounting of USB sticks (not formatted as FAT32/NTFS)
I mostly format them as FAT32 or NTFS. So when I insert them, most DEs will pop up a box to mount the volume (or can be done from a file manager directly). In any event the normal user can read/write.
I've noticed that when the stick is formatted as ext3/4, reiserfs etc, that read/write is possible only as root.
I realise one of the options would be to add an entry in fstab, but I think this would remove the ability for all sticks to be mounted as /media/<format label>. What other options are there?
I've noticed that when the stick is formatted as ext3/4, reiserfs etc, that read/write is possible only as root.
i aint got that problem. but my wm (e17, fluxbox...) doesnt do automounting the way you described (might be one may set it that way, for me it doesnt).
therefor i dont think much about it an am not that sure bout the following "internals" of mounting:
user is member of plugdev?
you have tried pmount?
have you tried mounting it in the users /home-directory?
making an entry in fstab, commenting it out and mounting the ext3/ext4 usb-stick after uncommenting the line with mount -a would be an option/possible at all?
for following posts you might tell which OS and which window-manager/desktop-environment you are using.
The usb stick was formatted with: mkfs.ext4 -L label /dev/sdd (tried it both in Fedora and Arch Linux)
I've tried on:
Laptop - Debian Sid (32-bit) and Gnome (Automount)
Desktop - Debian Sid (64-bit) and KDE (Click the File Manager icons that appears)
Desktop - Arch Linux (64-bit) and KDE (Click the File Manager icons that appears)
Desktop - Fedora 12 Beta (64-bit) and KDE (Click the File Manager icons that appears)
MythTV - Debian Testing (32-bit) and Gnome (Automount)
In all of them, after it mounts, a non-root user cannot write to it. And cannot read files that are copied onto the stick by root.
I use ext2 (not ext3) with no trouble and no fstab entry. But previously, when I used the default MS formating, I often had a read-only mount occurring: this was always due to some fault having developed in the filing system. So, try fsck and see if that helps.
Now I like to consider myself as an accomodating kind of guy. So i thought I would go looking for this LiveCD for the distro called "in a god damn". I trawled the internet without much luck. So eventually I settled on a PCLinuxOS LXDE LiveCD (I hope this will not be an issue for you).
So I put that stick in. Fired up the LXDE file mananger (pcmanfm). It recognised it. Clicked on it. It showed the files on the stick. Tried to copy a file onto it. No go.
So then I did the following while in the LiveCD environment
mke2fs 1.41.6 (30-May-2009)
/dev/sdd is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=euroTEK
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
62976 inodes, 251904 blocks
12595 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=260046848
8 block groups
32768 blocks per group, 32768 fragments per group
7872 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
My ext3 USB disk automounts just fine. It always has done, with every distro I've used.
Quote:
The usb stick was formatted with: mkfs.ext4 -L label /dev/sdd
This is a strange way to format a linux disk. And your choice of label is bad - it might not always be /dev/sdd so use a better label like Disgo or USB16GB to avoid future confusion.
You really should partition it first with fdisk /dev/sdwhatever , make one partition, using the whole disk space if you like.
Then format it: mkfs.ext4 -L label /dev/sdwhatever1
Windows (FAT32 / ntfs) doesn't seem to mind if the disk is partitioned or not. Linux does.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.