Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel installation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri May 02, 2003 6:39 am    Post subject: Kernel installation Reply with quote

Sorry if this post is out of topic, but it was the only one i found close to my subject.

Why in all gentoo installation documents or references no one speak about the "make install" in kernel compilation ?

IE: From http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chap15
Code listing 15.2: Compiling the Linux Kernel

# cd /usr/src/linux
# make menuconfig
# make dep && make clean bzImage modules modules_install
# cp /usr/src/linux/arch/i386/boot/bzImage /boot


There is a "make install" in kernel that install the kernel image without need to copy it, it works for lilo and grub (i use grub), you just have an error about lilo, but it works.

The kernel "make install" does a great job for you, it will
- Copy your configuration file to /boot as a backup with your kernel configuration (ie: config-2.4.20-gaming-r1)
- Install the bzImage to /boot as vmlinuz-"kernel version" (ie: vmlinuz-2.4.20-gaming-r1)
- Install the link in /boot to vmlinuz that point to the latest kernel (ie: vmlinuz-2.4.20-gaming-r1)
- Install the link in /boot to System.map that point to latest System.map file (ie: System.map-2.4.20-gaming-r1)
- Backup all the files with .old (config-2.4.20-gaming-r1.old ...)
- Update lilo to point to new kernel (unverified, taking that from my memory, but i'm not sure, i have switch to grub times ago)

With that you can use many kernels without having troubles, the common gentoo method works of course but anytime you compile a new kernel your old one is removed, as /boot/bzImage is overwrite !

With the "make install" you can have sererals kernels ready to run.
For example in grub.conf you can have that :
Title Gentoo Linux Latest kernel
root (hd0,1)
kernel /vmlinuz root=/dev/sdb1

Title Gentoo Linux Gaming r1
root (hd0,1)
kernel /vmlinuz-2.4.20-gaming-r1 root=/dev/sdb1

Title Gentoo Linux Gaming r3
root (hd0,1)
kernel /vmlinuz-2.4.20-gaming-r3 root=/dev/sdb1
...

I don't really remember where i get the "make install" instructions, but it work nicelly for me, you should
1/ give it a try
2/ talk about it to other users as that method is more secure for installation (prevent loosing a working bzImage kernel by overwriting it with a new bzImage that could end in kernel panic !)

So i suggest an update to :
# cd /usr/src/linux
# make menuconfig
# make dep && make clean bzImage modules modules_install
# make install
Back to top
View user's profile Send private message
Jimbow
Guru
Guru


Joined: 18 Feb 2003
Posts: 597
Location: Silver City, NM

PostPosted: Fri May 02, 2003 7:24 am    Post subject: Reply with quote

Good suggestion. I got around the problem of overwriting /boot/bzImage by:
Code:
 cp arch/i386/boot/bzImage /boot/Gentoo-VERSION-MY_VERSION
cp .config /boot/config/Kernel-Config-VERSION-MYVERSION

Works for me. :)

Sometimes I recompile my kernel a lot. The EXTRAVERSION variable in the Makefile can be used to distinguish between different kernel builds from the same source. This will keep the module libraries separate which makes backing out to a previous version a better bet.
_________________
After Perl everything else is just assembly language.
Back to top
View user's profile Send private message
platypus
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2003
Posts: 91

PostPosted: Fri May 02, 2003 9:09 am    Post subject: Reply with quote

well you don't HAVE to copy it to /boot/bzImage.
i create a different name for each kernel i have.
its not to difficult
you just copy the bzImage to /boot/bzImage-2.5.68 or something
and then create a new menu entry in the grub.conf file.
i mean i guess its easier with the make install, but i usually end up in the grub.conf file anyway trying to pass kernel boot parameters so i don't mind too much.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri May 02, 2003 7:00 pm    Post subject: Reply with quote

I think you misunderstood me

I'm not a noob, i know how to use "cp"... I didn't want a way to solve how to install a kernel without loosing previous one for me.
This is an helper for starters, i should have also put that in the grub.conf to show u how it's easy and safe for learners...

# As .old is the previous one, this is the kernel the person use to boot his linux box and build the new kernel...
title Gentoo Previous Working Kernel
root (hd0,1)
kernel /vmlinuz.old root=/dev/sdb1

Understand why it's easier and safer now ? With a grub.conf like that, you even prevent learners from editing grub.conf again and again (and so prevent errors)

All that with one command, no "cp .boot..." ...

ps: ok i'm a n00b (i just saw what is attach to my nick :D )
Back to top
View user's profile Send private message
Jimbow
Guru
Guru


Joined: 18 Feb 2003
Posts: 597
Location: Silver City, NM

PostPosted: Fri May 02, 2003 7:42 pm    Post subject: Reply with quote

Ya but ... what happens when they change their config and rebuild the kernel?

It is very possible (perhaps likely) that the new module library won't work with the .old kernel. Isn't this just giving n00b's a false sense of security?

If you change the EXTRAVERSION variable in the makefile then the old module libraries will stay intact.
_________________
After Perl everything else is just assembly language.
Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Fri May 02, 2003 7:48 pm    Post subject: Reply with quote

krinn wrote:
I think you misunderstood me

I'm not a noob, i know how to use "cp"... I didn't want a way to solve how to install a kernel without loosing previous one for me.
This is an helper for starters, i should have also put that in the grub.conf to show u how it's easy and safe for learners...


so then this should be in Doc's, Tips and Tricks?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum