Replace grub with syslinux
This commit is contained in:
parent
a21f795f24
commit
084ba2e892
1 changed files with 1 additions and 69 deletions
|
@ -4,8 +4,7 @@ include:
|
||||||
system_bootloader_pkgs:
|
system_bootloader_pkgs:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- pkgs:
|
- pkgs:
|
||||||
- grub
|
- syslinux
|
||||||
- grub-efi
|
|
||||||
- mkinitfs
|
- mkinitfs
|
||||||
- mkinitfs-doc
|
- mkinitfs-doc
|
||||||
- efibootmgr
|
- efibootmgr
|
||||||
|
@ -15,36 +14,6 @@ system_bootloader_pkgs:
|
||||||
{% set KERNEL_VERSION = salt['cmd.shell']('uname -r') %}
|
{% set KERNEL_VERSION = salt['cmd.shell']('uname -r') %}
|
||||||
{% set ROOT_UUID = salt['cmd.shell']('lsblk -o LABEL,UUID | grep ROOT | awk \'{print $2}\'') %}
|
{% set ROOT_UUID = salt['cmd.shell']('lsblk -o LABEL,UUID | grep ROOT | awk \'{print $2}\'') %}
|
||||||
|
|
||||||
system_bootloader_install:
|
|
||||||
cmd.run:
|
|
||||||
- name: "grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=alpine-{{ CURRENT_SUBVOLUME_TIMESTAMP }}"
|
|
||||||
- require:
|
|
||||||
- system_base_pkgs
|
|
||||||
- system_bootloader_pkgs
|
|
||||||
|
|
||||||
system_bootloader_default_grub:
|
|
||||||
file.keyvalue:
|
|
||||||
- name: /etc/default/grub
|
|
||||||
- key_values:
|
|
||||||
GRUB_CMDLINE_LINUX: '"console=ttyS0,19200n8net.ifnames=0"'
|
|
||||||
- separator: '='
|
|
||||||
- uncomment: '# '
|
|
||||||
- key_ignore_case: false
|
|
||||||
- value_ignore_case: false
|
|
||||||
- append_if_not_found: true
|
|
||||||
- require:
|
|
||||||
- system_bootloader_install
|
|
||||||
|
|
||||||
system_bootloader_grub_dir:
|
|
||||||
file.directory:
|
|
||||||
- name: /boot/grub
|
|
||||||
- makedirs: true
|
|
||||||
- user: root
|
|
||||||
- group: root
|
|
||||||
- mode: '0755'
|
|
||||||
- require:
|
|
||||||
- system_bootloader_install
|
|
||||||
|
|
||||||
system_bootloader_mkinitfs_conf:
|
system_bootloader_mkinitfs_conf:
|
||||||
file.keyvalue:
|
file.keyvalue:
|
||||||
- name: /etc/mkinitfs/mkinitfs.conf
|
- name: /etc/mkinitfs/mkinitfs.conf
|
||||||
|
@ -68,40 +37,3 @@ system_bootloader_os-release:
|
||||||
- uncomment: '# '
|
- uncomment: '# '
|
||||||
- key_ignore_case: False
|
- key_ignore_case: False
|
||||||
- append_if_not_found: True
|
- append_if_not_found: True
|
||||||
|
|
||||||
system_bootloader_remove_default_menuentry:
|
|
||||||
file.absent:
|
|
||||||
- name: /etc/grub.d/10_linux
|
|
||||||
- require:
|
|
||||||
- system_bootloader_install
|
|
||||||
|
|
||||||
system_bootloader_menuentry:
|
|
||||||
file.managed:
|
|
||||||
- name: /etc/grub.d/10_noveria
|
|
||||||
- source: salt://{{ tpldir }}/files/bootloader_menuentry
|
|
||||||
- template: jinja
|
|
||||||
- context:
|
|
||||||
CURRENT_SUBVOLUME_TIMESTAMP_HUMAN: {{ CURRENT_SUBVOLUME_TIMESTAMP_HUMAN }}
|
|
||||||
CURRENT_SUBVOLUME_TIMESTAMP: {{ CURRENT_SUBVOLUME_TIMESTAMP }}
|
|
||||||
ROOT_UUID: {{ ROOT_UUID }}
|
|
||||||
- mode: '0755'
|
|
||||||
- require:
|
|
||||||
- system_base_pkgs
|
|
||||||
- system_bootloader_pkgs
|
|
||||||
- system_bootloader_remove_default_menuentry
|
|
||||||
|
|
||||||
system_bootloader_menuentry_prepend_shebang:
|
|
||||||
file.prepend:
|
|
||||||
- name: /etc/grub.d/10_noveria
|
|
||||||
- text: "#!/bin/sh"
|
|
||||||
- require:
|
|
||||||
- system_bootloader_menuentry
|
|
||||||
|
|
||||||
system_bootloader_config:
|
|
||||||
cmd.run:
|
|
||||||
- name: 'grub-mkconfig -o /boot/grub/grub.cfg'
|
|
||||||
- require:
|
|
||||||
- system_bootloader_pkgs
|
|
||||||
- system_bootloader_install
|
|
||||||
- system_bootloader_grub_dir
|
|
||||||
- system_bootloader_menuentry_prepend_shebang
|
|
||||||
|
|
Loading…
Reference in a new issue