[SOLVED] Unknown Device in fstab and mount Response
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I don't seem to have a problem, just a question that came up while trying to understand fstab.
I'm using SLES 11 SP3.
In the response to a mount inquiry, I see:
/dev/disk/by-id/scsi-360024e806d150f001a7d2f5c1b07a0f1-part2 on / type ext3 (rw,acl,user_xattr)
Presumably this refers to /dev/sda2 since that's where my Linux installation is. To confirm that, I looked in the /dev/disk/by-id directory. There I found a lot of symbolic links in that or similar format, one of which did point to /dev/sda2. But this one was not there. I can't find any reference to it outside of the mount output, /etc/fstab file, and /etc/mtab.
My reading suggests that this space is supposed to be occupied by the name of a "special block device," so I guess that even though it looks like a file name, it isn't really.
How could I find out more about that object? Suppose I didn't actually know that it is /dev/sda2. How could I find out what it is?
I'm slowly learning about this.
With the command
I can find the UUID for /dev/sda2:
linux-support:~ # /sbin/blkid /dev/sda2
/dev/sda2: UUID="c8852f0a-295a-4584-aa29-4dc9795d732d" TYPE="ext3"
And with the UUID in hand I can go the other way:
linux-support:~ # blkid -U c8852f0a-295a-4584-aa29-4dc9795d732d
But what I don't see a way to do is identify this block device from the entry in /etc/fstab, /etc/mtab, and the mount command output ("/dev/disk/by-id/scsi-360024e806d150f001a7d2f5c1b07a0f1-part2").
I guess I'd better tell the whole story...
There was a problem with this system. It had been used with a different HDD for a while and when we put this one back in, the RAID controller failed to import the configuration for it. We rebuilt the RAID configuration and then hit a problem where the grub menu.lst file wasn't pointing to the disk. It had the above /dev/disk/by-id value in it for "root" and was apparently unable to find the disk with it. Well, there's no symlink at that location, so I guess that's not a big surprise. Anyhow, we updated the menu.lst file with the symlink that currently points to /dev/sda2 and now the system works.
But, it still shows this value as the "thing" mounted at /. I say "thing" because I don't know what it is. Apparently, it's something that allows /dev/sda2 to get mounted because I can access /. But it doesn't appear to be a symlink.
It is usually easer to have fstab device identified by "UUID=xxxxxxx".
Even easier to use customized label names - though you do have to actually create and set the names yourself. ("LABEL=name").
See the manpage on fstab for details.
The issues with either UUID or dev/disk/by... is that they are set by udev, and recreating a filesystem will change the UUID, and you have to reset the number manually. You also have to do it for setting the label, but at least the label can be short, and relatively easy to remember.
It occurred to me that I don't know if those mounts that 'mount' reports and are in the mtab actually work. So I took them out of fstab and rebooted. The system came up fine without them, although swapon -s doesn't report any swap space. It turns out that even with those entries in fstab, swapon -n doesn't report any swap space, so I think the entries in fstab which used what look like non-existent symlinks had no effect except to fool mount and mtab into thinking they were mounted.
Now, with fstab specifying the mount for swap by UUID and not specifying anything mounted at /, the system seems fine. Neither the /etc/mtab file nor the /bin/mount output show the mounts at swap, but I guess I don't understand what they're good for.
linux-support:~ # cat /etc/fstab
UUID=6964fe9a-6481-4961-afe4-96a7029869ec swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
linux-support:~ # swapon -s
Filename Type Size Used Priority
/dev/sda1 partition 2103292 0 -1
linux-support:~ # mount
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sr0 on /media/SLES-11-SP3-DVD-x86_6407031 type iso9660 (ro,nosuid,nodev,uid=0)
Depends on the distribution. Fedora for instance, copies the fstab into the initrd. So even if you delete the fstab file, the same things still get mounted. And root (at a minimum) gets mounted by the initrd (based on the "root=...." parameter), and not the fstab.