RikTelner 20 Posting Pro in Training

Related to another thread that has been posted. Now, my boot manager (GRUB) shows 4 options.

1 Ubuntu (really important one using for data).
1 Ubuntu (just for testing, but have to delete it).
1 Windows 7 (to delete)
1 Windows 7 (to delete)

Now it's easy to find tutorial which will point out how to delete parititon selection from menu, just by looking at it's name. So both Windows' are easily removable, along with their partitions. Then when we look at Ubuntu, the two of them, are exactly same, they have same name, started from same ISO. The only difference is that first one (the one I want to delete) is on sda1 and the second that I need to keep on sda4. Here's the problem. Tutorials show how to manage GRUB options, and how to delete booting "set-ups", by their names, but both Linuxes are called the same. Now I know that GRUB itself shows Ubuntu 14.04 LTS -blablabla- (dev/sda4), but applications which can manage GRUB don't.

How can I manage to delete the correct Ubuntu without taking risk of taking my important data down?

Dani AI

Generated

— short safe plan: identify which installation actually supplies the bootloader, reinstall GRUB from the installation you want to keep, then remove the unwanted partition and update GRUB. Back up critical data first; do not delete a partition until you are certain the firmware will still boot.

Use these commands to map devices, mountpoints and UUIDs so you can unambiguously identify each install:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,UUID
findmnt /
cat /etc/fstab
sudo grub-probe -t device /

After booting the Ubuntu you intend to keep, reinstall GRUB so the firmware uses that copy and then regenerate the menu. For legacy BIOS:

sudo grub-install /dev/sda
sudo update-grub

For UEFI check and manage entries with:

sudo efibootmgr -v
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
sudo update-grub

Once GRUB is coming from the kept install, remove the unwanted partition with GParted or fdisk, then run sudo update-grub so the old entry disappears. If automatic detection causes duplicate names, set GRUB_DISABLE_OS_PROBER=true in /etc/default/grub and add a clear manual entry in /etc/grub.d/40_custom using UUIDs. Official guidance and an automated repair tool are here: Ubuntu Grub2 docs and Boot-Repair.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.