LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Manual Kernel Update in SuSE? (https://www.linuxquestions.org/questions/linux-newbie-8/manual-kernel-update-in-suse-361400/)

fulch92a 09-08-2005 08:37 AM

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.

abisko00 09-08-2005 08:42 AM

- 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).

fulch92a 09-08-2005 09:33 AM

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?

abisko00 09-08-2005 09:40 AM

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.

fulch92a 09-08-2005 12:57 PM

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.

abisko00 09-09-2005 02:23 AM

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.

jcart 10-04-2005 02:19 PM

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

abisko00 10-05-2005 02:45 AM

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



All times are GMT -5. The time now is 04:12 AM.