Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ventosus opened this issue Dec 3, 2020 · 6 comments
Open

Comments

@ventosus
Copy link

ventosus commented Dec 3, 2020

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

@mika
Copy link
Member

mika commented Dec 3, 2020

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

@ventosus
Copy link
Author

ventosus commented Dec 4, 2020

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

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

@schoelpi
Copy link

schoelpi commented Aug 9, 2021

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.

@ventosus
Copy link
Author

ventosus commented Aug 9, 2021

@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 ventosus closed this as completed Aug 9, 2021
@schoelpi
Copy link

schoelpi commented Aug 9, 2021

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 ;-)

@mika
Copy link
Member

mika commented Aug 10, 2021

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

@mika mika reopened this Aug 10, 2021
@mika mika changed the title Make it work on loop back devices (disk images) Improve documentation for usage with loop back devices (disk images) Aug 10, 2021
@mika mika unassigned jkirk Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants