1

I had a Ubuntu/Windows 7 dual boot set up on my laptop. An updater tried to install Windows 10 in the middle of the night and now when I start the laptop, I get the grub rescue prompt. I tried this solution but ls into any partition gives me unknown filesystem.

I installed the boot-repair utility with a Live USB and ran a "Recommended Repair", which after a few minutes reported it had ran successfully but the grub prompt was there waiting for me when I restarted the laptop. Incidentally, most of the advanced options are grayed out. Here's the boot info summary.

I then tried to repair/restore using the Live USB assuming sda1 to be the Linux partition but chroot gave me failed to run command ‘/bin/bash’: No such file or directory. Taking a closer look at the boot into summary, the boot sector type is listed as Windows 8/2012...

I'm losing hope that I'll be able to recover any of my data :/ Any advice would be greatly appreciated!

EDIT: Thanks to oldfred, I can access both Ubuntu and Windows 10 from the grub menu at boot. In order to restore Windows 10, I booted from an Ubuntu Live USB and ran:

sudo apt-get install syslinux
sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

Windows didn't register my Ubuntu ext4 within an extended partition with the swap space. This was resolved, again from the Live USB, with parted:

sudo parted /dev/sda unit s print
sudo parted
(parted) unit s
(parted) rescue

Input start & end and see if it finds partition. If a new partition is discovered, install boot-repair and run "Recommended Fix" to reinstall grub. Check out the solution comments for more details!

  • Windows 10 defaults to fast start up on or hibernation. And grub cannot boot a hibernated system. You can use Boot-Repair to temporarily install a Windows type boot loader and Boot Windows. Turn off fast start up and make any other repairs. Then restore grub with Boot-Repair. askubuntu.com/questions/145902/… – oldfred May 29 '16 at 17:02
  • Unfortunately, boot-repair doesn't get me into Windows, just back to the grub prompt. I tried to issue those commands from the Live USB but I got Either the device is missing or it's powered down, or you have SoftRAID hardware and must use an activated, different device under – planpony69 May 29 '16 at 18:57
2

For BIOS only:

If Boot-Repair will not see Windows and offer to install the syslinux boot loader, you can install it manually.

sudo apt-get install syslinux
sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

You only want the syslinux boot loader as it is a Windows type boot loader that looks for more boot information in the partition with the boot flag. You do not want syslinux putting its additional boot data in the Windows partition, but want syslinux just to boot & pass boot to Windows code in the partition boot sector.

How to restore the Ubuntu/XP/Vista/7/8/10 BIOS bootloader

  • This got Windows 10 loading :) Unfortunately, I don't have the option to boot into Ubuntu. I turned off Fast Startup and stepped through these, to no avail – planpony69 May 30 '16 at 1:23
  • Windows will not easily boot Ubuntu. It really only boots Windows. But if you have turned off the fast start and repaired Windows so it boots, you then can restore grub to MBR with Boot-Repair. – oldfred May 30 '16 at 3:34
  • The MBR options are grayed out when I run boot-repair. – planpony69 May 30 '16 at 19:20
  • Did Windows turn fast start up back on. On updates it will do that and you have to go thru the process again. Best to have a separate Windows repair flash drive. Or did Windows updates corrupt Linux partition table entries. It has been known to do that also. Post link to summary report from Boot-Repair above. – oldfred May 30 '16 at 20:48
  • Here is a fresh boot info summary. In an interesting twist, the fast startup checkbox is no longer listed with the other power options at all... – planpony69 May 31 '16 at 7:24
0

Try the boot repair disk. It's based on Lubuntu and is very user friendly. Download it here.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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