LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to switch to the generic kernel (https://www.linuxquestions.org/questions/slackware-14/how-to-switch-to-the-generic-kernel-886634/)

Knightron 06-15-2011 11:29 PM

How to switch to the generic kernel
 
Quote:

Originally Posted by piratesmack (Post 4366164)
One thing I always do is switch to the vmlinuz-generic(-smp) kernel in /etc/lilo.conf and build an initrd (see /boot/README.initrd for details).

The "huge" kernel used by default is only meant for installing and not recommended for everyday use. It has a lot of drivers you don't need built-in and uses more RAM than the "generic" kernels.

Hi guys, still trying to find my feet and get to know Slackware. In one of my previous threads, 'things to do after installing' i was told the above message. When i installed, it used the huge kernel, but i'm unsure if that was the one that got installed. when i start slackware up, above the login screen it say, “wecome to Linux 2.6.37.6-smp (tty1)” I was wondering how to swich to the generic smp kernel, do I just change the vmlinuz to the desired, in lilo?

BCarey 06-15-2011 11:42 PM

You have two choices, you could either change lilo.conf to specifically point to the generic kernel, or you change the /boot/vmlinuz symlink to point to the generic kernel instead of the huge kernel. You will need to create an initrd and re-run lilo. If you are hesitant, you can create a new stanza in lilo.conf pointing to the generic kernel and keep the entry for the huge kernel.

If this sounds like gobbldy-gook repost and I or someone else can be more detailed as to how to do these things.

Brian

D1ver 06-15-2011 11:53 PM

Have a read through the lower half of '/boot/README.initrd'. There is an example command that will generate the initrd and it has an example of how to add it to your lilo.conf. It's a pretty simple process, you execute the one shell command to generate the initrd, add an entry to the bottom of your '/etc/lilo.conf' file and rerun lilo. It's a little intimidating first try though.


I'm sorry I can't give exact syntax as I'm at work on my Windows computer :(

Knightron 06-15-2011 11:54 PM

Thanks Brian, i think i might go for the lilo.conf way unless their's an advantage to the other? will i need to create an intrid if i do it this way? I don't know how to make an intrid. I was just skimming through the document on the slack dvd and the file about the intrid sounded daunting.

jamesf 06-16-2011 12:53 AM

You'll always need an initrd for a generic Slackware kernel. If you want to build one and add the option to use it to lilo then follow these directions. Copy the text from the Code: sections and paste it into the terminal you get in step 1.

1) Get to a command line, like XFCE Terminal or Konsole, and "su -" to root unless you run X as root.
2) Execute this command to add the lilo stanza:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh --lilo /boot/vmlinuz-generic-smp-2.6.37.6-smp >>/etc/lilo.conf
3) Execute this command to create an initrd:
Code:

$( /usr/share/mkinitrd/mkinitrd_command_generator.sh --run /boot/vmlinuz-generic-smp-2.6.37.6-smp )
4) Run lilo
Code:

lilo
5) Reboot.

You'll see a new option named 2.6.37.6(maybe something more). Arrow down to pick that option and hit enter. Your old kernel (huge) is the first option, and the default one when the time runs out and it boots automatically.

If you don't need to add any special modules for your hardware to the initrd and you don't need any special lilo options then you'll boot into a generic SMP kernel. If the boot fails just Ctrl-Alt-Del to reboot, or hold down Alt and the SysReq key and hit (while holding down Alt and SysReq the whole time) R E I S U B The mnemonic for that reboot is Raising Elephants Is So Utterly Boring.

If you've had to reboot because the generic SMP kernel failed then remember that the huge kernel is the first choice on the lilo screen.

Most don't need any special options or modules, so you'll probably work first time.

Good luck!

piratesmack 06-16-2011 01:12 AM

Alien Bob made a script that can help you

Run this and it will give you a command to create an initrd for your system:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
If using Slackware (32-Bit), this command will give you a menu entry for /etc/lilo.conf:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-smp-$(uname -r)
If using Slackware64, this command will give you a menu entry (Note: You might need to use this one on Slackware 32-Bit if your computer can't use the SMP kernel for some reason):
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-$(uname -r)
edit: jamesf was faster

brianL 06-16-2011 02:21 AM

Knightron
If you had scrolled down in that thread you got piratesmack's quote from, you might have noticed this:
http://www.linuxquestions.org/questi...0/#post4366389

Knightron 06-16-2011 03:27 AM

Quote:

Originally Posted by brianL (Post 4387233)
Knightron
If you had scrolled down in that thread you got piratesmack's quote from, you might have noticed this:
http://www.linuxquestions.org/questi...0/#post4366389


lol now i feel a little silly. Anyways guys, thankyou all, even you D1ver, i felt kinda bad before when i post a direct thanks to Brian and then by the time i'd published it, you'd also post, and it looked like i didn't care what you'd said.
I've successfully done it, i followed piratesmack's guide and have made a few personal edits so it's the default. Thanks heaps

brianL 06-16-2011 03:36 AM

Quote:

Originally Posted by Knightron (Post 4387289)
lol now i feel a little silly.

Don't worry about it. I've done a few (thousand...million?) silly things in my time. :)

D1ver 06-16-2011 05:52 AM

Quote:

Originally Posted by Knightron (Post 4387289)
lol now i feel a little silly. Anyways guys, thankyou all, even you D1ver, i felt kinda bad before when i post a direct thanks to Brian and then by the time i'd published it, you'd also post, and it looked like i didn't care what you'd said.
I've successfully done it, i followed piratesmack's guide and have made a few personal edits so it's the default. Thanks heaps

All good mate :) Glad to see you got it working.


All times are GMT -5. The time now is 12:08 AM.