Web lists-archives.com

Re: Restore backup to KVM




On 26/09/17 08:46, Reco wrote:
/dev/sda2 refers to the partition in QEMU disk that contains your
restored root filesystem.

I've got only one partition in my image file:

=========================================================
$ /sbin/parted  alan_restore.img
WARNING: You are not superuser.  Watch out for permissions.
GNU Parted 3.2
Using /media/solitone/Maxtor/vmimages/alan_restore.img
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) p
Model:  (file)
Disk /media/solitone/Maxtor/vmimages/alan_restore.img: 96.6GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  96.6GB  96.6GB  ext4
=========================================================

I'd expect I should refer to it with /dev/sda1. However, when booting it doesn't find it.

It's strange, since it finds /dev/sda, i.e. the entire disk:

=========================================================
[ 6.438693] sd 0:0:0:0: [sda] 188743680 512-byte logical blocks: (96.6 GB/90.0 GiB)
[    6.469182] sd 0:0:0:0: [sda] Write Protect is off
[ 6.482421] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
=========================================================

However, it then complains that /dev/sda1 does not exists:

=========================================================
[   39.409892] blk_update_request: I/O error, dev fd0, sector 0
[   39.410232] floppy: error -5 while reading block 0
[   39.481887] blk_update_request: I/O error, dev fd0, sector 0
[   39.482281] floppy: error -5 while reading block 0
Gave up waiting for suspend/resume device
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/sda1 does not exist.  Dropping to a shell!
=========================================================

Same thing if I try with /dev/sda2 or anything.

Regards!