This is for the people who wants to change the UEFI and/or GRUB2 configuration. Why? To change boot order or to set default operating system to boot.
I have a laptop which is installed an SSD and a SATA HDD. SSD for Windows 10 (without SSD, working with Windows is like going somewhere on a turtle) and sata HDD for Ubuntu 20.04.
I don't know why, Windows take the charge of booting process. It boots without asking me. But I want my pc to ask me which OS should be booted, and if I do not give it an input, it should boot Windows. I can be able to choose Ubuntu whenever I want.
Because of my wife, my system should be set up as default operating system is Windows. If you do not an input, computer should boot up into Windows. Because she has some difficulties with linux systems.
I have a laptop which is installed an SSD and a SATA HDD. SSD for Windows 10 (without SSD, working with Windows is like going somewhere on a turtle) and sata HDD for Ubuntu 20.04.
I don't know why, Windows take the charge of booting process. It boots without asking me. But I want my pc to ask me which OS should be booted, and if I do not give it an input, it should boot Windows. I can be able to choose Ubuntu whenever I want.
Because of my wife, my system should be set up as default operating system is Windows. If you do not an input, computer should boot up into Windows. Because she has some difficulties with linux systems.
How to Solve This?
First it is needed to force the pc to boot into Ubuntu. And Ubuntu should ask which OS should be booted (because Windows never asks this or I do not know how to make it ask).
First it is needed to force the pc to boot into Ubuntu. And Ubuntu should ask which OS should be booted (because Windows never asks this or I do not know how to make it ask).
Leet's start!
Write this command into the Ubuntu terminal: This will list boot order in uefi.
sudo efibootmgr -v
It looks like this:
In my uefi setup, there are 7 lines.
Boot0000 Windows
Boot0001 & Boot02 Realtek Ethernet boot options
Boot0004 Ubuntu
Boot2001 & Boot2002 & Boot2003 are USB, DVD, Network options.
You can set the order with efibootmgr. Sample command:
sudo efibootmgr -o 0004,0000,2003,2001,2002
Then, go to the GRUB2 configuration file.
sudo nano /etc/default/grub
You will see this terminal window:
For my situation, there are two important lines:
GRUB_DEFAULT
GRUB_TIMEOUT
You need to determine which operating system you want on the screen should be selected as default. In my case, Windows was written on third line. So I needed to write "2". Because first line is 0, second line is 1 and third line is 2... I want to give a user 5 seconds timeout to make user a decision which operating system to boot.
The last thing is writing this command to update all the changes systemwide:
sudo update-grub
With these commands, my pc runs as I wanted.
Comments
Post a Comment