Guest Plisgyn Posted December 2, 2006 Report Share Posted December 2, 2006 I have several hard disks in caddies which plug into one receptacle in my PC, the disks are Vfat and ext2/ext3. What I need to do is be able to supermount each disk to a different mount point depending on the disk label. My first problem is to label the disks, in MLCC Mount Points I can add a Label to the fstab entry but how do I write a label to the disk it self. Any help will be gratefully received. Phil Jones [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 3, 2006 Report Share Posted December 3, 2006 With ext2/ext3 partitions you can use the: e2label command. Not sure about writing labels to FAT32. Quote Link to comment Share on other sites More sharing options...
Guest Plisgyn Posted December 4, 2006 Report Share Posted December 4, 2006 (edited) Thanks I have now labeled my ext2/ext3 disks and my Vfat disk shows a label in Windows but not in Linux, I think this is because the label is i.e in hdc rather than hdc1. I still have the problem getting the system to mount the removeable disk on different mount points according to label. Phil Jones Edited December 4, 2006 by Plisgyn Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 4, 2006 Report Share Posted December 4, 2006 Any particular reason why you want to mount by label, rather than the partition information? I've still been trying to figure out what benefits it has mounting via label, than /dev/hdax or whatever :P I honestly think it'd be better to mount by the partition, for example: mount /dev/hda1 /mnt/fatpartition assuming hda1 is the partition of course, just an example. /etc/fstab can be edited accordingly with this information to auto-mount where necessary. Quote Link to comment Share on other sites More sharing options...
Guest Plisgyn Posted December 5, 2006 Report Share Posted December 5, 2006 The problem is a I have several disks ext2/3 and vfat in caddies, and when any disk is plugged in to my sole PC receptacle they are all seen as as hde1. This is why I need labels unless you know another way I can mount different disks on various mount points. Quote Link to comment Share on other sites More sharing options...
emmanuel_uk Posted December 5, 2006 Report Share Posted December 5, 2006 -L label Mount the partition that has the specified label. -U uuid Mount the partition that has the specified uuid. These two options require the file /proc/partitions (present since Linux 2.1.116) to exist. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 5, 2006 Report Share Posted December 5, 2006 As I mentioned, ext2/ext3 can be mounted by label. I've also just checked, and you cannot mount vfat/Fat32 partitions by label. The command in Linux for creating labels on DOS type partitions, or FAT/FAT32/VFAT if you like is: mlabel do: man mlabel to read up on it. However, when reading the man page for mount command, it can only mount by label for ext2/ext3 and xfs. Maybe even reiserfs too, but definitely not vfat type partitions. Quote Link to comment Share on other sites More sharing options...
emmanuel_uk Posted December 5, 2006 Report Share Posted December 5, 2006 Is uuid a linux thing only? I do not do windows, so do not know At boot time in mdv both label and uuid are displayed. I suppose for the vfat, a bit of scripting might do the trick Say once it is mounted on default mountpoint a script looks at the label and mount the HD on another location... I believe uuid are unique, but label not necessarily Quote Link to comment Share on other sites More sharing options...
Guest Rick Posted December 11, 2006 Report Share Posted December 11, 2006 I have a usb thumbdrive that is labeled. I'm able to mount it by label by having the following line in my /etc/fstab. /dev/disk/by-label/THUMBDRIVE /mnt/thumbdrive vfat noauto,umask=0,user 0 0 I don't know why that wouldn't work with the mount command directly. Give it a shot... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.