Device file listed by fdisk doesn't exist

Nils Kassube kassube at gmx.net
Sat Jun 20 14:04:11 UTC 2020


Volker Wysk wrote:
> Am Samstag, den 20.06.2020, 15:16 +0200 schrieb Nils Kassube:
> > file="2020-01-09 Wartung 1804.img"
> > fdisk -l "$file"
> > sudo mount -oloop,offset=$((2048*512)) "$file" /mnt
> >
> > should suffice.
>
> This looks like a very hacky way to do it, to me. I've taken a quick
> look at the mount and losetup man pages. If have read correctly, your
> solution only applies to the first partition. (Unless you wanted to do
> something with that "fdisk -l" output).

Well, the fdisk part tells you the start of each partition (your example
only showed one partition starting at sector 2048). So it would also
work for other partitions where you replace the 2048 with the start
sector of the other partition.

> I prefer Oliver's solution, which, I think, is much cleaner.

That's fine by me.


Nils





More information about the ubuntu-users mailing list