CentOS Linux Server Guide

CentOS Linux, Red Hat Linux and Virtualization

Solving Kernel Panic after Clonezilla or VMWare Converter consolidation on Linux Software Raid

 

It is always  not an easy task to consolidate Linux machines into virtual machines. The worst nightmare might be the physical machine is running on software raid. In the following scenario, we will discuss on simple guide to solve the kernel panic issue after using either clonezilla or VMWare VMConvertor.

 

Scenario:

A physical RedHat machine (RHEL3 U5) with the following software raid setup.

  • md0 -  raid1, hda1, /boot partition, total size  150MB

  • md1 -  raid1, hda2, "/" partition, total size 8GB

  • md2 -  raid1, hda3, /swap, total size size 4GB

Note: In actual fact, you do not need swap to run under raid1. Also, you do not need to clone this partition too. This is because you can always recreate this partition.

 

Step1: Boot in Linux Rescue Mode

Use you favorite Linux Rescue CD to boot in rescue mode. The example below, I use RedHat CD1.

When the following screen appear, type linux rescue and hit <ENTER>

 

Linux Rescue Mode Boot Up

 

Step2: Choose a Language

Linux Rescue Choose a Languague

Accept the default language English, navigate to <OK> button, hit <ENTER> to proceed to next page

 

Step3: Setup Networking

Linux Rescue Setup Networking

Ignore the Network setting, navigate <NO> hit <ENTER> to continue with next screen.

 

Step4: Auto Mounting the "/" partition to /mnt/sysimage

Linux Rescue Mouting /mnt/sysimage

Let the rescue cd to find our "/" root partition. You will be informed that the rescue CD cannot find the "/" partition. No worry, simply press press continue.

 

Linux Rescue mounting /mnt/sysimage - error

Because the installation partition for / is at /dev/md1 (/dev/hda2). The rescue unable to mount the partition for us. Don't worry we can mount the partition manually.

 

Step5: Mount the "/" partition to /mnt/sysimage and chroot to /mnt/sysimage

Chroot /mnt/sysimage

1. check the hard disk's partition information using 'fdisk -l'.

2. mount the /dev/hda2 to /mnt/sysimage. (my / partition is located at /mnt/sysimage).

3. now you can 'chroot /mnt/sysimage'

 

Step6: Changing  /etc/fstab

Changing /etc/fstab

Vi to /etc/fstab. Changing all the /dev/mdX to /dev/hdaX. Remember to save it.

 

Step7: Rename /etc/mdadm.conf to /etc/mdadm.conf.bck

Rename /etc/mdam.conf

Mdadm.conf is longer in used. I am going to rename the file.

 

Step8: Reinstall Grub

Reinstall Grub

We are setting up the grub in MBR at /dev/hda1.

 

Step9: Reinstall initrd

Reinstall initrd, mkinitrd in system rescue

Next, we are going to reinstall initial ram disk image.

 

Step10: Reboot the system

Reboot the system now. Issue "init 6". Remember to boot from hard disk.

RHEL booting after system rescue

 

The Kudzu will automatically detect the new hardware and obsolete hardware. Basically you just need to accept all new hardware and remove all hardware.

RHEL Kudzu  hardware detection

 

RHEL Kudzu Hardware Removal

 

 

Step11: Reconfigure X Windows (Optional)

Because RHEL3's X Windows cannot boot up properly under VMWare. You need to modify the /etc/X11/XF86Config, change the Display depth from 16 bits to 8 bit.

RHEL Rescue Recinfigure X Windows

 

Changing X Windows Display Depth

 

Step12: Mount VMtools CD and  Install VMTools

You can actually skip Step11 and mount the VMWare VMTools and install it

Mouting VMTools CD

 

Once the cdrom is mouted. Copy the VMTools.version.tar.gz to local directory, extract and install it.

mkdir /software

cp -varp /mnt/cdrom/VMwareTools.version.tar.gz /software

cd /software

tar -zxvf MwareTools.version.tar.gz /software

cd /vmware-tools-distrib/

./vmware-install.pl

 

Run the vmware-installa.pl and follow installation procedure.

 

 

Step13: Making Swap partition

Lastly we are making swap partition add mount it.

 

Making Swap, Swapon

 

Note: I have some difficulty to remove auto software raid  autos scanning during Linux boot process, if you know how to solve this, please email me at me[at]1a-centosserver.com. Thanks

 

Read More on CentOS Linux, Redhat Linux and Virtualization



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy