Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As the title suggests, I was fiddling with ext2 volume manager trying to get my unencrypted removable ext/luks drive to show up under windows. I accidentally went to 'change partition type' and switched it to extended from some mystery filesystem type. I refreshed and it showed up as free space under windows. Then I panicked and unplugged it and plugged it into my Ubuntu laptop trying to fix it . Fsck shows zero length partition. I didn't format it so presumably the information is still there. I'm pretty sure the bulk of the information (1TB removable drive) will still be encrypted.

How do I even start to go about fixing this?

share|improve this question
What filesystem does the partition now use? You may not have the tools on your system to deal with the partition type, and could by why fsck reports metadata corruption (what the zero lengh partition generally means). – new123456 Apr 15 '11 at 0:52
I changed it to extended. It should be ext3. I have mounted everything fine in the past with a 32bit edition of windows 7. I unencrypted the drive with freeotfe and then started up ext2fsd, saw that it hadnt been assigned a drive letter, then I changed it to extended and started the service, at which point the drive disappeared. – Jason Wells Apr 15 '11 at 0:58

Windows won't be able to recognize linux (ext2/3/4) partitions without special software.

TestDisk might be able to restore your partition back to the way it was.

share|improve this answer
I'm running gpart right now but I'm worried that it wont find anything because the only partition of the drive is encrypted (I chose to encrypt the main partition instead of the whole drive because otherwise linux doesnt recognize it). – Jason Wells Apr 15 '11 at 0:59

What you should have done, and all that you probably needed to do until you started running tools that go around altering disc contents, was change the partition type back from "extended" (which is a container partition type that contains other partitions within it) to "ext2/ext3". That would have needed exactly one byte on the disc to be changed from the value 0x05 (or 0x0F or, more rarely, some other code) to 0x82.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .