My partition table used to look like this:
[/boot (ext2)] [logical: [linux(ext4) /][linux(ext4) /home][linux swap] ] [windows 7]
Windows wasn't booting right, so I figured I'd just reinstall it, no biggie. As expected, it overwrote the MBR so I booted into a linux live-cd in order to run grub-install. However, much to my chagrin, my logical partition is now inexplicably empty. Both Windows and Linux see it as unallocated free space, albeit still inside a logical partition. The boot partition at the beginning of the drive seems untouched.
I'm rather peeved at this (seriously, wth windows, wth) and if anyone knows why this happened I'd be interested to know. More importantly, however, is how do I get my partitions back?
gpart, I get:
Begin scan... Possible extended partition at offset(101mb) Possible partition(Linux ext2), size(39997mb), offset(102mb) Possible partition(Linux ext2), size(381143mb), offset(40099mb) End scan. Checking partitions... Partition(Linux ext2 filesystem): logical Partition(Linux ext2 filesystem): orphaned logical Ok. Guessed primary partition table: Primary partition(1) type: 005(0x05)(Extended DOS) size: 429343mb #s(879294464) s(208845-879503308) chs: (13/0/1)-(1023/254/63)d (13/0/1)-(54746/139/62)r Primary partition(2) type: 000(0x00)(unused) size: 0mb #s(0) s(0-0) chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r Primary partition(3) type: 000(0x00)(unused) size: 0mb #s(0) s(0-0) chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r Primary partition(4) type: 000(0x00)(unused) size: 0mb #s(0) s(0-0) chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
It seems to have only found the missing partitions (those offsets look right-ish). The two partitions that it summarizes in the first two lines of output are the correct sizes and offsets of the missing partitions. However, the information below only shows a single partition, which represents the whole of the extended partition, and no information about the logical partitions it displayed above.
At this point I've made a new logical partition that spans the entire extended partition, and have a very large for loop going, running
dumpe2fs /dev/sda5 -o superblock=$i
does that even make sense? I'm getting desperate :(