You are not logged in.

#1 2008-12-29 22:54:11

barrre
Member
Registered: 2008-12-29
Posts: 4

i accidently overwrote my mbr.

yeah, that's what i did. don't mess around with su and dd, kids.
i screwed up big time. any suggestions on getting my mbr as it was before? i only had to physical drives: /boot and a LVM LUKS-encrypted partition, which were /dev/sda1 and /dev/sda2. the first one was 128mbs and the second one was the rest of the 160gb disk. testdisk recognizes both, but it says the encrypted one is 8kb, and it was around 159gbs. i guess i could repair it by giving the right data to the mbr, but i don't know how to get that data and what to do with it.
any suggestions? i'll be looking for recovery software
thanks!

Offline

#2 2008-12-29 23:00:13

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: i accidently overwrote my mbr.

Try reinstalling grub.

Offline

#3 2008-12-29 23:24:03

barrre
Member
Registered: 2008-12-29
Posts: 4

Re: i accidently overwrote my mbr.

Barrucadu wrote:

Try reinstalling grub.

that didn't work. it started to boot and it said that it didn't found /dev/mapper/root. although i don't really know why it didn't try to decrypt the partition first. it should decrypt it and then look for lvm volumes.

Offline

#4 2008-12-29 23:35:42

sirius
Member
From: Norway
Registered: 2008-12-25
Posts: 68

Re: i accidently overwrote my mbr.

I erased my mbr two weeks ago. I used GParted-Live and testdisk to recreate the partition table. I have several partitions, but no LVM. Testdisk (with deep? search) gave me a working partition table for all partitions but the one with LUKS encryption, it's about 60 GB and testdisk created a ~8kB partition and then free space for new partitions. cryptsetup luksOpen on the partition did unlock the key, but there was no valid partition there. I used cfdisk and deleted the ~8kB partition and created a new, starting at the same place as the ~8kB partition, ending at the end of the free space listed. It worked perfectly :-) The partition table doesn't modify your partitions, so if you filled the rest of the disk with the encrypted partition, this should be a quick solution. Good luck!

Offline

#5 2008-12-30 03:30:35

barrre
Member
Registered: 2008-12-29
Posts: 4

Re: i accidently overwrote my mbr.

sirius wrote:

I erased my mbr two weeks ago. I used GParted-Live and testdisk to recreate the partition table. I have several partitions, but no LVM. Testdisk (with deep? search) gave me a working partition table for all partitions but the one with LUKS encryption, it's about 60 GB and testdisk created a ~8kB partition and then free space for new partitions. cryptsetup luksOpen on the partition did unlock the key, but there was no valid partition there. I used cfdisk and deleted the ~8kB partition and created a new, starting at the same place as the ~8kB partition, ending at the end of the free space listed. It worked perfectly :-) The partition table doesn't modify your partitions, so if you filled the rest of the disk with the encrypted partition, this should be a quick solution. Good luck!

did that. but before and after creating the partition as you told me it didn't unlocked the key...
"Command failed: No key available with this passphrase"
any suggestions?

Offline

#6 2008-12-30 04:26:56

barrre
Member
Registered: 2008-12-29
Posts: 4

Re: i accidently overwrote my mbr.

this is so messed up. i really don't know why it doesn't accepts my passphrase. luksDump seems ok, it takes the actual uuid of the disk and doesn't gives out anything strange. it seems in order...
anyone can think of other board that's more into luks and cryptography? maybe if i can give someone the luks header and my passphrase (i wouldn't mind giving it away) they could help me out


thanks!

Offline

Board footer

Powered by FluxBB