I just purchased a second rackshack server yesterday with RHEL, and of course, the first order of business was to get the new linux kernel up and running on it! I searched around for any info here and didn't find any, so I thought I'd post how I did it.
*******DISCLAIMER 1*********
Upgrading a kernel is tricky business, there is substantial
risk of data loss, service interuption, frustration and the
dead may rise from the grave. If you don't know what you are
doing, do not attempt. Always backup your data, and do
this at a time when substantial downtime is most tolerable.
*******DISCLAIMER 2*********
The box I did this on is a new install of RHEL, with a single
P4 and a single IDE drive. Attempting to copy this exactly
on any other configuration will almostly certainly break your box.
While it's easy to modify this for a dual proc box, setting up 2.6.3
on dual xeon with scsi isn't a walk in the park, trust me, I know.
With that out of the way:
Step 1.
Obtain the 2.6.3 kernel source from:
http://www.kernel.org/pub/linux/kernel/v2....x-2.6.3.tar.bz2
and the new mod-init-tools from:
http://www.kernel.org/pub/linux/kernel/peo...ools-3.0.tar.gz
and my kernel config file, 'config3.txt' , attached to this message
Step 2. Install mod-init-tools
gunzip module-init-tools-3.0.tar.gz
tar -xvf module-init-tools-3.0.tar
cd module-init-3.0
./configure --prefix=/
make moveold
make
make install
./generate-modprobe.conf /etc/modprobe.conf
Step 3. Setup sysfs
mkdir /sysfs
edit /etc/rc.sysinit
where it says :
mount -f /proc
ADD on the next line
mount -f /sys
where it says:
mount -n -t proc /proc /proc
ADD on the next line
mount -n -t sysfs /sys /sys
edit /etc/fstab
ADD at the end
none /sys sysfs defaults 0 0
Step 4. Build the kernel
Unpack the source
cp /whereveryouputit/linux-2.6.3.tar.bz2 /usr/src
cd /usr/src/
bunzip2 ./linux-2.6.3.tar.bz2
tar -xf ./linux-2.6.3.tar
cd linux-2.6.3
cp /wheveryouputit/config3.txt ./
make menuconfig
Go to Load an Alternate Config File and put in:
./config3.txt
Now, you have my config loaded, go through the entire thing
and verify it's got what you need. My box has the intel ICH
chipset, and the RTL8139 network card, if your box is different
and you don't change the config, you won't get your box to boot.
Also, I config my kernel for webserving with extensive network
security built in, if you have different needs, configure it.
Now, exit and save.
make bzImage
make modules
make modules_install
make sure you don't get any errors in the above steps, if you do,
post them here and don't continue. depricated warnings are OK,
symbol errors are NOT
cp ./arch/i386/boot/bzImage /boot/bzImage-2.6.3
mkinitrd /boot/initrd-2.6.3 2.6.3
cp ./System.map /boot/System.map-2.6.3
cd /boot/
rm ./System.map
ln -s ./System.map-2.6.3 System.map
Your new kernel is now built and installed!
Step 5. Configure your bootloader to boot your new kernel
My bootloader is grub, not lilo, grub was installed by default
on my box, yours may be different. Fortunately, if lilo IS installed
on your box, editing your grub config won't do anything.
edit /boot/grub/grub.conf
add at the end
title Custom Linux-2.6.3
root (hd0,0)
kernel /bzImage-2.6.3 ro root=LABEL=/
initrd /initrd-2.6.3
Count the number of title lines, with the new kernel mine now
has 3, subtract 1 because programmers like to start with 0, and
set the line that says default= to this number. Mine is,
default=2
Step 6. Pray
If your box is like mine, and none of the above steps errored,
your kernel should now installed and ready to run. It might be
wise to save the scroll buffer on your client to disk, in case
something goes wrong, so you can get some clues.
reboot
If your box comes back:
uname -a
If it says:
Linux plain.rackshack.net 2.6.3 #2 Wed Feb 25 18:50:58 CST 2004 i686 i686 i386 GNU/Linux
YOU WIN THE PRIZE!!!
If it says something else, you probably have lilo installed, config
lilo, and try again.
If your box doesn't come back, submit a ticket to RS, and tell
them you followed some retards instructions on the support
forum to upgrade your kernel, tell them they need to boot your
old one.
Did I get it right? Post any comments or questions here, send all job offers to hel0hel0@NOSPAM.hotmail.com