Problem migrating to new hard disk configuration

General support questions including new installations
Post Reply
robinBones
Posts: 3
Joined: 2006/12/26 16:26:19

Problem migrating to new hard disk configuration

Post by robinBones » 2009/06/23 21:21:29

I have a CENT 4 Update 5 server that I am trying to visualize.
I have copied all the files over to the VM, and I have:

updated the following files
fstab
mtab
devices.map
grub.conf

re-installed grub, and
re-generated initrd

when I boot I get
mount: error 6 mounting ext3
mount: error 2 mounting none
Switching to new root
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!

Did I miss a config file, or forget to reconfigure something?

robinBones
Posts: 3
Joined: 2006/12/26 16:26:19

Re: Problem migrating to new hard disk configuration

Post by robinBones » 2009/06/23 22:45:52

Sorry Virtualize, not Visualize

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Problem migrating to new hard disk configuration

Post by gerald_clark » 2009/06/24 14:09:43

You don't say what kind of virtualization you are attempting, what virtualization package you are running,
or what the host is.
Have you followed the instructions that came with your virtualization software on how to virtualize a running Linux system?

Please do the required reading: http://www.centos.org/modules/newbb/viewforum.php?forum=47

You might try http://wiki.centos.org/HowTos#head-fb1ff7e71fb5f2f511cda8c68cb6ba5f6e8decae

eharmic
Posts: 4
Joined: 2006/06/24 03:13:14
Contact:

Re: Problem migrating to new hard disk configuration

Post by eharmic » 2009/10/05 04:03:39

Hi,

This is an old post so I assume the original poster has long since either solved the problem or given up, but here is the answer I found in case it helps someone else.

The reason it fails to mount the root filesystem is that the initrd image does not contain the modules needed to interface to the XEN virtual block device. The same thing can also happen if you try to replace some of the hardware on a server (such as the RAID controller) or transplant an installed image from one server to another.

I had a similar problem, although in my case I was just trying to run a Centos 4 based guest which I had installed fully virtualized in XEN. I wanted to run it paravirtualized. I got the same error message on bootup.

The solution:

1) Edit /etc/modprobe.conf and add the following lines, removing any other HW specific lines since they probably relate to HW which does not exist in a XEN VM:

alias scsi_hostadapter xenblk
alias eth0 xennet

2) Rebuild the initrd, eg:

# cd /boot
# mkinitrd initrd-2.6.9-89.0.11.ELxenU.img 2.6.9-89.0.11.ELxenU

NOTE: The original poster did not say if they had installed the xenU kernel before they tried to set up their VM. If you want to run the VM as paravirtualized you will have to install and select this kernel:

# yum install kernel-xenU

//Mike

Post Reply