Ok, this is very strange. I have Ubuntu 12.04 on an external hard drive and yesterday I booted it up and was running dxdiag.exe in Wine just for the heck of it. The resolution was kind of screwed up so I rebooted and got the "grub rescue" screen. So I booted up Ubuntu 13.04 (in the internal drive of the same computer) and attached the drive, it didn't mount and blkid showed nothing. fdisk -l showed the drive and the partitions but attempted to mount them resulted in an error which says "unknown filesystem". I started gparted and it couldn't detect the drive either.
So I ran fsck on each partitions on the drive, it reported a lot of inode errors and offered to fix them, I press yes all the way and now the file system appeared to be restored. So I mount sdb1 (where Ubuntu 12.04's boot partition) and reinstalled grub and then rebooted with the drive attached. But then I got to a grub screen with a prompt instead of Ubuntu 12.04. So I booted into 13.04 again and attached the external drive. All partitions mounted but they appear to be empty in Nautilus, however running gparted showed that the partitions are populated with data.
What has happened? Are there still data in those partitions or have they been wiped out? If they are still there how can I access them and boot the drive again? Thanks
Partition table entries are not in disk order
Disk /dev/sdb: 320.1 GB, 320072932352 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142446 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006b6bf
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 41945407 20971680 83 Linux
/dev/sdb2 41947134 415971327 187012097 5 Extended
/dev/sdb5 41947136 325720063 141886464 83 Linux
/dev/sdb6 325722112 332015615 3146752 82 Linux swap / Solaris
/dev/sdb7 332017664 363675647 15828992 83 Linux
/dev/sdb8 363677696 415971327 26146816 83 Linux
/dev/sdb1: LABEL="ubu1204" UUID="211934fe-e4d8-49aa-b623-9552dec61563" TYPE="ext4"
/dev/sdb5: LABEL="ubu1204_home" UUID="bc6ec861-3289-4351-8663-aa71d5a568ca" TYPE="ext4"
/dev/sdb6: UUID="9ca2b28f-6052-4091-a97f-f89b0712227c" TYPE="swap"
/dev/sdb7: UUID="424769e1-e0a2-4b35-9875-1a66e963f3b7" TYPE="ext4"
/dev/sdb8: UUID="d956ffb6-eac3-43eb-8773-975795cc1a0d" TYPE="ext4"
P.S. I have the whole thing cloned so I could restore it, but I want some idea about what happened and the proper way to fix this kind of problems.
p.p.s I tried to upload a screenshot from gparted but somehow I couldn't. Basically I can't see anything unusal, it showed sdb1 and sdb5 with the correct label and format and the amount of data.