LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 04-02-2004, 11:55 PM   #1
Rory in Toronto
Member
 
Registered: Mar 2004
Posts: 136

Rep: Reputation: 15
How to change from 2.4 to 2.6 kernel?


Hi,

I installed MDK10 with the 2.6 kernel. When installing development tools, I somehow reverted to 2.4 kernel. 2.6 is still there, somewhere.

In an attempt to get it back, I updated to 2.6.3-7 tonight. Everything installed fine. But, when I rebooted 2.4 was still there.

I'm a new convert from Windows so am just familiarizing myself with all the Linux terms and ways of doing things.

Can anyone post a simple step-by-step approach to switching back to the 2.63 kernel?

Thanks,
Rory
 
Old 04-03-2004, 12:43 AM   #2
kundor
Member
 
Registered: Aug 2003
Distribution: GoboLinux
Posts: 167

Rep: Reputation: 30
How are you determining what kernel you're running? what does the command "uname -r" say?

The process of "urpmi kernel-2.6.3.6mdk", for example, should set it up to run that kernel on a reboot.
 
Old 04-03-2004, 12:59 AM   #3
vi0lat0r
Member
 
Registered: Aug 2003
Location: Lewisville, TX
Distribution: Kubuntu
Posts: 295

Rep: Reputation: 30
In a terminal, type the following:

Code:
su
This gets you in as Super User, or more commonly referred to as Root. Now in that same terminal type:

Code:
rm -rf /boot/System.map (Hit Enter)
rm -rf /boot/vmlinuz (Hit Enter)
Now type:

Code:
ln -s /boot/vmlinuz-2.6.3-7 /boot/vmlinuz (Hit Enter)
ln -s /boot/System.map-2.6.3-7 /boot/System.map (Hit Enter)
Now open in Konqueror (just click the house name Home) and type into the url bar:
Code:
file:/lib/modules
Look for a folder named 2.6.3-7 . Now type that folder's name where ***HERE*** appears in the following code:
Code:
/sbin/mkinitrd /boot/initrd-2.6.3-7.img ***HERE*** (Hit Enter)
NOTE the space AFTER /boot/initrd-2.6.3-7.img AND the folder's name. Now go click the menu button, go to System -> System Configuration -> Boot -> Boot Loader -> Next
Add your 2.6.3-7 kernel by choosing the corresponding parts.

After adding the kernel, type:

Code:
/sbin/lilo
In the terminal.
 
Old 04-03-2004, 10:47 AM   #4
Rory in Toronto
Member
 
Registered: Mar 2004
Posts: 136

Original Poster
Rep: Reputation: 15
Thank you for your really excellent set of steps!!!

I urpmi 2.6.3-7 but it still rebooted in 2.4.

In file:/lib/modules it has two folders: 2.4 kernel and 2.6.3-4 kernel, so it didn't pick up teh -7 kernel.

In the bootloader MDK screen, I noticed there was an option: /boot/vmlinuz-2.6.3-4 (original 2.6.3 kernel with MDK). So, I chose that. But, when I rebooted, I locked part way with a kernel init= comment.

I wonder if I needed to type your /sbin/lilo comment in the terminal after I made that selection?

It appears that with that folder and that boot option, I'm very close to being able to simply select it as a default, however I'm a simple step away, which my newbie-ness is preventing me from seeing.
 
Old 04-03-2004, 11:34 AM   #5
vi0lat0r
Member
 
Registered: Aug 2003
Location: Lewisville, TX
Distribution: Kubuntu
Posts: 295

Rep: Reputation: 30
Ok you probably don't have the initrd file ;-)

Here, download this file:
http://www.nofirewall.com/cache/initrd-2.6.3-4mdk.img

And put it in the /boot folder.

Code:
cp /home/YOUR NAME/initrd-2.6.3-4mdk.img /boot/initrd-2.6.3-4mdk.img
Should get it all working. :-)
 
Old 04-03-2004, 02:03 PM   #6
Rory in Toronto
Member
 
Registered: Mar 2004
Posts: 136

Original Poster
Rep: Reputation: 15
This is all very peculiar... and interesting, quite frankly, for a newbie like me.

So I grabbed the .img (thanks!) and copied it over. Shell asked if I wanted to overwrite the identical file. Hmm. So, it was there all along. But, I ovewrote it, anyway, just in case there was something wrong with my file.

Then, I went MDK Control Centre > Boot > Bootloader > Next > Boot menu: I chose the default top login choice > linux (/boot/vmlinuz)* > select: modify > image / select: (3 choices)
/linux (/boot/vmlinuz) (default)
/boot/vmlinuz-2.6.3-4mdk
/boot/vmlinuz-2.4.25-2mdk

>I select: /boot/vmlinuz-2.6.3-4mdk >ok>finish.
Bootloader is changed to: boot/vmlinuz-2.6.3-4mdk

I re-boot and get what I got last time. A blue screen of text appears during boot and locks on:
Kernal panic: No init found. Try passing init= option to kernal.

To recover, I re-boot and at the boot options select: linux-nonfb (not sure what this is) that allows me in. I switch my main bootlogin back to /linux (/boot/vmlinuz) .

And here I am. I feel so darn close, yet so far away.
 
Old 04-03-2004, 03:41 PM   #7
vi0lat0r
Member
 
Registered: Aug 2003
Location: Lewisville, TX
Distribution: Kubuntu
Posts: 295

Rep: Reputation: 30
Do you have MSN messenger or any other messenger? If so post it for me.
 
Old 04-03-2004, 04:32 PM   #8
Rory in Toronto
Member
 
Registered: Mar 2004
Posts: 136

Original Poster
Rep: Reputation: 15
Nope, no messenger. I have Yahoo that I haven't been able to configure outgoing chat (incoming is fine), due to my router.
 
Old 04-03-2004, 05:05 PM   #9
vi0lat0r
Member
 
Registered: Aug 2003
Location: Lewisville, TX
Distribution: Kubuntu
Posts: 295

Rep: Reputation: 30
Tell you what, do this:

Code:
urpmi kernel-tmb-source
Then do this:
[quote]cd /usr/src
**"Change Directory To /usr/src"**

ls -alc
**"check for symlink (ex. /usr/src/linux->/usr/src/linux-2.4.18)"**
**"also note since its being ask recently, that if there is no symlink"**
**"then move on to the untarring of the kernel"**

file linux
**"double check with this command (output ex.) linux: symbolic link to linux-2.4.18-14"**

rm linux
**"remove symlink"**

tar -zxvf linux-x.x.x.tar.gz
**"unpack the tarball (new kernel)"**

ln -s /usr/src/linux-x.x.x /usr/src/linux
**"make a new link to the new kernel"**

cd linux
**"type this to change to the directory"**

----------------------------
Now Comes The Fun Part~!
----------------------------
make mrproper
**"this removes the current .config and other files"**

cp /usr/src/linux-2.4.x/.config /usr/src/linux
***this is if you want to use your old config***

make menuconfig
**"for ncurses GUI in the terminal"**

make bzImage
**"to make the kernel image (compile and creates compressed image of kernel)"**

make modules
**"compile your selected modules"**

make modules_install
**"to install newly compile modules (installs to /lib/modules/linux.x.x.x)"**

Remove the following links:
rm -rf /boot/System.map
rm -rf /boot/vmlinuz

Then copy the newly created kernel and system.map to /boot
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-x.x.x
cp /usr/src/linux/System.map /boot/System.map-x.x.x

Make the new links:
ln -s /boot/vmlinuz-x.x.x /boot/vmlinuz
ln -s /boot/System.map-x.x.x /boot/System.map

Next remove existing initrd.img file:
rm -rf /boot/initrd.x.x.x.img

..And create the new one:
/sbin/mkinitrd /boot/initrd-x.x.x.img x.x.x
(Note: )
The last set of x.x.x is the eqivalent to your new kernel version and it looks to /lib/modules for that version.[quote] -DrOzz

Then update lilo, and you will have a fully functional, customized 2.6.4-1kernel.
 
Old 04-04-2004, 12:43 AM   #10
Rory in Toronto
Member
 
Registered: Mar 2004
Posts: 136

Original Poster
Rep: Reputation: 15
In the end, I took the wusses way out. I stuck back in my discs and when it asked me whether I wanted to "install" or "upgrade," I took upgrade, hoped it wouldn't erase a number of my files and crossed my fingers.

When I rebooted, I was still in 2.4 kernel. But, a 2.6.3-4 login option had been added, which I've now defaulted to. So, I'm back to 2.6.3 and can now focus on some of the more tedious problems at the bottom of this learning curve called Linux.

Thanks for all your help!!

Rory
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change kernel new 3.1 install WoofDeF Debian 3 06-20-2005 08:30 AM
Change kernel provided with another from CD. Ren Slackware - Installation 3 10-29-2004 05:57 AM
How do I change my 2.6 to 2.4 kernel ?? carrie Linux - Newbie 4 10-11-2004 10:10 AM
Change Kernel Electboy Linux - General 3 08-01-2003 02:52 PM
Do i need to change the Kernel? magis Linux - Newbie 3 02-22-2002 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration