Not Understanding Grub

I added a second Linux Distro to my system. Ran the sudo update-grub, it found the second system and set up a boot menu for me to choose which system to boot from. All was fine.

When I was finished testing the second Linux system, I deleted the partition.
I then ran apt-update grub again, thinking it would remove this system from the boot menu.

Instead my system now boots to Grub>

After trying to fix the problem by doing Clonezilla restore, I gave up and just re-install Linux from the Distro USB. So, I can not try any suggestions but would like to hear what you think I did wrong -or
what I should have done to remove dual boot.

“apt-update grub” is not actually a “thing”…

I can’t remember what the exact grub command is - haven’t run grub for a while (last time I did anything in grub was to make/force Orrible [sic] Linux “OEL” running in HyperV NOT use the UEK kernel, which breaks in Microsoft’s shoddy half-arsed virtualization platform-from-hell)… in ZSH if I run “grub[tab tab]” it shows this :

╰─➤  grub- 
grub-bios-setup       grub-glue-efi         grub-menulst2cfg      grub-mkimage          grub-mkrelpath        grub-ntldr-img        grub-script-check   
grub-editenv          grub-install          grub-mkconfig         grub-mklayout         grub-mkrescue         grub-probe            grub-set-default    
grub-file             grub-kbdcomp          grub-mkdevicemap      grub-mknetdir         grub-mkstandalone     grub-reboot           grub-syslinux2cfg   
grub-fstest           grub-macbless         grub-mkfont           grub-mkpasswd-pbkdf2  grub-mount            grub-render-label

So - I think what you’re looking for is one of these doohickeys… it was “grub-set-default” that I had to use in Orrible Enterprise Linux in HyperV…

I don’t really know that much about grub, I never, hardly ever, dual boot, so I just let Ubuntu installer do all the automagickery for me…

2 Likes

Thanks @daniel.m.tripp, I should have type ‘sudo update-grub’. I will edit my post.

On my old pc I use for Linux testing I have Mint Cinnamon on a ssd and three Distros booting from an hdd. The ssd is set first to boot in the bios with grub installed to the mbr of /dev/sda. I install grub to the other Distros to the root partition of each Distros /devsdb1, /dev/sdb2 and /dev/sdb3. Their is really no need to install grub to these Distros, but the installers does not always give an options to not install grub. The key here is after installing a Distros to /dev/sdb is to reboot and boot into the ssd and run the command sudo update-grub and I let Mint find the other Linux OS. Mint is the only OS that I run the sudo update-grub.
Remember, Grub2 and Linux boots in stages and the first stage is my Grub2 entry in /dev/sda, from their it will try and find the linux image, or a Windows OS, of the OS I have selected. I can delete every partition, except Mint and still have a PC that will boot.

1 Like
  1. If you ran it from the second distribution which partition you destroyed, it cannot update GRUB the way you expected.
  2. If you are not familiar or not comfortable with GRUB, just use the GRUB Customizer, which displays all results and stati visually for anyone to understand. (I use it myself, as life is too short to waste time on GRUB configs manually.)
1 Like

I also use Grub Customizer with Linux and EasyBCD with Windows.