p2v of RHEL4 causes SATA drives to be IDE

Discussions about using Linux guests in VirtualBox.
Post Reply
legoman
Posts: 1
Joined: 25. Oct 2011, 18:06
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: RHEL

p2v of RHEL4 causes SATA drives to be IDE

Post by legoman »

Hi,

I'm attempting to p2v an RHEL4 box so that I can test updating it. Kernel is 32-bit 2.6.9-42.0.0.0.1.EL. The only drive is a 40GB SATA with an EXT3 partition and a swap one.

I rebooted the physical into SysRescueCD, and did a dd image of /dev/sda to a USB HDD. I mounted the USB on my VBox 4.1.4 host (32-bit MS XP Pro), then used VBoxManage to convert the image to a VMDK. I created a VM client using an OS Type of "Red Hat" and attached the new virt drive to it. I then started the new client.

Grub was able to run fine, but the kernel has issues. I get the grub display of "root", "Kernel", and "initrd", and then:
  • Uncompressing Linux... Ok, booting the kernel.
Great! But then it freezes for a few minutes before:
  • Buffer I/O error on device hde, logical block 0
    Buffer I/O error on device hde, logical block 0
    Buffer I/O error on device hde, logical block 0
    i8042.c: Can't get irq12 for AUX, unregistering the port.
    Red Hat nash version 4.2.1.8 starting
    mkrootdev: label / not found
    mount: error 2 mounting ext3
    mount: error 2 mounting none
    switchroot: mount failed: 22
    umount /initrd/dev failed: 2
    Kernel panic - not syncing: Attempted to kill init!
The grub entry for this boot reads:

Code: Select all

title Enterprise (2.6.9-42.0.0.0.1.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.0.0.0.1.EL ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.9-42.0.0.0.1.EL.img
So I stopped the client, attached a SysRescueCD ISO to it and booted off of that. It works great, even showing my VMDK as /dev/sda. I mounted /dev/sda and renamed the /boot/grub/device.map that had an "hda" reference. I verified through gparted that the drive does have the correct "/" label. I then modified the kernel line in grub.conf to be:

Code: Select all

        kernel /boot/vmlinuz-2.6.9-42.0.0.0.1.EL ro root=/dev/sda
...and restarted the client. Dropping the "quiet" spouts out more helpful information, including that my VMDK is appearing under the PIIX4 driver as "/dev/hde". Of course all I/O to this device fails and it hits the same Kernel panic as before.

On a whim, I rebooted it via SysRescueCD, mounted the drive, chrooted into it, and did a mkinitrd including a SCSI driver, but no luck.

I'm out of ideas. Anyone??!??

TIA!
Rich
applejj
Posts: 1
Joined: 11. Jan 2012, 05:33
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: three

Re: p2v of RHEL4 causes SATA drives to be IDE

Post by applejj »

Maybe you can change storage type of your VM from SATA controller to IDE controller.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: p2v of RHEL4 causes SATA drives to be IDE

Post by Technologov »

I think it would be useful to write automated scripts / program for this procedure for VirtualBox.

If you have any progress, please let us know.
faanwar
Posts: 1
Joined: 24. Apr 2013, 21:47

Re: p2v of RHEL4 causes SATA drives to be IDE

Post by faanwar »

I was getting similar errors. After reading your post I changed my storage controller to IDE. Its running smooth now.
thx,
Anwar
Post Reply