Solved I can't add linux to grub

Solved issue

osmandokgoz

New Member
Joined
Oct 7, 2025
Messages
6
Reaction score
2
Credits
52
I'm using windows 10 and linux as dual boot. Today while I was deleting some old files from windows, my laptop slipped and fall to the ground. First I failed to open the laptop but then realized my ssd is out of its slot. I put it back in and opened windows. Windows repaired itself automatically but when I tried to open linux, grub promt appeared. I manually loaded kernel and booted linux. I tried to add it back to boot menu but whatever I do, whenever I try opening linux it opens grub promt again. I searched a bit on the internet and tried using commands "sudo update-grub" and "sudo grub-install /dev/sdb". I also tried to remount the disks and adding it as a custom to "/etc/grub.d/40_custom". I still can't open it. Each time I need to manually load kernel to use it. Is there a way to solve it? Also secure boot is disabled.
 


when you ran windows repair, it will usually have reset both secure boot and windows quick start, check and disable then do a full power re-boot [not re-start from windows]
 
if you can get a Linux terminal, try sudo update-grub
 
I tried it a few times before. I get this log
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.12.10-76061203-generic
Found initrd image: /boot/initrd.img-6.12.10-76061203-generic
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Found Windows Boot Manager on /dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
but still same result
 
you have successfully re-built grub, if you did a power reboot after this then the only thing i can think is windows quickstart is still enabled.
 
It's closed, but still not even grub menu. It directly opens grub prompt
If the machine is booting to the grub prompt, grub >, then the likely situation is that grub cannot find the files it needs in its configuration, hence the user has to provide the info for it to boot, which evidently you have done as mentioned in post #1.

One solution is to reinstall grub from a live disk which should refresh all the files and configuration grub needs in the various directories it uses. There's instructions here: https://wiki.debian.org/GrubEFIReinstall, which are for debian, but can be adapted for other distros.

If after reinstalling grub it doesn't pick up the MS installation, you can set the following config in
/etc/default/grub: GRUB_DISABLE_OS_PROBER=false, update grub and reboot which can often resolve that issue.
 
I prepared a live USB, then tried to mount the parts my linux is installed but I get the message" Failed to open PTY: No such device"

Then terminal crashed and when I tried to reopen it I get the same error and terminal didn't start. I have no idea whats going on
 
If you must have windoze...install Virtualbox and run windoze as a VM...problem solved.
1759898949723.gif
 
I prepared a live USB, then tried to mount the parts my linux is installed but I get the message" Failed to open PTY: No such device"
You probably need to use the --rbind option with the mount ("for" loop in step 4 of the guide). However, you should also be able to reinstall the grub-efi without booting a live USB. You'd manually mount your system from the grub console as you have done earlier in the thread, boot it and then follow https://wiki.debian.org/GrubEFIReinstall#Reinstalling_grub-efi_on_your_hard_drive from the doc @osprey guided you to.
 


Follow Linux.org

Members online


Top