1 |
On Montag 23 November 2009, Stroller wrote: |
2 |
> Hi there, |
3 |
> |
4 |
> With reference to a couple of previous threads: |
5 |
> http://thread.gmane.org/gmane.linux.gentoo.user/193263 |
6 |
> http://thread.gmane.org/gmane.linux.gentoo.user/197120 |
7 |
> |
8 |
> Here's what I'm trying: |
9 |
> |
10 |
> $ ls -lh sda.dd.img |
11 |
> -rw-r--r-- 1 stroller users 77G 2009-11-22 03:51 sda.dd.img |
12 |
> $ file sda.dd.img |
13 |
> sda.dd.img: x86 boot sector, Microsoft Windows XP MBR, Serial |
14 |
> 0x1890189; partition 1: ID=0x7, active, starthead 1, startsector 63, |
15 |
> 160810587 sectors, code offset 0xc0 |
16 |
> $ parted sda.dd.img p |
17 |
> WARNING: You are not superuser. Watch out for permissions. |
18 |
> Model: (file) |
19 |
> Disk /path/to/sda.dd.img: 82.3GB |
20 |
> Sector size (logical/physical): 512B/512B |
21 |
> Partition Table: msdos |
22 |
> |
23 |
> Number Start End Size Type File system Flags |
24 |
> 1 32.3kB 82.3GB 82.3GB primary ntfs boot |
25 |
> |
26 |
> $ fdisk -l sda.dd.img |
27 |
> You must set cylinders. |
28 |
> You can do this from the extra functions menu. |
29 |
> |
30 |
> Disk sda.dd.img: 0 MB, 0 bytes |
31 |
> 255 heads, 63 sectors/track, 0 cylinders |
32 |
> Units = cylinders of 16065 * 512 = 8225280 bytes |
33 |
> Disk identifier: 0x01890189 |
34 |
> |
35 |
> Device Boot Start End Blocks Id System |
36 |
> sda.dd.img1 * 1 10010 80405293+ 7 HPFS/NTFS |
37 |
> Partition 1 has different physical/logical endings: |
38 |
> phys=(1023, 254, 63) logical=(10009, 254, 63) |
39 |
> $ |
40 |
> $ sudo losetup -o 8225280 /dev/loop0 sda.dd.img |
41 |
> $ sudo mount -v /dev/loop0 /mnt/floppy/ |
42 |
> mount: you didn't specify a filesystem type for /dev/loop0 |
43 |
> I will try all types mentioned in /etc/filesystems or /proc/ |
44 |
> filesystems |
45 |
> Trying # |
46 |
> Trying #vfat |
47 |
> Trying fuseblk |
48 |
> mount: you must specify the filesystem type |
49 |
> $ |
50 |
> |
51 |
> |
52 |
> If I format a USB stick as NTFS I can mount and read it fine, so NTFS |
53 |
> driver modules are correctly compiled into the kernel. |
54 |
> |
55 |
> I can `losetup` to a loop device and then `fdisk -l` or `parted /dev/ |
56 |
> loop0 p` and see the partitions. |
57 |
> |
58 |
> I've tried with an offset of 512 bytes instead of 8225280 with the |
59 |
> same results - I guess I'm getting a little confused about what the |
60 |
> correct offset should be. Thinking about this now it seems "obvious" |
61 |
> that 512 should be correct, but anyway, that isn't working. |
62 |
> |
63 |
> I get the same as Pat trying this: |
64 |
> http://article.gmane.org/gmane.linux.gentoo.user/197123 |
65 |
> |
66 |
> But: |
67 |
> |
68 |
> $ sudo losetup -d /dev/loop0 |
69 |
> $ sudo losetup /dev/loop0 sda.dd.img |
70 |
> $ sudo fdisk -l /dev/loop0 |
71 |
> |
72 |
> Disk /dev/loop0: 82.3 GB, 82348277760 bytes |
73 |
> 255 heads, 63 sectors/track, 10011 cylinders |
74 |
> Units = cylinders of 16065 * 512 = 8225280 bytes |
75 |
> Disk identifier: 0x01890189 |
76 |
> |
77 |
> Device Boot Start End Blocks Id System |
78 |
> /dev/loop0p1 * 1 10010 80405293+ 7 HPFS/NTFS |
79 |
> $ |
80 |
> |
81 |
> /dev/loop0p1 seems inaccessible to me. |
82 |
> |
83 |
> Really, any suggestions on how to access this "virtual partition" |
84 |
> would be great. Oh, I've also tried to run ntfsclone on it, because |
85 |
> that can produce images which can be loopback mounted (as per `man |
86 |
> ntfsclone`) but again, ntfsclone need to be pointed at a partition of |
87 |
> a hard-drive in order to produce the loopback-mountable image in the |
88 |
> first place. |
89 |
> |
90 |
> Any thoughts? |
91 |
> |
92 |
> Stroller. |
93 |
> |
94 |
|
95 |
yeah, you don't need to use losetup. I mounted a lot of images over the years |
96 |
and I never used losetup. |