Lewati ke konten

Boot Manager Configuration

Konten ini belum tersedia dalam bahasa Anda.

systemd-boot

systemd-boot has two kinds of configuration files, one for systemd-boot itself in /boot/loader/loader.conf and one for each individual kernel entry in /boot/loader/entry.

Loader configuration

In this configuration file, you can change the default entry and the timeout of systemd-boot

/boot/loader/loader.conf
default @saved
timeout 5
#console-mode keep # This option configures the resolution of the console.

Kernel Commandline Configuration

We provide a tool for easier configuration of systemd-boot sdboot-manage. One of the perks of this tool is global kernel commandline configuration. The configuration file for sdboot-manage is located in /etc/sdboot-manage.conf. Edit the LINUX_OPTIONS= line in /etc/sdboot-manage.conf to change kernel parameters.

/etc/sdboot-manage.conf
LINUX_OPTIONS="zswap.enabled=0 nowatchdog quiet splash"

After making changes, regenerate all systemd-boot entries with the following command

Terminal window
sudo sdboot-manage gen

rEFInd

Like systemd-boot, rEFInd has two configuration files. refind.conf located in boot/efi/EFI/refind is mainly for changing how rEFind behaves while /boot/refind_linux.conf is for managing your boot options. refind.conf contains extensive comments explaining all its options.

Kernel Commandline Configuration

To pass kernel parameters to the commandline, modify “Boot using default options” in /boot/refind_linux.conf

/boot/refind_linux.conf
"Boot using default options" "root=PARTUUID=1cb353ec-7f03-4820-8b4b-03baf53a208f rw zswap.enabled=0 nowatchdog quiet splash"

Changes to both configuration files will immediately take effect. Running a command to “save” changes is unnecessary.

GRUB

Unlike systemd-boot and rEFInd, GRUB only has one configuration file located in /etc/default/grub. There is pretty good documentation in this file that explains what each option does.

Hiding the GRUB Boot Menu

To hide the GRUB menu, simply set these following options accordingly.

/etc/default/grub
GRUB_TIMEOUT='0'
GRUB_TIMEOUT_STYLE=hidden

Press ESC to get access to the GRUB prompt. From here run normal or exit to get back to the familiar GRUB boot menu.

Kernel Commandline Configuration

To pass kernel parameters to the commandline with GRUB, we need to edit GRUB_CMDLINE_LINUX_DEFAULT within /etc/default/grub

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog zswap.enabled=0 quiet splash'

Every time we modify the GRUB configuration file, we need to remake the config with the following command

Terminal window
sudo grub-mkconfig -o /boot/grub/grub.cfg

Learn more