LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-12-2016, 06:50 AM   #1
chexmix
Member
 
Registered: Apr 2002
Location: Arlington, MA
Distribution: Slackware, Debian, OpenBSD
Posts: 246
Blog Entries: 16

Rep: Reputation: 25
initrd not being read correctly by grub?


Hi all -

I have noticed since switching to grub that the modules added by mkinitrd (jbd2, mbcache, ext4) fail to load at boot. I'd post the bootup messages, but I can't find them in dmesg output.

They don't show up in the output of lsmod.

When I look at the entries in /boot/grub/grub.cfg, I see

Code:
menuentry 'Slackware-14.2 GNU/Linux' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea' {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea
        else
          search --no-floppy --fs-uuid --set=root 5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea
        fi
        echo    'Loading Linux 4.4.9 ...'
        linux   /boot/vmlinuz-huge-4.4.9 root=UUID=5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea ro  
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.gz
}
... why 'msdos'? Is this causing the loading of ext4, mbcache and jbd2 to fail?

Thanks,

Glenn
 
Old 05-12-2016, 07:08 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
msdos is the partition type.
 
Old 05-12-2016, 07:41 AM   #3
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

You are booting a huge kernel, maybe the problem is some kind of conflict. Try not loading the initrd with the huge kernel and then try booting a generic kernel with the initrd, then compare.
 
Old 05-12-2016, 07:42 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by chexmix View Post
Hi all -

I have noticed since switching to grub that the modules added by mkinitrd (jbd2, mbcache, ext4) fail to load at boot. I'd post the bootup messages, but I can't find them in dmesg output.

They don't show up in the output of lsmod.
It's not grub, you're using kernel huge which has drivers as built-in, not as modules
 
Old 05-12-2016, 07:48 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Normally, the initrd for a specific kernel is created for that specific kernel.

The initrd for each contains things that may be specific to that kernel (either by version number, driver identification, specific drivers included/missing).

The initrd for the huge kernel would/should not try to load modules that are already built in - it WILL cause problems.

A generic kernel should use a generic initrd...
 
Old 05-12-2016, 07:48 AM   #6
chexmix
Member
 
Registered: Apr 2002
Location: Arlington, MA
Distribution: Slackware, Debian, OpenBSD
Posts: 246

Original Poster
Blog Entries: 16

Rep: Reputation: 25
OK. Why is the initrd not getting read correctly? or maybe the boot messages are spurious?

I've been having lots of issues with my Slackware installs lately, and have a large project due Saturday -- would love to start getting them ironed out. Since this one seems fundamental, I'm starting here.
 
Old 05-12-2016, 07:49 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
The boot messages MAY be spurious in that the initrd is directing the installation of modules that don't apply to that kernel.

It MAY be more serious if the boot doesn't complete.
 
Old 05-12-2016, 07:54 AM   #8
chexmix
Member
 
Registered: Apr 2002
Location: Arlington, MA
Distribution: Slackware, Debian, OpenBSD
Posts: 246

Original Poster
Blog Entries: 16

Rep: Reputation: 25
I think you folks hit it. Back in a few ...
 
Old 05-12-2016, 08:02 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
Quote:
Originally Posted by chexmix View Post
OK. Why is the initrd not getting read correctly?
Because, as others have already pointed out, there is no need to load as modules drivers that are already included in the kernel.

In other words, you can either use:
  • a huge kernel without an initrd.
  • or a generic kenel with an initrd.
Using an initrd with a huge kernel, although probably harmless, is pointless. Why are you doing that?
 
1 members found this post helpful.
Old 05-12-2016, 09:08 AM   #10
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by Didier Spaier View Post
Because, as others have already pointed out, there is no need to load as modules drivers that are already included in the kernel.

In other words, you can either use:
  • a huge kernel without an initrd.
  • or a generic kenel with an initrd.
Using an initrd with a huge kernel, although probably harmless, is pointless. Why are you doing that?
Sometimes, a minimal initrd is useful for catching hardware errors. The initrd IS, after all, a minimal root system and can be used to rebuild/recover a system.
 
Old 05-12-2016, 10:09 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
The initrd IS, after all, a minimal root system and can be used to rebuild/recover a system.
Yes, and that is the case for the Slackware installer. But I don't see a need for that in the issue brought by the OP.

Last edited by Didier Spaier; 05-12-2016 at 10:11 AM.
 
Old 05-12-2016, 10:18 AM   #12
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
No - that just looks like adding things to an initrd that aren't appropriate for that specific kernel, or just using the wrong initrd.
 
Old 05-12-2016, 11:55 AM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
If you want to use a generic kernel with an initrd with grub2, see https://www.linuxquestions.org/quest...ml#post5078462
 
Old 05-12-2016, 12:01 PM   #14
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,613
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
Quote:
Originally Posted by chexmix View Post
Hi all -

I have noticed since switching to grub that the modules added by mkinitrd (jbd2, mbcache, ext4) fail to load at boot. I'd post the bootup messages, but I can't find them in dmesg output.

They don't show up in the output of lsmod.

When I look at the entries in /boot/grub/grub.cfg, I see

Code:
menuentry 'Slackware-14.2 GNU/Linux' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea' {
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea
        else
          search --no-floppy --fs-uuid --set=root 5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea
        fi
        echo    'Loading Linux 4.4.9 ...'
        linux   /boot/vmlinuz-huge-4.4.9 root=UUID=5b9e6f1c-e84c-4b09-b9f6-0cacb682f2ea ro  
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.gz
}
... why 'msdos'? Is this causing the loading of ext4, mbcache and jbd2 to fail?
The modules that grub loads are modules for the grub kernel. For example, part_msdos is the module that reads the partition table of a msdos-partitioned disk (i.e. a traditional disk with an mbr).

What modules get loaded into your Linux kernel once it's loaded depends on how the kernel reads your hardware and what you have in your initrd's /etc/modprobe.d directory.
 
Old 05-12-2016, 07:43 PM   #15
chexmix
Member
 
Registered: Apr 2002
Location: Arlington, MA
Distribution: Slackware, Debian, OpenBSD
Posts: 246

Original Poster
Blog Entries: 16

Rep: Reputation: 25
Quote:
Originally Posted by chexmix View Post
I think you folks hit it. Back in a few ...
OK. More than a few, but not quite solved ...

I've removed what I thought was everything having to do with the 'huge' kernel from my system, re-ran both 'grub-install' and 'grub-mkconfig' ... and when I try to boot the first selection presented to me upon restarting, I find that the menu entry still has 'huge' where it should have 'generic'.

Of course I can edit it upon boot, but that's a drag. And I'd love to know where 'grub-mkconfig' is getting its information (somewhere in /etc/grub.d/ I guess). I could also disobey the orders at the top of grub.cfg and edit it directly, but I assume those edits would be overwritten next kernel upgrade when I have to run 'grub-mkconfig' again.

Next I'm going to try uninstalling and re-installing the grub package, in case something is set during that process.

- Glenn
 
  


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
gentoo : grub: The file /boot/boot/grub/stage1 not read correctly Boudewijn Linux - Software 3 05-21-2008 03:13 AM
The file /boot/grub/stage1 not read correctly. snowsquirrel Linux - General 6 02-27-2006 07:18 AM
Grub, initrd and new kernel (2.6.10) wilu Linux - Newbie 3 02-25-2005 06:28 AM
GRUB - initrd !?? gr33ndata Linux - Newbie 6 03-09-2004 03:57 PM
Grub and initrd.img homestead1000 Linux - Software 2 07-25-2003 02:39 PM

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

All times are GMT -5. The time now is 09:34 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