logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 4fb8efafe2ccb324dbfe241ae99a6d88a39e3f53
parent a1520a07fafdbb7b0d793ccca07b2a3a9006a55b
Author: fosslinux <fosslinux@aussies.space>
Date:   Thu,  6 Jan 2022 15:10:11 +1100

Use sudo for losetup -f.

This is required in some environments.

Diffstat:

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

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