Score:0

Unable to find Ubuntu directory in order to delete it

fk flag
Jon

Hello all and sorry for the newbie question, but I'm going through this tutorial: How do I remove "Ubuntu" in the bios boot menu? (UEFI) and am unable to find the Ubuntu subdirectory to delete it. I've been through several of the articles on here: Using locate to find a directory , https://stackoverflow.com/questions/47887522/how-to-search-for-a-directory-from-the-terminal-in-ubuntu etc. with no success. Any advice would be much appreciated.

David avatar
cn flag
Your question is confusing. Are you trying to remove the Ubuntu entry fro the EFI partition. Or do you think there is a directory called Ubuntu some place on your hard drive? What exactly are you trying to do?
Jon avatar
fk flag
Jon
@David Thank you for response and sorry for the confusion. I'm trying to remove the Ubuntu entry from the EFI partition.
Jon avatar
fk flag
Jon
@David Looking at the article more closely I noticed it says "Now you should also delete the ubuntu subdirectory in the EFI partition to prevent the UEFI firmware from restoring the entry into the BootOrder." So I guess I'm trying to remove a subdirectory (directory??) called "Ubuntu" not to be confused with another? subdirectory? called "ubuntu." I know I sound lost - because I am. lol
Jon avatar
fk flag
Jon
Dawn, thank you for your help! the partition was located in /dev/sda1 so I did sudo mkdir /mnt/efipart sudo mount /dev/sda1 /mnt/efipart However when I try to cd/mnt/efipart I get a bash: cd: /mnt/efipart: Permission denied.
Jon avatar
fk flag
Jon
@Dawn I went through this: https://askubuntu.com/questions/998214/permission-denied-when-i-try-to-cd-into-any-folder and I'm going to do a fresh install. Just to be safe.
Jon avatar
fk flag
Jon
Welp. I tried. I changed the boot order to boot from USB (where the Ubuntu 22.04 image that I originally installed from) and now I'm getting stuck on the GRUB screen - again. Ready to throw in the bloody towel. Been days struggling with this. Maybe it's just time to admit defeat. ha!
Score:0
pf flag

If you successfully mounted the partition with the following command (assuming your EFI partition is located in /dev/sda2. If not, you need to replace /dev/sda2 with the actual partition name to mount it to /mnt/efipart)

sudo mount /dev/sda2 /mnt/efipart

then, you can change directories to it and search:

cd /mnt/efipart
find . -name '*buntu'

If you use the wildcard *, then then it will match Ubuntu and ubuntu. If you do not have sufficient permissions to cd into /mnt/efipart, you can switch users with sudo su and you will now have root permission (sudo is no longer needed for each command). Be careful while you have root permission (and you will notice your prompt has changed to #). To return to your user permissions, simply enter exit

Dawn Howe avatar
pf flag
@jon, if your user id lacks permissions to `cd /mnt/efipart`, you have 2 options: lower the permissions of `/mnt/efipart` (`sudo chmod 777 /mnt/efipart`) or elevate your permissions (`sudo su`). Read my answer above about how using `sudo su` gives you root permissions.
I sit in a Tesla and translated this thread with Ai:

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.