Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have installed a new OS in the free space of the same hard disk after failing to upgrade the old one. Now there are two copies of boot partitions and EFI System partitions. After a harrowing experience deleting the partition containing the old OS where old swap is located, I am not confident to remove the rest of the partitions related to it.

Despite reading up Wikipedia articles pertaining to UEFI and GPT, I don't think I have gained sufficient overview of how the booting process works. Especially how the UEFI bootloader manages to find the correct EFI System partition (I have two) to boot up the new OS. Now I hope someone can enlightenment me on this issue so that I can gain some confidence and decide whether it is safe to delete the old boot (sda1) and EFI System (sda2) partitions.

share|improve this question
    
typically they don't take much space, so if you are 100% certain of what you are doing, don't fix it if it isn't broken. You can tidy everything up the next time you install from scratch. On the other hand, if you know what you are doing, it is safe to remove old, non functional filesystems, pending the caveat you know what you are doing. –  bdowning Jan 29 at 10:33

1 Answer 1

up vote 2 down vote accepted

I don't have direct answer, but what I would try if the partition needs to be reclaimed is:

  • first make sure you can boot the system from a CD
  • backup the EFI System partitions (to another partition), using dd
  • reformat one of them and reboot (without CD)

If the system does not come up, you can reboot from CD and restore the partition and try the other one.

Keep a written note of what you stored where, you will not have command history

share|improve this answer
    
Instead of backing up, I renamed all the folders in those partitions for the test. After ensuring nothing crops up, I deleted the partitions one at a time. I am glad that everything goes smoothly this time. In any case, do you have any idea how the bootloader manage to find the correct EFI system partition? For the legacy BIOS, we always label a partition as boot. –  Question Overflow Jan 29 at 12:30
    
Renaming is of course much simpler, I hope at least I gave you the idea to do that with my answer. Do you want me to update my Answer or are you going to pose your technique as Answer yourself? I do not have an UEFI based system myself. But I don't think the name is actually necessary and that the partition number is written in the bootsector. –  Zelda Jan 29 at 12:41
    
Umm.. that's ok. I was hoping for a little enlightenment on the UEFI booting process. Anyway, thanks :) –  Question Overflow Jan 29 at 12:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.