0

Installed ubuntu alongside windows (windows doesnt show in boot menu that is another issue)

After loggin in to ubuntu, I formatted a partition (not one which the OSes were installed on. It had just data)

But the formatting failed and now i cant see the partition or use it. Also the fdisk command shows the same partition twice sda4 and sda5 in the image below.

Not able to understand how to fix this so that the partition becomes usable again.

enter image description here

1 Answer 1

0

You can access grub menu with press and hold shift key on keyboard after your machines boot screen disappear.But you will see there is no windows entry there so you should add it into grub in Ubuntu.To add windows in grub open a terminal and type:

sudo gedit /etc/grub.d/40_custom

and paste the following and save:

menuentry "Windows" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos3)'
chainloader +1
}

Then in terminal type:

sudo update-grub2

Now reboot your machine and hold shift key you will see windows menu entry there select and enter if your C drive is okay you can access windows and try to correct/check your partition in windows.

5
  • Thanks... Can you explain the values passed to root. Will they be the same in my case? Aug 25, 2016 at 12:29
  • The value is where the Windows is.From your screenshot it seems your Windows is in /dev/sda3 so the root line should be msdos3 and here another link about this topic (askubuntu.com/questions/22629/add-windows-7-to-boot-menu)
    – cetox
    Aug 25, 2016 at 12:37
  • Get the windows menu item at boot now. But upon selection it says "BOOTMGR is missing"... Aug 25, 2016 at 14:28
  • First try to change msdos3 to msdos5 in "40_custom" file and do the same procedures and reboot if it is still says "BOOTMGR is missing" then you need to recover Windows with its Cd-Dvd.But before you can also think to copy your important personal datas into a usb in Ubuntu using file manager.(second icon in the launcher)
    – cetox
    Aug 25, 2016 at 15:31
  • ended up reinstalling both OSes Aug 26, 2016 at 6:13

You must log in to answer this question.

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