Boot order and bootloader editing

4aDummy

Member
Joined
Jul 21, 2021
Messages
30
Reaction score
9
Credits
306
Ill start w saying I am quite new to linux and, on the side trying to learn more about it while studying for Comptia A+. I have been building windows PC's for about 15 years or so. You dont know how much you dont know until you start to study and see how much you dont know. (lol) I recently installed Linux Mint alongside my Win 10 and wow. I now get a boot option with Mint booting first and the option to boot into windows. I like this. I then went and installed Centos on a second drive after setting the bios to boot from USB stick. After removing the stick it now boots to Centos automatically and gives me options for Mint and Win 10 with a couple of other options. This is fine too. My questions - Is the boot loader all in one place like my first drive w windows and Mint or is it on the second drive and if so, is booting altogether now dependant on the Centos install?
 


Rrrr you only mention having 2 drives at the end. Windows has its own bootloader and that came into play when you only had Windows as the only OS.

When you installed Mint , that will have installed grub as the bootloader and its picked up that there was another OS. Grub would be .. well let me show you whats in my OS bppt directory

Code:
andrew@darkstar:/][1]$ tree -L 2 boot                                                                                                      (07-27 21:22)
boot
├── amd-ucode.img
├── EFI
│   └── boot
├── grub
│   ├── fonts
│   ├── grub.cfg
│   ├── grubenv
│   ├── locale
│   ├── themes
│   └── x86_64-efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
└── vmlinuz-linux

But thats not the whole story i reckon your PC motherboard has uefi firmware and so i think you have a EFI partition , which is part of the boot system.

When you installed centros that also i think also probably installed grub(never used it) and took precedence and added the other 2 OS to the menu.

if you install efibootmgr , from the command line you can launch it and look at the entries.

Some days i think i understand the boot process and other days i think i don't get it.
And of course it all changed from when the MBR was involved and now mostly using gpt .

the basics in the old days was that after the POST test , a small bit of code at the start of the 1st partition 512 bytes held enough information and pointed at the next place in the chain to get things going which was legacy grub.

you can boot Windows 10 and Linux on a uefi system using rEFInd on a usb stick. You can at the grub prompt hit the "e" key to get grub options. you can even get the grub command prompt then play with it to see what it can see etc . you can get to the grub prompt after htting the 'e" key by hitting F2 or Ctrl-C

When you see the prompt i.e grub >

you can type ls

it will basically output what it can see. From that prompt which you will get to when your system has a problem finding the grub files is to help it manually.


https://www.dedoimedo.com/computers/grub-2.html worth a read also http://rodsbooks.com/
 
Last edited:
Rrrr you only mention having 2 drives at the end. Windows has its own bootloader and that came into play when you only had Windows as the only OS.

When you installed Mint , that will have installed grub as the bootloader and its picked up that there was another OS. Grub would be .. well let me show you whats in my OS bppt directory

Code:
andrew@darkstar:/][1]$ tree -L 2 boot                                                                                                      (07-27 21:22)
boot
├── amd-ucode.img
├── EFI
│   └── boot
├── grub
│   ├── fonts
│   ├── grub.cfg
│   ├── grubenv
│   ├── locale
│   ├── themes
│   └── x86_64-efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
└── vmlinuz-linux

But thats not the whole story i reckon your PC motherboard has uefi firmware and so i think you have a EFI partition , which is part of the boot system.

When you installed centros that also i think also probably installed grub(never used it) and took precedence and added the other 2 OS to the menu.

if you install efibootmgr , from the command line you can launch it and look at the entries.

Some days i think i understand the boot process and other days i think i don't get it.
And of course it all changed from when the MBR was involved and now mostly using gpt .

the basics in the old days was that after the POST test , a small bit of code at the start of the 1st partition 512 bytes held enough information and pointed at the next place in the chain to get things going which was legacy grub.

you can boot Windows 10 and Linux on a uefi system using rEFInd on a usb stick. You can at the grub prompt hit the "e" key to get grub options. you can even get the grub command prompt then play with it to see what it can see etc . you can get to the grub prompt after htting the 'e" key by hitting F2 or Ctrl-C

When you see the prompt i.e grub >

you can type ls

it will basically output what it can see. From that prompt which you will get to when your system has a problem finding the grub files is to help it manually.


https://www.dedoimedo.com/computers/grub-2.html worth a read also http://rodsbooks.com/
So I looked into efibootmgr. Installed it to Mint ( which shows up in my Bios boot options as Ubuntu TWICE ) and Thanx to a "linuxbabe" link in google search I also learned how to change the boot order. That was quite interesting. Now it boots directly to Windows and my "F11" will give me the choices of Win 10, Mint or Centos. I still would like to know if the Centos OS on a seperate drive in my PC is dependent on the boot file from the first drive. If I pulled the 1st drive will centos still be able to boot? Also I wonder if the bios boot options can be changed or deleted in the Bios menu itself. It shows Ubuntu in the boot options twice. One for the main drive ( Ubuntu Sabrent Rocket 4.0) and one on the second drive (Ubuntu Samsung Evo). I looked at the Link "dedoimedo". Thats a long read for another day but is very interesting to me.
 
dedoimedo was the short read ; this is the long one :^) https://www.gnu.org/software/grub/manual/grub/grub.html

some grub configuration files are on the efi partition; if you remove the partition that has the efi i think , the system would be confused.

I had on my laptop a dual boot of Arch and Slackware while i was testing out Arch , i deleted slackware partition and stretched Arch partition to fill the gap.I got a ghost entry on booting up ,with Slackware still on the grub menu. That i guess would be entries on efi;.

But as an experiment can you detach the 1st drive, boot up, observe empirically and please post results , now thats what used to be called "science" .

My heads extra fussy today, to do with wife and biopsy she had today , so i can't give you any coherent answers really today .But i'm sure others will chip in ..
 
the basics of uefi and boot are that the uefi can read gpt tables and also can read the FAT32 esp or efi partition. Variables in NVRAM are also accessed. The EFI partition holds files such as bootloader information in the form of .efi files. I read that using ghex you can look at .efi As far as i can understand they point to grub referencing grub,cfg , so basically handing over to grub which launches the OS.

So the efi is holding entries for OS which is displayed when you get output using efibootmgr; that would explain unless updated the efi will have entries for OS even if the partition that the entry points to has been deleted .

As you say you can also manipulate and change boot order using efibootmgr
 
dedoimedo was the short read ; this is the long one :^) https://www.gnu.org/software/grub/manual/grub/grub.html

some grub configuration files are on the efi partition; if you remove the partition that has the efi i think , the system would be confused.

I had on my laptop a dual boot of Arch and Slackware while i was testing out Arch , i deleted slackware partition and stretched Arch partition to fill the gap.I got a ghost entry on booting up ,with Slackware still on the grub menu. That i guess would be entries on efi;.

But as an experiment can you detach the 1st drive, boot up, observe empirically and please post results , now thats what used to be called "science" .

My heads extra fussy today, to do with wife and biopsy she had today , so i can't give you any coherent answers really today .But i'm sure others will chip in ..
Good idea opening my box but... I would have to remove the Graphics Card to get to main M.2, pull it, put back grahics card, boot and then repeat the process putting things back the way they were (yawn), but ill get to it soon.
 
Good idea opening my box but... I would have to remove the Graphics Card to get to main M.2, pull it, put back grahics card, boot and then repeat the process putting things back the way they were (yawn), but ill get to it soon.
OK. I pulled the drive out and installed Solus on the second drive. For fun I put my main M.2 drive in an external enclosure that looks like a jumbo USB drive with a cable for Type C and a cable for USB 3.2 .
Keep in mind that Linux Mint was installed after Windows but modified in the efi bootmgr to have windows boot first automatically. When I plugged my drive into a Type C port it kept trying to repair windows and would not boot. I changed the boot order in Bios to boot Mint and Voila! Im up and running without having to pull my graphics card to mount. Windows always takes over the boot file priority even when installing something on a secondary drive like i had done so removing the windows install was the trick here ( I kind of knew this). Not impressed w that aspect of Windows especially at a $129 retail box which I never pay (there are ways around that) . Is there a utitlity in Linux to test drive speeds? In windows my Samsung 960 Evo tested really high speeds in the Tpye-C port AND the USB 3.2 port .
 
the hdparm command in terminal can test various drive speeds. hdparm but be careful it's a powerful tool.
 
There's also benchmarking available in 'gnome-disks', should a GUI be desirable.
 


Top