From b2e713108ef78c8dc0e5dca8dbf058121c54cbe8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 31 Dec 2018 01:56:36 +0100 Subject: fix usb-install role to support UEFI, added very basic setup for media.elevate.at --- common/usb-install.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/usb-install.yml b/common/usb-install.yml index 7469fe2d..475a4cb5 100644 --- a/common/usb-install.yml +++ b/common/usb-install.yml @@ -40,7 +40,7 @@ loop_control: label: "{{ item | basename }}" - - name: Generate syslinux configuration + - name: Generate syslinux configuration for BIOS boot copy: dest: "{{ usbdrive_path }}/syslinux.cfg" content: | @@ -49,7 +49,23 @@ LABEL linux KERNEL linux INITRD initrd.preseed.gz - APPEND install vga=off console=ttyS0,115200n8 + APPEND install DEBCONF_DEBUG=5 + + - name: create EFI boot directory + file: + path: "{{ usbdrive_path }}/EFI/boot" + state: directory + + - name: Generate syslinux configuration for UEFI boot + copy: + dest: "{{ usbdrive_path }}/EFI/boot/syslinux.cfg" + content: | + DEFAULT linux + SAY SYSLINUX booting an automated installer for {{ hostname }}... + LABEL linux + KERNEL ../../linux + INITRD ../../initrd.preseed.gz + APPEND install DEBCONF_DEBUG=5 - name: Make the USB disk bootable pause: @@ -58,10 +74,15 @@ You should make sure the USB disk is bootable and has syslinux installed. - $ sudo apt install mbr syslinux + $ sudo apt install mbr syslinux syslinux-efi $ sudo install-mbr /dev/CHANGEME $ sudo syslinux -i /dev/CHANGEME1 $ sudo fdisk /dev/CHANGEME [Here, make sure partition 1 is marked bootable.] + for UEFI these steps need to be done + + $ cp /usr/lib/syslinux/modules/efi64/* {{ usbdrive_path }}/EFI/boot/ + $ cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi {{ usbdrive_path }}/EFI/boot/ + This will NOT be done automatically. -- cgit v1.2.3