0

Hi I have installed two Linux distributions and I have decided to remove one of them but it still keeps its boot loader, so I just wanted to know how can I find which one belongs to my current Linux so I can delete the other one. this is the ll output from /boot:

enter image description here

2 Answers 2

1

If I am not mistaken boot sequence is like this: Boot loader or uefi partition dispatches booting sequence to initramfs and vmlinuz (compressed linux running on tmpfs ram disk file system) in /boot from there it loads your linux system and Xorg GUI ...

Details are here: https://www.thegeekstuff.com/2011/02/linux-boot-process/

If you install on bios booting machine you install boot loader at the begging of MBR, to /dev/sdx and boot loader files to /dev/sdx1/boot

If you install on uefi , efi dispatches boot to /dev/sda1 (which is fat32 uefi partition 128-512 mb of size) and the boot loader files are also in /dev/sda1/EFI/boot

So it seems impossible to have 2 boot loaders in bios mode. It is also not possible to use one disk both for uefi and bios as far as I know because uefi requires GTP partition scheme and uefi partition on it ...

sudo apt-get autoremove 
sudo apt-get autoclean

moves unused kernels and their initramfs files also vmlinux files it usually keeps the newer one ... These are linux boot images not boot loaders there is only one boot loader. And in your case it seems to be grub ...

2
  • I have two disks, the SSD one contains Ubuntu and on the HDD I had both Windows and Kali. and I have decided to remove the Kali from my system and then I had to clean up the bootloader stuff. All three OSs were on BIOS. thanks for your answer and time Mar 24, 2020 at 10:11
  • 1
    Remove grub delete files reinstall grub ... If it wont work boot with live usb and chroot to your system and reinstall grub. It worked for me once, but it also didnt work in some occasions. So its risky. You may rename grub folders one by one checking if things are ok. If not you can boot with live usb and rename back to grub. That way it would be very easy to find redundant grub folder. Mar 31, 2020 at 10:29
0

We can find out the version of our Kernel by running the info center GUI application or we can run the following command: uname -r or even uname -a for more information and then we can delete the kernel files of the other Linux distro we have.

After deleting it, we need to update the grub setting by using the command bellow:

sudo update-grub

or maybe

sudo update-grub2

And after you restart the system you should only see the current distro you have (alongside windows if you have windows as well)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .