summaryrefslogtreecommitdiff
path: root/roles/installer/debian
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-09-16 00:40:31 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-09-16 00:40:31 +0200
commit58809a38cc999fc697bd3094f4575953c602ee2e (patch)
tree4bf2077c8dfa8520f48864816c81d444841c23dd /roles/installer/debian
parentubuntu installer /swapfile vs /swap.img (diff)
improve compatibility with more bioses for debian usb installer
Diffstat (limited to 'roles/installer/debian')
-rw-r--r--roles/installer/debian/usb/tasks/main.yml28
-rw-r--r--roles/installer/debian/usb/templates/syslinux.cfg.j24
2 files changed, 6 insertions, 26 deletions
diff --git a/roles/installer/debian/usb/tasks/main.yml b/roles/installer/debian/usb/tasks/main.yml
index 491cde3d..ced56372 100644
--- a/roles/installer/debian/usb/tasks/main.yml
+++ b/roles/installer/debian/usb/tasks/main.yml
@@ -69,33 +69,11 @@
src: "{{ debian_installer_target_dir }}/linux"
dest: "{{ usb_install_path }}/"
-- name: create BIOS boot directory
+- name: generate syslinux configuration
run_once: true
- file:
- path: "{{ usb_install_path }}/bios"
- state: directory
-
-- name: generate syslinux configuration for BIOS boot
- run_once: true
- vars:
- syslinux_base_path: "../"
- template:
- src: syslinux.cfg.j2
- dest: "{{ usb_install_path }}/bios/syslinux.cfg"
-
-- name: create EFI boot directory
- run_once: true
- file:
- path: "{{ usb_install_path }}/EFI/boot"
- state: directory
-
-- name: generate syslinux configuration for UEFI boot
- run_once: true
- vars:
- syslinux_base_path: "../../"
template:
src: syslinux.cfg.j2
- dest: "{{ usb_install_path }}/EFI/boot/syslinux.cfg"
+ dest: "{{ usb_install_path }}/syslinux.cfg"
- name: make the USB disk bootable
pause:
@@ -106,6 +84,7 @@
$ sudo apt install mbr syslinux
$ sudo install-mbr /dev/CHANGEME
+ $ mkdir -p {{ (usb_install_path, 'bios/') | path_join }}
$ sudo syslinux -i /dev/CHANGEME1 -d bios
$ sudo fdisk /dev/CHANGEME
[Here, make sure partition 1 is marked bootable.]
@@ -114,6 +93,7 @@
for UEFI these steps need to be done
$ sudo apt install syslinux-efi
+ $ mkdir -p {{ (usb_install_path, 'EFI/boot/') | path_join }}
$ cp /usr/lib/syslinux/modules/efi64/* {{ (usb_install_path, 'EFI/boot/') | path_join }}
$ cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi {{ (usb_install_path, 'EFI/boot/bootx64.efi') | path_join }}
diff --git a/roles/installer/debian/usb/templates/syslinux.cfg.j2 b/roles/installer/debian/usb/templates/syslinux.cfg.j2
index 40c877d2..badb7e81 100644
--- a/roles/installer/debian/usb/templates/syslinux.cfg.j2
+++ b/roles/installer/debian/usb/templates/syslinux.cfg.j2
@@ -19,7 +19,7 @@ MENU TITLE {{ install_distro }} / {{ install_codename }}
LABEL {{ host }}
MENU LABEL automated installer for {{ host }}
- KERNEL {{ syslinux_base_path }}linux
- INITRD {{ syslinux_base_path }}initrd.{{ host }}.gz
+ KERNEL linux
+ INITRD initrd.{{ host }}.gz
APPEND auto fb=false {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
{% endfor %}