Debian installing without also installing bootloader/grub: can't boot after installation
Debian installing without also installing bootloader/grub: can't boot after installation
Hi, I am trying to install Debian on my machine (lenovo z5070 on a samsung qvo SSD). I tried both installing debian after a clean windows installation, and I also tried to install debian as the only operating system on the ssd. My desired configuration is both win10 and debian in dual boot.
However, every time I try to install Debian, the installation actually writes files to the designed / partition, but there is no option to boot debian under my BIOS. I tried about 20 times, it never worked. By contrast, I tried to install Linux Mint both as a dual boot and as the only OS on the SSD, and both times it correctly installed the bootloader and I can see the "ubuntu" bootloader (it is actually linux mint) in my BIOS, and also grub correctly allows me to choose whether to startup windows or mint.
My BIOS settings are: boot only in UEFI, secure boot disabled, fast boot disabled. My BIOS allows me to choose the device/bootloader to use: after installing debian the boot list never ever showed debian/linux as an entry. The debian install USB says that it correctly boots as UEFI. In the debian install menu, it correctly selects the ESP, / and swap partition. I also tried to play with different partition configurations, and it doesn't work. There is probably some issue with the debian installer and my BIOS, but I can't seem to troubleshoot. What can I do?
However, every time I try to install Debian, the installation actually writes files to the designed / partition, but there is no option to boot debian under my BIOS. I tried about 20 times, it never worked. By contrast, I tried to install Linux Mint both as a dual boot and as the only OS on the SSD, and both times it correctly installed the bootloader and I can see the "ubuntu" bootloader (it is actually linux mint) in my BIOS, and also grub correctly allows me to choose whether to startup windows or mint.
My BIOS settings are: boot only in UEFI, secure boot disabled, fast boot disabled. My BIOS allows me to choose the device/bootloader to use: after installing debian the boot list never ever showed debian/linux as an entry. The debian install USB says that it correctly boots as UEFI. In the debian install menu, it correctly selects the ESP, / and swap partition. I also tried to play with different partition configurations, and it doesn't work. There is probably some issue with the debian installer and my BIOS, but I can't seem to troubleshoot. What can I do?
Re: Debian installing without also installing bootloader/grub: can't boot after installation
I am using the DVD iso, on a 64 GB kingston usb key, both plugged in a USB 2 and 3 port. The installer usb key correctly boots in UEFI. In the installation, I choose the guided simple install and I have tried choosing 3/4 different desktop environments, with no change.
I do not know for sure grub is not installed, but I do know that after installing debian I never managed to boot into it either from my BIOS startup menu (where bootloaders are shown) and I never saw the grub menu after an installation. I really can't figure it out, it would seem like the installation competely skips the bootloader/grub part of the install: I do not even get any errors, there simply is no boot entry ever added.
I do not know for sure grub is not installed, but I do know that after installing debian I never managed to boot into it either from my BIOS startup menu (where bootloaders are shown) and I never saw the grub menu after an installation. I really can't figure it out, it would seem like the installation competely skips the bootloader/grub part of the install: I do not even get any errors, there simply is no boot entry ever added.
Last edited by fotl on 2022-07-27 06:48, edited 1 time in total.
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Sorry to double post, but I would really like to solve the issue: I am waiting on organising my computer's hard drives since I can't install debian. I am tempted to use linux mint, but I would like to avoid it. Thanks.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Sounds like the motherboard firmware isn't accepting new NVRAM boot entries. This is not uncommon.
Copying /EFI/debian/grubx64.efi to /EFI/Boot/bootx64.efi on the EFI system partition should get it booted.
Once you install Windows that bootloader will almost certainly take precedence so run this command from an Administrator prompt to chainload GRUB:
Copying /EFI/debian/grubx64.efi to /EFI/Boot/bootx64.efi on the EFI system partition should get it booted.
Once you install Windows that bootloader will almost certainly take precedence so run this command from an Administrator prompt to chainload GRUB:
Code: Select all
bcdedit /set "{bootmgr}" path "\EFI\debian\shimx64.efi"
deadbang
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Debian installing without also installing bootloader/grub: can't boot after installation
No, you do not know at all. You just guess without any sound evidence.
Simple evidence would include, for example, checking the actual presence or absence of GRUB files in the EFI partition.
GRUB installation for EFI boot is automatic in normal installation and will result in an error message if it fails.
Or the UEFI firmware does not handle them correctly, e.g. ignores them. Rather common too. In any case Windows does not need them, so why bother implementing them properly, huh ?Head_on_a_Stick wrote: ↑2022-07-28 15:00 Sounds like the motherboard firmware isn't accepting new NVRAM boot entries.
Or choose expert install in the installer boot menu and accept to install GRUB in the "removable media path" (unrelated to any actual removable media despite the name).Head_on_a_Stick wrote: ↑2022-07-28 15:00 Copying /EFI/debian/grubx64.efi to /EFI/Boot/bootx64.efi on the EFI system partition should get it booted.
Or boot the installer in rescue mode, select the root device, reinstall GRUB and accept to install it in the "removable media path".
AFAIK this command does not chainload GRUB, it just changes the target of the EFI boot entry registered by Windows (as can be seen with efibootmgr -v), so I'm afraid it does not help if the firmware ignores EFI boot entries.Head_on_a_Stick wrote: ↑2022-07-28 15:00 run this command from an Administrator prompt to chainload GRUB:
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Hi, I just tried this and I still don't see any linux/debian related entries in the Boot Menu. It seems just like any other time I tried it: the / and /swap partitions are created and populated with files, but I can't actually boot debian in any way. I had a fresh win10 installation, I created the free space for debian and went into the installation as usual.Or choose expert install in the installer boot menu and accept to install GRUB in the "removable media path" (unrelated to any actual removable media despite the name).
I would like to repeat that linux mint installs without issues, and I still think it is some weird bug on Debians behalf. What can I try next? I will thinker with rescue mode but I doubt it will get me anywhere.AFAIK this command does not chainload GRUB, it just changes the target of the EFI boot entry registered by Windows (as can be seen with efibootmgr -v), so I'm afraid it does not help if the firmware ignores EFI boot entries.
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Hi, I tried the rescue mode. When I ran "efibootmgr" it didn't show any linux-related entries. So I ran grub-install on /dev/sda and everything worked without error messages, however when I ran update-grub it said "grub-probe: error cannot find a GRUB drive for /dev/sda... etc". Still in rescue mode, I ran again efibootmgr and then I could finally see "debian" as a boot entry. I did "ls" on the /EFI/ folder and I could see the debian files. However, when I rebooted the computer nothing changed: I still can't see anything debian related in the Boot Menu. What else can I try?
Last edited by fotl on 2022-07-29 10:33, edited 1 time in total.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Or actually follow p.H's suggestions. Did you select the "force installation to removable media path" option for GRUB? Did you even bother selecting expert mode?I wrote:Copying /EFI/debian/grubx64.efi to /EFI/Boot/bootx64.efi on the EFI system partition should get it booted.
deadbang
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Sorry why this tone? I reinstalled debian selecting the "removable media path" in expert mode as I said, and then I re-selected it from the rescue mode. I said it quite clearly in my second to last post.
As I said, there is no /efi/debian anything, after a manual grub -install from rescue mode, while still in the rescue shell, I can see debians entries in /efi/ but as soon as I reboot they disappear.
As I said, there is no /efi/debian anything, after a manual grub -install from rescue mode, while still in the rescue shell, I can see debians entries in /efi/ but as soon as I reboot they disappear.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Debian installing without also installing bootloader/grub: can't boot after installation
This is not supposed to have any effect on Debian boot entries but only install a copy of GRUB in a location which does not need to be registered in EFI boot variables. To use is just select the whole drive/partition in the boot menu.
Care to post what it showed instead of what it did not show ?
No you didn't. In EFI mode GRUB does not use any device but the partition mounted on /boot/efi.
What are you talking about ? Contents of the EFI partition (/boot/efi/EFI) or EFI boot variables shown by efibootmgr ?
Please post full commands and output. Showing is better than telling.
Re: Debian installing without also installing bootloader/grub: can't boot after installation
I have just re-done the "grub-install" procedure via the rescue shell as explained https://wiki.debian.org/GrubEFIReinstall, on the debian system I have just installed in expert mode choosing to abilitate the "removable media path" option. Sadly I couldn't find the installer's screenshots in /var/log/installer so I uploaded some photos (https://imgur.com/a/Bw9sCQg) and write my steps extacly.
First of all, the system has a total of 6 partitions: ESP, win10 (ntfs), win10 reserved, win10 recovery, debian (ext4 /), swap. What I did exactly:
* Plugged in the EFI debian installer USB key with the DVD installer ISO.
* Booted from the USB key via my computer's "Boot Menu".
* Ran the graphical rescue option.
* When the installer asked me to mount a partition "as the root filesystem", I choose sda5 (which is the debian / partition, the ony one in ext4):
* When the installer asked me to mount the separate /boot/efi partition, I said YES.
* Next, I chose "execute a shell in /dev/sda5".
* I typed "efibootmgr" and i got "EFI variables are not supported on this system".
* Per what the wiki said, I typed "mount -t efivarfs none /sys/firmware/efi/efivars"
* I ran again "efibootmgr" and I got a list of boot entries: "EFI USB Device; Windows boot manager; EFI network ipv4; EFI network ipv6; EFI USB device; EFI DVD/CDROM; EFI network".
* I ran "grub-install -v /dev/sda"
* The "grub-installed" finished without errors.
* I ran "update grub": you can see the output of this program in the attached pictures.
* I ran again "efibootmgr" and this time, in addition to the previously listed entries, it showed "debian".
* I rebooted my pc, and I couldn't boot into anything: not windows nor debian.
* I rebooted my pc again, and I could only see Windows Boot Manager.
First of all, the system has a total of 6 partitions: ESP, win10 (ntfs), win10 reserved, win10 recovery, debian (ext4 /), swap. What I did exactly:
* Plugged in the EFI debian installer USB key with the DVD installer ISO.
* Booted from the USB key via my computer's "Boot Menu".
* Ran the graphical rescue option.
* When the installer asked me to mount a partition "as the root filesystem", I choose sda5 (which is the debian / partition, the ony one in ext4):
* When the installer asked me to mount the separate /boot/efi partition, I said YES.
* Next, I chose "execute a shell in /dev/sda5".
* I typed "efibootmgr" and i got "EFI variables are not supported on this system".
* Per what the wiki said, I typed "mount -t efivarfs none /sys/firmware/efi/efivars"
* I ran again "efibootmgr" and I got a list of boot entries: "EFI USB Device; Windows boot manager; EFI network ipv4; EFI network ipv6; EFI USB device; EFI DVD/CDROM; EFI network".
* I ran "grub-install -v /dev/sda"
* The "grub-installed" finished without errors.
* I ran "update grub": you can see the output of this program in the attached pictures.
* I ran again "efibootmgr" and this time, in addition to the previously listed entries, it showed "debian".
* I rebooted my pc, and I couldn't boot into anything: not windows nor debian.
* I rebooted my pc again, and I could only see Windows Boot Manager.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Debian installing without also installing bootloader/grub: can't boot after installation
The last resort is to move /EFI/Microsoft/Boot/bootmgfw.efi then copy grubx64.efi to that location and add a custom GRUB menuentry for the original bootmgfw.efi using the chainloader command.
Windows will probably "fix" this during major updates but you can use a batch file in Windows to restore your configuration and run it at every boot.
Windows will probably "fix" this during major updates but you can use a batch file in Windows to restore your configuration and run it at every boot.
deadbang
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Hi, thank you for all the help however I really wouldn't know where to start doing what you said and I really need to get my computer operating again, so I will begrudgingly be installing linux mint as my primary OS. Sorry for the trouble, I really would have liked to have debian. Bye!
Re: Debian installing without also installing bootloader/grub: can't boot after installation
Just for an update, I tried to install manjaro. The OS actually installed and I was able to automatically boot into manjaro right after the installation. However, after a single reboot, the manjaro bootloader entry disappeared. What is linux mint doing different?