You are not logged in.
I recently setup my /etc/fstab to mount by LABEL.
LABEL=ArchLinux / ext2 rw,noatime,errors=continue 0 0
LABEL=Data30GB /data ext2 rw,noatime 0 0
When I reboot, these two drives work fine. But I run the "mount" command and it shows:
/dev/disk/by-uuid/8fac6ab0-3d40-4676-bf30-b23c482b47b9 on / type ext2 (rw,noatime,errors=continue)
/dev/sdb1 on /data type ext2 (rw,noatime)
I'm curious, why does mount not list things by how the fstab shows them? By the way, I have other drives labeled and mounted by label and it shows the device (i.e. /dev/sdd1) instead of the LABEL as fstab shows on those as well.
Anyone know why?
Last edited by HuckleSmothered (2011-08-06 19:38:35)
Offline
The root partition "/" is mounted according to your Grub config in /boot/grub/menu.lst, so I'm guessing your Grub config specifies your root partition by UUID. Not sure about /data.
Offline
It's the initramfs's job to mount your root. If you want it mounted by the block device name, mkinitcpio supports reading "root=LABEL=<labelname>" or "root=UUID=<uuid>" syntax from the bootloader. blkid will resolve this to a raw block device and mount it as /dev/sdxy instead of the udev symlink.
Last edited by falconindy (2011-08-06 19:00:13)
Offline
Thank you both!
Changing the /boot/grub/menu.lst kernel line for "root=" to /dev/disk/by-label/ArchLinux" mounted it as such.
Changing the /boot/grub/menu.lst kernel line for "root=" to /dev/sda1 mounted it that way as well.
Still curious about the other drives that get mounted, such as my /dev/sdb1. And how it is listed in the fstab by LABEL but in "mount" as /dev/sdb1. Any suggestions on this?
Offline
LABEL= and UUID= aren't something the kernel understands -- they're tags interpreted by blkid that resolve to a device, e.g.:
$ blkid -lt LABEL=root -o device
/dev/sda2
This functionality is provided by util-linux's libblkid, which /bin/mount links against. In other words, that syntax in /etc/fstab is just a convenience feature.
Last edited by falconindy (2011-08-06 19:30:09)
Offline
Probably relates to what falconindy said above:
blkid will resolve this to a raw block device and mount it as /dev/sdxy instead of the udev symlink.
If you want it to show the mount by label, maybe just do what you did with Grub and put the /dev/disk/by-label path.
Offline
Ahh! I think I understand now. Not sure I was fully comprehending the 1st falconindy post. I think I do now and it makes sense in my head. I'm content, thank you for the explanations, they've helped!
Offline