Device file listed by fdisk doesn't exist

Volker Wysk post at volker-wysk.de
Sat Jun 20 11:44:46 UTC 2020


Hi

I have an image file of an USB stick. It contains a regular MBR and one
partition, not just the partition.

I've set up a loop device, like this (*.img part is the image file):

losetup -f "2020-01-09 Wartung 1804.img"

This creates the new loop device /dev/loop23.

Now I wonder how to access the partition inside. I can access the MBR
inside /dev/loop23:

-----snip-----
desktop ~ % fdisk --list /dev/loop23
Festplatte /dev/loop23: 14,3 GiB, 15376318464 Bytes, 30031872
Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0x807b71ab

Gerät         Boot Anfang     Ende Sektoren Größe Kn Typ
/dev/loop23p1 *      2048 30031871 30029824 14,3G 83 Linux
-----snip-----

What I don't understand is the /dev/loop23p1 device name. Such a device
doesn't exist!

desktop ~ % ls -l /dev/loop23*
brw-rw---- 1 root disk 7, 23 Jun 20 13:27 /dev/loop23

What does that mean? How to mount the partition inside the image file?
Any ideas?

I know that I can just write the image file to an unused USB stick and
use that. But still...

Cheers,
Volker





More information about the ubuntu-users mailing list