As Microsoft keeps pointing out, Windows 10 has now reached it's planned end of support date. As much as Microsoft is pushing for me to upgrade to Windows 11, my computer isn't officially support it. OK sure, I could hack it onto my machine, but Microsoft have decided they don't wish to allow their product to run on my machine so why go against their wishes... that and I ain't putting that AI liability crap on any of my devices.
The obvious upgrade solution is Linux, and in the time between me trying it in 2010 (spinning my own distro in SUSEStudio, remember that?) and now, it's developed into a really nice alternative to Windows. Heck, an increasing amount of software is now compatible with Linux, and games thanks to the endeavors of Steam and their Steam OS. Linux is also free, which is a big selling point.
My main Linux daily driver is Linux Mint Debian Edition... yes I'm a Debian girl, I'm used to it from tinkering with Raspberry Pi's, and LMDE makes using Linux a breeze and is the perfect OS replacement for those non-tech savvy people in your life that you know will just benefit more from less data collection (cough Windows/Microsoft Telemetry cough).
Now, for as much as I've just praised Linux, there are still some applications that I use that can't be run from within Linux, even via compatibility layers. As such I would like to keep Windows 10 for the things I can't yet do in Linux. Thankfully we have dual booting, the way to get the best of both worlds ("best" is doing some heavy lifting for Microsoft there) so I can utilise a Windows installation, and an LMDE installation on the same machine.
The way you enable dual booting is to have a boot loader that supports the functionality to point to different OS installations. Windows uses it's own boot loader, which will support this but I just couldn't figure out how to do it, and Linux has boot loader options (of course it does, it's Linux). The default option in LMDE seems to be GRUB, which is what I rolled with. From my experience, GRUB has had no issues in detecting my Linux installation and the Windows installation. It works perfectly fine... right up until the point where it doesn't
In fairness, my issues around GRUB and having to restore it probably isn't the fault of that package and more my own insanity of trying to run a daily driver operating system on an external hard drive connected over USB 3 (I do these kinds of things to myself). It's also, from my understanding, the fault of the EFI BIOS on my computer's motherboard.
But before we move on, unless you really want problems, it's probably best not to install Linux, or any OS really, onto an external hard drive connected over USB. Even I've seen the error in my ways and opted to purchase a SATA PCI card (I've now got 8 SATA connections in this beast slaps roof)
First things first, you're going to need a live environment to boot into. If you're not overly familiar with Linux and don't know what I mean by this then I highly recommend that you seek help from a technical specialist. Make no mistake, we're messing around with some important system files here at BIOS level which if done incorrectly could cause further headaches and data loss.
This guide is written using a Debian based distribution as both the installed OS and the live environment. To fully follow along, download LMDE (at the time of publication, use LMDE 6). I won't go over in this post how to create a bootable USB drive however a quick web search will provide you with many tutorials. Once you've created your bootable USB drive, boot into the live environment. Don't attempt to follow along within your installed OS.
In the live environment open a terminal window and type:
sudo efibootmgrNow, look for the boot number of "debian" or whatever your Linux installation is called. The boot number is the 4 digits after "Boot", for example using the returned data below:
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0004,0006,0005
Boot0000* Windows Boot Manager
Boot0001* livegrub
Boot0002* debian
Boot0004* Windows Boot Manager
Boot0005* CD/DVD Drive
Boot0006* Hard Drive The boot number we'd be interested in for debian is 0002. If efibootmgr does not return an expected installation (in our case if debian was not listed) then there is no requirement to delete any boot entries and you can skip to step 3. Otherwise type:
sudo efibootmgr -b xxxx -BWhere xxxx is the boot number, so in our example sudo efibootmgr -b 0002 -B as we want to specify our debian boot entry. In terms of flags, -b is the flag used to specify a boot number and -B is th flag to delete a boot entry.
At this point, the boot entry has been deleted and you will notice that the debian entry will no longer be listed if you run sudo efibootmgr again.
We now need to locate the EFI boot loader for the installed os that we are correcting the EFI boot entry for. We need to know on what disk and which partition the boot loader files are stored. If you're also following along using LMDE as the live environment, the easiest way to do this is by using the Disks utility. This is found under "Accessories" in the system menu.
Within Disks, on the left pane select the disk on which your installed OS is located. Then in the main part of the window, click on each parition in turn until you find the EFI System assosiated with your installed OS and make a note of what appears next to "Device". EFI System will appear as the Partition Type, and will usually be the first partition before your main installation partition (although not always). If you've only installed one OS to the disk, the EFI System partition is likely to be /dev/sda1.
In the example above, the device entry of EFI System partition is /dev/sda1. From this we can denote two things:
As a seperate example, if the device entry of your EFI System partition was /dev/sdc3, then the disk containing your EFI boot loader would be /dev/sdc and the partition would be 3.
We are now ready to re-create the boot entry for our installed OS. It is easier to show you the example command first with the relevent information for my situation, and then explain what each flag is doing. As such I would want to enter:
sudo efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\debian\\grubx64.efi -L debianThe commands for this flag include -c which is used to create a new boot entry, -d to specify the disk in which our EFI boot loader is located (as explained previously, this is /dev/sda in the example), -p to specify which partition of the disk the EFI boot loader is located (as explained previously, this is the first partition in the example), -l specifies the path to the EFI shell file (this will depend on the installed OS. I have listed some common locations below. When entering a path here, be sure to use double backslash instead of a forwardslash as shown in the example command), -L specifies the label of the boot entry and is what is shown to you as a friendly name in the BIOS for example (this can be whatever you like, although it's best to keep it simple and relevent).
Be sure to use the relevent information you've found previously in place of the example information in the command shown above.
Depending on your distribution of choice, you will likely find that the EFI shell file will be one of the following.
-L ) is "Windows Boot Manager"You should now be ready to reboot although it is unlikely that the new boot entry will be preferred by your BIOS. Whilst it is possible to change this using efibootmgr, it is easier to do this via your BIOS boot order setup. Each BIOS is different, generally however you will want to reboot your machine into the BIOS and change the boot order so that the new boot entry is the first in the order. You will notice that the label value you specified previously appears here. Save settings and reboot the system. You should now be greated with the GRUB bootloader again.
This guide is very much only helpful to those using the GRUB bootloader and I've had to carry out the above steps previously when moving disks around in my computer. I also carried out the steps again to test what I've written. Generally I've found GRUB to be very stable and I'm able to use it to dual boot between LMDE and Windows with no issues in a number of months. However, I am aware that Windows does not always play nicely with Linux dual booting, although this may be the case if you're using the Windows boot loader. I can't comment on this as I haven't had any problems myself.
If this post has helped you in anyway and you'd like to show your appreciation with a financial donation, you can find a link to do so below.
Rachel x
Disclaimer: I am not an IT professional, I do not have extensive knowledge in computer systems, the highest level of understanding I have is A-Level computer science from 2014. I do not hold any qualifications regarding IT, Computer Science, Networking etc. I am a hobbyist at best. Some of the information above may not be accurate, it may not be best practice and it may not be secure. The information shared is from my own experiences, and is saved here for when I need to use it again. You are recommended to carry out your own research. Information and guidance is correct at the time of publication and is likely to change. I cannot be held responsible for any data loss or other IT related incidents. "Don't believe everything you read on the internet" ~ Abraham Lincoln
This post has been tagged with the follwing tags: