debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #06254
[Bug 2120963] Re: losetup fails on image file within squashfs
I've now figured out the affected commands "mount" and "losetup" are
part of the package "util-linux".
** Package changed: ubuntu => util-linux (Ubuntu)
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/2120963
Title:
losetup fails on image file within squashfs
Status in util-linux package in Ubuntu:
New
Bug description:
I'm using Ubuntu 25.04.
This was working with this Ubuntu version a few weeks ago, and failed with a recent update.
I have an image of an SD-card within a squashfs container. This SD
card is partitioned, so the image contains a partition table.
What I'm doing:
> mkdir -p /tmp/mnt/sqfs
> mkdir -p /tmp/mnt/img
> sudo mount container.sqfs /tmp/mnt/sqfs
> sudo losetup -Pf /tmp/mnt/sqfs/sd-card.img
What I would expect to happen:
A loopback device gets created with the partitions of the SD-card image. I could then mount those loopback devices to (read only) access their content without extracting the image from squashfs.
What instead happens:
losetup: /tmp/mnt/sqfs/sd-card.img: failed to set up loop device: Invalid argument
After this, I can't even unmount the squashfs container anymore:
> sudo umount /tmp/mnt/sqfs
umount: /tmp/mnt/sqfs: target is busy.
Copying the image file out of the squashfs mountpoint (extracting it)
works. And then I can successfully create the loopback device on that
extracted image file. It just doesn't work within the mounted
squashfs. I've used this a lot in the past, so I'm certain this was
working.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/2120963/+subscriptions