diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 6ac3ca39..3e58528f 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -20,6 +20,7 @@ RUN apt-get update && \ gccgo \ genisoimage \ git \ + grub-efi \ isolinux \ less \ libblkid-dev \ diff --git a/efi.txt b/efi.txt new file mode 100644 index 00000000..f684e8ee --- /dev/null +++ b/efi.txt @@ -0,0 +1,28 @@ +To install with EFI: + +A: install grub-efi + +apt install grub-efi + +B: Add to the installation process in scripts/package-iso + +1. Make directories ${CD}/boot/grub and ${CD}/EFI/BOOT +2. Install the various grub modules from /usr/lib/grub/x86_64-efi/ to ${CD}/boot/grub/x86_64-efi/ +3. Copy scripts/grub.cfg to ${CD}/boot/grub/grub.cfg +4. Run grub-mkimage to create the grub image: + +(cd ${CD} && grub-mkimage -O x86_64-efi -o EFI/BOOT/BOOTX64.EFI --config=boot/grub/grub.cfg --compression=auto --prefix='()/boot/grub' disk part_msdos fat iso9660 ) + +NOTE: do *NOT* try to install the linux module directly in the grub image; it causes command-line options not to be passed and is a known bug. + +5. Add the following xorriso options + + -eltorito-alt-boot -e EFI/BOOT/BOOTX64.EFI -no-emul-boot \ + -isohybrid-gpt-basdat \ + +This installation includes *no* additional icons or drivers. It is just meant to get RancherOS booted on an EFI system. +If you want to add support for graphical installations, additional filesystems, and everything else.... you will need a lot more + + + + diff --git a/scripts/grub.cfg b/scripts/grub.cfg new file mode 100644 index 00000000..3882fb7d --- /dev/null +++ b/scripts/grub.cfg @@ -0,0 +1,14 @@ +set default="0" +set timeout=10 + +set gfxmode=auto +insmod efi_gop +insmod efi_uga + + +menuentry "Rancher" { + set gfxpayload=keep + linux /boot/vmlinuz quiet rancher.password=rancher rancher.state.autoformat=[/dev/sda,/dev/vda] + initrd /boot/initrd +} +