* [dm-crypt] Another LUKS problem
@ 2012-06-09 8:50 tada
2012-06-09 11:09 ` Arno Wagner
0 siblings, 1 reply; 3+ messages in thread
From: tada @ 2012-06-09 8:50 UTC (permalink / raw)
To: dm-crypt
Hey guys.
Straigh to the problem:
somehow partition table of my external harddrive got corrupted after last
reboot. I did managed to restore the whole table with testdisk, but
somehow the program was able to set up LUKS partition only to 1MB (i
suppose it was able to figure only the header of the partition). The
partition is at very beginning of the drive - starts at 63 and ends at
2118 (giving 2048 total sectors for the header)
So the first question - is the header proper sized? I mean can it get
corrupted by testdisk partition table writing procedure?
And the other question - if i resize partition with fdisk (deleting and
recreating it with restoring LUKS header at the very beginning) will it
give me the possibility to access the data again? The thingy for now is
that whenever i try to luksOpen the 1MB partition it returns me "Requested
offset is beyond real size of device /dev/sdb1" which i suppose is good,
and only thing i need is resizing the partition.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dm-crypt] Another LUKS problem
2012-06-09 8:50 [dm-crypt] Another LUKS problem tada
@ 2012-06-09 11:09 ` Arno Wagner
2012-06-10 12:03 ` tada
0 siblings, 1 reply; 3+ messages in thread
From: Arno Wagner @ 2012-06-09 11:09 UTC (permalink / raw)
To: dm-crypt
I do hope you have a LUKS header backup, what you are doing
comes with an extreme high risk of damaging the header or
key-slot aream with the associated permanent data-loss.
That said, the simplest thing would be to enlarge sdb1 to
start at the same place and span the rest of the disk.
Everything else risks putting in a partition header into
data, unless you know the sector-exact size the partition
had before or only use primary partitions. The filesystem
inside the LUKS container will still be its original size
and prevent overwriting of any other data.
Arno
On Sat, Jun 09, 2012 at 01:50:34AM -0700, tada@riseup.net wrote:
> Hey guys.
>
> Straigh to the problem:
> somehow partition table of my external harddrive got corrupted after last
> reboot. I did managed to restore the whole table with testdisk, but
> somehow the program was able to set up LUKS partition only to 1MB (i
> suppose it was able to figure only the header of the partition). The
> partition is at very beginning of the drive - starts at 63 and ends at
> 2118 (giving 2048 total sectors for the header)
>
> So the first question - is the header proper sized? I mean can it get
> corrupted by testdisk partition table writing procedure?
>
> And the other question - if i resize partition with fdisk (deleting and
> recreating it with restoring LUKS header at the very beginning) will it
> give me the possibility to access the data again? The thingy for now is
> that whenever i try to luksOpen the 1MB partition it returns me "Requested
> offset is beyond real size of device /dev/sdb1" which i suppose is good,
> and only thing i need is resizing the partition.
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name
GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
----
One of the painful things about our time is that those who feel certainty
are stupid, and those with any imagination and understanding are filled
with doubt and indecision. -- Bertrand Russell
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dm-crypt] Another LUKS problem
2012-06-09 11:09 ` Arno Wagner
@ 2012-06-10 12:03 ` tada
0 siblings, 0 replies; 3+ messages in thread
From: tada @ 2012-06-10 12:03 UTC (permalink / raw)
To: dm-crypt
Well everything worked really good.
After restoration of partition table i got my LUKS header back which was
part of the good news. The other part was about knowing exact start and
end sectors of the LUKS partition. So i just moved end sector to the one
i knew and got back my LUKS partition.
On 06/09/2012 02:09 PM, Arno Wagner wrote:
>
> I do hope you have a LUKS header backup, what you are doing
> comes with an extreme high risk of damaging the header or
> key-slot aream with the associated permanent data-loss.
>
> That said, the simplest thing would be to enlarge sdb1 to
> start at the same place and span the rest of the disk.
> Everything else risks putting in a partition header into
> data, unless you know the sector-exact size the partition
> had before or only use primary partitions. The filesystem
> inside the LUKS container will still be its original size
> and prevent overwriting of any other data.
>
> Arno
>
>
> On Sat, Jun 09, 2012 at 01:50:34AM -0700, tada@riseup.net wrote:
>> Hey guys.
>>
>> Straigh to the problem:
>> somehow partition table of my external harddrive got corrupted after last
>> reboot. I did managed to restore the whole table with testdisk, but
>> somehow the program was able to set up LUKS partition only to 1MB (i
>> suppose it was able to figure only the header of the partition). The
>> partition is at very beginning of the drive - starts at 63 and ends at
>> 2118 (giving 2048 total sectors for the header)
>>
>> So the first question - is the header proper sized? I mean can it get
>> corrupted by testdisk partition table writing procedure?
>>
>> And the other question - if i resize partition with fdisk (deleting and
>> recreating it with restoring LUKS header at the very beginning) will it
>> give me the possibility to access the data again? The thingy for now is
>> that whenever i try to luksOpen the 1MB partition it returns me "Requested
>> offset is beyond real size of device /dev/sdb1" which i suppose is good,
>> and only thing i need is resizing the partition.
>>
>> _______________________________________________
>> dm-crypt mailing list
>> dm-crypt@saout.de
>> http://www.saout.de/mailman/listinfo/dm-crypt
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-10 12:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-09 8:50 [dm-crypt] Another LUKS problem tada
2012-06-09 11:09 ` Arno Wagner
2012-06-10 12:03 ` tada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox