0
1
I have a raw disk image created by gddrescue. I'm failing on getting it mounted since to it's complex partition structure.
I tried first with losetup
portscan option.
# losetup -Pf --show -v silvio-extern.iso
/dev/loop0
# fdisk -lu /dev/loop0
Disk /dev/loop0: 298,1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x88c8fbd4
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 63 625137344 625137282 298,1G 7 HPFS/NTFS/exFAT
# fdisk -lu /dev/loop0p1
Disk /dev/loop0p1: 298,1 GiB, 320070288384 bytes, 625137282 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x444c544e
Device Boot Start End Sectors Size Id Type
/dev/loop0p1p1 ? 1768778098 1776409558 7631461 3,7G 6b unknown
/dev/loop0p1p2 ? 1830843506 3225479386 1394635881 665G 75 PC/IX
/dev/loop0p1p3 ? 1718906437 1718909009 2573 1,3M 41 PPC PReP Boot
/dev/loop0p1p4 2827157504 2827210421 52918 25,9M 0 Empty
Partition table entries are not in disk order.
# fdisk -lu /dev/loop0p1p2
fdisk: cannot open /dev/loop0p1p2: No such file or directory
Partition size tells me that I'm interested in /dev/loop0p1p2.
I tried to create a loop device manual. If I got it right I need an offest of Start
* Sector size
(1830843506 * 512 = 937391875072) and a sizelimit of Sectors
* Sector size
(1394635881 * 512 = 714053571072). But it doesn't work:
# losetup -o 937391875072 --sizelimit 714053571072 --show -v -f /dev/loop0p1
/dev/loop1
# fdisk -lu /dev/loop1
fdisk: cannot open /dev/loop1: Inappropriate ioctl for device
# mount /dev/loop1 content/
mount: /dev/loop1 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
So I gave kpartx
a change. But it was the same:
# kpartx -av silvio-extern.iso
add map loop0p1 (253:2): 0 625137282 linear /dev/loop0 63
# fdisk -lu /dev/loop0p1
Disk /dev/loop0p1: 298.1 GiB, 320070288384 bytes, 625137282 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x444c544e
Device Boot Start End Sectors Size Id Type
/dev/loop0p1p1 ? 1768778098 1776409558 7631461 3.7G 6b unknown
/dev/loop0p1p2 ? 1830843506 3225479386 1394635881 665G 75 PC/IX
/dev/loop0p1p3 ? 1718906437 1718909009 2573 1.3M 41 PPC PReP Boot
/dev/loop0p1p4 2827157504 2827210421 52918 25.9M 0 Empty
Partition table entries are not in disk order.
# fdisk -lu /dev/loop0p1p2
fdisk: cannot open /dev/loop0p1p2: No such file or directory
I then tried to run losetup
with portscan option but didn't to succeeded:
# losetup -Pf --show -v /dev/loop0p1
/dev/loop1
# fdisk -lu /dev/loop1
Disk /dev/loop1: 298.1 GiB, 320070288384 bytes, 625137282 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x444c544e
Device Boot Start End Sectors Size Id Type
/dev/loop1p1 ? 1768778098 1776409558 7631461 3.7G 6b unknown
/dev/loop1p2 ? 1830843506 3225479386 1394635881 665G 75 PC/IX
/dev/loop1p3 ? 1718906437 1718909009 2573 1.3M 41 PPC PReP Boot
/dev/loop1p4 2827157504 2827210421 52918 25.9M 0 Empty
Partition table entries are not in disk order.
# fdisk -lu /dev/loop1p2
fdisk: cannot open /dev/loop1p2: No such file or directory
I gave kpartx
a try on /dev/loop0p1
and got some error messages:
# kpartx -av /dev/loop0p1
device-mapper: reload ioctl on loop0p1p1 failed: Invalid argument
create/reload failed on loop0p1p1
add map loop0p1p1 (0:0): 0 7631461 linear /dev/loop0p1 1768778098
device-mapper: reload ioctl on loop0p1p2 failed: Invalid argument
create/reload failed on loop0p1p2
add map loop0p1p2 (0:0): 0 1394635881 linear /dev/loop0p1 1830843506
device-mapper: reload ioctl on loop0p1p3 failed: Invalid argument
create/reload failed on loop0p1p3
add map loop0p1p3 (0:0): 0 2573 linear /dev/loop0p1 1718906437
device-mapper: reload ioctl on loop0p1p4 failed: Invalid argument
create/reload failed on loop0p1p4
add map loop0p1p4 (0:0): 0 52918 linear /dev/loop0p1 2827157504
Just to mention: Auto mount in Ubuntu 16.04 works fine with original disk.
Anybody has any idea?
I'm trying to mount disk image with Debian 8.
As suggested by @Kamil Maciorowski I've tried to mount image file directly with offset
option. This one gives me an Input/output error
when listing content:
# mount -o offset=$((512*63)) silvio-extern.iso content/
# ls -l content/
ls: reading directory content/: Input/output error
total 0
I've double checked offset with fdisk
against image file:
# fdisk -lu silvio-extern.iso
Disk silvio-extern.iso: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x88c8fbd4
Device Boot Start End Sectors Size Id Type
silvio-extern.iso1 63 625137344 625137282 298.1G 7 HPFS/NTFS/exFAT
1Why would there be nested partitions? – Daniel B – 2016-09-26T14:22:33.263
@DanielB I've no idea. I haven't created or even used that disk. I just got it after it was broken. Kamil Maciorowski included a possible reason therefore in his answer. – jelhan – 2016-09-26T16:41:11.367