site  contact  subhomenews

mount fail, partitions in image file

July 04, 2017 — BarryK
I have just hit a new failure, when building a distro in woofQ.

For the first time, I am doing the build in Pyro Quirky, on the Raspberry Pi3. These are packages compiled from source in OpenEmbedded.

The '3builddistro' script aborts with an error message "overlapping loop device exists".

What I have is a file which is a skeleton image file, to be written to an SD-card. This file has two partitions in it, the first is vfat, the second is ext4.
By the format "mount -t <fs> -o loop,offset=<bytes> <image file> <mount point>", both of these partitions can be mounted.

Up until now that is. 3buildistro mounts the ext4 partition first, ok, but fails when mount the vfat partition (the ext4 partition is still mounted).

I found, to get the vfat partition to mount, have to do "mount -t vfat -o loop,offset=<offset>,sizelimit=<size> <img> <mntpt>"

Where sizelimit is the size of the partition, in bytes.

This code has been around for a very long time, so why is it failing now? I found out why:
http://www.spinics.net/lists/util-linux-ng/msg13044.html

The situation is now an error, wasn't before.
I hadn't hit this before, as up until now have been using older versions of util-linux that did not have this "improvement".

Tags: linux