首页 > 科技 > Update kernel 2.6.19.1 in VMware5.5

Update kernel 2.6.19.1 in VMware5.5

2006年12月17日 12点00分 发表评论 阅读评论

It tooks about two days on resolving how to update kernel 2.6.19.1 in VMware5.5, because the VMware default configured disk is SCSI which need some special module setting. During this course, I learn more about kernel concepts.

1. Target
Update the lastest kernel 2.6.19.1 in VMware5.5 in order to research NFSv4.0

2. Test Environment
VMware version: 5.5.1 build -19175 for linux
Virtual Operating System: CenOS 3.5 (Kernel 2.4.21-32EL)

3. Steps
Install Virtual Operaing System CenOS3.5 which kernel is 2.4.21. Download the kernel 2.6.19.1 with related patch from www.kernel.org.
# cd /usr/src
# tar xvf /download/linux-2.6.19.1.tar
# ln linux-2.6.19.1 linux-2.6
# cd linux-2.6

Apply the patch:
# bunzip2 -dv /download/patch-2.6.19.bz2 | patch -p1

Begin to compile:
# cd /usr/src/linux-2.6
# make mrproper
# make menuconfig (make oldconfig would be ignored here)
At this point, the following items must be selected as “build in”, more explanation would be wrote in the later section.
SCSI device support <*>
SCSI device -> SCSI low-lever device -> Buslogic SCSI support <*>
Device Drivers -> Fusion MPT sevice support <*>
Device Drivers -> Fusion MPT (base+scsihost) drivers <*>
Device Drivers -> Fusion MPT (ioctl) drivers <*>
Device Drivers -> USB support <*>
Device Drivers -> Network support -> Ethernet(10/100) support <*>
File System -> EXT2, EXT3 support <*>
Commend, the vmware default SCSI controller is Buslogic.

If not add “scsi, usb, mpt” built in directly, or just select modules load [M], when issue “mkinitrd /boot/initrd-2.6.19.1.img 2.6.19.1”, there’s the following error message:
no modules mptbase found for 2.6.19.1 kernel, aborting
If not add “ext2, ext3” build in directly, or just select modules load [M], when reboot after compiling, the system will be halt:
Kernel Panic: no init found

Continue the compiling process:
# make bzImage
# make modules
# make modules-install
# cp /usr/src/2.6.19.1/arch/i386/boot/bzImage /boot/vmlinuz-2.6.19.1
# mkinitrd /boot/initrd-2.6.19.1.img 2.6.19.1
# cp /usr/src/2.6.19.1/System.map /boot/System.map-2.6.19.1
# cp /usr/src/2.6.19.1/.config /boot/config-2.6.19.1

Modify “/boot/grub/grub.conf”:
# This is Phillip’s /boot/grub/grub.conf
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title CentOS-3 (2.4.21-32.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.EL ro root=LABEL=/
initrd /initrd-2.4.21-32.EL.img
title New-Kernel (2.6.19.1)
root (hd0,0)
kernel /vmlinuz-2.6.19.1 ro root=LABEL=/
initrd /initrd-2.6.19.1.img
Save and reboot, if all succeed, issue “uname -r” will shows: 2.6.19.1

4. Summary
If set hard disk as IDE, it would be very easy to update. But I think practise on this SCSI system is very benifit for future works. At first begining, when issue “mkinitrd /boot/initrd-2.6.19.1.img 2.6.19.1” and error “no modules mptbase found for kernel”, I just did a stupid thing, add the “–omit-scsi-modules”(ignore scsi), but this system is based on SCSI drivers! Though “mkinitrd –omit-scis-modules /boot/initrd-2.6.19.1.img 2.6.19.1” passed, the system was kernel panic when reboot:

VFS: Cannot open root device “sda1” or unknown-block(0,0)
Please append a correct “root=” boot option
Kernel panic: not syncing: VFS: unable to mount root fs on unknown block(0,0)

By reading some documents, I tried to comment all lines contains “mpt” in /etc/modules.conf, the same kernel panic happenes; Download the latest “lvm2, device-mapped, mkinitrd” rpm packages, however, these packages can not be installed. The only way fixed this problem is building mpt,scsi,ext2,ext3,usb directly when run “make menuconfig”.

menuconfig options:
[*] build-in
[M] modules
[ ] excluded

5. Fix issues in new 2.6 kernel
The network device eth0 seems to be disappeared in new kernel, when execute “#lsmod”, there’s the following error:
QM_MODULES: Function not implemented.

I fix this issue by installing new mode-init-tools(need download),
# cd mode-init-tools
# ./configure –prefix
# make moveold
# make
# make install
Generate “/etc/modprobe.conf” :
# ./generate_modprobe.conf /etc/modprobe.conf
# depmod 2.6.19
OK, reboot the OS, and issue “#lsmod” again, the eth0 module “pcnet32” is listed.(vmware default eth0 module is called pcnet32). Fixed.

分类: 科技 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.
您必须在 登录 后才能发布评论.