LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How do I modify GRUB to boot using the generic kernel? (http://www.linuxquestions.org/questions/slackware-14/how-do-i-modify-grub-to-boot-using-the-generic-kernel-863073/)

Robert.Thompson 02-16-2011 10:01 AM

How do I modify GRUB to boot using the generic kernel?
 
Hello:

My Slackware boots using the huge kernel.

I am not using LILO; I am using GRUB from the extras directory on the DVD.

I followed the tutorial @ http://genek.net/LinuxAdventures/ins...ackconfig.html up to the point where it discusses modifying LILO.

My /boot/grub/menu.lst reads, in part:
Quote:

# Linux bootable partition config begins
title Slackware Linux on (/dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz root=/dev/sda7 ro vga=normal
# Linux bootable partition config ends
This boots the huge kernel.

What changes must I make to the above menu.lst entry to boot using the generic kernel?

Thanks for any advice on this,

Hannes Worst 02-16-2011 10:50 AM

Add the line "initrd /boot/initrd.gz" to your menu.lst. That is, if you made an initrd with your generic kernel. Good luck, it worked well at my machine. And you have to specify your generic kernel, like for instance /boot/vmlinuz-generic-2.6.33.4

bgeddy 02-16-2011 10:57 AM

Well first you'll obviously need to generate an initrd - if you've not done this you may use :
Code:

su -c "$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)"
Then change grub like so
Code:

# Linux bootable partition config begins
title Slackware LinuxHuge on (/dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz root=/dev/sda7 ro vga=normal
# Linux bootable partition config ends
# Linux bootable partition config begins
title Slackware LinuxGeneric on (/dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-generic-smp-2.6.33.4-smp root=/dev/sda7 ro vga=normal
initrd /boot/initrd.gz
# Linux bootable partition config ends

I would add the additional stanza rather than change the existing one so you have a fall back.

Robert.Thompson 02-16-2011 02:00 PM

Thank you for your help - my system now boots the generic kernel and I know because I ran T3slider's code: (http://www.linuxquestions.org/questi...kernel-856086/)
Code:

diff <(zcat /proc/config.gz) /boot/config-generic-smp-2.6.33.4-smp &>/dev/null && echo true || echo false
My result is: true :)

Thanks again,


All times are GMT -5. The time now is 11:34 PM.