LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-01-2016, 06:21 PM   #1
tuubaaku
Member
 
Registered: Oct 2004
Distribution: Slackware, Mint
Posts: 122

Rep: Reputation: 16
14.1 usb boot stick kernel panic


I'm on 14.1, 32-bit, with a generic smp kernel and initrd. I'm using lvm and ext4. I tried creating a usb boot stick with the Slackware setup script, but when I try booting it I get the following error:
kernel panic - not syncing: VFS: unable to mount root fs on unknown block (0,0)

I'm thinking that maybe the USB stick needs an initrd, but the script doesn't create one? Does that sound right? If that's the issue, is there a good way to create a boot stick that won't cause the kernel panic? Any thoughts?

Thanks.
 
Old 06-01-2016, 07:45 PM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Kernel wants to mount / before USB is initialized, add rootwait to your kernel command line.
 
Old 06-01-2016, 08:15 PM   #3
tuubaaku
Member
 
Registered: Oct 2004
Distribution: Slackware, Mint
Posts: 122

Original Poster
Rep: Reputation: 16
Thanks, Emerson.

I tried booting with a special kernel command with the rootwait option, and the boot messages did show that it was waiting for root. Unfortunately, after waiting a few minutes, nothing happened, so that doesn't seem to be the issue.

Any other thoughts?
 
Old 06-01-2016, 09:50 PM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,449
Blog Entries: 15

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
You're using a generic kernel. Try a huge kernel. You probably have a driver issue.
 
1 members found this post helpful.
Old 06-02-2016, 04:41 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,005

Rep: Reputation: Disabled
The script that creates the boot stick is /var/log/setup/setup80-make-bootdisk.

It copies vmlinuz to the USB stick, but no initrd.

Rationale as I understand it:

This script's main purpose is to make an "emergency" boot stick, allowing you to start Slackware in case where the boot loader can't do that for some reason after installation. When you run it during the "CONFIGURE" step after a fresh installation, vmlinuz is a symlink to a huge kernel, so there is no need for an initrd.

If you want to run this script after installation (for instance from "pkgtool") you could:
  • either tentatively make of /boot/vmlinuz a symlink to a huge kernel,
  • or modify the script to make it copy your initrd to the boot stick and adapt the config files of the boot loaders accordingly.
The first way is simpler and faster, the second could be a learning exercise

Last edited by Didier Spaier; 06-02-2016 at 05:37 AM.
 
Old 06-02-2016, 07:37 PM   #6
tuubaaku
Member
 
Registered: Oct 2004
Distribution: Slackware, Mint
Posts: 122

Original Poster
Rep: Reputation: 16
OK, I tried making a boot disk with the huge kernel, but I still got the same error.

The second option of copying the initrd over and updating the config - is that the only way to make this work? Has anyone else had trouble with an LVM/ext4 boot disk, or does this work for everyone else?
 
Old 06-03-2016, 12:46 AM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,449
Blog Entries: 15

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Check your fstab. It might need to be set to mount by UUID rather than a device name node.
 
Old 06-03-2016, 02:45 AM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,005

Rep: Reputation: Disabled
Quote:
Originally Posted by tuubaaku View Post
OK, I tried making a boot disk with the huge kernel, but I still got the same error.

The second option of copying the initrd over and updating the config - is that the only way to make this work? Has anyone else had trouble with an LVM/ext4 boot disk, or does this work for everyone else?
We miss precise information to help you. Please indicate at least the content of /etc/fstab and of /etc/lilo.conf and the output of "df -h".
 
Old 06-03-2016, 03:03 AM   #9
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Code:
kernel panic - not syncing: VFS: unable to mount root fs on unknown block (0,0)
This is clear message kernel has no drivers to access root device, what's in fstab is irrelevant at this stage of boot. You need all modules loaded which are needed to mount USB and access the root filesystem and you probably still need the rootwait option.
 
Old 06-03-2016, 04:48 AM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,005

Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Code:
kernel panic - not syncing: VFS: unable to mount root fs on unknown block (0,0)
This is clear message kernel has no drivers to access root device, what's in fstab is irrelevant at this stage of boot. You need all modules loaded which are needed to mount USB and access the root filesystem and you probably still need the rootwait option.
At this time we do not know what the problem is. So please do not provide "solutions" not knowing what the problem is (the kernel panic is a symptom, no more) and do not discourage the OP to provide information that could be useful. The content of /etc/fstab is relevant.

@tubaaku: knowing how LVM is set is needed as well.
 
Old 06-03-2016, 05:01 AM   #11
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,449
Blog Entries: 15

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Kernel panic for vfs means that the root file system driver doesn't exist at boot, which is why I directed you to use the Huge kernel. The vmlinuz copied should be the vmlinuz-huge version. Checksum the huge kernel with the copied file and make sure its equal. If needed, try using the initrd with busybox and mdev to preload a few tools and extra modules if needed.
 
Old 06-03-2016, 05:23 AM   #12
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
At this time we do not know what the problem is. So please do not provide "solutions" not knowing what the problem is (the kernel panic is a symptom, no more) and do not discourage the OP to provide information that could be useful. The content of /etc/fstab is relevant.

@tubaaku: knowing how LVM is set is needed as well.
Please do not talk unless you know what you are talking about.
Code:
unable to mount root fs on unknown block (0,0)
This (0,0) indicates the device is not accessible. Or, in case of UEFI boot root= parameter is not passed to the kernel. In case the partition table is not recognized or root filesystem is not supported by given kernel the numbers are not zero any more.
 
Old 06-03-2016, 07:08 AM   #13
tuubaaku
Member
 
Registered: Oct 2004
Distribution: Slackware, Mint
Posts: 122

Original Poster
Rep: Reputation: 16
Thanks for the replies. I will post back later with more information and/or results.
 
Old 06-04-2016, 03:18 PM   #14
aaazen
Member
 
Registered: Dec 2009
Posts: 357

Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
The script that creates the boot stick is /var/log/setup/setup80-make-bootdisk.

It copies vmlinuz to the USB stick, but no initrd.
Maybe the script should copy vmlinuz-huge instead of vmlinuz?

Last edited by aaazen; 06-05-2016 at 03:22 PM. Reason: Remove my wild goose chasing speculations
 
Old 06-04-2016, 04:05 PM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,005

Rep: Reputation: Disabled
mlin
Quote:
Originally Posted by comet.berkeley View Post
Maybe the script should copy vmlinuz-huge instead of vmlinuz?
I don't think so:
  • This script is supposed to be used just after installation, and at this point vmlinuz is a symlink to the huge kernel anyway.
  • If it is used later, the user can just tentatively modify the symlink if need be.
This being said I am not the decider.

Quote:
While we are at it, I found another bug in setup80-make-bootdisk in Slackware64-current.

When running from an install DVD (running busybox) then the syslinux command fails at line 208:

Code:
   syslinux -s /dev/$STICK 1> /dev/null 2> /dev/null
The syslinux command requires run time libraries which are not available.
Code:
#ldd /usr/bin/syslinux
        linux-vdso.so.1 (0x00007fff5819f000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f058053f000)
        /lib64/ld-linux-x86-64.so.2 (0x000055a1475a2000)
To run syslinux the script needs to do something like this:

1) mount --bind /dev /mnt/dev
2) chroot /mnt
3) syslinx ..[/q
o
wish list: If only syslinux had a -r option like lilo.
Not sure about that. I am puzzled because I get another output of ldd on slackware-current:
Code:
bash-4.3$ ldd syslinux
        linux-gate.so.1 (0xb77e7000)
        libc.so.6 => /lib/libc.so.6 (0xb7615000)
        /lib/ld-linux.so.2 (0x800bf000)
It's not the same arch but I doubt that fundamentally changes something. Anyway I will makee some tests tomorrow

Last edited by Didier Spaier; 06-04-2016 at 05:12 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
installing slackware on usb-stick with kernel panic rasidrasid Slackware - Installation 4 01-24-2014 07:31 AM
use alternate kernel from USB stick boot prompt nickboarder27 Slackware 2 05-14-2010 08:09 PM
How to find which drivers - configure kernel to boot off a USB stick without initrd Couling Linux - General 4 10-30-2009 09:04 PM
Kernel Panic with USB stick as >only< linux partition(s) shinobi_dude Linux - Newbie 3 04-18-2007 09:10 AM
usb boot not working ! kernel panic mandrakemikael Feather 12 01-31-2005 10:32 AM

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

All times are GMT -5. The time now is 01:36 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration