assembler/qemu: grub prefix relative to mountpoint
The grub prefix ("/boot/grub2") should be defined as relative to the
mountpoint of the filesystem containing it, i.e. /boot/grub2 if it is
on the root filesystem or /grub2 if boot is on a separate partition.
This commit is contained in:
parent
abfc4d6b5a
commit
eb71e3d85c
1 changed files with 4 additions and 1 deletions
|
|
@ -513,11 +513,14 @@ def install_grub2(image: str, pt: PartitionTable, options):
|
|||
partid = grub2_partition_id(pt) + str(boot_part.index + 1)
|
||||
print(f"grub2 prefix {partid}")
|
||||
|
||||
# the path containing the grub files relative partition
|
||||
grub_path = os.path.relpath("/boot/grub2", boot_part.mountpoint)
|
||||
|
||||
# now created the core image
|
||||
subprocess.run(["grub2-mkimage",
|
||||
"--verbose",
|
||||
"--directory", f"/usr/lib/grub/{platform}",
|
||||
"--prefix", f"(,{partid})/boot/grub2",
|
||||
"--prefix", f"(,{partid})/{grub_path}",
|
||||
"--format", platform,
|
||||
"--compression", "auto",
|
||||
"--output", core_path] +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue