Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Trying to loopback mount partition from a disk image
Date: Mon, 23 Nov 2009 20:12:35
Message-Id: 200911232011.58695.wonko@wonkology.org
In Reply to: Re: [gentoo-user] Trying to loopback mount partition from a disk image by Volker Armin Hemmann
1 Volker Armin Hemmann writes:
2
3 > On Montag 23 November 2009, Stroller wrote:
4
5 > > $ fdisk -l sda.dd.img
6 > > You must set cylinders.
7 > > You can do this from the extra functions menu.
8 > >
9 > > Disk sda.dd.img: 0 MB, 0 bytes
10 > > 255 heads, 63 sectors/track, 0 cylinders
11 > > Units = cylinders of 16065 * 512 = 8225280 bytes
12 > > Disk identifier: 0x01890189
13 > >
14 > > Device Boot Start End Blocks Id System
15 > > sda.dd.img1 * 1 10010 80405293+ 7 HPFS/NTFS
16 > > Partition 1 has different physical/logical endings:
17 > > phys=(1023, 254, 63) logical=(10009, 254, 63)
18 > > $
19 > > $ sudo losetup -o 8225280 /dev/loop0 sda.dd.img
20
21 Try -o $(( 63*512 )). 63 is the start sector, you see this when you enter
22 the U command in fdisk in order to change the units.
23
24 > yeah, you don't need to use losetup. I mounted a lot of images over the
25 > years and I never used losetup.
26
27 Um, even if the partition does not start at the beginning? I tried this a
28 while ago, giving the offset directly as mount option, but it did not work
29 at all. But when I also tried it manually with losetup, I succeeded.
30
31 Wonko

Replies

Subject Author
Re: [gentoo-user] Trying to loopback mount partition from a disk image Stroller <stroller@××××××××××××××××××.uk>