[Libguestfs] does guestfs_list_partitions() work with Windows 95 images?

Richard W.M. Jones rjones at redhat.com
Tue Dec 16 09:00:09 UTC 2014


[Let's keep all replies on the list]

On Tue, Dec 16, 2014 at 12:43:21AM -0500, Skippy VonDrake wrote:
> Looks like that returned an empty array. Could the image be corrupt?
> 
> Here's the output:
> 
> # guestfish -v -x --ro -a /home/skippy/disk_images/[...]/old.img  run : list-partitions

[...]

> [    0.558351] scsi2 : Virtio SCSI HBA
> [    0.560916] scsi 2:0:0:0: Direct-Access     QEMU     QEMU HARDDISK
>  2.0. PQ: 0 ANSI: 5
> [    0.562418] scsi 2:0:1:0: Direct-Access     QEMU     QEMU HARDDISK
>  2.0. PQ: 0 ANSI: 5
> [    0.590401] sd 2:0:0:0: Attached scsi generic sg0 type 0
> [    0.592464] sd 2:0:0:0: [sda] 4122952 512-byte logical blocks: (2.11
> GB/1.96 GiB)
> [    0.594758] sd 2:0:1:0: Attached scsi generic sg1 type 0
> [    0.595840] sd 2:0:1:0: [sdb] 8388608 512-byte logical blocks: (4.29
> GB/4.00 GiB)
> [    0.597380] sd 2:0:0:0: [sda] Write Protect is off
> [    0.598437] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled,
> doesn't support DPO or FUA
> [    0.600092] sd 2:0:1:0: [sdb] Write Protect is off
> [    0.601216] sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled,
> doesn't support DPO or FUA
> [    0.603609]  sda:

The appliance kernel couldn't find any partitions at all on the disk.

Is it a raw format disk image, or some other format that qemu can
reasonably be expected to read?

If it is, then yes I'd say the image is corrupted.  However you'd
probably want to hexdump it to see what's really going on.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list