Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
upgrading from 2.4 to 2.6 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
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Wed Jun 02, 2004 5:11 am    Post subject: upgrading from 2.4 to 2.6 kernel Reply with quote

how do i upgrade my kernel from 2.4 to 2.6 iv searched for a howto maybe im looking in the wrong place. thankyou
Back to top
View user's profile Send private message
Rainmaker
Veteran
Veteran


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

PostPosted: Wed Jun 02, 2004 5:14 am    Post subject: Reply with quote

Quote:

emerge gentoo-dev-sources

ln -sf /usr/src/linux-2.6.x /usr/src/linux
cd /usr/src/linux
make menuconfig
make && make modules_install
mount /boot
cp arch/i386/boot/bzImage /boot/kernel-2.6


Ofcourse, alter your bootloader config after that

and you're done!
_________________
If you can't dazzle them with brilliance, baffle them with bullshit.
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Wed Jun 02, 2004 5:19 am    Post subject: Reply with quote

k sounds simple enough .i will give it a go thanks fellow aussie ..... i think ?
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Wed Jun 02, 2004 4:47 pm    Post subject: Reply with quote

when i use make menuconfig it opens with linux kernel 2.4.25-gentoo-r2 configuration is that correct ???
Back to top
View user's profile Send private message
Raistlin
l33t
l33t


Joined: 17 May 2004
Posts: 691
Location: Boston, MA

PostPosted: Wed Jun 02, 2004 5:12 pm    Post subject: Reply with quote

did you recreate a new symlink to "/usr/src/linux-2.6.[whatever]" ?

r.
_________________
Zwei Was Eins Initially

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Wed Jun 02, 2004 5:22 pm    Post subject: Reply with quote

i tried as stated above using the new kernel name,but when ls -la /linux it still shows the link to 2.4.25 are the above commands correct?
Back to top
View user's profile Send private message
HydroSan
l33t
l33t


Joined: 04 Mar 2004
Posts: 764
Location: The Kremlin (aka Canada)

PostPosted: Wed Jun 02, 2004 5:33 pm    Post subject: Reply with quote

After you emerge the new sources, do:
Code:
rm -rf /usr/src/linux
ln -sf /usr/src/(insert kernel directory for 2.6) /usr/src/linux


Like what I'd do for Love-Sources, for example, is...
Code:
ln -sf /usr/src/2.6.6-love4 /usr/src/linux


Then just go into /usr/src/linux, and do 'make menuconfig'. Also, I highly discourage copying .config from 2.4.x to 2.6.x, just for safety reasons.
_________________
I was a Gangster for Capitalism, by Major General Smedley Butler.

Server status: Currently down, being replaced with fresh install - 20% completed.
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Thu Jun 03, 2004 12:32 am    Post subject: Reply with quote

thanks that has fixed it i will continue with the upgrade
cheerz
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Thu Jun 03, 2004 1:08 am    Post subject: Reply with quote

once it has finished compiling what do i have to do to boot from that kernel ?? altering grub i gather ? this should all make sense soon ,i hope :)
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Thu Jun 03, 2004 2:49 am    Post subject: Reply with quote

the 2.6 kernel that i just compiled is what i meant in the last post , do i still use these commands
mount /boot
cp arch/i386/boot/bzImage /boot/kernel-2.6
thanks for your time
Back to top
View user's profile Send private message
Rainmaker
Veteran
Veteran


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

PostPosted: Thu Jun 03, 2004 3:50 am    Post subject: Reply with quote

yes, use those 2 commands to copy the kernel into your boot partition.

Then alter grub.conf to display a new menuoption when booting. I'm not a GRUB user myself, but I think you have to do it like this:

Code:

nano -w /boot/grub/grub.conf
title=Gentoo Linux 2.6.7
root (hd0,0)
kernel /kernel-2.6.7 root=/dev/hda3


be sure to replace the root line with a correct one (might be different, look in one of the other sections of your grub.conf)
_________________
If you can't dazzle them with brilliance, baffle them with bullshit.
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Thu Jun 03, 2004 2:04 pm    Post subject: Reply with quote

ok i compiled it no probs, altered the grub conf no problem ,when it boots with 2.6.5 i get the error that i didnt compile DEVFS in the kernel .
ill try this
1) As root in a shell, enter the command "mount /boot"
2) cd to the source directory
3) copy the kernel from that directory to your /boot
4) enter "umount /boot"
5) restart computer; notice that you don't get the message anymore.
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Thu Jun 03, 2004 2:26 pm    Post subject: Reply with quote

cannot umount /boot ,i must be doing something wrong any help appreciated .thanks
Back to top
View user's profile Send private message
HydroSan
l33t
l33t


Joined: 04 Mar 2004
Posts: 764
Location: The Kremlin (aka Canada)

PostPosted: Thu Jun 03, 2004 4:14 pm    Post subject: Reply with quote

Well, what I usually do, and it works all the time, is...
Code:
mount /boot
make && make modules modules_install && make install


That copies the Kernel to the /boot directory, including all the necessary files, and creates a symlink to the kernel in /boot called 'vmlinuz'.
_________________
I was a Gangster for Capitalism, by Major General Smedley Butler.

Server status: Currently down, being replaced with fresh install - 20% completed.
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Thu Jun 03, 2004 4:29 pm    Post subject: Reply with quote

mount /boot i cant its already mounted .would this cause a problem or it dosnt matter as it is already mounted? maybe i should do a fresh install
_________________
"Live long and Prosper"
Back to top
View user's profile Send private message
HydroSan
l33t
l33t


Joined: 04 Mar 2004
Posts: 764
Location: The Kremlin (aka Canada)

PostPosted: Thu Jun 03, 2004 10:25 pm    Post subject: Reply with quote

spockstar wrote:
mount /boot i cant its already mounted .would this cause a problem or it dosnt matter as it is already mounted? maybe i should do a fresh install


If it's already mounted than it's fine. And you shouldn't have to do a fresh install ever unless you totally screw over the partition. 8O
_________________
I was a Gangster for Capitalism, by Major General Smedley Butler.

Server status: Currently down, being replaced with fresh install - 20% completed.
Back to top
View user's profile Send private message
Wart
n00b
n00b


Joined: 03 Jun 2004
Posts: 66

PostPosted: Thu Jun 03, 2004 11:56 pm    Post subject: Reply with quote

I tried to follow these directions and now I get a cannot mount root error. It's broken good :x
Back to top
View user's profile Send private message
Rainmaker
Veteran
Veteran


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

PostPosted: Fri Jun 04, 2004 12:30 am    Post subject: Reply with quote

just reompile, don't start over again.

Take a deep breath

Then go out for a smoke

When you feel relaxed and come back, start up your PC in your "old" 2.4 kernel.

Then do this:
Code:

cd /usr/src/linux
cp .config ~/2.6-kernel-config
make clean
mv ~/2.6-kernel-config .config
make menuconfig


If everything went OK, you should have the same config as last time. Just select DEVFS and "mount automaticly at boot" Then exit and save

then do this again:
Code:

make && make modules_install
mount /boot
cp arch/i386/boot/bzImage /boot/kernel-2.6.7


If you've altered your grub already, as explained in my previous post, just reboot and you should be OK
_________________
If you can't dazzle them with brilliance, baffle them with bullshit.
Back to top
View user's profile Send private message
Wart
n00b
n00b


Joined: 03 Jun 2004
Posts: 66

PostPosted: Fri Jun 04, 2004 1:00 am    Post subject: Reply with quote

How do I start with the 2.4 kernel? I tried editing /etc/lilo.conf to point to the old kernel, but everything is mounted as read only..
Back to top
View user's profile Send private message
spockstar
n00b
n00b


Joined: 02 Jun 2004
Posts: 39
Location: Oztrailya

PostPosted: Fri Jun 04, 2004 12:42 pm    Post subject: Reply with quote

yep i got it all working now no probs .i was originally having trouble with the nvidia package ,but now with 2.6 it emerged with no problem.what is the easiest way to keep the system up to date???
thanks again for all your help :)
_________________
"Live long and Prosper"
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