PDA

View Full Version : Updating the kernel micro-howto


alsierra
2004-01-10, 00:19 AM
I followed these steps:

1.- Get the most recent kernel source for woody, in this case 2.4.24. I got it from kernel.org since there is not a package for woody yet.

2.- Untar it and copy the config file:

# cd /usr/src/linux-2.4.24
# cp /boot/config-2.4.23 .config

3.- Create the package:

# make-kpkg kernel_image

4.- Install the new package:

# dpkg -i kernel-image-2.4.24_[...]_i386.deb

5.- Edit /boot/grub/menu.lst adding these lines after the splashimage line:

title GNU/Linux (2.4.24)
root(hd0,0)
kernel /vmlinuz-2.4.24 root=/dev/hda3 devfs=mount

(yes I just copied and edited the previous 2.4.23 lines.)

You could use also update-grub .

6.- Reboot.

That's it! :)

Comments?

JonTrainer
2004-01-10, 08:44 AM
Thanks! Nicely done.

JonTrainer
2004-01-10, 10:51 AM
This HowTo worked great. I'm now running 2.4.24 from source. :cool:

I noticed in /boot that I have links for:
config -> config-2.4.21
vmlinuz -> vmlinuz-2.4.21

These are to my old kernel, yet I've booted into the new kernel. Are these links not used? I answered "Yes" to the kernel config script when prompted to create links to the new kernel. The links don't appear to have been changed.

alsierra
2004-01-10, 11:09 AM
Originally posted by JonTrainer
This HowTo worked great. I'm now running 2.4.24 from source. :cool:

I noticed in /boot that I have links for:
config -> config-2.4.21
vmlinuz -> vmlinuz-2.4.21

These are to my old kernel, yet I've booted into the new kernel. Are these links not used? I answered "Yes" to the kernel config script when prompted to create links to the new kernel. The links don't appear to have been changed.

I think the link to the new kernel is:

vmlinuz -> boot/vmlinuz-2.4.24

You should have also the new config and system files:

/boot/System.map-2.4.24
/boot/config-2.4.24

Perhaps you should delete those old links to avoid confusion.

JonTrainer
2004-01-10, 11:23 AM
Hmm... In /boot I have the following:

lrwxrwxrwx 1 root root 17 Oct 1 18:33 System.map -> System.map-2.4.21
-rw-r--r-- 1 root root 461677 Jul 18 18:37 System.map-2.4.21
-rw-r--r-- 1 root root 483286 Jan 10 15:20 System.map-2.4.24
lrwxrwxrwx 1 root root 13 Oct 1 18:33 config -> config-2.4.21
-rw-r--r-- 1 root root 16892 Jul 18 18:37 config-2.4.21
-rw-r--r-- 1 root root 17589 Jan 10 15:10 config-2.4.24
drwxr-xr-x 2 root root 1024 Jan 10 15:33 grub
drwx------ 2 root root 12288 Oct 1 18:29 lost+found
lrwxrwxrwx 1 root root 14 Oct 1 18:33 vmlinuz -> vmlinuz-2.4.21
-rw-r--r-- 1 root root 750794 Jul 18 18:37 vmlinuz-2.4.21
-rw-r--r-- 1 root root 781925 Jan 10 15:20 vmlinuz-2.4.24

uname -a gives me:

Linux dragon.outerlevel.com 2.4.24 #1 SMP Sat Jan 10 15:11:40 UTC 2004 i686 unknown


So... Debian does not use the links? How did they get there to begin with then? Should I delete them or change them to point to the new kernel's files?

Also, do the permissions on these files look ok? They seem to give an aweful lot of rights to "everyone".

alsierra
2004-01-10, 11:38 AM
Originally posted by JonTrainer

So... Debian does not use the links? How did they get there to begin with then? Should I delete them or change them to point to the new kernel's files?


No, grub only uses what is in the menu.lst file.

The kernel link was used to make the kernel update easier for lilo, but, as discussed in other threads, that's not the SB way. ;)


Also, do the permissions on these files look ok? They seem to give an aweful lot of rights to "everyone".

They are just informative on how was configured your kernel. You can change the permisions if that makes you feel better. :)

JonTrainer
2004-01-10, 11:43 AM
Once again...thanks for your help.

Capo
2004-01-10, 17:54 PM
Somehow I wasn't so lucky :confused:

certainly looked like everything went off without a hitch, I rebooted the machine and I got nothing....hrmmmm

I'll let you know what I find out.

Capo
2004-01-10, 18:05 PM
Well I could ping the server, and the status in My Serverbeach was online, so I tried the rapid reboot before submitting a ticket :: fingers crossed ::

Eric
2004-01-10, 19:34 PM
I just had Debian installed last night and kernel wasn't updated. Good thing I saw this post and checked it.

The only thing I had to do different was that I had to include the path to the package when running dpkg -i

Great tip alsierra!

Capo
2004-01-10, 21:53 PM
It's still a mystery why my reboot failed...I submitted a ticket.. no response on the ticket, but I can get into my box now and it's running on the new kernel :confused:

Capo
2004-01-11, 11:55 AM
Well I guess it will always be a mystery?

I did get a response from support, apparently network services didn't start up on both reboots, they started them and viola the box works fine.....

weird? I'll try to get further clarification as I don't want this to be a recurring problem.

But hey.... The new kernel operation worked just fine!

debhead
2004-01-18, 18:32 PM
While you are at it - If you want a real treat patch the kernel to support the advanced security features of GrSecurity. Gives you acl's, chroot enhancements, and restricted processes. Besides borking my Grub config everything is working excellently.

ayn
2004-02-11, 15:13 PM
I upgraded to 2.4.24 from 2.4.21 and server isn't coming back up. :(

submitted trouble ticket.

--Andrew

ayn
2004-02-11, 15:38 PM
update: a Rapid Reboot fixed it, maybe `sudo reboot` didn't quite reboot the server.

But now it's back up and life is good.

toddbfleming
2004-02-11, 18:41 PM
It worked! I checked my menu.1st many times before I attempted the reboot into 24.2.4. You can't be too careful when a mistake costs downtime plus an emergency support call...

This is how I approached the upgrade: :poke:

This is what I'm so glad didn't happen: :flush: