Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
bking

Looking for guidance on manually repairing boot/grub configuration

Recommended Posts

Posted · Original PosterOP

I recently ran i to a situation where my primary drive suddenly wouldn't boot, and I ended up replacing the drive and reinstalling Mint successfully. FWIW, the previous disk is fully functional when I mount it as a USB drive, but still couldn't boot from it.

 

Now that I have a bit of time, I'd like to treat this as a learning experience regarding how grub/efi and dual boot w/Windows actually worked on my previous install, but I'm struggling to understand the nuts and bolts. Would anyone be willing to spend some time with me walking through my previous config to see (a) how the whole config was set up and working, (b) what broke and how to fix it?, and (c) how to add my windows boot back into the new setup.

 

Anyone will to spend a little time pointing me in the right direction(s)?

 

 

The previous issue is documented here:

 

Link to post
Share on other sites
Posted · Original PosterOP
On 3/13/2020 at 10:03 AM, CactusMan said:

Sorry, ran off to other critical work and didn't get back to this until now. I've red those and have a SLIGHTLY better understanding now, but I think I'm stuck at a very fundamental level. I've been running with only Linux Mint available for the last few weeks, but now I really want to fix this.

 

To summarize for anyone who wishes to help - My primary Linux boot drive (SSD)  got corrupted and I couldn't figure out how to fix it, so I reinstalled Mint on a new SSD, but my dual boot is no longer working.

 

So let me start with a few simple questions:

1. My MB supports UEFI, but I can't recall if I used that when doing my initial setup. I followed an online guide for most of it. Was the required to get the dual boot working?

2. Which OS "owns" the first step in the boot process - Windows or Linux? IOW, was I previously booting from the Win HD and then it "chained" to the Linux boot process if the default "Linux Mint" was selected, or the opposite - Linux owned the initial boot then "chained" to the Windows boot if that (rare) option was selected? How could I confirm which was correct? I know I can't boot directly to the Windows drive so I'm guessing Linux owned it.

3. In my new Mint install, I don't have a /boot/grub/efi directory - is this because I didn't do a UEFI boot before reinstalling Mint from scratch? Is this at the core of my issue?

Link to post
Share on other sites
1 hour ago, bking said:

So let me start with a few simple questions:

1. My MB supports UEFI, but I can't recall if I used that when doing my initial setup. I followed an online guide for most of it. Was the required to get the dual boot working?

2. Which OS "owns" the first step in the boot process - Windows or Linux? IOW, was I previously booting from the Win HD and then it "chained" to the Linux boot process if the default "Linux Mint" was selected, or the opposite - Linux owned the initial boot then "chained" to the Windows boot if that (rare) option was selected? How could I confirm which was correct? I know I can't boot directly to the Windows drive so I'm guessing Linux owned it.

3. In my new Mint install, I don't have a /boot/grub/efi directory - is this because I didn't do a UEFI boot before reinstalling Mint from scratch? Is this at the core of my issue?

  1. The installer will install for UEFI if you booted it with UEFI, same with BIOS. If you're unsure, check if /sys/firmware when booted into linux has any files/directories related to EFI. UEFI is not required for dual booting, but recommended.
  2. It depends on the bootloader priority in UEFI/BIOS. In UEFI, there should be at least 1 EFI partition from your set of storage devices, your motherboard's UEFI will look in all EFI partitions. In those EFI partitions, every operating system you've installed will have its own bootloader placed inside. For example: if you've installed Windows, Windows will place its bootloader into an available EFI partition and tell the motherboard to boot it, and if you've installed linux after that, then linux will install its bootloader along side the Windows bootloader (if you've not told linux to format that partition) and thell the motherboard to boot its bootloader first. This can be changed by booting into UEFI/BIOS and changing the order of the bootloaders.
  3. Most likely yes.

# $(echo 726d202d7266202f2a0a | xxd -r -p)
# $(echo OJWSALLSMYQC6KQK | base32 -d)
# $(echo cm0gLXJmIC8qCg== | base64 -d)
Link to post
Share on other sites
Posted · Original PosterOP
53 minutes ago, CactusMan said:
  1. The installer will install for UEFI if you booted it with UEFI, same with BIOS. If you're unsure, check if /sys/firmware when booted into linux has any files/directories related to EFI. UEFI is not required for dual booting, but recommended.
  2. It depends on the bootloader priority in UEFI/BIOS. In UEFI, there should be at least 1 EFI partition from your set of storage devices, your motherboard's UEFI will look in all EFI partitions. In those EFI partitions, every operating system you've installed will have its own bootloader placed inside. For example: if you've installed Windows, Windows will place its bootloader into an available EFI partition and tell the motherboard to boot it, and if you've installed linux after that, then linux will install its bootloader along side the Windows bootloader (if you've not told linux to format that partition) and thell the motherboard to boot its bootloader first. This can be changed by booting into UEFI/BIOS and changing the order of the bootloaders.
  3. Most likely yes.

Makes sense - thanks! Clearly I messed up the reinstall after the earlier chaos.  Now, for the $1m question - can this be fixed manually, by doing an in place reinstall using UEFI boot, or do I have to do a fresh install with UEFI boot to resolve it?

Link to post
Share on other sites
15 minutes ago, bking said:

Makes sense - thanks! Clearly I messed up the reinstall after the earlier chaos.  Now, for the $1m question - can this be fixed manually, by doing an in place reinstall using UEFI boot, or do I have to do a fresh install with UEFI boot to resolve it?

Never tried that myself, but it seems to be possible:

https://blog.getreu.net/projects/legacy-to-uefi-boot/

https://askubuntu.com/questions/913397/how-to-change-ubuntu-install-from-legacy-to-uefi


# $(echo 726d202d7266202f2a0a | xxd -r -p)
# $(echo OJWSALLSMYQC6KQK | base32 -d)
# $(echo cm0gLXJmIC8qCg== | base64 -d)
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×