Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Compile new kernel (2.6.5-mm6) and keep previous kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
x86processor
n00b
n00b


Joined: 07 Apr 2004
Posts: 14

PostPosted: Mon May 10, 2004 6:39 am    Post subject: Compile new kernel (2.6.5-mm6) and keep previous kernel Reply with quote

Hi!

I have 2.6.5-mm1 kernel installed on my Thinkpad T41 and it works great. I did emerge sync and then emerge -uDav world and it updated my portage and installed 2.6.5-mm6 kernel.

Question 1:
I would like to know how I should proceed to compile and add 2.6.5-mm6 to the grub.conf and still keep my previous kernel. If you can give me step-by-step instructions it would be very useful. My /usr/src/linux points to /usr/src/kernel-2.6.5-mm1.

Question 2:
If I were to reconfigure my 2.6.5-mm1 kernel and compile it again, how should I do this so as to keep my old configuration and the new configuration in grub.conf. Step-by-step instructions will be handy.

Question 3:
Is it ok to leave the 2.6.5-mm6 as I am quite pleased with 2.6.5-mm1?

My /boot/grub/grub.conf
Quote:

/*contents of /boot/grub/grub.conf*/
/*Code listing 6: grub.conf for GRP genkernel users*/
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.5-mm1
root (hd0,0)
kernel (hd0,0)/kernel-2.6.5-mm1 root=/dev/hda3 vga=791
initrd (hd0,0)/initrd-2.6.5-mm1

Thanks,

x86
Back to top
View user's profile Send private message
Rainmaker
Veteran
Veteran


Joined: 12 Feb 2004
Posts: 1650
Location: /home/NL/ehv/

PostPosted: Mon May 10, 2004 6:44 am    Post subject: Re: Compile new kernel (2.6.5-mm6) and keep previous kernel Reply with quote

x86processor wrote:
Hi!

I have 2.6.5-mm1 kernel installed on my Thinkpad T41 and it works great. I did emerge sync and then emerge -uDav world and it updated my portage and installed 2.6.5-mm6 kernel.

Question 1:
I would like to know how I should proceed to compile and add 2.6.5-mm6 to the grub.conf and still keep my previous kernel. If you can give me step-by-step instructions it would be very useful. My /usr/src/linux points to /usr/src/kernel-2.6.5-mm1.


Well, you don't HAVE to. Usually these minor versions don't offer THAT much new.

Step by step:

mount /boot/
cd /usr/src/
ln -sf kernel-2.6.5-mm6 linux
cd linux
genkernel all

Add to grub.conf:
title=Gentoo Linux 2.6.5-mm6
root (hd0,0)
kernel (hd0,0)/kernel-2.6.5-mm6 root=/dev/hda3 vga=791
initrd (hd0,0)/initrd-2.6.5-mm6

You will now have 2 options when booting into GRUB

Quote:


Question 2:
If I were to reconfigure my 2.6.5-mm1 kernel and compile it again, how should I do this so as to keep my old configuration and the new configuration in grub.conf. Step-by-step instructions will be handy.


cd /usr/src/
ln -sf kernel-2.6.5-mm6 linux
cd linux
cp ../kernel-2.6.5-mm1/.config .config
make oldconfig

Quote:

Question 3:
Is it ok to leave the 2.6.5-mm6 as I am quite pleased with 2.6.5-mm1?

My /boot/grub/grub.conf
Quote:

/*contents of /boot/grub/grub.conf*/
/*Code listing 6: grub.conf for GRP genkernel users*/
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.5-mm1
root (hd0,0)
kernel (hd0,0)/kernel-2.6.5-mm1 root=/dev/hda3 vga=791
initrd (hd0,0)/initrd-2.6.5-mm1

Thanks,

x86


Yes, it's ok to leave it in
_________________
If you can't dazzle them with brilliance, baffle them with bullshit.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon May 10, 2004 9:32 am    Post subject: Reply with quote

I like to set a few aliases (in ~.rcbash) to swap the linux sym link back and forth so I can keep multiple kernels.

for example:
Code:

alias mm5='cd /usr/src && rm linux && ln -s *mm5* linux && cd linux'
alias mm1='cd /usr/src && rm linux && ln -s *mm1* linux && cd linux'


then you can do make menuconfig etc just the same way each time .

copy the resulting kernels to different names in /boot so you can have the choise at boot time. Again you can set up aliases to save massive typing.

Code:

alias cpmm5='cp bzImage /boot/kernel-mm5'
alias cpmm1='cp bzImage /boot/kernel-mm1'


edit your grub to use the new file names/

Code:

alias gr='nano /boot/grub/grub.conf'


That should give you what you want.

8)
Back to top
View user's profile Send private message
x86processor
n00b
n00b


Joined: 07 Apr 2004
Posts: 14

PostPosted: Mon May 10, 2004 9:00 pm    Post subject: Reply with quote

Thanks for your replies Rainmaker and Gentree.

Question 1.
Quote:

mount /boot/
cd /usr/src/
ln -sf kernel-2.6.5-mm6 linux
cd linux
genkernel all

Add to grub.conf:
title=Gentoo Linux 2.6.5-mm6
root (hd0,0)
kernel (hd0,0)/kernel-2.6.5-mm6 root=/dev/hda3 vga=791
initrd (hd0,0)/initrd-2.6.5-mm6

You will now have 2 options when booting into GRUB

After doing ln -sf kernel-2.6.5-mm6 linux, /usr/src/linux will point to the 2.6.5-mm6 kernel and not 2.6.5-mm1 kernel. But, since we have a separate entry in grub.conf for 2.6.5-mm1, it will still load 2.6.5-mm1 right?

Question 2.
Quote:

cd /usr/src/
ln -sf kernel-2.6.5-mm6 linux
cd linux
cp ../kernel-2.6.5-mm1/.config .config
make oldconfig

Was the first 2.6.5-mm6 a typo? Should it be 2.6.5-mm1? What does "oldconfig" do?
Its like this. I have a current .config in /usr/src/2.6.5-mm1. Say, I want to change few values in the kernel in 2.6.5-mm1, for instance change CONFIG_SND_INTEL8X0M to m. I would proceed as follows:
Code:

#ln -sf /usr/src/kernel-2.6.5-mm1 /usr/src/linux
#cd /usr/src/linux
#make menuconfig

I change the appropriate values and save it. So, does my current .config get changed? Should I move the .config to some other file like .config.OLD before doing "make menuconfig"?

Assuming I move the current .config to .config.OLD and I do make menuconfig, it will save it currently in .config. Then I would do,
Code:

#make && make modules_install

Do I need to change anything in grub.conf ? I am guessing that with the same kernel source 2.6.5-mm1, I can have different .config files, like (.config.1, .config.2, .config.3) and just copy whichever I want to .config? I don't have to modify grub.conf in this way?

x86
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Tue May 11, 2004 5:32 pm    Post subject: Reply with quote

Hi,

I think you need to read up a bit before posting. There are apparently lots of basic things you dont understand here.

Sometimes its fair to ask for help if we get stuck or just cant see the way forward - I often do, but it seems you need to do your homework! :wink:

You're almost asking for linux primer with all your questions.

I suggest you look at the gentoo.org doc , esp. kernel stuff and probably a use man (the linux reference. )

eg start with : man ln

Using the info in the posts above you can easily swtich back and forth but if you are going to play around with your system at this level you do need to have a better understanding before diving in else you are likely to end up with a non-booting Gentoo. :!:

Dont hesitate to post again if you get stuck , but read up a bit first.

HTH.

best regards, Gentree.
8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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