2

I am having some large issues right now. I decided to go forward with a Windows 10 upgrade after it worked fine on my other dual boot. Of course, I knew that I would have to fix Grub in some way afterwards.

I got to grub rescue. Okay so I got out a live USB and installed boot-repair and ran it. I rebooted after it said the problem was fixed and the problem was not fixed.

I booted into my live USB again and checked partitions. I used to run Windows 8.1, Kubuntu, and Ubuntu MATE. From what I can tell, my Ubuntu partitions are gone and there is unallocated space where they were.

Does anyone know of a fix?

EDIT: Boot info summary isn't looking good. It says there are no linux systems installed. You can find it here: http://paste.ubuntu.com/14481248.

EDIT 2: I was able to get into Windows using SuperGRUB2Disk. Will a reinstall of Ubuntu fix Grub?

EDIT 3: This is my latest boot info summary after using test-disk and boot-repair. http://paste.ubuntu.com/14491353

  • Reinstall. If they were removed, I'm sorry but you have to reinstall. Windows' installation should not leave you with a grub rescue prompt, but with an NTLDR. – Eduardo Cola Jan 12 '16 at 22:18
  • @EduardoCola NTLDR? – b1uepear Jan 12 '16 at 22:20
  • The Windows bootloader @b1uepear Wikipedia – Daniel Jan 12 '16 at 22:30
  • Windows NT kernel loader. – Eduardo Cola Jan 12 '16 at 22:41
  • @EduardoCola Would a reinstall of Ubuntu fix GRUB and allow me to boot Windows normally? – b1uepear Jan 12 '16 at 22:52
  • Yes. Reinstalling Ubuntu would also install GRUB. But note that there are some cases where Windows 10 (specifically this version) is not being recognized by the installer and you have to partition your disk manually. But os-prober and update-grub should do it. – Eduardo Cola Jan 12 '16 at 22:56
  • @b1uepear I'm looking at your paste, and I see 3 NTFS partitions, and one FAT. Where did you see the unallocated space? Also, I'm very curious, how could that happened that Windows upgrade did something with partitions it didn't own? – Hi-Angel Jan 12 '16 at 22:58
  • @Hi-Angel I'm not sure. I'm not very experienced with that sort of thing. I just know that when I booted into a live USB, Gparted showed ~200GB of unallocated space and then boot-repair can't find either of my two linux partitions. – b1uepear Jan 12 '16 at 23:07
  • @b1uepear were all the systems installed with the same UEFI settings in BIOS? (I mean, e.g. with UEFI disabled, either enabled). I mean, didn't you install, for example, GNU/Linux with UEFI disabled, and Windows with UEFI enabled? – Hi-Angel Jan 12 '16 at 23:12
  • @Hi-Angel I assume so, but I can't say for sure. – b1uepear Jan 13 '16 at 00:17
  • Okay, take a look then at the output of both sudo fdisk -l /dev/sda and sudo gdisk -l /dev/sda and check if you see in partition list of any of the outputs a name like Linux anything (except for swap). It's just that the only valid reason for the problem, I can think of, is that somehow GPT and MBR tables messed up, perhaps like MBR was used before, and now it is GPT… So, old fdisk utility doesn't know of GPT, it would check MBR — but gdisk would rather check GPT (if it exist). If that won't work, then I'm out of ideas, I'm really curious what else could've done Windows OS. – Hi-Angel Jan 13 '16 at 00:42
  • Oh, yet another idea — try to run filesystem check of the partition which were supposed to be the GNU/Linux one. For example if you do remember that you did use ext4 filesystem, and partition was /dev/sda3, then run sudo fsck.ext4 /dev/sda3. I'm really not sure if that would work, but worth at least checking that. – Hi-Angel Jan 13 '16 at 00:55

3 Answers3

0

Windows has LONG had problems with extended and logical partitions. I've seen reports as far back (at least) as Windows XP of it trashing logical partitions in various creative ways. It seems likely to me that the Windows upgrade process ran afoul of this amazingly-unfixed long-term bug.

Before you re-install, especially if you have important user data in your Ubuntu installation, you might try running TestDisk from the Ubuntu installer in "try before installing" mode. Your fdisk output makes it clear that there's a big gap in your partition table, so chances are the entry for your Ubuntu partition was simply deleted, and the filesystem itself is intact. There's a good chance that TestDisk will be able to recover the partition. After that, there's a small chance that GRUB will just start working. If not (which is more likely), Boot Repair should be able to re-install it and everything should start up again.


EDIT:

Your post-TestDisk Boot Info Script output shows that what had been two Windows primary partitions (1 and 3) are now your first two logical partitions (5 and 6), and your original partition 2 is now missing. Windows can't boot from a logical partition, which may be what's causing your Windows boot problems -- or it could be that /dev/sda2 was your Windows boot volume, in which case the fact that it's missing is obviously not optimal. You can correct the primary-to-logical problem with my FixParts program (see the just-linked-to documentation for detailed usage instructions). This is part of the gdisk package in Ubuntu. Thereafter, I recommend you use fdisk in Ubuntu to re-create your original /dev/sda2 by creating a new partition from sector 718,848 to 541,059,589. Alternatively, you can try using TestDisk again, but you must be careful to tell it which partitions should be primary and which should be logical, so that it doesn't make the same mistake again.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • I edited my post to include the latest boot info summary. – b1uepear Jan 13 '16 at 22:33
  • It worked for one of my two Ubuntu installs. Unfortunately, windows doesn't work anymore. I'll eventually figure it out. – b1uepear Jan 13 '16 at 22:43
  • If it was one partition, parted rescue might be easier to restore. But you need to know sizes to use it. So testdisk may work. http://askubuntu.com/questions/665445/upgraded-to-windows-10-on-dual-boot-and-cant-boot-to-ubuntu-partition/665462 – oldfred Jan 13 '16 at 23:42
  • Please see my edit above. – Rod Smith Jan 13 '16 at 23:49
0

First thing you should know is what kind of disk are you dealing with: is a GPT disk or does it have a MBR? In both case I would recommend you use testdisk in order to recovery your partition table.

  • you lost all partitions from 542,724,094 to 968,521,728. It is logical to think that you had at least 2 ext4 partitions there and shared the swap file system. – David Pardo Jan 13 '16 at 23:10
0

I gave up and wiped the disk. I've decided not to do a dual-boot as it's too complicated for me and I haven't found a good reason I need Windows on this laptop. (I have another one running 10.)