[SOLVED] restoring grub for dual boot with windows
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would have to agree with the post above by syg00. Grub not installed on the internal drive, only on the flash drive used to install. Has the proper efi files, at least appears to but no grub files on the system partition.
The internal drive is /dev/sdb and /dev/sdb1 is the EFI partition and has all EFI boot files including Windows boot files.
Yes I put a supervisor password this is how I was able to install Linux which said completed successfully. This is running from a live Ubuntu, should I use debian instead?
I already found the parameters for bcdedit so if someone could tell me how to get the uuid for sdb1 I could at least setup the windows bootloader
In your first screenshot you will notice "F12 boot menu disabled". Enable it, reboot and hit the F12 key when the splash appears and you will see a menu, scroll down to Debian and hit Enter, problem solved.
Once you've booted into Debian, run command: efibootmgr -v to remove Ubuntu and MMX from the computer's boot menu. Look at menu item #4.3 of this article for guidance. You can also delete their directories in the EFI partition to clean things up but not necessary.
The internal drive is /dev/sdb and /dev/sdb1 is the EFI partition and has all EFI boot files including Windows boot files.
The boot repair output posted in the initial post does not show any grub.cfg file on the system partition, only the grub.cfg on the EFI partition, contents below. That won't boot anything as it is simply pointing to the partition on which his Linux OS is installed. Either boot repair didn't detect grub.cfg on the partition or it isn't there.
Quote:
search.fs_uuid 0f4ff69e-cbba-455c-8b82-3a3455559e6e root hd1,gpt13
set prefix=($root)'/boot/grub'
The above is useless because the UUID for the partition on which he has his Linux install (sdb4) is:
Quote:
/dev/sdb4 73a19b30-af1c-4523-8b0f-38dca94d07cc
It's also pointing to sdb13 which doesn't exist.
Enabling the F12 boot options menu should do it as there are 2 Linux entries in the efibootmgr output and Boot0001 should be Debian. Or, maybe not??
One way or another, Linux will not boot by default.
The computer's boot menu needs to be enabled in order to boot Linux.
If Debian won't boot, or it's not in the boot menu list. The best way to remedy this based on the OP's level of knowledge is to ensure the boot menu is enabled and he/she knows how to access it. Then reinstall whichever flavor of Linux is desired, which is likely quicker that trying to repair mistakes made trying to boot them without the menu.
The thing is, look at the title of this thread. You need to ask yourself... did three Linux installers botch this up?
To boot a fresh Linux installation on pretty much all UEFI computers, you need to bring up the boot menu and select the Linux from the list, if it came with Windows pre-installed, Windows will be the default.
Based on what I've seen so far, the OP has no Linux experience and has likely never been greeted by a Linux desktop. The advice being given here is currently out of the OP's reach/capabilities. Let's focus on getting the OP to be greeted by a Linux desktop. A fresh installation can be done within a half hour, once the OP knows how to boot it, the OP shall likely smile and start learning Linux.
And there's always a chance Debian will boot by selecting Ubuntu in the list. I've installed Linux Mint after deleting Ubuntu and no Mint directory was created in the EFI partition nor was Mint available as a boot option in the boot menu. But selecting Ubuntu in the list booted Mint.
I've installed Linux Mint after deleting Ubuntu and no Mint directory was created in the EFI partition nor was Mint available as a boot option in the boot menu.
Mint uses ubuntu as its EFI boot name, explained at the Mint install guide below. I believe some of the other major Ubuntu derivatives do also but have not tested. Don't think selecting the ubuntu option in EFI will boot Debian but it certainly won't hurt to try either option.
I have doubts from step 3 which is: bcdedit /set {feebec32-3b16-11e9-85f6-10f005998ec3} path \debian.bin
because I have no idea if debian uses debian.bin or if another filename is used. He uses ubuntu.bin & FYI the reason that you saw ubuntu in my output was because I was using a live ubuntu.
Will this be fixed if I remove the EFI & windows partition & keep only the diagnostic partition & then reinstall linux? This idea makes me uneasy as I'm not sure if I'll ever need windows again for programming/modelling/training AI. All your opinions on these 2 subjects would be greatly appreciated
@Brains you are half right. While I do have years of experience with linux, I used the GUI mostly as a crutch for most of that time & only learned a few commands in the cli.
The debian.bin is created by using dd to extract the PBR of Debian when Grub is installed to the partition instead of the MBR on DOS partitioned disks. Not sure if it will work on GPT partition (which is what you have), maybe. But if using Windows 10, it might not work because Microsoft rigged it to deny booting kernels not signed by Microsoft.
Your best bet is to install Debian again.
Then go into the BIOS, in the "Main" tab, hit down arrow key till "F12 boot menu disabled" is highlighted, hit enter key and a small window should pop up with the words "Enable, Disable", highlight the "Enable" with arrow keys and hit enter. Then Exit BIOS while saving settings. The computer will reboot, when you see the Acer Logo (splash), hit the F12 key, some folks hit it 10 times or so but once is enough as soon as the splash appears. A boot menu will pop up listing: Windows, MX, Ubuntu, Debian. Scroll down to Debian with arrow keys and hit enter, it should boot.
Once you get it to boot, which is the only way you'll boot it without 3rd party software, you can use efibootmgr from command line to change the default operating system to Debian, and it will boot automatically when you hit the power button to start the computer. This way you'll avoid further destruction and be able to use your computer, and keep Windows.
Deleting the EFI partition will give you nothing but a black screen of death.
OH!
And one more thing, you also need to disable "Secure boot" in the BIOS. Within 2-3 weeks, Debian Buster will be the new Debian Stable, it will be able to boot with Secure boot enabled, but for now it must be disabled.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.