Compile Kernel
Compile Kernel for Ext4 support on OpenSUSE 11.1
The Ext4 Linux file system:
Ref. http://linuxpoison.blogspot.com/2009/01/ext4-support-on-opensuse-111.html
http://www.cyberciti.biz/tips/linux-convert-ext3-to-ext4-file-system.html
Partitions & Filesystems ก่อนทำการ Compile
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda2 ext3 20635732 10777304 8810188 56% /
udev tmpfs 728144 308 727836 1% /dev
/dev/sda1 ext3 93327 44831 43677 51% /boot
/dev/sda5 ext3 20635700 11508532 8078932 59% /home
/dev/sda6 ext3 33482852 8613584 23168388 28% /var
- คุณต้องแน่ใจก่อนว่าได้ติดตั้ง qt3, qt3-devel, qt3-devel-tools
- Download kernel จาก www.kernel.org (2.6.28) หรือ เวอร์ชั่นล่าสุด
- แตกไฟล์ที่โหลดมา ไปไว้ที่ /usr/src/
1). Compile kernel:
$ cd /usr/src/
$ tar -zxvf linux-kernel-2.6.28.tar.gz
$ cd linux-kernel-2.6.28
$ make xconfig
CHECK qt
*
* Unable to find the QT3 installation. Please make sure that
* the QT3 development package is correctly installed and
* either install pkg-config or set the QTDIR environment
* variable to the correct location.
*
make[1]: *** No rule to make target `scripts/kconfig/.tmp_qtcheck', needed by `scripts/kconfig/qconf.o'. Stop.
make: *** [xconfig] Error 2
Fix error: Install
-qt3
-qt3-devel
-qt3-devel-doc
-qt3-devel-tools
-qt3-extensions
-qt3-man
$ make xconfig
|
File systems
- The Extended 4
- Ext4 extended attributes (NEW)
-Ext4 POSIX Access Control Lists
-EXt4 Security Lables
- Cleck Save button.
- Manu File > Quit
$ make rpm
$ cd /usr/src/packages/RPMS/i386
2). Install Kernel
$ rpm -ivh kernel-2.6.289xen-1.i386.rpm
3). Create boot menu
$ mkinitrd
Kernel image: /boot/vmlinuz-2.6.28-9-xen
Initrd image: /boot/initrd-2.6.28-9-xen
Root device: /dev/sda2 (mounted on / as ext3)
Resume device: /dev/disk/by-id/ata-ST380817AS_5MR30M2H-part3 (/dev/sda3)
Kernel Modules: hwmon thermal_sys processor thermal scsi_mod libata pata_it821x ata_piix ata_generic ide-core piix ide-pci-generic fan jbd mbcache ext3 edd crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd hid usbhid
Features: block usb resume.userspace resume.kernel
Bootsplash: No bootsplash for kernel flavor xen
47417 blocks
4). Edit file boot loader
$ vi /boot/grub/menu.lst
เพิ่ม (หรือคัดลอกมาก็ได้)
title openSUSE 11.1 (2.6.28) XEN
root (hd0,0)
kernel /vmlinuz-2.6.28-9-xen root=/dev/hda2 resume=/dev/hda3 splash=silent showopts vga=0x31a
initrd /initrd-2.6.28-9-xen
***หรือจะใช้เครื่องมือจาก YaST ก็ได้***
YaST > System -> Boot Loader
5). Set as Default Boot Loader:
YaST > System -> Boot Loader
6). Install GRUB
$ grub-install /dev/sda
7). Reboot the system:
$ reboot
8). Login "root"
$ init 1
9). Migrate Ext3 filesystems to Ext4: (ทดสอบ /var)
$ umount /dev/sda6
$ tune2fs -O extents,uninit_bg,dir_index /dev/sda6
10). Run fsck and repair filesystems:
$ fsck -pf /dev/sda6
-p (Don't want to be asked)
11). Modify /etc/fstab:
$ vi /etc/fstab
/dev/sda6 /var ext4 acl,user_xattr 1 2
12). Mount Ext4 partition:
$ mount -t ext4 /dev/sda6 /var
13). Reboot the system:
$ reboot
14). Check filesystem
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda2 ext3 20635732 10777304 8810188 56% /
udev tmpfs 728144 308 727836 1% /dev
/dev/sda1 ext3 93327 44831 43677 51% /boot
/dev/sda5 ext3 20635700 11508532 8078932 59% /home
/dev/sda6 ext4 33482852 8613584 23168388 28% /var
Important:
*** ไม่ Convert พาร์ติชั่น /boot ไปเป็น ext4 เพราะตอนนี่ GRUB ยังไม่สนับสนุน ext4 แต่ถ้าต้องการทดสอบ อ่านที่นี่ครับ (Google project) http://code.google.com/p/grub4ext4/
END.

SUSE Linux Enterprise Cool Solutions
|














