mintCast 333.5 – EFIred

Download

In our Innards section, we talk about Fun With Boots!

And finally, our listener feedback and a few suggestions.

LINUX INNARDS: 

ADVENTURES IN THE BOOT SECTOR – Moss

 This report is not meant to be a Deep Dive so much as an I Want It Fixed NOW, How Do I Do It? We may be hearing from my other team members as I go along for more tips.

  • Cleaning up EFI

After many installations of different distros on my computer, I discovered that my EFI boot sector held a folder for each and every one of those distros, making for a lot of non-booting artifacts.

If you want to see what’s in your EFI, you can run efibootmgr in a terminal. Or you can install rEFInd, which will replace your current GRUB menu with an EFI graphical menu, which may help or further confuse you. I note there are icons for boot menus, Ubuntu distros, Mint (has the old logo), and a penguin logo for other Linuxes.

I was greatly confused by all of this. I won’t go through the long process I went through trying to understand the differences between EFI and GRUB, and also being sidetracked by friends who threw them both out and are using systemd-boot.

The final solution, proposed by Andreas in the Ubuntu Podcast Telegram group and refined by conversations with Londoner and cryptodan in the DHD group, is as follows:

Delete everything on your EFI menu (using efibootmgr). Then reinstall with grub-install with a key to writing it in the EFI partition.

Specifics:

using efibootmgr, you view and identify your EFI boots.

[email protected]:~$ efibootmgr

BootCurrent: 0000

Timeout: 1 seconds

BootOrder: 0000,0005,000A,0008

Boot0000* ubuntu

Boot0005* rEFInd Boot Manager

Boot0008* UEFI OS

Boot000A* openmandriva

[email protected]:~$

Then using sudo efibootmgr, delete each one:

[email protected]:~$ efibootmgr -b 0005 -B

Could not delete variable: Permission denied

[email protected]:~$ sudo !!

sudo efibootmgr -b 0005 -B

BootCurrent: 0000

Timeout: 1 seconds

BootOrder: 0000,000A,0008

Boot0000* ubuntu

Boot0008* UEFI OS

Boot000A* openmandriva

[email protected]:~$

Note that you must use sudo. My illustration showed what happens when you do not.  

Continue until all are deleted.

Run efibootmgr again, and you will see how effective you were.

[email protected]:~$ efibootmgr

BootCurrent: 0000

Timeout: 1 seconds

BootOrder: 0000

Boot0000* ubuntu

[email protected]:~$

Then use:

sudo grub-install –target=x86_64-efi

If you get this warning…: 

grub-install: warning: disk does not exist, so falling back to partition device /dev/sdb1

…then you forgot to use sudo

{NOTE: I have perused the man page for grub-install, and the –target switch is not shown. Thanks to Andreas on Ubuntu Podcast Telegram group for bringing it to my attention.)

Then you just run “sudo update-grub” to get all your boots back.

[email protected]:~$ update-grub

grub-mkconfig: You must run this as root

[email protected]:~$ sudo !!

sudo update-grub

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-45-generic

Found initrd image: /boot/initrd.img-5.3.0-45-generic

Found linux image: /boot/vmlinuz-5.3.0-42-generic

Found initrd image: /boot/initrd.img-5.3.0-42-generic

Found linux image: /boot/vmlinuz-5.3.0-40-generic

Found initrd image: /boot/initrd.img-5.3.0-40-generic

Found linux image: /boot/vmlinuz-5.3.0-28-generic

Found initrd image: /boot/initrd.img-5.3.0-28-generic

Found linux image: /boot/vmlinuz-5.0.0-32-generic

Found initrd image: /boot/initrd.img-5.0.0-32-generic

Found Feren OS (18.04) on /dev/sda1

Found Ubuntu 16.04.6 LTS (16.04) on /dev/sda2

Found Ubuntu 18.04.4 LTS (18.04) on /dev/sda3

Found Zorin OS 15.2 (15) on /dev/sda4

Found OpenMandriva Lx 4.1 (4.1) on /dev/sdb3

Found linux image: /boot/vmlinuz-5.3.0-45-generic

Found initrd image: /boot/initrd.img-5.3.0-45-generic

Found linux image: /boot/vmlinuz-5.3.0-42-generic

Found initrd image: /boot/initrd.img-5.3.0-42-generic

Found linux image: /boot/vmlinuz-5.3.0-40-generic

Found initrd image: /boot/initrd.img-5.3.0-40-generic

Found linux image: /boot/vmlinuz-5.3.0-28-generic

Found initrd image: /boot/initrd.img-5.3.0-28-generic

Found linux image: /boot/vmlinuz-5.0.0-32-generic

Found initrd image: /boot/initrd.img-5.0.0-32-generic

Found Feren OS (18.04) on /dev/sda1

Found Ubuntu 16.04.6 LTS (16.04) on /dev/sda2

Found Ubuntu 18.04.4 LTS (18.04) on /dev/sda3

Found Zorin OS 15.2 (15) on /dev/sda4

Found OpenMandriva Lx 4.1 (4.1) on /dev/sdb3

Found Feren OS (18.04) on /dev/sda1

Found Ubuntu 16.04.6 LTS (16.04) on /dev/sda2

Found Ubuntu 18.04.4 LTS (18.04) on /dev/sda3

Found Zorin OS 15.2 (15) on /dev/sda4

Found OpenMandriva Lx 4.1 (4.1) on /dev/sdb3

Adding boot menu entry for EFI firmware configuration

done

[email protected]:~$

FIXING GRUB

You know that issue I’ve had with each successive installation taking over GRUB? Running grub-install as shown above, in the distro you want to have controlling GRUB, will fix this.

If you’re installing a distro and don’t want it to take control of GRUB, and *if* it uses the Ubiquity installer common to many Ubuntu-based distros, our listener Londoner points out you can install by booting to the live disk, open a Terminal, and type “ubiquity –no-bootloader“. This will open a graphical Ubiquity installer but will not install GRUB as part of the process.

GRUB Rescue (Joe)

Remember this will be temporary.

Grub rescue is what comes up when your boot is broken for whatever reason and all you see is (GRUB)

ls

Which will show you all the attached partitions.

You will need to continue using ls to inspect each of the partitions and determine which is the root of your system.  Should look like a normal linux root folder structure.

Then when you have that you can set root

set root=(hd0,1)

You can then search though and find the grub file using LS and do:

set prefix=(hd0,1)/grubLocation

For many efi systems your root and grub will be on different partitions.

From here you can test with boot, and it will probably work but remember if it doesn’t you will end up right back at the start.

Do the things above again as well as:

linux /boot/vmlinuz-3.2.0-14-generic 

using the correct vmlinuz location and version which you will find using l

initrd /initrd.img is something that may also need to set.

After that do a boot.

Sometimes you will not be able to determine the proper root and may need several attempts at changing before the system will boot.

After the system is booted you will need to reinstall grub which will hopefully pick up the proper settings or you can go into the grub on the system and update it manually with the information that you put into rescue and update Grub that way.

  • Tony H
    • I recently had the need to rescue my Grub install after rebuilding my Desktop PC and used this ‘Boot Repair Disk’ iso from sourceforge and within a few minutes had a bootable system again. (Also SuperGrub2 disk helps – Moss)

VIBRATIONS FROM THE ETHER:

 

 

  • John Wallis

Check iptables rules to see which rules are currently not used [FIRE-4513]  https://cisofy.com/lynis/controls/FIRE-4513/

To decrease the impact of a full /home file system, place /home on a separate partition [FILE-6310]

   https://cisofy.com/lynis/controls/FILE-6310/

  * To decrease the impact of a full /tmp file system, place /tmp on a separate partition [FILE-6310]

   https://cisofy.com/lynis/controls/FILE-6310/

  * To decrease the impact of a full /var file system, place /var on a separate partition [FILE-6310]

   https://cisofy.com/lynis/controls/FILE-6310/

  • Larry Murphey

” How To Linux ” with Chase Nunes and Chris Fisher.

  • Nobhobbor
  • Billy Larland

Chess Griffen’s Linux Reality podcast

CHECK THIS OUT!

  • Paul Romano, Listener
    • Recently, in the current situation, I have been watching a lot of videos (movies and TV shows) in full-screen mode. Occasionally I have failed to notice the battery warning indicator on my laptop, resulting in a complete system freeze when the battery becomes fully discharged.

I came across a Cinnamon applet called Battery Applet with Monitoring and Shutdown (BAMS). This displays the battery charge as a percentage in the system tray and allows Alerts & Actions to be set up. For users like me who no longer have perfect eyesight it is much easier to determine the state of the battery at a glance, because of the colour coding it uses. See attached screenshots.

When the battery is above the pre-determined threshold and connected to AC power, the applet is green (BAMS-1.png). When the battery is above the pre-determined threshold but is not connected to AC power, the applet is green with a red border (BAMS-2.png). When the battery reaches the pre-determined threshold, the applet flashes a message and plays a configurable audio alert. This also appears when in full-screen mode, avoiding the problem I described above. When reconnected to AC power, the applet is orange (BAMS-3.png) until the pre-determined threshold is achieved, then it goes back to green. The thresholds for both the Alert and for Suspend can be adjusted.

The applet can work alongside the default Power Manager applet, or be used instead of it. However, it only displays battery percentage and not the time remaining, neither can it be used to adjust the screen brightness. I am also using TLP, so there is no conflict with that either.

https://cinnamon-spices.linuxmint.com/applets/view/255

Announcements: 

  • Our next episode will be at 2 pm Central US time, 7 pm UTC, May 3, 2020. That’s 8PM British Summer Time. 

Wrap-up:

Before we leave, we want to make sure to acknowledge some of the people who make mintCast possible … 

  • Hobstar for his work on the new logo
  • Josh for all his work on the website
  • Hacker Public Radio for the Mumble server we are using to record
  • Bytemark Hosting for hosting mintcast.org and our Mumble server
  • Archive.org for hosting our audio files
  • The Linux Mint development team for the fine distro we love to talk about.

3 Replies to “mintCast 333.5 – EFIred”

Leave a Reply

Your email address will not be published. Required fields are marked *

Linux Mint

The distribution that spawned a podcast. Support us by supporting them. Donate here.

Archive.org

We currently host our podcast at archive.org. Support us by supporting them. Donate here.

Audacity

They’ve made post-production of our podcast possible. Support us by supporting them. Donate here.

mintCast on the Web

Episode Archives