The Way of the great learning involves manifesting virtue, renovating the people, and abiding by the highest good.

2010年3月28日星期日

upgrkernel 2.6.33 in ubuntu 9.10

 
Upgrade kernel 2.6.33  in ubuntu 9.10

1.Get the kernel source code of 2.6.33 from kernel.org.Patch the kernel if possible .

2.Extra the tar file,
$tar -xzvf linux-2.6.33.tar.gz

3.$cd linux-2.6.33
$sudo apt-get install ncurses     //a text user interface library!
$make menuconfig
{
a good way  for config the kernel !
it can easily get the hardware driver modules .
cp /boot/config-2.6.31-21-generic .config
$make old config
}

4.compile the kernel
$make bzImage 
then
$make modules
then
$sudo make modules_install
it will copy the modules in  /lib/modules/2.6.33 .

5.install the kernel
$sudo make install
it will run install.sh ,just copy three files into /boot directions

config-2.6.33
System.map-2.6.33
vmlinuz-2.6.33

6.create initrd image
$cd /boot
$sudo mkinitramfs  -o initrd.img-2.6.33 2.6.33
or
$sudo update-initramfs -c -k 2.6.33
the 2.6.33 is the kernel release number ,just keep the same as vmlinuz-*,and /lib/modules/*
for it's a temporary file system ,so it contains some device drivers as the loadable modules ,
these modules must be copied by /lib/modules/2.6.33 directional .

7.configure the grub
alex@alex-laptop:/boot$ sudo update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.33
Found initrd image: /boot/initrd.img-2.6.33
Found linux image: /boot/vmlinuz-2.6.31-21-generic
Found initrd image: /boot/initrd.img-2.6.31-21-generic
Found linux image: /boot/vmlinuz-2.6.31-20-generic
Found initrd image: /boot/initrd.img-2.6.31-20-generic
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done



notation:
Grub2  
Vmlinuz 
Kernel_Howto
Boot Process
Initrd
System.map
kernel config