An open API service indexing awesome lists of open source software.

https://github.com/b0o/refind-genconf

refind-genconf makes it easier to generate rEFInd configurations for multiple kernels
https://github.com/b0o/refind-genconf

linux linux-kernel refind uefi

Last synced: over 1 year ago
JSON representation

refind-genconf makes it easier to generate rEFInd configurations for multiple kernels

Awesome Lists containing this project

README

          

# refind-genconf [![version](https://img.shields.io/github/v/tag/b0o/refind-genconf?style=flat&color=yellow&label=version&sort=semver)](https://github.com/b0o/refind-genconf/releases) [![license: gpl-3.0-or-later](https://img.shields.io/github/license/b0o/refind-genconf?style=flat&color=green)](https://opensource.org/licenses/GPL-3.0)

> refind-genconf makes it easier to generate rEFInd configurations for multiple kernels

## Install

TODO

## Usage

```
usage: refind-genconf [opts] [kernel ..]

Options:

-h Print this help message.
-c Use file to configure refind-genconf (wow such config).
-x Print the default configuration file.
-X Print an example configuration file.

refind-genconf generates refind configuration files
```

## Configuration

```bash
# Example configuration for refind-genconf
# Make sure you edit this file to reflect your actual setup!

# Path to the boot partition mount point.
# Default:
# boot="/boot"

# Title of the main refind linux menu. If not specified, it will be autodetected via lsb_release.
# menu_title="Arch Linux"

# Configuration directives to be placed at the outermost level of the refind config file.
# Default:
# conf_outer=()
conf_outer=(
"include /EFI/refind/themes/refind-ambience/theme.conf"
"icons_dir /EFI/refind/themes/refind-ambience/icons"
"scan_all_linux_kernels false"
"timeout 20"
"screensaver 300"
)

# Configuration directives to be placed within the main refind linux menu
# Default:
# conf_inner=()
conf_inner=(
"icon /EFI/refind/themes/refind-ambience/icons/os_arch.png"
'volume "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"'
)

# The different boot types for which you would like to generate boot submenu entries.
# Boot type names should match the regular expression [a-zA-Z0-9_]+. The boot type "all" is reserved.
# Default:
# boot_types=("basic" "fallback")
boot_types=(
"apparmor"
"basic"
"minimal"
"fallback"
)

# Manually specify for which kernels boot entries should be generated.
# If this array is empty, all installed kernels will have boot entries generated for them.
kernels=("linux-clear-bin" "linux-ck-zen" "linux-zen" "linux")

# The default kernel to use.
# Default:
# default_kernel="linux"
default_kernel="linux-ck-zen"

# The default boot type to use.
# Default:
# default_type="basic"
default_type="apparmor"

# Kernel parameters to pass for all boot types.
# Default:
# params_all=()
params_all=(
"ro"
"rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
"rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system"
"root=/dev/mapper/system"
"rootflags=subvol=@"
)

# To define kernel parameters specific to a given boot type, define an array
# named params_${boot_type}, e.g. params_basic.

# Kernel parameters to pass for the 'basic' boot type.
params_basic=(
"splash"
"quiet"
"consoleblank=60"
"fbcon=scrollback:256k"
"initrd=\amd-ucode.img"
)

# Kernel parameters to pass for the 'apparmor' boot type.
params_apparmor=(
"${params_basic[@]}"
"apparmor=1"
"security=apparmor"
)

# Kernel parameters to pass for the 'minimal' boot type.
params_minimal=(
"nosplash"
)

# Kernel parameters to pass for the 'fallback' boot type.
params_fallback=(
"${params_minimal[@]}"
)

# Character to use for indentation, either a tab or a space.
# Default:
# indent_char=" "

# Number of indent characters per indent level.
# Default:
# indent_size=2
```

The preceding example produces the following rEFInd configuration:

```ini
# NOTE: This file was auto-generated by refind-genconf. Do not edit directly.

include /EFI/refind/themes/refind-ambience/theme.conf
icons_dir /EFI/refind/themes/refind-ambience/icons
scan_all_linux_kernels false
timeout 20
screensaver 300

menuentry "Arch Linux" {
ostype "Linux"
icon /EFI/refind/themes/refind-ambience/icons/os_arch.png
volume "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

# Default: linux-ck-zen (apparmor)
loader /vmlinuz-linux-ck-zen
options "initrd=\initramfs-linux-ck-zen.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img apparmor=1 security=apparmor ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"

# linux-clear-bin {{{

submenuentry "linux-clear-bin (apparmor)" {
loader /vmlinuz-linux-clear-bin
options "initrd=\initramfs-linux-clear-bin.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img apparmor=1 security=apparmor ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-clear-bin (basic)" {
loader /vmlinuz-linux-clear-bin
options "initrd=\initramfs-linux-clear-bin.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-clear-bin (minimal)" {
loader /vmlinuz-linux-clear-bin
options "initrd=\initramfs-linux-clear-bin.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-clear-bin (fallback)" {
loader /vmlinuz-linux-clear-bin
options "initrd=\initramfs-linux-clear-bin-fallback.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

# }}}

# linux-ck-zen {{{

submenuentry "linux-ck-zen (apparmor)" {
loader /vmlinuz-linux-ck-zen
options "initrd=\initramfs-linux-ck-zen.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img apparmor=1 security=apparmor ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-ck-zen (basic)" {
loader /vmlinuz-linux-ck-zen
options "initrd=\initramfs-linux-ck-zen.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-ck-zen (minimal)" {
loader /vmlinuz-linux-ck-zen
options "initrd=\initramfs-linux-ck-zen.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-ck-zen (fallback)" {
loader /vmlinuz-linux-ck-zen
options "initrd=\initramfs-linux-ck-zen-fallback.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

# }}}

# linux-zen {{{

submenuentry "linux-zen (apparmor)" {
loader /vmlinuz-linux-zen
options "initrd=\initramfs-linux-zen.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img apparmor=1 security=apparmor ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-zen (basic)" {
loader /vmlinuz-linux-zen
options "initrd=\initramfs-linux-zen.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-zen (minimal)" {
loader /vmlinuz-linux-zen
options "initrd=\initramfs-linux-zen.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux-zen (fallback)" {
loader /vmlinuz-linux-zen
options "initrd=\initramfs-linux-zen-fallback.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

# }}}

# linux {{{

submenuentry "linux (apparmor)" {
loader /vmlinuz-linux
options "initrd=\initramfs-linux.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img apparmor=1 security=apparmor ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux (basic)" {
loader /vmlinuz-linux
options "initrd=\initramfs-linux.img splash quiet consoleblank=60 fbcon=scrollback:256k initrd=\amd-ucode.img ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux (minimal)" {
loader /vmlinuz-linux
options "initrd=\initramfs-linux.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

submenuentry "linux (fallback)" {
loader /vmlinuz-linux
options "initrd=\initramfs-linux-fallback.img nosplash ro rd.luks.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=system root=/dev/mapper/system rootflags=subvol=@"
}

# }}}
}

# vim:set fdm=marker fdl=2 ft=conf sw=2 sts=2 et:
```

## License

© 2020-2021 Maddison Hellstrom

Released under the GNU General Public License, version 3.0 or later.