LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 07-18-2015, 11:33 PM   #1
soborbon
LQ Newbie
 
Registered: Jul 2015
Posts: 1

Rep: Reputation: Disabled
Question 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.
 
Old 07-19-2015, 01:06 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Welcome to LQ!

Quote:
Originally Posted by soborbon View Post
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
 
Old 07-19-2015, 01:27 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
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".

Last edited by Didier Spaier; 07-19-2015 at 01:36 AM.
 
1 members found this post helpful.
Old 07-19-2015, 02:35 AM   #4
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Man Page

Quote:
Originally Posted by Didier Spaier View Post
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 ...

Code:
perldoc -F /usr/sbin/lilo-uuid-diskid
... which yields a well formatted man page.

Just FYI.
 
1 members found this post helpful.
Old 07-19-2015, 04:17 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
@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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Kernel Panic with generic kernel on Dell poweredge 2850 Slackware 14.1 Dieselchair Slackware 44 08-22-2014 06:46 PM
Kernel panic on boot with new SATA drive Slackware 12 kernel: 2.6.21.5 theapodan Linux - Hardware 3 05-18-2009 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 07:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration