Score:0

cannot remove bios and grub entry of Ubuntu 20.04 LTS

cn flag

I am currently using Debian 10 and I was using Ubuntu 20.04 LTS along with Windows 10 Home in dual boot. And to install Debian 10, I have deleted the Ubuntu partition from disk-manager on Windows. After installing Debian, I could still find Ubuntu entry in BIOS and it had it's grub as well. So, as stated in this article, I tried to remove it from the boot entries, by doing the following, I couldn't.

reamler@reamlig:~$ sudo modprobe efivars
reamler@reamlig:~$ sudo efibootmgr
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0006,3006,0003,0002,2001,0001,0000,2002,2004
Boot0000* Notebook Hard Drive - WDC WD10JPVX-60JC3T1
Boot0001* Notebook Hard Drive - Samsung SSD 860 EVO M.2 500GB
Boot0002* ubuntu
Boot0003* Windows Boot Manager
Boot0006* debian
Boot3006* Internal Hard Disk or Solid State Disk
reamler@reamlig:~$ sudo efibootmgr -b -2 -B
Invalid bootnum value: FFFFFFFFFFFFFFFE

reamler@reamlig:~$ sudo efibootmgr
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0006,3006,0003,0002,2001,0001,0000,2002,2004
Boot0000* Notebook Hard Drive - WDC WD10JPVX-60JC3T1
Boot0001* Notebook Hard Drive - Samsung SSD 860 EVO M.2 500GB
Boot0002* ubuntu
Boot0003* Windows Boot Manager
Boot0006* debian
Boot3006* Internal Hard Disk or Solid State Disk

How do I remove Ubuntu(or any OS) from my laptop completely?

Score:4
cn flag

You want ro run

sudo efibootmgr -b 2 -B

You added a leading dash (-) to the argument 2, thus you got that error.

Also remind to remove the ubuntu-folder from your EFI System Partition.

Your ESP is mounted under /boot/efi in Ubuntu, that should be the same in Debian. If that is the case, the folder should be /boot/efi/EFI/ubuntu which needs to be removed. In most cases you will need root-privileges to do so, depending on how the partition is mounted.

You can always use the command lsblk -f to find on which folder your ESP is mounted.

Naveen Reddy Marthala avatar
cn flag
how stupid of me. thanks @mook765.
Naveen Reddy Marthala avatar
cn flag
after a reboot, i can still see ubuntu in my bios and in my terminal by doing 'sudo efibootmgr' at the same position.
mook765 avatar
cn flag
So did you remove the `ubuntu`-folder from your ESP?
Naveen Reddy Marthala avatar
cn flag
no, how do i do that? will you please be able to point me to an article or blog please?
Naveen Reddy Marthala avatar
cn flag
becuase every article and answer here on askubuntu, talks about deleting an fat type partition of linux partition. i want to retain one linux partition and delete other linux partition(want to retain debian and purge ubuntu), and am not sure which to delete without messing up all the other partitions. I still have windows installed along with debian 10.
mook765 avatar
cn flag
@NaveenReddyMarthala Please see my edit.
Naveen Reddy Marthala avatar
cn flag
thanks for the update. that fixed everything.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.