Wasted 8 hours today trying to convince Windows to boot.

Yesterday I deleted two unused partitions. Today no OS booted up. Guess what, diskpart (think parted for Windows) reindexes GPT partitions on any modification. So when I deleted partition #1, my EFI System Partition, previously #2, became #1. But UEFI was still trying to boot from partition #2.

Linux booted after recreating UEFI boot entry. 1 minute job, no tools required. Windows, though... Bootrec /rebuildbcd failed, bcdedit failed, recreating ESP from scratch failed spectacularly. Finally I made a clean install just to get proper ESP and restored OS from backup.

Dammit, Windows. Why do you have to make things that hard.

  • 3
    I hate to wake you up to it, but messing around with disk partitioning without having taken a disk image as backup is so FUCKING STUPID that it qualifies for the "idiot of the month" award.
  • 0
    @Fast-Nop I'm making weekly images of everything, so restoring from backup wouldn't be a problem. The thing is, I actually wanted these partitions gone and ESP not being 1st partition bothered my inner perfectionist for some time already, so I wanted to fix it, not just get it to work quickly.
  • 0
    @Fast-Nop did you just assume a dev is not awake all the time?
  • 0
    @electrineer when someone has already physical access to the machine and can boot into Linux with root permissions, the system security has already gone out of the window.

    Data security could still be there if the data are in encrypted containers.
Add Comment