qcow2: remove partition_table_id

It's not necessary to specify it.
This commit is contained in:
Lars Karlitski 2019-07-29 09:46:47 +02:00 committed by Tom Gundersen
parent 593c6de385
commit 2e0981f1ab
5 changed files with 6 additions and 11 deletions

View file

@ -61,7 +61,7 @@ def main(tree, output_dir, options, loop_client):
subprocess.run(["truncate", "--size", str(size), image], check=True)
# Set up the partition table of the image
partition_table = "label: mbr\nlabel-id: {partition_table_id}\nbootable, type=83"
partition_table = "label: mbr\nbootable, type=83"
subprocess.run(["sfdisk", "-q", image], input=partition_table, encoding='utf-8', check=True)
r = subprocess.run(["sfdisk", "--json", image], stdout=subprocess.PIPE, encoding='utf-8', check=True)
partition_table = json.loads(r.stdout)

View file

@ -6,8 +6,7 @@
"name": "org.osbuild.qcow2",
"options": {
"filename": "base.qcow2",
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"partition_table_id": "0xdeadbeef"
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac"
}
}
}

View file

@ -29,8 +29,7 @@
{
"name": "org.osbuild.grub2",
"options": {
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"partition_table_id": "0xdeadbeef"
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac"
}
}
]

View file

@ -5,8 +5,7 @@
"name": "org.osbuild.qcow2",
"options": {
"filename": "base.qcow2",
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"partition_table_id": "0xdeadbeef"
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac"
}
}
}

View file

@ -46,8 +46,7 @@
{
"name": "org.osbuild.grub2",
"options": {
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"partition_table_id": "0xdeadbeef"
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac"
}
}
],
@ -55,8 +54,7 @@
"name": "org.osbuild.qcow2",
"options": {
"filename": "base.qcow2",
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"partition_table_id": "0xdeadbeef"
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac"
}
}
}