![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2006
Beans: 34
Ubuntu 6.06
|
Howto: Mount you external ext disk using volume labels
Having more than one external drive makes it difficult to mount them at the same point if you plug and unplug this drives in different orders.
For example the first external usb drive attached will always get the device /dev/sda the second /dev/sdb, etc a fstab line like Code:
/dev/sda1 /media/usb120gb ext3 defaults 0 0 /dev/sdb1 /media/usb300gb ext3 defaults 0 0 At least with following filesystems you can easily get this fixed: ext2, ext3, XFS, JFS,Reiserfs. Just do Code:
tune2fs -L usb120gb /dev/sda1 tune2fs -L usb300gb /dev/sdb1 Check with: dumpe2fs Then you can (auto)mount them the right way using following fstab: Code:
LABEL=usb120gb /media/usb120gb ext3 defaults 0 0 LABEL=usb300gb /media/usb300gb ext3 defaults 0 0 |
|
|
|
|
|
#2 | |
|
Ubuntu addict and loving it
![]() Join Date: Feb 2005
Location: Melbourne, Australia
Beans: 7,085
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: Mount you external ext disk using volume labels
Quote:
Also, I would recommend that "dumpe2fs" be used with the "-h" parameter to cut down on the screen output. Very handy HOWTO.
__________________
Regards, David. The Forum search function is useful for immediate help (give it a try).
Please mark your thread as "Solved" (using the Thread Tools) when appropriate. |
|
|
|
|
|
|
#3 |
|
A Carafe of Ubuntu
![]() Join Date: Mar 2006
Location: San Francisco
Beans: 106
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: Mount you external ext disk using volume labels
THIS is exactly what I was looking for! Who knew it would be this simple?
OK...maybe not SO simple! I am running Kubuntu Breezy on an HP zd7015 notebook and I have three external USB disks. Two of these disks are formatted with ext3 filesystems, while the third is formatted with the vfat/fat32/whatever filesystem. For some reason I can't get fstab to recognize the label for this drive. Here is the error I get when trying to set it again with tune2fs: rickstone@kubuntu:~$ tune2fs -L Media_Drive /dev/sdc1 tune2fs 1.38 (30-Jun-2005) tune2fs: Permission denied while trying to open /dev/sdc1 Couldn't find valid filesystem superblock. Here is my fstab file: # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/hda3 / reiserfs notail,atime,auto,rw,dev,exec,suid,nouser 0 1 /dev/hda1 /media/hda1 ntfs defaults,uid=0,gid=0,auto,rw,nouser 0 0 /dev/hda2 none swap sw 0 0 /dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0 LABEL=MEDIA_DRIVE /media/Media_Drive vfat ,uid=1000,gid=1000,auto,rw,users 0 0 LABEL=Big_Boy /media/Big_Boy ext3 ,atime,auto,rw,nodev,noexec,nosuid,users 0 0 LABEL=Little_Big_Boy /media/Little_Big_Boy ext3 ,atime,auto,rw,nodev,noexec,nosuid,users 0 0 /dev/sdd2 /media/ipod vfat ,uid=1000,gid=1000,auto,rw,users 0 0 Any ideas? Thanks in advance and thanks again for a great howto! |
|
|
|
|
|
#4 |
|
Way Too Much Ubuntu
![]() |
Re: Howto: Mount you external ext disk using volume labels
To the best of my knowledge, vfat (fat32) does not support labeling, as per the output:
Code:
rickstone@kubuntu:~$ tune2fs -L Media_Drive /dev/sdc1 tune2fs 1.38 (30-Jun-2005) tune2fs: Permission denied while trying to open /dev/sdc1 Couldn't find valid filesystem superblock. |
|
|
|
|
|
#5 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2006
Beans: 34
Ubuntu 6.06
|
Re: Howto: Mount you external ext disk using volume labels
As said before this is only for these filesystems:
ext2, ext3, XFS, JFS,Reiserfs not vfat, ntfs, hfs+, etc. But there are other ways to accomplish it more generically: Here is a link which may help you: http://gentoo-wiki.com/HOWTO_Customi...digital_camera |
|
|
|
|
|
#6 |
|
A Carafe of Ubuntu
![]() Join Date: Mar 2006
Location: San Francisco
Beans: 106
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: Mount you external ext disk using volume labels
Thanks for the responses. I have to say that the UDEV wiki bit I think is a little over my head as I couldn't get it to work.
SO...what I'm wondering is why I couldn't simply replace this line: LABEL=MEDIA_DRIVE /media/Media_Drive vfat ,uid=1000,gid=1000,auto,rw,users 0 0 with this: UID="the_UID_of_this_drive" /media/Media_Drive vfat ,uid=1000,gid=1000,auto,rw,users 0 0 ? So, I did. I found the UID of the drive (can't remember now the command but it was something in the UDEV wiki listed above) and it doesn't work. I guess I don't understand why I couldn't use another parameter in place of LABEL? I didn't type the UID in quotes as I did above, either. I'm at work, so not in front of my (home) computer with the appropriate info. Is there another unique parameter that I could use in place of LABEL, or is this something that is simply not going to work with a vfat drive? I kind of want to keep one drive formatted as such, as I still have to have XP on this machine for music writing/recording stuff. |
|
|
|
|
|
#7 |
|
A Carafe of Ubuntu
![]() Join Date: Mar 2006
Location: San Francisco
Beans: 106
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: Mount you external ext disk using volume labels
Like I said above, I'm not at home, but I did run across this article:
http://ubuntu.wordpress.com/2006/03/...-using-mtools/ Might be the answer? Anybody tried this? |
|
|
|
|
|
#8 |
|
Just Give Me the Beans!
![]() Join Date: Feb 2005
Location: Switzerland / Hong Kong
Beans: 68
Ubuntu Breezy 5.10
|
Re: Howto: Mount you external ext disk using volume labels
I have a reiserfs external disk and edit the label with reiserfstune (Breezy). Then I tried to add
LABEL=MyDisk /media/MyDisk reiserfs defaults 0 0 in /etc/fstab. The problem is that I cannot write on the mounted disk, unless I am root... I would like any user on the computer to be able to write on the disk root... Which options should I add? Thx
__________________
BOFH excuse: The cause of the problem is: Bad user karma. |
|
|
|
|
|
#9 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2006
Beans: 34
Ubuntu 6.06
|
Re: Howto: Mount you external ext disk using volume labels
With the disk mounted do:
Code:
chown -R root:yourusergroupname /media/thenameofthemountedreiserfs chmod -R g+w /media/thenameofthemountedreiserfs |
|
|
|
|
|
#10 |
|
A Carafe of Ubuntu
![]() Join Date: Mar 2006
Location: San Francisco
Beans: 106
Ubuntu 9.04 Jaunty Jackalope
|
Re: Howto: Mount you external ext disk using volume labels
Whoa Nelly!
What is the "chmod g+w" bit? Can you explain? I'm having permissions problems on just ONE of my reiserfs drives...of course the drive that holds my music collection and I need to make changes to tags fairly often and get the wonderful glass-breaking sound an an error popup that actually doesn't tell me what the error is! |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|