View Full Version : Problems restoring backup in virtual disk

14th August 2008, 03:47 PM

I'm working on a backup script for my PCs using systemrescuecd and partimage. I believe that my backup script works fine. I'm trying to prove this by restoring a backup of my laptop into a VirtualBox empty disk. Here's the process that I used to restore:

restore partition table using sfdisk
use dd to restore the MBR
use partimage restore to restore /boot, /root, /home, and /opt

Then I restart the virtual O/S and I get this:

Decomporessing Linux... done.
Booting the kernel.
Red Hat nash version 6.0.52 starting
Unable to access resume device (/dev/sda5)
Mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Mount failed for selinuxfs on /selinux: No such file or directory
switchroot: mount failed: No such file or directory

So, GRUB correctly booted and found the boot partition on /dev/sda1. What's wrong with the rest of the picture?

I would sure like to prove that I can restore this backup before having to rely on it.

Thanks in advance for your help.


14th August 2008, 04:31 PM
The internal structure of of VD is not the same as a real disk and it partitions.
Those tools would never work with in the same VM, Multipal VM's would need to be created for each tool boot and then point to the VM. Just wouldn't be practical.

If this would be used to test the bkup/recovery of real disks? It would be better to use a test machine and real disks.

If this would be used to test the bkup / recovery of a VM, just shut the VM down and cp the VD to another location.
To recover cp it back to the original location and replace it.


14th August 2008, 05:37 PM
I understand what your saying; after I posted I thought that all I really need to do is prove that the backup / restore works with two VM disks. However, if I do change out physical drives some day, couldn't I have the same problem? It's a problem with what the O/S considers physical disk characteristics it seems to me.


14th August 2008, 06:02 PM
Changing the phyical disk implies recovery.
cp the VD from a backup source to recover after reinstalling the Virt softeware and possibly creating a fisrt time dummy VM to build the Virt dir structurce. Once the VD is in the correct place, create a new VM pointing to it.

For a physical recovery to a new disk?
Well, that seems to be a time and space issue between the between the ears of the admin doing the job,
But I use TAR with bz2 and so I simply recreate the same partitions with the same names and use rescue or liveCD depending on the tools set version needed. Mount the TAR source partition, mount the new f's and recover one by one. When done, add touch /.autorelabel to the /mnt/myroot, umount all the f/s and reboot.