AsahiLinux / asahi-scripts

Miscellaneous admin scripts for the Asahi Linux reference distro
MIT License
45 stars 32 forks source link

separate /boot partition is not supported in update-grub #3

Closed ey3ball closed 1 year ago

ey3ball commented 2 years ago

While trying to setup a fully encrypted rootfs (with a separate /boot partition), I ended up getting dropped to a grub rescue-shell (see attached shitty pic)

image

Grub could not find normal.mod I was able to fix it by changing the prefix variable.

Root cause is that the update-grub script hardcodes the following :

set prefix=(\$root)'/boot/grub'

Which breaks if grub is installed on partition separate from /

dkwo commented 1 year ago

I was looking into the same: would it be fine to mount the "efi - uefi" partition (created by asahi installer in 'uefi only' mode) as /boot, and then install grub as grub-install --target=arm64-efi --efi-directory=/boot --removable, and not use the update-grub-script? Later I would also put there the kernel and initram, so that / can be encrypted. (I'm on Void linux btw).

dkwo commented 1 year ago

I believe also the update-m1n1 script would need to be changed.

dkwo commented 1 year ago

It seems this recent commit https://github.com/AsahiLinux/asahi-scripts/commit/b48e49132e18fdcaba776cb7b59fc2cc7a8950fd fixes the issues, so now it should be possible to mount efi partition at /boot without any issues.

marcan commented 1 year ago

This should be fixed in the new scripts, which we'll be releasing soon.