0

I have a laptop with UEFI firmware, but had to set the firmware to boot in CSM legacy mode so that I could boot from USB. I'm multi booting three different linux distros, two of them are Ubuntu. The distros are all installed on their own Logical Volume. One of the distros has VirtualBox installed on it, I want it to be my GRUB default, which it currently is not.

I've edited the /etc/default/grub file with sudo as follows:

changed DEFAULT=0 to DEFAULT="saved" added new line below that... GRUB_SAVEDEFAULT="true"

I then saved the file with :wq!

I then entered the command... sudo update-grub

With no success after rebooting, I tried...

sudo chmod 744 /boot/grub/grub.cfg sudo update-grub sudo chmod 444 /boot/grub/grub.cfg

rebooted, still default boot order hasn't changed.

Installed grub-configuration GUI tool, it reflects all the changes I've made, however still when I reboot the machine, the default boot order hasn't changed.

I've also tried installing a GRUB2 them from GNOMElooks, I used the install script packaged with the download, it hasn't displayed on the GRUB boot splash screen either.

Here's the install.sh file that I executed that came with the GRUB2 theme download:

!/usr/bin/env bash

GRUB_NAME=""

function compile_grub() { echo -e "\e[1m\e[32m==> \e[97mApplying changes...\e[0m" ${GRUB_NAME}-mkconfig -o /boot/${GRUB_NAME}/grub.cfg echo -e "\e[1m\e[34m -> \e[97mTheme successfuly applied!" echo -e "\e[1m\e[34m -> \e[97mRestart your PC to check it out." sleep 2 }

function update_grub_file() { grep -v GRUB_THEME < /etc/default/grub > /tmp/clean_grub mv /tmp/clean_grub /etc/default/grub echo "GRUB_THEME=/boot/${GRUB_NAME}/themes/Atomic/theme.txt" >> /etc/default/grub }

function copy_atomic_files() { echo -e "\e[1m\e[32m==> \e[97mDownloading files...\e[0m" git clone https://github.com/lfelipe1501/Atomic-GRUB2-Theme /tmp/Atomic-GRUB2-Theme echo -e "\e[1m\e[32m==> \e[97mCopying files...\e[0m" cp -rf /tmp/Atomic-GRUB2-Theme/Atomic /boot/${GRUB_NAME}/themes/ }

function main() {

# Check user is root if [ $UID == 0 ]; then echo "Yes, You are root!" else echo "No, You must be root!" exit 1 fi

# Check which grub if [ -d "/boot/grub" ]; then GRUB_NAME="grub" else GRUB_NAME="grub2" fi copy_atomic_files

echo -e "\e[1m\e[97m You must set the theme in your GRUB config file," while : ;do if [ "$answer" = "g" ];then echo -e "\e[1m\e[97m You didn't give a valid option, try again." else read -p " Would you like to do it now? [y/n] " -t 10 answer echo -e "\e[0m" if [ "$answer" = "y" ];then # backup old grub file cp /etc/default/grub /tmp/grub$(date '+%m-%d-%y_%H:%M:%S') update_grub_file compile_grub break elif [ "$answer" = "n" ];then break fi let answer=g fi done

}

main "$@" exit 0

3
  • * had to set the firmware to boot in CSM legacy mode so that I could boot from USB* Sorry, no, absolutely not. If you had to do that then you burned the USB in a wrong way. If you used Rufus (Windows) with the default options then it'll boot in Legacy/BIOS only. You need to select GPT/UEFI. But also you want to install a multi-boot in the same mode, always. And if your system is UEFI then you also want to install all in such mode which, by the way, makes multi-booting a LOT easier.
    – user931000
    Jun 23, 2019 at 17:11
  • Thanks for your input Gabriela. I used etcher to reformat and write to the USB. If I selected GPT/UEFI scheme for writing to the USB, and then try to use that USB to boot by first putting my firmware in EFI mode, my laptop just hangs as soon as I exit "BIOS/EFI" and try to start booting from the USB. I actually tried Rufus as well, using GPT/UEFI scheme option for reformatting and writing the image to the USB with the same results. Only when I reformatted the USB using CSM and modified my laptop's "BIOS/EFI" settings to boot in CSM/legacy mode was I able to boot from USB. Jun 24, 2019 at 19:52
  • your q need basic post editing, it can be more readable! May 6, 2021 at 19:12

1 Answer 1

0

GRUB has a number of components. Part is located where the laptop firmware starts the boot process, and that points to the rest. Each Linux distro you installed has its own copy of GRUB with settings like what you edited. At installation, the distro replaces the portion that starts the process with its own segment that points to its own settings.

So the last distro you installed is the one that's actually controlling things. If you want to change the GRUB settings, you need to do it in the last distro you installed, or run grub-install in a distro installed earlier to make it the one that is started. Discussion in this post may be helpful: update-grub vs. grub-install?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .