Skip to content

Create Loop-Device for complex Image #2412

Description

@killermoehre

Hi,

I need to create my own disk image with a base in LVM for real hardware machines. As systemd-repart has no support for this, I create my own disk in mkosi.finalize and give it an appropriate GPT with sgdisk, to be a rsync target of $BUILDROOT after mounting all the partitions.

Now the problem is that I can't loop-mount this disk with losetup, because in the mkosi.finalize name space there are no loop devices (ls /dev/loop* is empty).

Even if I mknod -m0777 "$LOOP_DEVICE" b 7 0; losetup "$LOOP_DEVICE" "$RAW_DISK" I get Permission denied inside mkosi.finalize.

Any idea? mkosi.prepare is probably already to late for this setup. Also, this setup worked with mkosi@v14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions