stages/grub2: make booting in ro/rw mode configurable

Move the decision whether the root fs should be mounted ro or rw
into the pipeline configuration.

Update the pipelines accordingly.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-08-24 23:20:02 +02:00 committed by Lars Karlitski
parent 17d562e75f
commit 5854ceea42
3 changed files with 21 additions and 5 deletions

View file

@ -20,7 +20,7 @@ def main(tree, options):
env.write("# GRUB Environment Block\n"
f"GRUB2_ROOT_FS_UUID={root_fs_uuid}\n"
f"GRUB2_BOOT_FS_UUID={root_fs_uuid}\n"
f"kernelopts=root=UUID={root_fs_uuid} rw {kernel_opts}\n")
f"kernelopts=root=UUID={root_fs_uuid} {kernel_opts}\n")
with open(f"{tree}/boot/grub2/grub.cfg", "w") as cfg:
cfg.write("set timeout=0\n"
"load_env\n"