Mailinglist Archive: opensuse (1468 mails)
| < Previous | Next > |
Re: [opensuse] Accessing a disk-image
- From: David Bolt <bcrafhfr@xxxxxxxxxx>
- Date: Tue, 2 Jun 2009 18:08:05 +0100
- Message-id: <1St$$jF1xVJKFwsH@xxxxxxxxxxxxxxxxxxx>
On Tue, 2 Jun 2009, Petr Uzel wrote:-
Another alternative is to tell mount the offset to the partitions boot
sector. E.g. for a 2GiB virtual drive containing a couple of file
systems:
playing:/local2 # parted -s disc.img unit B print
Model: (file)
Disk /local2/disc.img: 2147483648B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32256B 172730879B 172698624B primary ext2 , , , , , ,
, , , type=83, ,
2 172730880B 2146798079B 1974067200B primary ext3 , , , , , ,
, , , type=83, ,
In this case, I could mount the individual file systems by using:
playing:/local2 # mkdir -p temp/mnt{1,2}
playing:/local2 # mount disc.img temp/mnt1 -o loop,offset=32256
playing:/local2 # mount disc.img temp/mnt2 -o loop,offset=172730880
playing:/local2 # df /local2/temp/mnt*
Filesystem 1K-blocks Used Available Use% Mounted on
/local2/disc.img 163322 1550 153340 2% /local2/temp/mnt1
/local2/disc.img 1897452 35636 1765428 2% /local2/temp/mnt2
Regards,
David Bolt
--
Team Acorn: http://www.distributed.net/ OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
openSUSE 10.3 32b | openSUSE 11.0 32b | |
openSUSE 10.3 64b | openSUSE 11.0 64b | openSUSE 11.1 64b |
RISC OS 3.6 | RISC OS 3.11 | openSUSE 11.1 PPC | TOS 4.02
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
On Tue, Jun 02, 2009 at 03:29:40PM +0200, Koenraad Lelong wrote:
Hi,
Last year I made a diskimage of a CF-hard-disk using dd. Now I have some
problems booting that disk so I want to investigate the differences.
However, I can't mount that diskimage with "mount -o loop diskimage
/mnt". I think it's because the image contains two partitions. Is it
possible to mount such an image ?
Try running 'parted -s diskimage unit B print' to see where each
partition starts/ends.
Then you could
a) extract the partition with dd to another file, which should be
mountable with mount -o loop ...
or
b) use device-mapper linear mapping to access the partition (man
dmraid).
Another alternative is to tell mount the offset to the partitions boot
sector. E.g. for a 2GiB virtual drive containing a couple of file
systems:
playing:/local2 # parted -s disc.img unit B print
Model: (file)
Disk /local2/disc.img: 2147483648B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32256B 172730879B 172698624B primary ext2 , , , , , ,
, , , type=83, ,
2 172730880B 2146798079B 1974067200B primary ext3 , , , , , ,
, , , type=83, ,
In this case, I could mount the individual file systems by using:
playing:/local2 # mkdir -p temp/mnt{1,2}
playing:/local2 # mount disc.img temp/mnt1 -o loop,offset=32256
playing:/local2 # mount disc.img temp/mnt2 -o loop,offset=172730880
playing:/local2 # df /local2/temp/mnt*
Filesystem 1K-blocks Used Available Use% Mounted on
/local2/disc.img 163322 1550 153340 2% /local2/temp/mnt1
/local2/disc.img 1897452 35636 1765428 2% /local2/temp/mnt2
Regards,
David Bolt
--
Team Acorn: http://www.distributed.net/ OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
openSUSE 10.3 32b | openSUSE 11.0 32b | |
openSUSE 10.3 64b | openSUSE 11.0 64b | openSUSE 11.1 64b |
RISC OS 3.6 | RISC OS 3.11 | openSUSE 11.1 PPC | TOS 4.02
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |