3

My notebook has two disks (there is a third disk -/dev/sdb - that is cache for the second disk).

Windows 10 is on the second disk (/dev/sdc) (SATA ODD) and was working very well until today.

Ubuntu I installed yesterday on the first disk (/dev/sda) (Fixed HDD).

Ubuntu is normal at this moment.

My problem started today after I executed GParted in Ubuntu. I received the following pop-up message:

Bug found in libparted! The Backup GPT Table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)?

Unfortunately, I pressed the button to execute the process. I was expecting that it would alter the disk (/dev/sda) in which it was running. But it changed the disk (/dev/sdc) with Windows.

After that:

  1. UEFI does not found Windows;
  2. In Setup, SATA ODD appears as [Not Detected];
  3. DiskPart (list disk command) running using the recovery disk of Windows could not see the second disk (/dev/sdc/). It found 2 disks: /dev/sda and /dev/sdb was correct and with GPT.

In Linux /dev/sdc is visible using: lsblk, fdisk, and parted.

I was able to mount the partitions of the second disk (/dev/sdc/) and access the files (as read only).

Gdisk presented the following information for /dev/sdc:

Problem: The secondary header's self-pointer indicates that it doesn't reside at the end of the disk. If you've added a disk to a RAID array, use the 'e' option on the experts' menu to adjust the secondary header's and partition table's locations.

Identified 1 problems!

Boot Info Script showed that:

No boot loader is installed in the MBR of /dev/sdc. (disk with Windows)

Windows is installed in the MBR of /dev/sda. (disk with Ubuntu)

Could you help me to repair the GPT partition, or Boot Loader, of /dev/sdc (the second disk in which is Windows 10) ?

An update:

I removed the disk (/dev/sdc/) from the notebook. I put it in a adapter to use HDD SATA with USB conector.

And in this way DISKPART was able to see the disk and its partitions/volumes. Identifying it as GPT.

Now I just need to recover the windows bootloader for the disk. (I have the recovery disk created using the system, and the Windows 10 installer both in pendrives).

What is the safest procedure to do that ?

3 Answers 3

2

For all currently supported versions of Ubuntu, open the terminal and type:

sudo add-apt-repository ppa:yannubuntu/boot-repair  
sudo apt update  
sudo apt install -y boot-repair
sudo boot-repair  

enter image description here

2
  • more ubuntu-specific than my answer, but very good since the asker asked about Ubuntu.
    – Wyatt Ward
    Commented Nov 1, 2015 at 6:19
  • Karel, I tried your solution and it worked. Thanks for you that pointed the solution and Yann that developed it. Commented Nov 2, 2015 at 1:04
1

In a very similar case (moved and enlarged partitions, so Windows system/C: partition has been moved – which GParted explicitly warns about), I also had a non-bootable Windows with grub.

Symptom: Had a Windows 10 blue error screen directly after choosing Windows 10 in the grub boot menu with some cryptic error code, which shows not much information. It says I should press F8 for troubleshooting or Enter to retry, but F8 just shows the same error.

Notes: The problem other solutions tries have when you have a working grub you may not want to break that. As such, e.g. do not overwrite the MBR (breaks MBR and requires grub reinstall then) or overwrite the boot sector.

Also, automatically fixing via Windows 10 boot troubleshooting tool did not work.

Solution: Boot a Windows 10 installation media (GParted explains how to get it, direct link for Windows 10) and rebuild the Boot Configuration Data (BCD) store using the cmd.exe/command line Windows 10 from thinstallation media:

bootrec /rebuildbcd

IMHO the Microsoft doc linked from GParted is too cumbersome, and I suggest to refer to these detailed instructions by Ventoy.

This was the only command needed.

PS: In my case I installed the Windows 10 installation media via ventoy to have other rescue ISOs next to it, which worked well.

(Cross-posted from a similar question)

0

If I understand correctly, you should boot the pen drive/CD/DVD with the installer, and select the repair options. From there, select the option for fixing startup problems. That should re-install the boot loader. Then, you'll have to boot to linux from a CD/DVD, and re-install GRUB, because windows will overwrite that too.

The Ubuntu wiki describes the process well.

If that fails you, I use debian, which should use about the same methods as Ubuntu. Here are good instructions for fixing GRUB EFI that I used in the past. They should be easily transferrable to Ubuntu, if the Ubuntu wiki method fails. This method uses a REFInd boot CD for installation of GRUB, and is EFI-specific (legacy BIOS won't work this way).

0

You must log in to answer this question.

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