Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I have a dual boot system, win7 in sdb1 and ubuntu in sdb6, the latter resides on an extended partition.

well up until today, update-grub2 would not find a windows partition and today I decide to try and fix that.

using the win7 install dvd, I used the dos cmd line to try and fix the error. the suggested methods within askubuntu said to use bootsect /nt60 c: and bootrec /fixboot. These failed for me and pursuing myattempts I also tried bootrec /fixmbr. Either that or a filesystem check from the win side, managed to make the ubuntu partition (sdb6) disappear completely.

How I see the full disk now:

ubuntu@ubuntu:~$ sudo fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 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: 0xf2eeea4d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048    65383135    32690544    7  HPFS/NTFS/exFAT
/dev/sdb2        65384446   117229567    25922561    5  Extended
/dev/sdb5        92069888   117229567    12579840   82  Linux swap / Solaris

as you can see sdb6 is not even present any longer. from gparted I can see that there exist unallocated space between sector #'s: 65384447 & 92069888.

I tried using gpart to acquire actual sector # in order to then use parted -> rescue , but gpart returns wrong data:

ubuntu@ubuntu:~$ sudo gpart /dev/sdb

Begin scan...
End scan.

Checking partitions...

Guessed primary partition table:
Primary partition(1)
   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(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

This could be related to the fact that MBR was last written from windows. I do not know how to proceed though.

Should I install grub now (even though there is no ubuntu partition) and try gpart again afterwards? If yes, how should I go about it? is there a walk-through for that? If no, what else is suggested to do?

share|improve this question
up vote 0 down vote accepted

Using testdisk utility , I was able to scan the disk and find the partition again.

testdisk is fairly easy to use, especially if you have an idea of the "partition map" of the disk.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.