How to Fix the Linux Boots Into the BIOS Mistake

Laptop on a blue background showing a Linux command prompt.
fatmawati achmad zaenuri/

GRUB updates have been identified to final result in Linux pcs booting into the BIOS or UEFI configurations. The correct for this normally takes benefit of a helpful program recovery trick you really ought to know about.

A Case Analyze: GRUB 2:2.06.r322

A procedure update for Arch and Arch-primarily based Linux distributions in summer months 2022 included a new variation of GRUB. GRUB stands for grand unified bootloader.

A bootloader is an software that kicks off the boot-up approach when your laptop or computer is turned on. Various program instruments and utilities want to be launched—from the right partition and in the right order—to finally final result in an operational and obtainable functioning technique. GRUB kicks off that cascade of occasions.

If you have additional than 1 working method put in on your personal computer, GRUB offers a menu so that you can choose which operating method to use. One of the code variations to GRUB 2:2.06.r322 added help for a new GRUB alternative, --is-supported. The selection is used to indicate whether a boot to firmware capacity is current or not. If it is, GRUB adds an entry to the boot menu to enable you boot into your EUFI options.

The new option was referenced in a script called “” The diff for this file shows that an if assertion was removed, and two strains had been extra.

One particular of the new traces was a replacement if statement. The other new line is made up of fwsetup --is-supported . The “fw” in “fwsetup” stands for firmware. But mainly because that line is higher than the new if statement, it is normally heading to run. If it was inside of the entire body of the if assertion it would only operate when the test in the if assertion resolved to true.

This caused difficulties on several, but not all, UEFI pcs. It depended on no matter if the edition of GRUB you currently had set up supported this command. Afflicted equipment would do just one of two points. They’d both go into a boot-loop wherever the boot system was never ever accomplished but regularly restarted, or the personal computer would boot straight into the UEFI firmware settings. Possibly way, there was no way to power your laptop or computer to boot into Linux.

When you are confronted with conditions like this there is always the nuclear selection of executing a total reinstall. That’ll get the job done, but based on how your difficult drive has been partitioned, without a current backup, you may well reduce details.

The reduced-influence method takes advantage of chroot and a Reside USB or Are living CD/DVD. This is a very good procedure to understand and have up your sleeve for all types of program failures when you cannot boot or log in to your Linux laptop.

The Procedure We’ll Use

In purchase to use this technique you need to have to have possibly a bootable USB or CD/DVD with a Linux distribution on it, that boots into a are living Linux instance. Usually these are referred to as a Reside USB or Are living CD/DVD. All the key distributions support this functionality.

We’re not going to put in just about anything, so the are living media doesn’t have to be the identical distribution that you have installed on your computer. You could use an Ubuntu USB to fix an EndeavourOS personal computer, for example. If you really don’t have entry to any reside media, you will want to use an additional laptop to download an image and create it to a USB memory stick or to a CD/DVD.

When you boot from the reside media you’ll be able to mount and accessibility your present file technique. Your mounted file program will appear as aspect of the file process of the Linux that was booted from the stay media. That’s excellent. If we can accessibility it, we have a opportunity of repairing it. But it does raise an problem.

The root of this hybrid file procedure is the root of the stay media file technique, not the root of your set up file technique. To make the file paths configured in your Linux process reference their appropriate concentrate on locations—somewhere inside your file program, and not somewhere relative to the root of the live Linux—we have to have to use chroot to established a new root that factors to the root of your set up file procedure. In other text, paths that commence with “/” will use the root of your file process as their beginning place.

The exam laptop we used for this employs the ext4 file technique, but you can use this strategy on other file techniques too. You just have to discover which partitions or volumes you require to mount, and the place to mount them. The principles are the very same.

Placing It Into Observe

We produced a bootable USB generate and booted our stricken laptop or computer from it. The distribution we utilised was EndeavourOS. The EndeavourOS dwell media boots into the XFCE 4 desktop surroundings.

The EndeavourOS live media booted into the XFCE desktop environment

To detect which partitions maintain the root of your file process, and which is the boot partition, open up a terminal window and use the fdisk command. We’re using the -l (listing partition) alternative. You are going to will need to use sudo, as well.

sudo fdisk -l

Using the sudo fdisk -l command to list partitions and devices

Scroll as a result of the output until you see entries labeled “EFI System” and “Linux filesystem.”

The output from the sudo fdisk -l command with the boot and root partitions highlighted

On this laptop, they are the two on the sda tricky drive. They are in partitions a single and two, as indicated by the partition labels /dev/sda1 and /dev/sda2.

On your computer system, they may possibly be on diverse tricky drives and partitions. Acquire care to take note the partitions they’re on, we’ll need to use these in the up coming commands.

We need to mount the file techniques on these partitions by attaching them to the dwell file process. The mount command will do that for us. Keep in mind, your partition labels are very likely to be distinctive, so make guaranteed you use the ones from the effects of your fdisk command.

sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi

Mounting the boot and file system root file systems

To make the efficient root of the file technique start out at the root of your precise, mounted file process, we’ll use chroot to established the root to be the “/mnt” mount stage. This is where the root of your mounted file technique is grafted onto the reside file procedure.

sudo chroot /mnt

Using the chroot command to create a new effective root

Note that the command prompt variations to demonstrate you are now efficiently logged in as root, and you are at the root listing “/”of the file process of your computer.

We can quickly examination this, by transforming into the “/home” directory and checking what directories exist inside of it.

cd /home

Using ls to list user accounts

You should see a directory for each person configured on your pc, which include a single for your personal consumer account. This computer system has a single consumer, referred to as “dave.” If we’d utilised cd /home prior to we employed the chroot command, we’d have entered the “/home” listing of the dwell file system.

Just to be distinct, you’re now accessing your true file procedure as the root user, so be watchful.

To take care of the problem with GRUB 2:2.06.r322, all we required to do was operate the grub-set up command.


Running the grub-install command to fix the GRUB boot to BIOS error

Functioning grub-set up blindly like this is not typically encouraged. In this instance, it is what was expected.

Mend or Swap

If you are seeking to deal with a diverse issue, you will need to examine the forums for your distribution for the appropriate resolve for your issue. If it is a popular grievance, you’ll quickly come across a resolution for it.

At the extremely least, now that you can access your file program, you are capable to copy your info to some detachable media. If you choose to do a entire reinstall, you will not shed information.

Linked: How to Duplicate Files Working with the “set up” Command on Linux

Supply :

Leave a Comment

SMM Panel PDF Kitap indir