I have an old PC which has two internal hard drives of 80GB in a mdadm RAID1 configuration with LVM on top of it. I wanted to migrate this PC to a virtual machine, so I booted both, the PC and the VM, with Clonezilla and cloned both disks into two separate disk images on the VM. First, it seems like the VM loads the bootloader, but then stops showing the error "Gave up waiting for the root device" and "ALERT! /dev/mapper/system-root does not exist."

It then presents an initramfs shell where I can run various commands such as blkid or mdadm. Interestingly, blkid does not list any disks, but when I boot the VM with Clonezilla or Gparted, I can see both disks.

I assume that for some reason, the LVM or the mdadm RAID gets corrupted when the clone is created, so I wonder whether it would be possible to clone those disks?

Would it make sense to try the clone with dd ?

  • What disks does it see in the Live CD? It sounds like you may be emulating your disks as virtio but the cloned/installed system is too old to support those or simply doesn't have the relevant driver modules included in the initramfs, so LiveCD -> chroot -> rebuild initramfs might work. That or set the VM to emulate sata/scsi/ide drives instead. Missing modules/drivers in initramfs is a common issue, you can google it. – frostschutz Jun 15 '20 at 7:52
  • Thanks, I emulated the disks in the VM (Proxmox VE) using SCSI, but I also tried VirtIO SCSI, SATA and IDE. With other options than VirtIO SCSI it does not even load the initramfs. The system I want to clone runs Ubuntu 12.04, so it's old, but not terribly old. – T. Pluess Jun 15 '20 at 8:04
  • Unless your VM Host doesn't provide disk protection you could dispense with the RAID1, and just carry forward the LVMs. You'll need to update-grub if you do this – roaima Jun 15 '20 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.