← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2120963] [NEW] losetup fails on image file within squashfs

 

You have been subscribed to a public bug:

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.

** Affects: util-linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bot-comment
-- 
losetup fails on image file within squashfs
https://bugs.launchpad.net/bugs/2120963
You received this bug notification because you are a member of Debcrafters packages, which is subscribed to util-linux in Ubuntu.