I was a little careless today and I erased my MBR and GPT off my hard-drive. I was trying to set up a new boot usb disk.
I ignored the warning and continued wiping out my hard drive GPT. I was certain I had typed parted /dev/sdb
and not /dev/sda
but I was in a rush and I assume I had typed it correct.
Luckily, I made my partition table system fairly simple with blocks of 50 GiBs. I was able to use parted to re-write my partition table. The table was from memory, although I had to re-write it twice as I had the last partitions backwards. parted
was able to detect the FS and I used that as a rough guide to ensure I had my boundaries correct.
It was a bit of a pain to rewrite fstab
and my syslinux.cfg
file using new UUIDs
I forgot to re-write the mbrgpt.bin to the MBR, so I used my Arch Linux install media as a rescue disk.
Interesting caveat. The Syslinux
uses lsblk -o PARTLABEL,PARTUUID
uses lsblk -o PARTLABEL,UUID
Two Lessons Learned:
1. Don't Ignore Warnings (Even if you're in a rush)
2. Doing things manually helps you when your up **** creek.