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 12-31-2013, 03:04 AM   #1
joshua60
LQ Newbie
 
Registered: Dec 2013
Posts: 12

Rep: Reputation: Disabled
initrd.gz and Grub2


Hi,

I've been told not to use 'huge' kernel but 'generic'. See:

http://www.linuxquestions.org/questi...fs-4175489134/

I am using Grub2 as bootloader and now I would like that Grub2 automatically detects the 'generic' kernel. Is it possible? How do I have to rename initrd.gz?

Thanks for your help and 'Happy New Year'
 
Old 12-31-2013, 03:43 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,316

Rep: Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172
As you define the kernel with the "linux" statement, likewise for the "initrd" statement.
Documentation here.
 
Old 12-31-2013, 04:15 AM   #3
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Hello, I had a similar issue, and got help here.
 
Old 01-02-2014, 06:30 AM   #4
joshua60
LQ Newbie
 
Registered: Dec 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
I could run 'initrd initrd.gz' modifing grub.cfg but I got the following error:

No kernel modules found for linux 3.10.17.
mount: mounting /dev/sda8 on /mnt failed: no such device
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try to fix it. Type 'exit' when things are done.
/bin/sh: can't access tty; job control turned off.
 
Old 01-02-2014, 09:41 PM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
How did you generate that initrd.gz?
 
Old 01-03-2014, 03:06 AM   #6
joshua60
LQ Newbie
 
Registered: Dec 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
I used

/usr/share/mkinitrd/mkinitrd_command_generator.sh

and

mkinitrd -c -k 3.10.17-smp -m ext4 (README.initrd)

as well.
 
Old 01-03-2014, 03:51 AM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
Blog Entries: 15

Rep: Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118
It's not recommended you use the Huge kernel, but honestly it works fine. I've found that Huge, for me when I used Slackware, was a better choice as dealing with the initrd.gz was just bothersome and a needless extra step that was only for someone wanting a kernel with a lighter memory footprint which, in my needs didn't matter.

Just take the safe option and stick with Huge. You can also remove the generic kernel package from pkgtools and grub2 will only detect huge.
 
Old 01-03-2014, 12:48 PM   #8
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
Quote:
Originally Posted by joshua60 View Post
I used

/usr/share/mkinitrd/mkinitrd_command_generator.sh

and

mkinitrd -c -k 3.10.17-smp -m ext4 (README.initrd)

as well.
What does
Code:
echo $(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
show?

Which of those two commands did you run to create your initrd that was used to create that error message?

Could you also provide your /boot/grub/grub.cfg file contents?

Last edited by Richard Cranium; 01-03-2014 at 12:58 PM. Reason: Forgot to ask for grub.cfg
 
Old 01-03-2014, 12:49 PM   #9
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
Quote:
Originally Posted by ReaperX7 View Post
It's not recommended you use the Huge kernel, but honestly it works fine.
The OP didn't ask "How do I not use the generic kernel?"
 
Old 01-03-2014, 01:04 PM   #10
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
Also, Reaper, refer to your sig & remember that if you have all those drivers loaded in your kernel, you are primed to do many things, possibly poorly.
Regards,
Bill
 
Old 01-03-2014, 04:03 PM   #11
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
Blog Entries: 15

Rep: Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118Reputation: 2118
True, but since I've been using a custom kernel with LFS, some of my drivers are located within the kernel minus several modularized drivers for certain hardware like video cards, sound cards, etc.

I've also used the Huge kernel as a basis to base my custom kernels off of also. In truth you could also recompile generic with the driver for your specific file system and not even need the initrd.gz as we'll and leave the rest to udev.
 
Old 01-04-2014, 03:03 AM   #12
joshua60
LQ Newbie
 
Registered: Dec 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
What does
Code:
echo $(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
show?

bash-4.2# echo $(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
mkinitrd -c -k 3.10.17-smp -f ext4 -r /dev/sda8 -m usb-storage:xhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

Which of those two commands did you run to create your initrd that was used to create that error message?

I first run /usr/share/mkinitrd/mkinitrd_command_generator.sh
then I deleted /boot/initrd.gz and /boot/initrd-tree and run
mkinitrd -c -k 3.10.17-smp -m ext4. Both gave the same error.

Could you also provide your /boot/grub/grub.cfg file contents?
Sure, here it is:

menuentry 'Slackware Linux (Slackware 14.1) (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-2b64bf4d-d3b8-428d-81ce-516636141ac6' {
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 --hint='hd0,msdos8' 2b64bf4d-d3b8-428d-81ce-516636141ac6
else
search --no-floppy --fs-uuid --set=root 2b64bf4d-d3b8-428d-81ce-516636141ac6
fi
linux /boot/vmlinuz-generic-3.10.17 root=/dev/sda8
initrd /boot/initrd.gz
}

I would like to state that huge kernel is fine for me too.

Thanks
 
Old 01-04-2014, 07:50 AM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
What does running the command
Code:
ls -l /boot/initrd-tree/dev/sda*
as root show?

Last edited by Richard Cranium; 01-04-2014 at 07:53 AM. Reason: wrong command given
 
Old 01-04-2014, 07:54 AM   #14
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
You don't happen to have /boot on its own partition, do you?
 
Old 01-04-2014, 10:35 AM   #15
joshua60
LQ Newbie
 
Registered: Dec 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
What does running the command
Code:
ls -l /boot/initrd-tree/dev/sda*
as root show?
bash-4.2# ls -l /boot/initrd-tree/dev/sda*
brw-rw---- 1 root disk 8, 0 Jan 2 12:03 /boot/initrd-tree/dev/sda
brw-rw---- 1 root disk 8, 1 Jan 2 12:03 /boot/initrd-tree/dev/sda1
brw-rw---- 1 root disk 8, 10 Jan 2 12:03 /boot/initrd-tree/dev/sda10
brw-rw---- 1 root disk 8, 11 Jan 2 12:03 /boot/initrd-tree/dev/sda11
brw-rw---- 1 root disk 8, 12 Jan 2 12:03 /boot/initrd-tree/dev/sda12
brw-rw---- 1 root disk 8, 13 Jan 2 12:03 /boot/initrd-tree/dev/sda13
brw-rw---- 1 root disk 8, 14 Jan 2 12:03 /boot/initrd-tree/dev/sda14
brw-rw---- 1 root disk 8, 2 Jan 2 12:03 /boot/initrd-tree/dev/sda2
brw-rw---- 1 root disk 8, 3 Jan 2 12:03 /boot/initrd-tree/dev/sda3
brw-rw---- 1 root disk 8, 4 Jan 2 12:03 /boot/initrd-tree/dev/sda4
brw-rw---- 1 root disk 8, 5 Jan 2 12:03 /boot/initrd-tree/dev/sda5
brw-rw---- 1 root disk 8, 6 Jan 2 12:03 /boot/initrd-tree/dev/sda6
brw-rw---- 1 root disk 8, 7 Jan 2 12:03 /boot/initrd-tree/dev/sda7
brw-rw---- 1 root disk 8, 8 Jan 2 12:03 /boot/initrd-tree/dev/sda8
brw-rw---- 1 root disk 8, 9 Jan 2 12:03 /boot/initrd-tree/dev/sda9
bash-4.2#

---------- Post added 01-04-14 at 04:35 PM ----------

Quote:
Originally Posted by Richard Cranium View Post
You don't happen to have /boot on its own partition, do you?
No, I don't!
 
  


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
[SOLVED] setting up initrd / generic kernel in Grub2...can't load generic Ubunoob001 Slackware 12 03-20-2015 08:32 AM
[SOLVED] OpenSuSe12.3 - Help Fix Grub2 Syntax Errors (was - Replace Grub2 w/ Lilo) enorbet SUSE / openSUSE 9 12-08-2013 05:09 AM
grub2 can't see my win 7 partition and yast2 bootloader can't reinstall grub2 jjrojaspy SUSE / openSUSE 5 07-07-2013 11:38 PM
kcm-grub2 - No valid GRUB2/BURG installation could be detected cristi92b Linux - Newbie 2 06-14-2012 09:01 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 03:39 PM

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

All times are GMT -5. The time now is 10:52 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
Open Source Consulting | Domain Registration