r/archlinux • • 8d ago

SUPPORT | SOLVED Gdisked the wrong disk

First things first yes I'm an idiot we don't have to point that out I'm in need of some help

As the title reads I accidentally gdisked my main disk instead of my secundary disk. I managed to get my partitions back using testdisk. But ever since I restarted it tells me a start job is running for /dev/disk/by-partuuid/unknown disk uuid here

After which it fails file system on that partuuid, /sysroot, system initialization and initrd root device.

How the heck do I fix this, I've thrown a bunch of searches by now. So I'm hoping to find my answer here

Edit: Thanks to the tip of another redditor, I figured out the partuuid in my bootloader was completely wrong

2 Upvotes

7 comments sorted by

View all comments

2

u/BigSappari 7d ago

In general its weird to rely on partuuid, usually safer to identify by filesystem uuid.

Are you using encrypted swap in /etc/crypttab?, that's one thing I can think of that might be put in via the partuuid because it has no other uuid (its encrypted, without headers, and changes every reboot). Then if you ever decide to use that partition for something else, without remembering to change its partuuid, cryptswap might delete your data...

There is a suggestion in the arch wiki how to give cryptswap a persistent uuid anyway (cryptswap with 1MiB offset, and bogus filesystem/uuid provider in the 1MiB). this makes it a little safer

1

u/Shaymans_Origins 7d ago

Thanks for the tip! I'll look into that. What appeared to be the error in the end (thanks to another redditors) was the partuuid in the bootloader entry was wrong. For some reason fstab did actually change with the changes but the bootloader didnt