mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
Add options for;
- disk to be created (blank disk given to live-bootstrap) (default) - disk to already exist but sources downloaded within live-bootstrap - sources to be downloaded outside live-bootstrap (non-blank disk given to live-bootstrap) Also migrate sysb to use sys_transfer in QEMU mode also. Note that this means copy_sysc is now irrelevant. sysc is *always* sourced from sysa.
This commit is contained in:
parent
6ea1b8e295
commit
0ce50a6393
9 changed files with 219 additions and 51 deletions
|
|
@ -32,10 +32,11 @@ def create_disk(image, disk_type, fs_type, size):
|
|||
loop_dev = run('sudo', 'losetup', '-f', capture_output=True).stdout.decode().strip()
|
||||
run('sudo', 'losetup', '-P', loop_dev, image)
|
||||
# Create the partition
|
||||
run('sudo', 'parted', '--script', image, 'mklabel', disk_type, 'mkpart',
|
||||
'primary', 'ext4', '0%', '100%')
|
||||
run('sudo', 'partprobe', loop_dev)
|
||||
run('sudo', 'mkfs.' + fs_type, loop_dev + "p1")
|
||||
if disk_type != "none":
|
||||
run('sudo', 'parted', '--script', image, 'mklabel', disk_type, 'mkpart',
|
||||
'primary', 'ext4', '0%', '100%')
|
||||
run('sudo', 'partprobe', loop_dev)
|
||||
run('sudo', 'mkfs.' + fs_type, loop_dev + "p1")
|
||||
return loop_dev
|
||||
|
||||
def mount(source, target, fs_type, options='', **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue