I've made a small mistake, I've removed my boot partition by mistake.
testdisk I was able to recover the boot partition without problem but I either misused it or did not understand and only write partition table with my boot partition.
So now my
swap partition are missing from my system.
I've found this answer from the great Gilles however,
my system is using EFI and my partition is encrypted, does the same solution apply to restore my partition table and what partition format should I use with an encrypted
swap partition ?
Also in the same question from SuperUser, I've come accross the fact that I should use
gdisk and substract 1 to sector size is all those informations accurate and up-to-date ?
testdisk find those partition with a deep search:
Disk /dev/nvme0n1 - 512 GB / 476 GiB - CHS 488386 64 32 Partition Start End Size in sectors P EFI System 2048 1619967 1617920 [EFI System Partition] [ESP] D MS Data 2054 1619973 1617920 [NO NAME] D EFI System 4096 618495 614400 [EFI System Partition] D MS Data 4102 618501 614400 D MS Data 37699 43872 6174 D MS Data 43872 50045 6174 [Boot] D Linux filesys. data 618494 1000206893 999588400 D Linux filesys. data 618496 622591 4096 D Linux filesys. data 618496 1000206895 999588400 D MS Data 374180459 374183338 2880 [NO NAME] D MS Data 374180483 374183362 2880 [NO NAME] D MS Data 374181379 374184258 2880 [NO NAME] >D Linux filesys. data 965039160 965043255 4096
2 of them (the one with 4096 block size) as LUKS.
"bad structue" and from this mess I've know Idea what I could or should restore.
My orginal disk had a gpt boot partiton, one main encrypted partition and a encrypted swap partition in the end.
My computer is still on and I've been able to backup LUKS header and I have access to all data and relevant informations, I just don't know how to exploit it.