This question already has an answer here:

I removed the ubuntu partition from windows and extended the volume to a existing windows partition. Earlier I had a dual boot windows and ubuntu. Now it shows me the grub rescue.

grub rescue>ls

(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

I loaded a livecd of ubuntu and did boot repair. Still it is showing grub resue. And I don't have a windows cd.

After trying doing a

"ls (hd0,msdos1) /boot" 

on all of partition shown by ls[1]. In each case, it shows Filesystem is unknown.

In the liveCD, I get this:

sudo fdisk -l
Device     Boot     Start        End   Sectors   Size Id Type
/dev/sda1            2048   31791103  31789056  15.2G 27 Hidden NTFS WinRE
/dev/sda2  *     31791104   32507903    716800   350M  7 HPFS/NTFS/exFAT
/dev/sda3        32507904  780682991 748175088 356.8G  7 HPFS/NTFS/exFAT
/dev/sda4       780685310 1465147391 684462082 326.4G  f W95 Ext'd (LBA)
/dev/sda5       780685312 1465143607 684458296 326.4G  7 HPFS/NTFS/exFAT

I don't have any linux partition, should I install linux? Is there anyway to fix this?

Gparted: enter image description here

marked as duplicate by Eric Carvalho, Thomas, Charles Green, George Udosen, vidarlo Jan 1 at 11:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @Zacharee1 I tried ls (hdX,msdosX) \ boot on all partitions. All of them show Filesystem is unknown. – Abhishek Bhatia Mar 24 '16 at 1:20
  • I don't see that command in the answer there. Follow the procedure exactly. – TheWanderer Mar 24 '16 at 1:22
  • @Zacharee1 I can't identify the partition. Please check question again, I have edited. – Abhishek Bhatia Mar 24 '16 at 1:29
  • I think you need to burn a Windows install disc and use it. – TheWanderer Mar 24 '16 at 1:31
  • @Zacharee1 Does it make sense to install linux from a liveCD and then try maybe? – Abhishek Bhatia Mar 24 '16 at 1:32

Boot on Ubuntu with Ubuntu Live DVD/USB and executesudo fdisk -l, note your hdd ID (sda in your case)

Now sudo apt-get update && sudo apt-get install syslinux

Finally sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda

Exit and you can now reboot on Windows. Hope it helps, thanks

  • Thanks for answer! But I am getting this error while running it : ubuntu@ubuntu:~$ sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda dd: failed to open ‘/usr/lib/syslinux/mbr.bin’: No such file or directory – Abhishek Bhatia Mar 24 '16 at 3:37
  • Possibly a change in mbr location, try /usr/lib/syslinux/mbr/mbr.bin – Arijit Chatterjee Mar 24 '16 at 3:49
  • Thanks so much! That works! If possible please provide some explanation. I have limited to no knowledge about mbr. – Abhishek Bhatia Mar 24 '16 at 4:04
  • Dear Abhishek, I suggest you to read more on Google about it, as I am not an expert too. Regards – Arijit Chatterjee Mar 24 '16 at 4:09

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