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!
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
No comments:
Post a Comment