Slackware Kernel Panic
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. |
Welcome to LQ!
Quote:
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:
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. |
Hi, welcome to this forum.
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". |
Man Page
Quote:
The command "/usr/sbin/lilo-uuid-diskid --help" suggested the following ... Code:
perldoc -F /usr/sbin/lilo-uuid-diskid Just FYI. |
@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. |
All times are GMT -5. The time now is 03:29 AM. |