Package:GRUB2

From Adélie Linux

GRUB 2 is a bootloader for multiple architectures. It can be useful on x86_64 machines where elilo and syslinux fail to boot in UEFI mode.

x86 (BIOS)

Ensure you are chrooted correctly into /target before continuing.

Install the needed packages:

   # apk add grub grub-bios

Ensure /boot is mounted, if you haven't already mounted it:

   > mount /dev/$boot /boot

Run grub-mkconfig to create a configuration file suitable for your system:

   # cat -> /etc/update-extlinux.conf
   default_kernel_opts=ro   # Any kernel options you need
   modules=                 # Any modules you need
   root=/dev/sda4           # Your root device here
   GRUB_DISTRIBUTOR=Adelie
   # mkdir -p /boot/grub
   # grub-mkconfig > /boot/grub/grub.cfg

Install GRUB, where $disk is the actual disk (i.e. /dev/sda or /dev/vda, not /dev/sda1):

   # grub-install --boot-directory=/boot /dev/$disk

This should allow you to boot from the disk.


PowerPC

Ensure you are chrooted correctly into /target before continuing.

Install the needed packages:

   # apk add grub grub-ieee1275

Mount your bootstrap partition (HFS formatted, if on Macintosh) at /boot/grub:

   # mkdir -p /boot/grub
   > mount /dev/$boot /boot/grub

Run grub-mkconfig to create a configuration file suitable for your system:

   # cat -> /etc/update-extlinux.conf
   default_kernel_opts=ro   # Any kernel options you need
   modules=                 # Any modules you need
   root=/dev/sda4           # Your root device here
   GRUB_DISTRIBUTOR=Adelie
   # grub-mkconfig > /boot/grub/grub.cfg

Install GRUB, ignoring any errors about PReP partitions:

   # grub-install /boot/grub
   # grub-macbless /boot/grub/grub

You then need to install a suitable ofboot.b file:

   # curl -o /boot/grub/ofboot.b https://distfiles.adelielinux.org/source/grub-ofboot.b

This should allow you to boot from the disk.