Another GRUB problem Debian

Gallerilt

New Member
Joined
Sep 6, 2023
Messages
12
Reaction score
0
Credits
124
I did a update form Ubuntu 22.04 to 24.04, and ran into a lots of problems - programs that did not start etc. I had problems to roll back to 22.04 and decided to install Debian 12, dual boot with Win 12. EFI system.
I could not boot after that, but ended with grub>. With Boot-repair I hoped to fix the problem, from the report:
chroot /mnt/boot-sav/sda7 grub-install --efi-directory=/boot/efi --target=x86_64-efi
Installing for x86_64-efi platform.
Installation finished. No error reported.
chroot /mnt/boot-sav/sda7 update-grub
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-25-amd64
Found initrd image: /boot/initrd.img-6.1.0-25-amd64
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
Found Windows Boot Manager on /dev/sda3@/EFI/Microsoft/Boot/bootmgfw.efi

I manged to boot into debian but not Win10 from grub>:
grub> set root=(hd0,gpt7)
grub> linux /vmlinuz root=/dev/sda7
grub> initrd /initrd.img
grub> boot

From Grub optimizer - see attached files. All seems to be OK. I have been doing sudo grub-update with no effect. I don`t think it is a hardware problem, so no inxi. /dev/sda9 is my /home ext4.
Do I have 2 installs of Grub? Some tips?
 

Attachments

  • Skærmbillede fra 2024-09-17 23-19-33.png
    Skærmbillede fra 2024-09-17 23-19-33.png
    87.8 KB · Views: 54
  • Skærmbillede fra 2024-09-17 22-49-49.png
    Skærmbillede fra 2024-09-17 22-49-49.png
    67.5 KB · Views: 58


If you are missing the boot flag on your boot or root partition then Grub won't boot your system.

This string:
Code:
 grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
Looks to me that Grub is not installed to your /dev/sdb1 partition.

The /dev/sda7 is your Linux rootfs partition. The /dev/sda9 is a Microsoft partition of some sort.


Run this command please and post back.
Code:
sudo fdisk -l
 
I have been warned about grub optimizer in that it screws things up pretty good. Might be your issue. Or more likely windows. I can't tell if you have windows 10 or the yet unreleased windows 12. Either way one of the windoze updates has screwed grub so you will most likely have to rebuild grub from scratch.
 
Make space for another Linux and install it in hope it finds the 1st one without any need for magic spells, or just have rEFInd added on a much smaller ESP, which is what i always do during my initial setup(s). Leave Win1x alone and be "polite" in case of interactions with it...
 
Use a usb stick with your linux distro on it....boot to that usb stick (same is when you intsall Linux)

When it is booted...type boot repair into menu

Click on it to open it


1726614156048.png


Click on advanced options
1726614204598.png

leave the above settings as they are

Click on 'Grub Location'....
also on grub options....

1726614357088.png


1726614417832.png

If you select purge grub before reinstalling it....that may work for you......you will be given a list of commands to enter into terminal.....do them one at a time....
I would not select any of the others.

The rest of the tool is "fluff"....just aim at the repair for the drives that matter...select no for drives that do not matter
No need to write all their "advice" down.....

Sorry this could be better detailed for you....I have used this quite a number of times, but did not screenshot the various screens for future reference....It is all in my head !
 
Use a usb stick with your linux distro on it....boot to that usb stick (same is when you intsall Linux)

When it is booted...type boot repair into menu

Click on it to open it


View attachment 22113

Click on advanced options
View attachment 22114
leave the above settings as they are

Click on 'Grub Location'....
also on grub options....

View attachment 22115

View attachment 22116
If you select purge grub before reinstalling it....that may work for you......you will be given a list of commands to enter into terminal.....do them one at a time....
I would not select any of the others.

The rest of the tool is "fluff"....just aim at the repair for the drives that matter...select no for drives that do not matter
No need to write all their "advice" down.....

Sorry this could be better detailed for you....I have used this quite a number of times, but did not screenshot the various screens for future reference....It is all in my head !
Thank you so much- I will try this as soon as my time allows. Is it smart to purge grub first? And grub have to be installed in /dev/sda3 in my system? Se picture of fdisk -l -- with norwegian text. Is a boot-flag necessary?
 
I purged grub in mine simply because the procedure in boot repair reinstalled it for me.

I was careful not to alter the choices in boot repair....It is a clever tool

I would put the boot-flag in place....I am not sure it is necessary but it can do no harm

I would use GParted to do that

Open gparted, and wait for it to load....then right click on the drive concerned and choose manage flags
 
I purged grub in mine simply because the procedure in boot repair reinstalled it for me.

I was careful not to alter the choices in boot repair....It is a clever tool

I would put the boot-flag in place....I am not sure it is necessary but it can do no harm

I would use GParted to do that

Open gparted, and wait for it to load....then right click on the drive concerned and choose manage flags
A last question before I try: can I run Boot-repair form my installed debian, or do I have to run from a live usb?
 
A last question before I try: can I run Boot-repair form my installed debian, or do I have to run from a live usb?
Yup, using a Live USB is wise.
 
This is giving me headache.....
Same grub> after grub-repair. When opening grub customizer (just to check but not to change anything), I got this message: grb-mkconfig couldnt be executed successfully. error message: /usr/bin/grub-probe: did not find full path to "dev/sda7"
Some clues?
 

Attachments

  • Skærmbillede fra 2024-09-18 23-21-39.png
    Skærmbillede fra 2024-09-18 23-21-39.png
    62.4 KB · Views: 29
This is giving me headache.....
Same grub> after grub-repair. When opening grub customizer (just to check but not to change anything), I got this message: grb-mkconfig couldnt be executed successfully. error message: /usr/bin/grub-probe: did not find full path to "dev/sda7"
Some clues?
I strongly advise you not to use Grub Customizer.
Grub-customizer is notoriously problematic and known for breaking Grub configs.

Boot repair as @Condobloke said via a USB is the way to do this.
 
Grub-customizer can cause all sorts of trouble. I stopped using it and as a result of its 'intrusiveness" into my system, I did a complete reinstall from scratch.
No problems since.

Using boot repair...definitely from a 'Live USB'

You may find additional help here. Read carefully

 
I strongly advise you not to use Grub Customizer.
Grub-customizer is notoriously problematic and known for breaking Grub configs.

Boot repair as @Condobloke said via a USB is the way to do this.
And I did.... boot-repair from usb with no errors. Used Grub Customizer after boot via grub> to check, not saving anything form the customizer. Cant see that could harm.
May be some of you have time to read the boot-repair log? Attached.
 

Attachments

  • Boot-repair_log.txt
    28 KB · Views: 26
Sorry to bother, but what abouut this:
sudo update-grub
/usr/sbin/grub-probe: error: did not find full path to «dev/sda7»
 
Try, .....when your pc boots, hit one of the F keys to boot to a usb....and see if sda7 is listed there....

If it is, boot to it.

let it run for a minute, and then run sudo update-grub again
 
My last error gone, but still ending at grub>. Boot repair several times, with all commands - no help.
Change to rEFInd? Some experience?
 
Not "change", it's simply offering a Plan-B which would only cost you a tiny FAT32 partition. It's the boot loader i depend on everyday (my preferred Plan-A...), besides having multiple other GrUB menus, each additional one created separately by a new Linux install.

Ref.:


'refind-cd-0.14.2.zip' (contains the .ISO version)
 
Last edited:
I am using rEFInd from a usb flash, and can boot into debian, windows 10 without problems. But strange enough: on the rEFInd list is EFI\ubuntu\grubx64.efi from EFI system partition, and EFI\ubuntu\grubx64.efi from SONYSYS. They should not be there after install of debian?? When trying to boot the first one, I am ending at grub> - the second one at grub rescue>.
I think I should get rid of these two, but how without screwing up my system?
p.s I have noticed a lot having problems after update to ubuntu 22.02....
 
To be honest i never cared for the extra stuff, but if i did i vaguely recall an installed rEFInd allows some setup options, boot order presumably. Since it remembers my last selection i'm often away in the kitchen while it boots...

P.S.: I didn't remember about that. but it seems the « Install rEFInd to Disk » boot-time option is only available when launched from a USB device. The « Manage EFI boot order » item too, and that one can prove most valuable as it lists the FAT32 ESPs including other USB devices apparently. « Start disk partitioning tool » failed to start though, but most good LIVE session make this a non-issue anyway. Just don't touch any other systems, instead i simply reserve a partition dedicated to it and then adjust my boot order in the BiOS/UEFi utility pointing at the rEFInd boot loader itself for total convenience... Proceeding in such manner kind of early during an initial setup usually saves the day when things go slightly wrong, but not so wrong it's all ruined, which in that later case may require a try using 'Super GrUB2 Disk 2.04' (or else) as a last resort. YMMV!
 
Last edited:

Staff online

Members online


Top