GoogleCloudPlatform / compute-archlinux-image-builder

A tool to build a Arch Linux Image for GCE
Apache License 2.0
284 stars 58 forks source link

Replace GRUB with systemd-boot #47

Closed skbeh closed 2 years ago

skbeh commented 2 years ago

As the image becomes UEFI-based, we can safely replace GRUB with systemd-boot to make the setup simpler and more robust. GRUB is known to be complex, and it is easy to be broken if we update the kernel without regenerating its config. Its recent update even breaks in some situation if we didn't reinstall it. Systemd-boot is simpler, and its configs can be written by hands, which enables us to manually fix it without chrooting. Also, because we don't need to deal with various hardware environments, we don't need the complexity of GRUB. All in all, I think systemd-boot is a better choice for using with GCE than GRUB.

toastwaffle commented 2 years ago

This sounds reasonable to me; @lcastelli do you have any concerns?

@skbeh do you want to prepare a patch and see if this works?

skbeh commented 2 years ago

I have tested systemd-boot in GCE environment and it worked. Patch for this project will be delayed for a few days because of my lack of time.

lcastelli commented 2 years ago

Sounds reasonable. The only drawback I see is that we need to store the kernel in vfat rather than ext4, as systemd-boot can't read ext4, but I guess that's the price to pay for simplicity. I also remember GRUB was explicitly listed as the only supported bootloader for GCE years ago, but I don't see that mentioned anywhere anymore, so probably that's not really a concern anymore.

OK, let's go with this, thanks!