I have a question about mounting disk image as the disk. I have disk image
which was created using:
dd if=/dev/sda of=./file.iso
and the sda contained two partitions sda1 and sda2. I know, that if I have
only image of the sda1 I can mount it using loop device like
#losetup /dev/loop0 file.iso
#mount -t ... /dev/loop0 /mnt/tmp
But, how to do it if the file structure is: sda -> sda1, sda2? I need to get
data from sda1 and sda2 :-|
Thanks a lot for help.
Pat
--
gento...@lists.gentoo.org mailing list
losetup -o <offset_value> /dev/loop<something>
see man losetup
--
Alan McKinnon
alan dot mckinnon at gmail dot com
--
gento...@lists.gentoo.org mailing list
I don't have time to test, but try something like this:
(from: http://lwn.net/Articles/110426/)
losetup /dev/loop0 file.iso
blockdev --rereadpt /dev/loop0
mount /dev/loop0p2 /mnt/temp (for p2 replace with other partition,
check ls /sys/block/loop0/dev)
--
gento...@lists.gentoo.org mailing list
Thanks. How to count the offset? And where can I get the partitions offsets?
Thanks, but it ends with:
BLKRRPART: Invalid argument
The problem can be that I did dd at disk with broken partition table. So over
the disk image I've run testdisk utility and it found the partitions - labels
and the correct sizes (as far as I remember). There are two partitions NTFS
and FAT32 and using the testdisk utility, it enables me to browse the FAT
partition, so I thing the testdisk succeeded.
Any idea at that?
Thanks a lot.
Well, yes and no :-( The partition table of the original table has crashed, so
I've created the ISO image of the disk and now playing with it ... but, the
original drive is still untouched. So, I should play with hard drive directly
instead using the dd copy? To partition table recovery in the ISO image I've
used the testdisk utility.
Any suggestions?
Thanks a lot.
Is the original disk still intact? Then fdisk would tell you the offset
> Well, yes and no :-( The partition table of the original table has
> crashed, so I've created the ISO image of the disk and now playing
> with it ... but, the original drive is still untouched. So, I should
> play with hard drive directly instead using the dd copy? To partition
> table recovery in the ISO image I've used the testdisk utility.
>
> Any suggestions?
To be safe I would mount the .iso devices read-only till you are sure
you have found the correct offsets. Only use the original disk if you
really have no other option
Well, I'm not the low level guru :-) This is the first time I playing with
data/partitions recovery :-\
The fdisk gives me:
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(19456, 254, 63)
/mnt/tmp/recovery.dd.2.iso5 16612 19457 22860463+ c W95
FAT32 (LBA)
Which number should I use?
OK. Thanks.
Hi there,
I have a similar disk image I need to access in the same way. I asked
about this on the list a while ago & received some helpful replies.
Unfortunately I got busy with work right after posting, and haven't
had a chance to try them, yet, but maybe you'll find them useful:
http://thread.gmane.org/gmane.linux.gentoo.user/193263
Stroller.
--
gento...@lists.gentoo.org mailing list
On an occasion or two, I've had linux installs overwrite a partition
table when I wasn't paying close occasion. Using google I found
TestDisk which is a program that is able to recover partition tables.
I've used it successfully 2 or 3 times. I've also encountered one
situation where I broke the partition table with dd and TestDisk wasn't
able to help. So, mileage varies :->
David
--
gento...@lists.gentoo.org mailing list