I decided to delete a partition called "HDDRECOVERY" which I wouldnt use, of around 14 GB, I decided to do it on Windows because I was already working there so I didn't have to boot again into Ubuntu, which is my main system, I only use Windows once a week or so.

So I opened the Disk Manager in Windows and simply deleted it. Everything was going fine until then. Then I right clicked my biggest partition where I store all my media files (and have Windows installed) and asked the program to check if I could shrink it and by how much, so I could have another partition to store stuff on.

The program froze for like 10 min and then it came back up again, working.

Then I tried doing some other stuff but didn't because it wouldn't let me.

Then, I installed like 300 MB of Windows updates bc I don't log on that system very often, and also uninstalled ZoneAlarm and other software that could be slowing my machine, finally restarted the computer and all I see is a grub recovery > command prompt, I tried some stuff there but it couldn't recognize my filesystem.

Then I inserted the Ubuntu DVD and here I am, trying to figure out what to do.

image showing gparted:

enter image description here

That is what gparted shows,/dev/sda2 is where my biggest partition with all the media and Windows is.

/dev/sda3 is where my Linux partition should be - note:my home folder is encrypted

A couple of commands that I tried to determine what to do:

Ubuntu@Ubuntu: ~$ sudo fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 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: 0x637ca5d8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     3074047     1536000   27  Hidden NTFS WinRE
/dev/sda2         3074048  1167904767   582415360    7  HPFS/NTFS/exFAT
/dev/sda3      1167906814  1220651007    26372097    5  Extended
/dev/sda5      1208262656  1220651007     6194176   82  Linux swap / Solaris

sudo parted -l

ubuntu@ubuntu:~$ sudo parted -l
Model: ATA TOSHIBA MK6475GS (scsi)
Disk /dev/sda: 640GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  1574MB  1573MB  primary   ntfs         boot, diag
 2      1574MB  598GB   596GB   primary   ntfs
 3      598GB   625GB   27.0GB  extended
 5      619GB   625GB   6343MB  logical

Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: Can't have a partition outside the disk!       

So I really don't know what to do here, it looks like my partition table got completely broken and also grub doesn't work, so I basically cannot boot to neither Windows or Linux, the only positive thing is that I can access my media partition with Windows from the live DVD but I work on my Ubuntu partition and I need access to it at least to restore all the files I had on my download and desktop folders.

any suggestion is welcome.

2 Answers 2


Looks like you're screwed, especially with an encrypted partition. What you can try is:

1) Copy everything as it is now, on an external USB, another DD, w/e. Copy byte-by-byte is dd if=/dev/sdX of=foo/bar, that will create an exact replica of /dev/sdX to a file named bar located in /foo (adapt those of course, like dd if=/dev/sda5 of=/media/files/backup_hdd.bkp

2) Try to recover your partition with a live-session where you'll install testdisk

3) Play with testdisk and try to restore your DD.

Bonus: you could try to recover some data with ext4undelete (if your partition was in ext4 format?) but I never managed to recover much with that tool.

  • Okay im going to try to copy all my data to an external drive and reformatting it, looks like its the only option, do you know if i will lose my certified windows installation? it came with the notebook. Sep 23, 2014 at 21:03
  • I never mentionned formatting, I pointed out 2 tools to avoid reformatting, testdisk and ext4undelete
    – MrVaykadji
    Sep 23, 2014 at 22:11
  • Hey man, finally i managed to fix the partitions AND GRUB, thanks for your advice anyways. Sep 23, 2014 at 22:14

Finally fixed all my hard drive following these simple steps.

while on the ubuntu live CD:

1) Install TestDisk and run it, very simple.

2) Install Boot-repair and run it with recommended settings, very simple too.

You must log in to answer this question.

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