5 ms·
Recently learned this lesson. Had 2 backups (1 SD card, 1 HDD) for my "Document" folder. I was trying to replace my GRUB MBR bootloader for REFind's EFI so I
by throwaway2331 5y ago
Recently learned this lesson.
Had 2 backups (1 SD card, 1 HDD) for my "Document" folder.
I was trying to replace my GRUB MBR bootloader for REFind's EFI so I could dualboot on a new laptop (and swap-in my old one's SSD without having to reinsall the whole system: Arch). Unfortunately, the boot partition was too small, and needed to be re-sized from 512MB to 1GB. Foolishly, and in a rush, I thought using gparted to change the partition boundaries (shrink the root partition by 512MB from the beginning, and stretch the boot partition to 1GB from the end) was the answer.
I completely forgot that EXT4 has a superblock at the beginning, so now it was gone, and the root partition was completely unmountable -- and fsck was of no use.
So I scramble to find my backups (to decide whether or not I should figure out how to fix this), and realize that tiny little SD card was missing, and my HDD backup was completely unmountable.
Truly, a major fuck-up.
Thankfully, I didn't write anything to the boot partition, so throwing a Hail Mary and simply resizing the partitions back to their exact original sizes (thankfully x2 my TTS history was useful), allowed the root drive to mount without a hitch.
I was close to losing all of my KeepPassXC passwords and private keys due to shear idiocy.
In the end, I set up "cloud" backups (second storage media type, and long and far away), switched to Debian, and continued on my merry way.
- deleted 5y ago[deleted]
- zamadatix 5y agoTo be fair I think the fuck-up was on gparted's part, it's supposed to handle this kind of thing for you during the resize. That being said no tool is ever bug free hence backups :).
- travisby 5y ago> so throwing a Hail Mary and simply resizing the partitions back to their exact original sizes I've made similar mistakes (well, the same effect, but for different reasons. I thought I was over a remote session when I was local and made an entire new partition layout). `testdisk` was able to introspect what partition boundaries _were_ and rebuild the partition table. If you're ever in a similar situation and either don't remember the exact boundaries or don't trust yourself to recreate them, check it out!
- progman32 5y agoClose shave! Be sure your cloud backups can be accessed by you even in the case of loss of all/most computing devices in your possession. This includes your phone for 2FA.
- dotancohen 5y ago> switched to Debian Not to trivialize the wonders of Arch, but the switch to Debian was a major step in improving the Linux-Wife balance. A system that is reliable, and doesn't have many history lines that begin with `sudo vim /etc...` makes for a happy family life.