Skip to content

Consider using kpartx #7

@dberlin

Description

@dberlin

You currently manually calculate the loop partition offsets, etc.
This is very fragile, and actually breaks for no obvious reason on some of my machines

kpartx is a tool (installable by apt in dockerfile) that is meant to do this for you.

If you run kpartx -a -v {RASPBIOS}.img in your build.sh, it will create /dev/mapper/loop0p1 (boot) and /dev/mapper/loop0p2 (root), which you can mount without any flags/issues at all.
It will take care of figuring out the partitions by actually reading the partition table out of the image, rather than guessing offsets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions