Difference between revisions of "Compile Kernel Alternatif"

From OnnoWiki
Jump to navigation Jump to search
Line 53: Line 53:
  
  
==GRUB Ubuntu 9.10 ke atas==
+
 
  
 
==GRUB di Ubuntu 9.10 ke atas==
 
==GRUB di Ubuntu 9.10 ke atas==

Revision as of 05:12, 19 January 2010

Siapkan software pendukung

apt-get update
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 libncurses5 libncurses5-dev

download source code kernel

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.33-rc4.tar.bz2
tar xjf linux-2.6.33-rc4.tar.bz2 -C /usr/src
ln -s linux-2.6.33-rc4 linux
cd /usr/src/linux
cp /boot/config-`uname -r` ./.config

pilih salah satu

cd /usr/src/linux
make menuconfig
make xconfig
make gconfig
make-kpkg clean

Compile kernel

make
make modules 
make modules_install
make install 

Akan di install tiga (3) file ke /boot

  • System.map-2.6.33-rc4
  • config-2.6.33-rc4
  • vmlinuz-2.6.33-rc4

Lakukan

cd /boot
mkinitrd -o initrd.img-2.6.33-rc4 2.6.33-rc4

GRUB Ubuntu 9.04 ke bawah

vi /boot/grub/menu.lst
title           Debian GNU/Linux, kernel 2.6.33-rc4 Default
root            (hd0,0)
kernel          /boot/vmlinuz root=/dev/hdb1 ro
initrd          /boot/initrd.img-2.6.33-rc4
savedefault
boot



GRUB di Ubuntu 9.10 ke atas

Ubah file

vi /boot/grub/grub.conf

Isi informasi kernel yang baru

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Ubuntu, Linux 2.6.31-14-generic (on /dev/sdb1)" {
        insmod ext2
        set root=(hd1,1)
        search --no-floppy --fs-uuid --set cc4a2d61-eab2-4734-82a2-ece9b0ed62ba
        linux /boot/vmlinuz-2.6.31-14-generic root=UUID=cc4a2d61-eab2-4734-82a2-ece9b0ed62ba ro quiet splash
        initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode) (on /dev/sdb1)" {
        insmod ext2
        set root=(hd1,1)
        search --no-floppy --fs-uuid --set cc4a2d61-eab2-4734-82a2-ece9b0ed62ba
        linux /boot/vmlinuz-2.6.31-14-generic root=UUID=cc4a2d61-eab2-4734-82a2-ece9b0ed62ba ro single
        initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/40_custom ###


update-grub
reboot

Pranala Menarik