3 Jan 2009 00:51
Re: fdisk complains about geometry of a disk image
One thing that comes to mind is to do the following:
boot with a knoppix or other livecd. ntfs will be mounted. Some of the disk will be readable. In such case you can backup on other disk.
after that boot windows with a recovery disk if you have.
boot with a knoppix or other livecd. ntfs will be mounted. Some of the disk will be readable. In such case you can backup on other disk.
after that boot windows with a recovery disk if you have.
On Fri, Jan 2, 2009 at 9:40 AM, Amos Shapira <amos.shapira-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
More information: It looks like the pvscan output I quoted below was
actually capturing the original half-dead device, not the image added
by kpartx. After I turned off the USB disk enclosure I get:
# losetup -a
/dev/loop0: [0821]:132 (/media/FreeAgent Drive/AMOS/sdd)# pvscan
/dev/pictonvg/swaplv: read failed after 0 of 4096 at 536805376:
Input/output error
/dev/pictonvg/swaplv: read failed after 0 of 4096 at 0: Input/output error
/dev/pictonvg/rootlv: read failed after 0 of 4096 at 10737352704:
Input/output error
/dev/pictonvg/rootlv: read failed after 0 of 4096 at 0: Input/output error
/dev/pictonvg/homelv: read failed after 0 of 4096 at 88747212800:
Input/output error
/dev/pictonvg/homelv: read failed after 0 of 4096 at 0: Input/output error
PV /dev/sda5 VG wanaka lvm2 [278.47 GB / 7.97 GB free]Total: 1 [278.47 GB] / in use: 1 [278.47 GB] / in no VG: 0 [0 ]
I.e. nothing is recognized from the loop-loaded image file.
Help?
--Amos
2009/1/2 Amos Shapira <amos.shapira-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> Hello,
>
> I'm trying to salvage data from a desktop IDE disk which went sour
> during a Windows XP re-installation on one of its partitions (the rest
> was Ubunut 8.04 with LVM).
>
> I put that IDE disk into an IDE->USB enclosure and ran ddrescue on it.
> It complaint a lot but for now I just want to see if I manage to read
> whatever is possible at the LVM level.
>
> "fdisk -l" on the image file complains about not finding geometry and
> therefore difference in logical/physical partition size in table:
>
> Disk sdd: 0 MB, 0 bytes
> 255 heads, 63 sectors/track, 0 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x00096ee7
>
> Device Boot Start End Blocks Id System
> sdd2 12030 24190 97683232+ 8e Linux LVM
> Partition 2 has different physical/logical beginnings (non-Linux?):
> phys=(1023, 0, 1) logical=(12029, 0, 1)
> Partition 2 has different physical/logical endings:
> phys=(1023, 254, 63) logical=(24189, 254, 63)
> sdd3 24191 24321 1052257+ 83 Linux
> Partition 3 has different physical/logical beginnings (non-Linux?):
> phys=(1023, 0, 1) logical=(24190, 0, 1)
> Partition 3 has different physical/logical endings:
> phys=(1023, 254, 63) logical=(24320, 254, 63)
>
> If I give it a "number of cylinders" it doesn't complain:
>
> fdisk -C 24321 -l sdd
>
> Disk sdd: 0 MB, 0 bytes
> 255 heads, 63 sectors/track, 24321 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x00096ee7
>
> Device Boot Start End Blocks Id System
> sdd2 12030 24190 97683232+ 8e Linux LVM
> sdd3 24191 24321 1052257+ 83 Linux
>
> (I deleted the windows partition on the image file).
>
> But kpartx/pvscan still complains a lot when I try to add this image:
>
> # kpartx -a -v "`pwd`/sdd"
> gpt: 0 slices
> dos: 4 slices
> device-mapper: reload ioctl failed: Invalid argument
> add map loop0p2 (0:0): 0 195366465 linear /dev/loop0 193245885
> device-mapper: reload ioctl failed: Invalid argument
> add map loop0p3 (0:0): 0 2104515 linear /dev/loop0 388612350
> # pvscan
> /dev/pictonvg/swaplv: read failed after 0 of 4096 at 536805376:
> Input/output error
> /dev/pictonvg/swaplv: read failed after 0 of 4096 at 0: Input/output error
> /dev/pictonvg/rootlv: read failed after 0 of 4096 at 10737352704:
> Input/output error
> /dev/pictonvg/rootlv: read failed after 0 of 4096 at 0: Input/output error
> /dev/pictonvg/homelv: read failed after 0 of 4096 at 88747212800:
> Input/output error
> /dev/pictonvg/homelv: read failed after 0 of 4096 at 0: Input/output error
> /dev/sdd1: read failed after 0 of 2048 at 0: Input/output error
> PV /dev/sdd2 VG pictonvg lvm2 [93.16 GB / 4.00 MB free]
> PV /dev/sda5 VG wanaka lvm2 [278.47 GB / 7.97 GB free]
> Total: 2 [371.62 GB] / in use: 2 [371.62 GB] / in no VG: 0 [0 ]
>
> And I can't access these volumes:
>
> # e2fsck /dev/pictonvg/homelv
> e2fsck 1.40.8 (13-Mar-2008)
> e2fsck: Attempt to read block from filesystem resulted in short read
> while trying to open /dev/pictonvg/homelv
> Could this be a zero-length partition?
>
> What can I do in order to access the volumes on the image file?
>
> Thanks,
>
> --Amos
>
=================================================================
To unsubscribe, send mail to linux-il-request-NSemkxREmS1YZAO8hgG6+w@public.gmane.org with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request-NSemkxREmS1YZAO8hgG6+w@public.gmane.org
RSS Feed