Category: grub

GRUB Basic

GRUB Basic

Access grub menu

For hidden menu, it can be accessed by holding down the Shift key at the very start of the boot-up process.

If still cannot be started, then provide following lines in /etc/defaults/grub could fix the issue.

GRUB_TERMINAL_OUTPUT="console"

Power down monitor

Power down monitor can be done via command line as below.

setterm --blank 1 --powerdown 2

It blanks screen after 1 min and turn it off after 2 min.

By adding the kernel parameter consoleblank=60 will lets screen off in 60 seconds if no one touch it.

Regenerate /boot/grub/grub.cfg

Run following command can regenerate /boot/grub/grub.cfg using /etc/defaults/grub

update-grub
# or
update-grub2

Update /boot/efi/EFI/ubuntu/grub.cfg

Run following command can update this file according to current envirnment structure.

dpkg-reconfigure grub-efi-amd64

It is also update /boot/grub too.

References

GRUB2 101: How to Access and Use Your Linux Distribution’s Boot Loader
How To Configure GRUB2 Boot Loader Settings In Ubuntu
How to power down display on terminal?
How to Configure the GRUB2 Boot Loader’s Settings

Ubuntu grub-efi-amd64-signed error after do-release-upgrade

Ubuntu grub-efi-amd64-signed error after do-release-upgrade

Following error occurred whenever run apt upgrade after perform do-release-upgrade

dpkg: error processing package grub-efi-amd64-signed (–configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32

Solution

Reinstall all grub group packages using following commands

sudo apt-get purge grub\*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub

Boot from small USB drive with iscsi root filesystem

Boot from small USB drive with iscsi root filesystem

Boot from small size USB drive only holding boot partitions, rest of filesystems are on iscsi drives. Tested in EFI boot in Fedora 34.

Requirement

  • /boot partition can be 256M, can be very small, but better bigger
Filesystem                         Size  Used Avail Use% Mounted on
/dev/sdb2                          428M  190M  212M  48% /boot
  • /boot/efi is an almost static very small filesystem, can be very small
Filesystem                         Size  Used Avail Use% Mounted on
/dev/sdb1                          512M   31M  482M   6% /boot/efi

grub configuration

Define iscsi login info

GRUB_CMDLINE_LINUX="netroot=iscsi:<user>:<password>@<ip>::3260::<iqn> rd.iscsi.initiator=<client iqn> rhgb quiet ...

Define network interface with static ip 192.168.1.2, gateway 192.168.1.254, nameserver 192.168.1.1, interface enp0s10.

ip=192.168.1.2::192.168.1.254:255.255.255.0::enp0s10:off nameserver=192.168.1.1

Define network with bridge interface br0 on network interface enp0s10

ip=192.168.1.2::192.168.1.254:255.255.255.0::br0:off nameserver=192.168.1.1 ifname=enp0s10:xx:xx:xx:xx:xx:xx bridge=br0:enp0s10"

Update grub using following command

grub2-mkconfig -o /boot/grub2/grub.cfg