LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2005, 08:37 AM   #1
fulch92a
LQ Newbie
 
Registered: Apr 2005
Location: San Antonio, TX USA
Posts: 6

Rep: Reputation: 0
Manual Kernel Update in SuSE?


Can anyone tell me the steps to perform a manual kernel update in SuSE.

I've gotten through the following steps:

mkdir -p /usr/src/linux/
download 2.6.13.tar.bz2 kernel to dir /usr/src/linux/
tar -jxvf /usr/src/linux/linux-2.6.13.tar.bz2 <not exact filename>.
cd /linux-2.6.13/
make clean
make menuconfig <may have make clean and make menuconfig backwards>
make bzImage
make modules
make modules_Install

When I run mkinitrd /boot/linux-2.6.13 2.6.13 it gives an error about an entry not being in fstab.

Novell's website says to use the rpm but I'd rather do it manually to set the options I want using make menuconfig. I know that usually, the mkinitrd works fine, but for some reason in SuSE, it's not working or I don't know the right switches. Also, what do I do after this? How do I edit grub.conf to boot the new kernel but still allow me to boot to the old one if I need to?

Thanks in advance.
 
Old 09-08-2005, 08:42 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
- you can combine 'make bzImage' and 'make modules' by running just 'make'
- after the bzImage has been created, you need to install the kernel. Either run 'make install', or copy the kernel (bzImage) and System.map to /boot
- you need to add the kernel to your bootloader to be able to choose it from the menu. That may already been done by 'make install' (never tried).
 
Old 09-08-2005, 09:33 AM   #3
fulch92a
LQ Newbie
 
Registered: Apr 2005
Location: San Antonio, TX USA
Posts: 6

Original Poster
Rep: Reputation: 0
so, make menuconfig
make
make install

and that should be it? I'll try it when I get home tonight. I'm just concerned I guess because the mkinitrd didn't work. and the grub.conf file didn't appear to have anything in it in suse. but the only grub.conf file I could find to speak of was in /etc/grub.conf. There wasn't a grub.conf in the /boot/grub/ directory like there normally would be. SuSE is kinda funny like that. Or maybe the other distros haven't caught up yet? hmm?
 
Old 09-08-2005, 09:40 AM   #4
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
I never used 'make install', so I don't know if it includes 'make modules_install'.

I know that mkinitrd has changed since 9.1, but the syntax I used specified the kernel this way:
Code:
mkinitrd -k <kernel> -i <initrd> -m <modules to include>
The modules can also be added to /etc/sysconfig/kernel: INITRD_MODULES=""

In SUSE, the bootloader menu is /boot/grub/menu.lst.
 
Old 09-08-2005, 12:57 PM   #5
fulch92a
LQ Newbie
 
Registered: Apr 2005
Location: San Antonio, TX USA
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you...

I'll give this a try when I get back to my computer tonight.

cp /boot/system.map /boot/systemmap.old
cp /boot/vmlinuz /boot/vmlinuz.old
cp /boot/initrd /boot/initrd.old
mkinitrd -k linux-2.6.13 -i initrd

<Does that look right to you?>

then add a line for the new kernel to the file /boot/grub/menu.lst to boot to it and leave the old one in there in case the new one doesn't work? I'll let you know tomorrow if it works.
 
Old 09-09-2005, 02:23 AM   #6
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
Quote:
<Does that look right to you?>
No.You don't need to backup those files in /boot. The kernel binary will be named with the version number and can be addressed directly from menu.lst. So you can have multiple kernel in /boot. When you run mkinitrd, make sure you name the initrd file accordingly, e.g. 'mkinitrd -k vmlinuz-2.6.13 -i initrd-2.6.13'. If you really like, you can change the symlinks (vmlinuz,initrd and system.map) to the newest kernel. However, I don't think this is necessary. My symlinks still point to the original SUSE kernel.

If you are not sure about this procedure, run 'make install' and everything should be done for you automatically.

Last edited by abisko00; 09-09-2005 at 02:24 AM.
 
Old 10-04-2005, 02:19 PM   #7
jcart
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
I have a situation where my initrd file in the boot directory is about 5meg. after builging new kernel (original is 1.7 meg) and it wont boot with new kernel. I have used both make install & installkernel with same result. Any ideas about why the initrd is so big? - thanks
 
Old 10-05-2005, 02:45 AM   #8
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
No, unfortunately I have no idea how 'make install' creates the initrd. On my system, both kernel and initrd are about 1.5-1.8 MB. But if you include a lot of driver into your kernel, it can easily get bigger. The same with initrd, it depends on what's packed inside. Just for fun, you can have a look in your initrd. It won't necessarily help with your problem, but you may find what's using the space.

Code:
cp /boot/initrd-whatsoever /boot/lookinside.gz
gunzip /boot/lookinside.gz
mkdir /mnt/lookinside
mount -o /boot/lookinside /mnt/lookinside
cd /mnt/lookinside
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Red Hat Manual Update folken718 Red Hat 2 02-13-2005 10:21 AM
SuSE Manual Kernel Update - Which RPMs do I need? Foxy Linux - Distributions 2 07-30-2004 11:01 AM
manual update, what order? Hama Mandriva 2 04-12-2004 11:20 AM
How to manual update up2date? explorer1979 Linux - General 2 02-04-2004 09:57 PM
GENTOO.. "etc-update" versus Manual update opinions.. l0f33t Linux - Distributions 2 09-17-2003 04:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration