Skip to content

Commit

Permalink
moves generation of initramfs
Browse files Browse the repository at this point in the history
This is necessary to have the correct keyboard set in the initramfs.
  • Loading branch information
taukakao committed Jul 19, 2024
1 parent f372f92 commit 6139688
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions vanilla_installer/utils/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ def gen_install_recipe(log_path, finals, sys_recipe):
"mkdir /.system/boot/init/vos-a",
"mkdir /.system/boot/init/vos-b",
"mv /.system/boot/vmlinuz* /.system/boot/init/vos-a",
"mv /.system/boot/initrd* /.system/boot/init/vos-a",
],
chroot=True,
)
Expand Down Expand Up @@ -656,7 +655,6 @@ def gen_install_recipe(log_path, finals, sys_recipe):
"mv /var/storage /var/lib/abroot/",
"mount -o bind /var/home /home",
"mount -o bind /var/opt /opt",
"mount -o bind,ro /.system/usr /usr",
],
chroot=True,
)
Expand Down Expand Up @@ -725,6 +723,24 @@ def gen_install_recipe(log_path, finals, sys_recipe):
chroot=True,
)

# Set up initramfs after all configuration is done
# Need to mount boot for initramfs generated
# Need to unmount afterwards to access init partition
recipe.add_postinstall_step(
"shell",
[
f"mount {boot_part} /boot",
f"mount {efi_part} /boot/efi",
"update-initramfs -c -k all",
"mkdir /var/tmp/vanilla-generated-initrd",
"cp -a /boot/initrd* /var/tmp/vanilla-generated-initrd/",
"umount -l /boot/efi",
"umount -l /boot",
"mv /var/tmp/vanilla-generated-initrd/initrd* /.system/boot/init/vos-a",
],
chroot=True,
)

recipe.merge_postinstall_steps()

if "VANILLA_FAKE" in os.environ:
Expand Down

0 comments on commit 6139688

Please sign in to comment.