grml2usb icon indicating copy to clipboard operation
grml2usb copied to clipboard

Improve documentation for usage with loop back devices (disk images)

Open ventosus opened this issue 5 years ago • 6 comments

Would be nice if this would work on loopback devices

fallocate -l 950M /tmp/image.dd
sfdisk ...
losetup -o $(( 2048*512 )) /dev/loop0 /tmp/image.dd
losetup -o $(( 1003520*512 )) /dev/loop1 /tmp/image.dd

mkfs.vfat /dev/loop0
mkfs.ext4 -L persistence /dev/loop1

grml2usb ... /dev/loop0

I don't see why is couldn't, but currently it fails upon installing the MBR, because it cannot find de device of /dev/loop0, which is the disk image /tmp/image.dd

ventosus avatar Dec 03 '20 17:12 ventosus

Hm, what's your use case to use it on a loopback device?

mika avatar Dec 03 '20 22:12 mika

Hm, what's your use case to use it on a loopback device?

Automated building on a machine I have no physical access to.

ventosus avatar Dec 04 '20 00:12 ventosus

Hm, what's your use case to use it on a loopback device?

Unfortunately I also have trouble with this feature. Since usage of loopback devices is explicitly mentioned in the manpage, I think this should be considered to be fixed.

schoelpi avatar Aug 09 '21 11:08 schoelpi

@schoelpi this works with the git version, forgot to close the issue.

Make sure to load your loopback module with support for loopback partitions (default off).

modprobe loop max_loop=8 max_part=8

ventosus avatar Aug 09 '21 11:08 ventosus

modprobe loop max_loop=8 max_part=8

Ah great, thank you for your quick response. It works, although I had to figure out, that I had to use -P option for losetup and kick out kpartx instead ;-)

schoelpi avatar Aug 09 '21 12:08 schoelpi

I'm reopening this, as our docs should be properly clarify its usage, thanks everyone :)

mika avatar Aug 10 '21 03:08 mika