logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: c9868f431289c2da1998c7ee1fff41f5cf5fe1a5
parent 53803ed46ff2f90158a545d9005e796627f0319c
Author: Dor Askayo <dor.askayo@gmail.com>
Date:   Tue, 10 May 2022 22:34:11 +0300

Add -P to the losetup command

It seems to be required for partitions to be recognized.

Diffstat:

Mlib/utils.py2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/utils.py b/lib/utils.py @@ -30,7 +30,7 @@ def create_disk(image, disk_type, fs_type, size): run('truncate', '-s', size, image) # First find the device we will use, then actually use it loop_dev = run('sudo', 'losetup', '-f', capture_output=True).stdout.decode().strip() - run('sudo', 'losetup', loop_dev, image) + run('sudo', 'losetup', '-P', loop_dev, image) # Create the partition run('sudo', 'parted', '--script', image, 'mklabel', disk_type, 'mkpart', 'primary', 'ext4', '0%', '100%')