LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-17-2015, 01:58 AM   #1
bandrami
LQ Newbie
 
Registered: Nov 2013
Location: Mumbai
Distribution: Slackware, Alpine
Posts: 16

Rep: Reputation: Disabled
Initrd not being run on boot from LILO


I created an initrd with the command:

Quote:
mkinitrd -c -k 3.10.17-smp -r /dev/sda1 -m ext4 -f ext4 -h /dev/sda2 -u -o /boot/initrd-3.10.17-smp.gz
(I also tried using the output from the helper script in /usr/share/mkinitrd/, which just added some input modules I don't use to the -m list; same problem happens with that.)

And added this entry to lilo.conf

Code:
image=/boot/vmlinuz-generic-smp-3.10.17-smp
  initrd = /boot/initrd-3.10.17-smp.gz
  root = /dev/sda1
  label = generic-smp
  read-only
/sbin/lilo then runs without complaint.

On reboot, the kernel declares a VFS error and then spews several pages of panic information; the exact same behavior as when you try to boot a -generic kernel without an initrd at all.

And, in fact, after I gunzip and cpio the the initrd, and edit the init script to put some "canary" output and pauses, re-cpio and gzip, and re-run lilo (again, without complaints), the exact same problem happens.

As far as I can tell, the initrd simply isn't being run, at all. Is there a better way to figure out what's actually going on?

(Editing to add: I switched to grub2, which I loathe, and it booted fine, so it's not a corrupted initrd or anything.)

Last edited by bandrami; 01-17-2015 at 02:17 AM.
 
Old 01-17-2015, 02:09 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,260
Blog Entries: 11

Rep: Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237
Try this as the -m option...

Code:
-m mbcache:jbd2:ext4
...if that doesn't work post some of the actual error messages.
 
Old 01-17-2015, 02:19 AM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,313

Rep: Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949
+1 to what astrogeek said to the extra modules. You need this for the ext4 file system.

Did you install LILO to the MBR?
If so, do you have
Code:
boot = /dev/sda
in the global section of /etc/lilo.conf?

Please post the full contents of /etc/lilo.conf for us to check.
 
Old 01-17-2015, 02:20 AM   #4
bandrami
LQ Newbie
 
Registered: Nov 2013
Location: Mumbai
Distribution: Slackware, Alpine
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by astrogeek View Post
Try this as the -m option...

Code:
-m mbcache:jbd2:ext4
...if that doesn't work post some of the actual error messages.
Yeah, those were also in the module list from the mkinitrd helper script; same problem (and I've never needed them on any other machine so I tend to just drop them).

I'll be happy to post the actual error message if somebody wants to give me a time-stopping device so that I can fully read them before the panic dump floods the screen. It's definitely the normal VFS "I can't find a root" problem. And, more importantly, I'd like a way to convince myself the initrd is actually being loaded because it definitely doesn't seem to be.
 
Old 01-17-2015, 02:23 AM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,260
Blog Entries: 11

Rep: Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237
Do you have more than one disk drive in your system, or do you have any usb devices plugged in at boot?
 
Old 01-17-2015, 02:33 AM   #6
bandrami
LQ Newbie
 
Registered: Nov 2013
Location: Mumbai
Distribution: Slackware, Alpine
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
+1 to what astrogeek said to the extra modules. You need this for the ext4 file system.

Did you install LILO to the MBR?
If so, do you have
Code:
boot = /dev/sda
in the global section of /etc/lilo.conf?

Please post the full contents of /etc/lilo.conf for us to check.
Code:
append="resume=/dev/sda2 vt.default_utf8=0"
boot = /dev/sda

bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255

prompt
timeout = 1200
change-rules
  reset

vga = 895

image = /boot/vmlinuz-generic-smp-3.10.17-smp
  initrd = /boot/initrd-3.10.17-smp.gz
  root = /dev/sda1
  label = generic
  read-only

image = /boot/vmlinuz-huge-3.10.17
  root = /dev/sda1
  label = stock
  read-only
That is, exactly the sort of lilo.conf I've used on dozens of other machines over the past several years without any problem (including the one I'm posting from). But I can't figure out why loading an initrd would be hardware-dependent.

Again, if I make an initrd with an init shell that just prints "badger" and pauses for 30 seconds, this doesn't actually happen from LILO (but does if I switch to GRUB). I'm looking for a way to figure out if my initrd is actually being loaded and its init run.
 
Old 01-17-2015, 02:35 AM   #7
bandrami
LQ Newbie
 
Registered: Nov 2013
Location: Mumbai
Distribution: Slackware, Alpine
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by astrogeek View Post
Do you have more than one disk drive in your system, or do you have any usb devices plugged in at boot?
No to both questions (actually I suppose the touchscreen and webcam are on the USB bus, so there's that -- all my other slackware machines don't have those fancy gizmo's so that's a thought).
 
Old 01-17-2015, 02:46 AM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,260
Blog Entries: 11

Rep: Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237
I always use an initrd and have never had any particular problem, so I am not sure how to answer your question about how to tell if it actually loaded... I am playing around with borking one now... let you know what I figure out...

Could you post your fstab as a sanity check?
 
Old 01-17-2015, 02:49 AM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,313

Rep: Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949
Your /etc/lilo.conf looks OK.
Quote:
mkinitrd -c -k 3.10.17-smp -r /dev/sda1 -m ext4 -f ext4 -h /dev/sda2 -u -o /boot/initrd-3.10.17-smp.gz
What happens if you drop the -h option ?
 
Old 01-17-2015, 03:42 AM   #10
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,260
Blog Entries: 11

Rep: Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237Reputation: 3237
Well, after trying a few ways of breaking a generic/initrd boot on a stock 14.1 install, I do not have any great insights.

But I do think that your initial conclusions were correct - it is probably not loading the initrd. Since lilo does not seem to complain about installing the MBR with it, and grub2 (cold sweats) uses it, the initrd is probably OK.

mkinitrd claims to be smart enough to include the mbcache and jbd2 modules for the ext4 fs, and indeed that works on my test machine, which also confirms that the initrd is probably OK.

I also assume that you are running lilo from the "stock" huge stanza, so that you do successfully boot that way - could you just confirm that for my own reference, please.

So I am beginning to wonder if you might have drive or memory error, a corrupted MBR... not really sure where to go with that line of thought.

Also just for sanity... this is definitely MBR partitioning, not GPT and no EFI entanglements?

If it were me, I would run a memtest, then I would boot into the huge kernel and verify every /dev/sdx to be double certain everything is what you think it is, and cross check fstab. I also use uuids for all mounts, lilo references and in my initrd -r, you might consider that.

Other than that I don't have any ready ideas...

Last edited by astrogeek; 01-17-2015 at 03:44 AM.
 
Old 01-17-2015, 04:14 AM   #11
bandrami
LQ Newbie
 
Registered: Nov 2013
Location: Mumbai
Distribution: Slackware, Alpine
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by astrogeek View Post
I also assume that you are running lilo from the "stock" huge stanza, so that you do successfully boot that way - could you just confirm that for my own reference, please.

So I am beginning to wonder if you might have drive or memory error, a corrupted MBR... not really sure where to go with that line of thought.

Also just for sanity... this is definitely MBR partitioning, not GPT and no EFI entanglements?

If it were me, I would run a memtest, then I would boot into the huge kernel and verify every /dev/sdx to be double certain everything is what you think it is, and cross check fstab. I also use uuids for all mounts, lilo references and in my initrd -r, you might consider that.
Good points. Yes, it does successfully boot the stock huge kernel fine. (And, irritatingly, grub2 boots everything without a problem.) And this is plain old MBR, no GPT, no EFI, just like when the triceratopses roamed the plains.

(Hmm. Now that I say that, this BIOS lets me enable "legacy" booting but doesn't have an option to preclude any EFI booting... but then again this is i486 so LILO shouldn't know what that is, but let me dig around on that.)

/me shrugs. Since grub works I will probably end up just writing this off as a weird interaction between lilo and the hardware. I just had never seen a problem like this before.

Edit for an idea: I'm going to try a 3.18-family kernel I packaged recently and see how that works.

Thanks for your ideas!

Last edited by bandrami; 01-17-2015 at 04:17 AM.
 
Old 01-17-2015, 04:16 AM   #12
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
Tossing a dart... perhaps try adding a wait (-w) of a couple seconds to ensure the drive has spun up.
 
Old 01-17-2015, 07:16 AM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,527

Rep: Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882Reputation: 1882
Quote:
Originally Posted by bandrami View Post
Yeah, those were also in the module list from the mkinitrd helper script; same problem (and I've never needed them on any other machine so I tend to just drop them).

I'll be happy to post the actual error message if somebody wants to give me a time-stopping device so that I can fully read them before the panic dump floods the screen. It's definitely the normal VFS "I can't find a root" problem. And, more importantly, I'd like a way to convince myself the initrd is actually being loaded because it definitely doesn't seem to be.
If you have a cell phone with a camera, try taking a movie of the boot screen.
 
Old 01-17-2015, 12:51 PM   #14
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys for decades while testing others to keep up
Posts: 2,508

Rep: Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562
I am wondering why if, as it appears, that the only reason you "require" an initrd is for ext4 support, you would choose to add such complexity when simply enabling the needed modules at kernel level solves all these issues? Granted it takes longer to rebuild a kernel than to run mkinitrd but once it's done you never have to do it again, unlike mkinitrd... and the bonus is you have a simpler, more reliable system.
 
Old 01-17-2015, 01:16 PM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,101

Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
I am wondering why if, as it appears, that the only reason you "require" an initrd is for ext4 support, you would choose to add such complexity when simply enabling the needed modules at kernel level solves all these issues? Granted it takes longer to rebuild a kernel than to run mkinitrd but once it's done you never have to do it again, unlike mkinitrd... and the bonus is you have a simpler, more reliable system.
I fail to see what makes a system that doesn't use an initrd simpler and more reliable. What's sure instead is that having a built-in driver prevents to blacklist it, but you could need to avoid that a device be held by the wrong driver. Bear in mind that some devices can be claimed by several drivers, and it's good to be able to choose which one will be used. But of course that can need to provide the modules in an initrd.

Last edited by Didier Spaier; 01-17-2015 at 01:27 PM.
 
  


Reply

Tags
boot, initrd, kernel, lilo


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
WHen I rebooted my laptop it is stuck at "initrd /boot/initrd.img Shadowmeph Linux - Newbie 2 03-07-2014 04:03 PM
one initrd for each lilo entry? metageek Slackware 4 02-18-2012 12:35 PM
[SOLVED] Edit lilo.conf, run /sbin/lilo, but lilo won't take changes lukameen Slackware 2 02-10-2012 01:10 PM
need help with initrd in lilo.conf hapter Linux - General 2 02-15-2006 08:36 AM
lilo / initrd stuff Dr Croubie Linux - General 1 06-25-2005 04:37 AM

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

All times are GMT -5. The time now is 07:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration