linuxboot / heads

A minimal Linux that runs as a coreboot or LinuxBoot ROM payload to provide a secure, flexible boot environment for laptops, workstations and servers.
https://osresearch.net/
GNU General Public License v2.0
1.42k stars 186 forks source link

Alpine OS not detected after install (only grub.cfg searched for on local disk installation by scripts) #1415

Open adwall4 opened 1 year ago

adwall4 commented 1 year ago

I booted Alpine off USB and installed to disk with and without encryption and changed the default boot partition to sdb1.

Unfortunately it still couldn’t find anything to boot. Is Alpine supported under Heads?

adwall4 commented 1 year ago

Last line before error: Failed to parse any boot options

tlaurion commented 1 year ago

@adwall4

Can you do find /boot And take a screenshot?

adwall5 commented 1 year ago

image

this is with just standard alpine install no encryption.

tlaurion commented 1 year ago

Ho. I guess you would need to do a custom installation as per instructions on wiki. At least /boot partition unencrypted and the rest under / preferably encrypted.

As per screenshot / (root) is under /boot. And /boot is under /boot/boot This is not good because everything would be hashed and change across reboots.

Same guidelines as for Debian here: https://osresearch.net/InstallingOS/#compatibility

adwall5 commented 1 year ago

Yeah but Alpine puts boot on /dev/sdb1, swap /dev/sdb2, and rest /dev/sdb3. I set default boot to sdb1 but it doesn’t recognize it.

I think this is more issue of Heads not supporting syslinux rather than Alpine.

Unfortunately, I’m not sure how to install grub inside alpine live usb.

tlaurion commented 1 year ago

I think this is more issue of Heads not supporting syslinux rather than Alpine.

You are right. syslinux and grub are both supported for example media-scan (*.cfg), but not anywhere else in codebase where only grub.cfg is searched for and parsed.

I guess we did it like that because most OSes support both grub/syslinux on ISO/boot media where grub was expected to be installed on disk. Generalizing the concept to scan for both everywhere else would be easy to do, but not sure how many duplicates we would get for boot entries.

@adwall4 @adwall5 : you can test this easily in code by replacing each find /boot for grub.cfg to *.cfg?