Jump to content

How to remove GRUB from the wrong SSD?

I have 2 SSDs, on one I installed Ubuntu and is the current bootloader with GRUB.

 

But I noticed there is another Ubuntu bootloader in BIOS on the other SSD on which I did not install Ubuntu.

 

When I try to boot using this bootloader, it doesn't open the GRUB menu, but instead it opens a minimal GRUB bash.

 

Is it a leftover from a wrong installation attempt?

Is it possible to remove it?

Link to comment
Share on other sites

Link to post
Share on other sites

Is the PC running in UEFI Boot mode or Legacy?

 

For UEFI simply delete/format/rm -R the small Fat32 EFI boot partition an the beginning of the drive.

 

If its legacy, not sure its even possible after the fact. You're supposed to uninstall Grub from the install to remove it on a legacy system but you don't have access to the failed install.

 

Its not like it existing will hurt anything anyway, just set boot priority in bios and forget about it.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

it is UEFI.

I will try to rm it.

From Windows disk management or cmd or from Ubuntu?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Filingo said:

it is UEFI.

I will try to rm it.

From Windows disk management or cmd or from Ubuntu?

Doesn't matter.

 

Honestly, just do lsblk, find the small F32 partition (it will be partition 1 and is usually 300mb) then do mkfs.vfat -F32 /dev/whatever1 to wipe it.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

44 minutes ago, Master Disaster said:

Doesn't matter.

 

Honestly, just do lsblk, find the small F32 partition (it will be partition 1 and is usually 300mb) then do mkfs.vfat -F32 /dev/whatever1 to wipe it.

Update: I just realized, Ubuntu installed it wrong:

The working GRUB menu is actually on drive WITHOUT the Ubuntu, only the Windodws.

The GRUB on the SSD with the Ubuntu is the one that shows the minimal shell.. what? Looks like the installation process did it wrong

 

Is it possible to then delete the working GRUB from the wrong drive and fix the GRUB that only shows minimal BASH on the Ubuntu drive?

 

Update 2: I managed to fix the GRUB on the correct drive using insmod and updating root point.

But now I want to delete the wrong GRUB - how do I know that the fat32 is not the Windows bootloader? Or the Windows bootloader is different filesystem?

Link to comment
Share on other sites

Link to post
Share on other sites

Windows bootloader will be in the EFI partition, but you should be able to mount that and delete the Ubuntu loader

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Kilrah said:

Windows bootloader will be in the EFI partition, but you should be able to mount that and delete the Ubuntu loader

so if lsblk shows:

 

sda

|___sda1   499M

|___sda2     99M  /boot/efi

|___sda3   230G

|___sda4   538M

 

The 99M /boot/efi is the WIndows bootloader, and one of the 499M or 538M is the GRUB? (But how do I know which is which? I think one of the is the Windows reserved partition)

Link to comment
Share on other sites

Link to post
Share on other sites

The way efi works is there's one efi partition and it can have multiple loaders on it. So sda2 should be holding both windows boot manager and the ubuntu loader

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Kilrah said:

The way efi works is there's one efi partition and it can have multiple loaders on it. So sda2 should be holding both windows boot manager and the ubuntu loader

 

Oh then how can I delete only GRUB from it? I was looking for a fat32 partition as @Master Disaster mentioned but now you say it's actually both on the same partition,

Then how can I remove the entry from the BIOS? So that I won't see "ubuntu bootloader" on this SSD?

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, Filingo said:

 

Oh then how can I delete only GRUB from it? I was looking for a fat32 partition as @Master Disaster mentioned but now you say it's actually both on the same partition,

Then how can I remove the entry from the BIOS? So that I won't see "ubuntu bootloader" on this SSD?

That's a weird layout, I've never seen the EFI partition as not the first and AFAIK it shouldn't work unless it is the first. Guess I was wrong on that one.

 

The EFI partition is the F32 partition and you can see it is mounted as /boot/efi so it must contain GRUB.

 

What does "ls -la /boot" show?

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

I always forget this tool even exists but you can use efibootmgr to delete entries.

 

First run efibootmgr from a terminal, find the number of the entry you want to remove then do

 

sudo efibootmgr -b number -B

eg if the one you wanted to remove was Boot0001 then it would be

sudo efibootmgr -b 0001 -B

 

to delete it.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

When I use efibootmgr it lists:

 

ubuntu

Windows Boot Manager

Windows Boot Manager

 

so only one ubuntu, but BIOS shows two - and both work when I boot to them from the BIOS.. so why efibootmgr only shows one ubuntu?

 

Update:

Even when I delete this ubuntu, it still shows up after the next restart

 

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, Filingo said:

When I use efibootmgr it lists:

 

ubuntu

Windows Boot Manager

Windows Boot Manager

 

so only one ubuntu, but BIOS shows two - and both work when I boot to them from the BIOS.. so why efibootmgr only shows one ubuntu?

 

Update:

Even when I delete this ubuntu, it still shows up after the next restart

 

This is going to sound crazy but humour me...

 

Shut down the PC, physically unplug both drives, boot it back up with none connected, let it complain about missing boot devices, shut down, replug both drives, boot again.

 

I've had entries exist until I unplugged then replugged them even though I know I formatted the drive clean. I think UEFI stores known entries in flash and sometimes it doesn't update the list.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Master Disaster said:

This is going to sound crazy but humour me...

 

Shut down the PC, physically unplug both drives, boot it back up with none connected, let it complain about missing boot devices, shut down, replug both drives, boot again.

 

I've had entries exist until I unplugged then replugged them even though I know I formatted the drive clean. I think UEFI stores known entries in flash and sometimes it doesn't update the list.

I just checked from ubuntu again, this is not the case because the grub exists in both sda and sdb and I verified it after mounting sda2 and sdb2 and `ls` into them, which showed me "Boot Microsoft ubuntu" in both of them. They now live together inside this vfat partition.. Not sure if there's an easy way to remove only ubuntu from it.

Might do a Linux magic and completely delete this vfat and somehow reinstall the Windows Boot Loader alone, though I am not that experienced

Link to comment
Share on other sites

Link to post
Share on other sites

I GIVE UP!!!

 

I followed this post: https://askubuntu.com/questions/429610/uninstall-grub-and-use-windows-bootloader

 

Then reinstalled grub on the correct drive using this article: https://www.geeksforgeeks.org/how-to-fix-minimal-bash-like-line-editing-is-supported-grub-error-in-linux/

 

And after a restart, grub reinstalled itself on the 250GB SSD without Ubuntu again!

And GRUB on the correct drive showed "minimal bash" once again!!!

 

Link to comment
Share on other sites

Link to post
Share on other sites

When doing these things you want to physically disconnect all drives other than the one you want to modify (or disable in BIOS if possible), both windows and linux will typically install bootloaders not where you want if there are multiple drives.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×