IRC:patch-grub19 [2020-01-22]

About

At linux mint 19.3, the initial created setup of grub might not allow you to enter the grub-menu on boot, the common keys to enter grub-menu are simply not usable/working for you!

Being able to enter the grub-menu is needed with some machines to by-pass issues on boot, es. to be able to:

You can use ot-patch-grub19 to modify (patch) the related grub.cfg file, so the grub-menu will show up on boot without user-action, giving you a 10 seconds timeout to enter edit-mode or to start doing any selection there.

*) systems having already installed at least one other kernel, seem to be less affected by this issue == chances are higher to be able to enter the grub-menu after a warm-boot.

Remarks

ot-patch-grub19 is meant to be used for linux mint 19.x only. You download and run it using a live-mint (the install media).

You have to mount the volume/partition of the installed linux-mint containing the grub-configuration (/boot/grub) - just read on.

mount volume

Use the filemanager and mount the volume/partition containing the grub-configuration (/boot/grub) of your installed linux mint.

Mountable volumes/partitions are shown at the device section in the lower left pane.

To mount a volume: click onto it's entry at the at the device section. Contained files will be shown on the main-pane of the filemanager automatically. Note: next to the device-entry an icon will show up, which you can use to unmount the volume/partition again later.

There exist two possible cases where grub is stored - with most setups /boot/grub will be part of your root-filesystem.

In some cases (/boot/)grub does reside in a partition of it's own (examples: using lvm/encryption or btrfs with a multiboot-setup, or if you did perform a manual setup).

cross-check - /boot/grub part of root-fs

After mounting a volume, check if there exists and folder boot, containing other files and a subfolder grub.

If this is the case, you can continue with applying the patch below.

If the folder boot is empty - you are using a separate partition for grub. Unmount the volume/partition again and select the correct volume.

cross-check - grub uses a separate volume/partition

After mounting a volume, check if there exists and folder grub (without a boot parent-folder) .

If this is the case, you can continue with applying the patch below.

If there is no folder grub: Unmount the volume/partition again and select the correct volume.

apply the patch

Download a current version of ot-patch-grub19, make it executable and run it using sudo (no password required at a live-mint).

Open a terminal and copy&paste the following commands there (to paste at the terminal: use right-click -> paste ):

cd ~/Downloads
wget https://www.orcus.de/Entities/linux/ot-patch-grub19.sh -O ot-patch-grub19.sh
chmod +x ot-patch-grub19.sh
# if you get asked for the sudo password - just press return
sudo ./ot-patch-grub19.sh

ot-patch-grub19 will show some version + general info and prompts you to mount the partition/volume (which you should have done already if you did follow the tutorial) - so press just ENTER (aka RETURN) to continue.

If you didn't mount the volume: do it now as described above and press ENTER (aka RETURN) afterwards, to continue.

After pressing return, it will take some seconds until ot-patch-grub19 did finish searching for grub.cfg. If no grub.cfg can be found, or if there are more locations available than expected (as you did forget to unmount other volumes), it will return an according error-message. Just fix the reason and run ot-patch-grub19 again.

ot-patch-grub19 will create a backup of the current grub.cfg first. (If you are running the tool repeatedly, additional backups will be created, the oldest one will be the initial copy).

After applying the patch ot-patch-grub19 will show an according success-message or error-message (in case of failure).

If you get a message shown from the patch "do you want to revert..." - you did seemingly run ot-patch-grub19 before and should already be done = press CTRL+c to abort. Note: You could use the revert-feature (pressing 2 times y(es) to revert the changes done by the patch too (in case you did deleted the created backup-files for some reason).

After the patch has been applied: Unmount the used volume/partition using the filemanager and reboot (remove the boot-media when being asked for at reboot).

sample output

mint@mint:~/Downloads$ sudo ./ot-patch-grub19.sh
ot-patch-grub19.sh - 003 - 2020.01.12
This tool has only to be used with a fresh install of linux mint 19,
where you are not able to enter the grub-menu on boot
1) the orignal grub.cfg will be saved as grub.cfg-backup
2) applies a required patch to grub.cfg to show grub-menu without user-action
------------------------------------------------------------------------
mount your root filesystem (or the filesystem containing /boot)
using the filemanager NOW ...
press [enter] to continue, when done / press [CTRL+C] to abort
ok found'/media/mint/8d06c327-c3ea-4eba-bb5e-6e4fbdd8165f/boot/grub/grub.cfg' ...
... create backup at '/media/mint/8d06c327-c3ea-4eba-bb5e-6e4fbdd8165f/boot/grub/grub.cfg-back'
patching file /media/mint/8d06c327-c3ea-4eba-bb5e-6e4fbdd8165f/boot/grub/grub.cfg
... returned status-code 0 = no error/success
please umount the filesystem and reboot
grub-menu should now get visible without user action
using a 10 seconds timeout

Final Notes

If you want to get rid of the modified grub.cfg at a later time (from a working system) - running sudo update-grub from the installed linux-mint will recreate grub.cfg and remove the modifications this way again. Note: as a kernel-related update will implicitly run update-grub - the modification will be gone afterwards too.

If you want to make the changes permanent, you have to modify additionally /etc/default/grub adapting the modified values - likely ask at IRC if you need help with this.

Related information

IRC:bootgrub.htmentering grub-menu on boot
IRC:bootparam.htmedit kernel params on boot, common use-cases
IRC:grubedit.htmmaking kernel params permanent

© 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