IRC:grubedit [2020-01-21]

About

To make kernel parameters permanent you have to edit /etc/default/grub and recreate the grub-menu afterwards.

Remarks

You should first test kernel params by editing them on boot using the grub-menu (see below).

Create a backup of the /etc/default/grub before editing it.

If using commands with sudo, you will get ask for your users password. (with older mint-versions, your will get no feedback shown while entering it; newer mint-versions will show some asterisks * while entering it)

Make kernel parameters permanent

1) Create backup

Copy the following lines to a terminal:

mkdir ~/backups
cp --parents --backup=numbered /etc/default/grub  ~/backups

This will create a folder backups at your users home-directory and place a copy of the original file, including it's parent folders structure there.

If the cp command is run repeatedly, older backups will be kept, but renamed to grub~1~, grub~2~ etc - the last recent version will keep the original name.

2) Edit /etc/default/grub

Copy the following line to a terminal and enter your password, when being asked (2 times on the first run):

xed admin:///etc/default/grub

Note: If you cant used xed for some reason or are limited to a text-console, you can use nano - see IRC:nano.htm - instead to apply the required changes:

Go to the line showing: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

# ... skipped text before
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# skipped text after ...

Add extra parameters inside the quotes to quiet splash, delimiting it with an extra space-character from the existing ones.

You could optionally replace the default quiet splash with nosplash too, which will suppress the mint-logo, but show text-output during boot instead (many people will prefer to have the logo).

Save the modified file and close the editor.

Common edits (only use them if you need them)

kernel-paraminfo
nomodesetturn off graphics-detection on boot = avoid black-screen
acpi=offturn off power-management = is faulty on some machines

3) Recreate the actual grub-menu run

To re-create the actual grub-menu run:

sudo update-grub

, which should list available kernels and installed OS - similar to this:

oadm@mint-19-3-cinnamon-64bit:~$ sudo update-grub
[sudo] password for oadm:         
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/60_mint-theme.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/linuxmint/theme.txt
Found linux image: /boot/vmlinuz-5.3.0-26-generic
Found initrd image: /boot/initrd.img-5.3.0-26-generic
Found linux image: /boot/vmlinuz-5.0.0-37-generic
Found initrd image: /boot/initrd.img-5.0.0-37-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
oadm@mint-19-3-cinnamon-64bit:~$

If update-grub does show any errors: recheck your edits. It might help to compare your edits against the initial created backup-file using:

diff /etc/default/grub  ~/backups/etc/default/grub
oadm@mint-19-3-cinnamon-64bit:~$ diff /etc/default/grub  ~/backups/etc/default/grub 
10c10
< GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
---
> GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
oadm@mint-19-3-cinnamon-64bit:~$ 

Reboot and use

If you reboot now, your modified kernel params will be used as default.

In case you are facing unexpected issue during boot: you are able to edit (or delete) kernel-params from the grub-menu as usual: You have just replaced the default quiet splash with your modified version of it ...

Related information

IRC:nano.htma simple text-mode editor
IRC:grub-saved.htmauto-save last manual kernel- or os-selection as new default
IRC:bootparam.htmedit kernel params on boot, common use-cases

© 1998-2023 by ORCUS® GmbH - www.orcus.de (imprint) - we strictly do not track (period) - details: privacy - overview IRC: IRC support

note-1: not tracking does mean too - we are strictly NOT using direct external links within the content = we bother you having to copy&paste offered URLs