Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
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.
I recently installed Slackware 14.1 on a USB hard disk. The root directory is in the first primary partition, /dev/sdb1. I installed only the base system, Part A. I configured LILO to boot from the root directory on /dev/sdb1. Slackware started to boot, meaning that LILO found vmlinuz and loaded initrd. After a few screens full of messages, a kernel panic dump filled the screen.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block (8.17)
When installing Slackware, I mounted the root filesystem to /mnt with no problem at all, and viewed the directories under the root. So I could do a mount myself, but the kernel couldn't do the same mount during the boot process. That doesn't make sense.
How could the kernel not mount the root fs, when it already loaded vmlinuz and initrd from a sub-directory on the root fs? /boot/vmlinuz is located on the root fs.
What could possibly be wrong with the installation? I installed only the base system, nothing fancy, and I followed the installation steps in setup to the letter.
Then I turned to VirtualBox to see if I could be more successful. But VirtualBox wouldn't even boot a kernel on the first Slackware iso disk. I tried booting hugesmp.s and huge.s. Both failed. The VirtualBox problem is less important at this moment than the above problem of booting from a USB hard disk.
I recently installed Slackware 14.1 on a USB hard disk. The root directory is in the first primary partition, /dev/sdb1. I installed only the base system, Part A. I configured LILO to boot from the root directory on /dev/sdb1. Slackware started to boot, meaning that LILO found vmlinuz and loaded initrd. After a few screens full of messages, a kernel panic dump filled the screen.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block (8.17)
...
How could the kernel not mount the root fs, when it already loaded vmlinuz and initrd from a sub-directory on the root fs? /boot/vmlinuz is located on the root fs.
What could possibly be wrong with the installation? I installed only the base system, nothing fancy, and I followed the installation steps in setup to the letter.
It is most likely due to the disk receiving a different /dev/sdx path assignment during boot than during installation. The device assignments are created by the kernel and are not always the same in different boot contexts.
The kernel is not loaded "from a sub-directory on the root fs" because there is no filesystem available before the kernel loads (hence the term boot!). The kernel is loaded as an absolute offset location on the disk stored in the boot loader by lilo. So the kernel loads, the device paths are assigned and then mounted, at which point the kernel panics because it cannot find the root partition.
The easy way to resolve this would be to change the root device specifications in lilo.conf and /etc/fstab to use the device UUID instead of /dev/sdb1. To do that...
Quote:
1. Boot into the Slackware installation disk
2. Mount the root partition of the drive
3. chroot into the mounted partition
4. Get the root device UUID by ls -l /dev/disk/by-uuid/...
5. Edit /etc/lilo.conf and change root = /dev/sdb1 to root = "UUID_FROM_STEP_4" (quoted as shown)
6. Edit /etc/lilo.conf change boot = /dev/sdb(1) to boot = /dev/disk/by-id (of device)
7. Edit /etc/fstab and change /dev/sdb1 / ... to UUID=UUID_FROM_STEP_4 / ... (unquoted as shown)
Run lilo and reboot...
It is not clear from your post whether lilo is installing the boot loader to the MBR or the root partition, so be sure to use the same actual device for the boot = ... parameter.
Last edited by astrogeek; 07-19-2015 at 01:24 AM.
Reason: typos, clarity
Maybe in /etc/fstab you told to mount /dev/sdb1 as / (your root partition) but as this is a removable device its name can change after reboot. Name it with UUID instead. "blkid" or "lsblk -o name,size,fstype,uuid" will tell you the UUID of this partition, then see instead of /dev/sdb1 in /etc/fstab write for instance UUID=<the UUID for /dev/sdb1>
Also, USB disks needs some time to spin and before during that time the data are not yet accessible, so it's not bad to append a "rootdelay=15" for instance in the stanza for this system in /etc/lilo.conf.
PS: I typed too slow...
PPS you can convert automatically /dev/sdX to "UUID=" also in /etc/lilo.conf. Just run lilo-uuid-diskid as root, see "man lilo-uuid-diskid".
Last edited by Didier Spaier; 07-19-2015 at 01:36 AM.
Just run lilo-uuid-diskid as root, see "man lilo-uuid-diskid".
Thanks for suggesting this command. This command was new to me and I wanted to read about it so I tried "man lilo-uuid-diskid" but the man page couldn't be found in Slackware64 14.0. Still couldn't find the man page after executing makewhatis.
The command "/usr/sbin/lilo-uuid-diskid --help" suggested the following ...
@TracyTiger: the perloc commands works also in Slackware version 14.1. I just see slight ordering and formatting differences, and the man page has a "COPYRIGHT and LICENCE" paragraph and the author's email address.
Just in case (as you probably already know that) I remind that the lilo version shipped in Slackware version 14.0 can't handle big kernels, so if you want to use it to add a stanza for 14.1 or incoming 14.2 you should first upgrade lilo.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.