1

After Windows 10 Anniversary update the grub OS choice menu no longer shows, I just get the grub prompt. From the grub prompt I can use ls on only one of the partitions, which has three folders: ubuntu, boot and windows but I'm not sure what to do from the grub command line.

I've tried using the boot-repair tool but it didn't work.

I tried the bcdedit approach mentioned here Windows 10 upgrade kills grub and boot-repair doesn't help but it didn't change anything.

I fear for the worst because the partition that had ubuntu on it is not recognized properly by gParted (it says file system unknown), and fdisk -l /dev/sda6 says "Disk /dev/sda6 doesn't contain a valid partition table" I've not much experience with partitioning or grub, and maybe it's a wrong assumption, but since I have only two partitions with more than 100GB, and gParted says sda4 has the Windows label I've assumed that sda6 is my old Ubuntu partition.

I tried the accepted answer from here: How can I repair grub? (How to get Ubuntu back after installing Windows?) but immediately hit problems because I couldn't mount my ubuntu partition. Without type (or with -t auto) mount says I must specify type, but with type I get:

sudo mount -t ext4 /dev/sda6 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda6,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Here is the output from sudo parted -l

Model: ATA Crucial_CT250MX2 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  735MB   734MB   ntfs            Basic data partition          hidden, diag
 2      735MB   1008MB  273MB   fat32           EFI system partition          boot
 3      1008MB  1142MB  134MB                   Microsoft reserved partition  msftres
 4      1142MB  103GB   102GB   ntfs            Basic data partition          msftdata
 5      103GB   104GB   855MB   ntfs                                          hidden, diag
 6      104GB   230GB   125GB
 7      230GB   238GB   8468MB  linux-swap(v1)
 8      239GB   250GB   11.5GB  ntfs            Basic data partition          hidden, diag

Here is the output from the recovery tool: http://paste.ubuntu.com/23276891/

I haven't tried TestDisk yet because I'm not sure if it can fix it (and I don't want to break the windows partition) but if anyone thinks it's worth trying I can do that.

Overall it's been a very sad anniversary for Windows for me. When I saw the Windows "Hi.. We've updated your PC" on screen I wanted to put my fist through it.

Update: I tried TestDisk and now windows isn't booting either after just doing the basic "scan" and write partition table.

mickadoo
  • 131
  • 5

2 Answers2

3

Windows won't be effected by running Testdisk unless you specifically choose to write the partition table. After the scan, Testdisk will give you the option to choose whether to write the results of what it finds. You can then choose if the partition table is correct. Compare it with what you already have, namely the size of your Windows partition.

The windows update clobbered the Grub boot manager. You'll have to reinstall it. I find this to be the simplest method.

Boot to a live session (USB or DVD) and run these commands from a terminal prompt.

Change the XY in line #1 to the partition where Ubuntu is installed. Change the X in line #4 to your boot disk. It's most likely /dev/sda.

The prefix :$ and :# are the command prompts you see on the terminal.

1:$ sudo mount /dev/sdXY /mnt
2:$ for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/$i"; done
3:$ sudo chroot /mnt
4:# grub-install /dev/sdX
5:# update-grub
6:# exit
7:$ for i in /sys /proc /run /dev; do sudo umount "/mnt/$i"; done
8:$ exit

Reboot.

Ensure that you have UEFI enabled in your BIOS if is a later model computer with that feature.

L. D. James
  • 25,036
  • That sounds like the approach i tried but, as I said in the question, I can't mount the Ubuntu partition – mickadoo Oct 05 '16 at 00:34
  • What was the exact command you used to mount the Ubuntu partition? – L. D. James Oct 05 '16 at 00:35
  • The command I posted was sudo mount /dev/sdXY. That will fail. From a live disk I can mount any partition including the Windows partitions. Can you post the error message you get when you attempt to mount the partition? Also can you send a screen shot of a gparted of the drive where your Ubuntu is installed? – L. D. James Oct 05 '16 at 00:40
  • Looking at your parted -l output it's showing your /dev/sda6 as not having an ext4 format. The requested image from gparted will help. – L. D. James Oct 05 '16 at 00:47
  • The output from the mount command (including the command I used) is in the question text. Could you explain a bit more what you mean by "the requested image from gparted" please – mickadoo Oct 05 '16 at 09:15
  • @mickadoo I know this is late. But FYI, and for others reading the comments, when you were having problems I asked you in my second message (above) to provide a screenshot of gparted. – L. D. James Oct 18 '17 at 08:10
0

I did the SHIFT + Restart trick and was looking around. I selected USB device and BAM... there is my Ubuntu installation! I just selected and it rebooted into linux.

This solution may work for others with this issue.

P.S. My partitions are like most and saying unreadable by Windows. I even had an issue with using partition manager, but my OS is still there and this process allowed it to be accessed.

TheOdd
  • 3,012