[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: losetup from 7.6.1 can't detach a cloop device

Hello hb,

On Sat, Jun 04, 2016 at 01:42:19PM +0200, hb wrote:
> In this example cx.iso was created with genisoimage and create_compressed_fs
> # ls -l cx.iso
> -rw-r--r-- 1 root root 122052675 Jun  4 00:39 cx.iso
> #
> # losetup -V
> losetup from util-linux 2.27.1
> #
> # losetup -r /dev/cloop7 cx.iso
> losetup: cx.iso: Warning: file does not fit into a 512-byte sector; the
> end of the file will be ignored.
> # losetup -d /dev/cloop7
> losetup: /dev/cloop7: failed to use device: Success
> #
> ... and cloop7 is still attached.

I've seen this, and have been wondering about it, too. The new losetup
error message does not make much sense to me, it's probably supposed to
mean "file size is not aligned to sector size". I still don't see why
this should be a problem now, it has always worked in the past. And,
losetup failing to detach the file that it attached happily before, is
definitiely a bug, from my point of view.

I'd recommend using busybox internal losetup command for now for
attaching and detaching cloop files manually.

sudo busybox losetup -d /dev/cloop7

sudo busybox losetup -r /dev/cloop7 cx.iso[.cloop]

Knoppix only uses the busybox-internal losetup during startup and
shutdown, anyways.

Reply to: