6

The Grub2 files on a single drive Lenovo dual boot laptop have been erased, along with everything else in the Ext4 partition, when the user resized the Ext4 partition to make more space for Windows 10 Pro 64-bit ver 1709. /boot/grub/grub.cfg /etc/grub.d/ and /etc/default/grub are all gone along with everything else in the ext4 filesystem.

So the system doesn’t boot and I need to get Windows booting again as a priority; once Windows boots, reinstalling Linux is easy.

DISKPART shows the disk as neither Dyn nor GPT; no asterisk for either.

There are three NTFS partitions on the machine's drive, plus a vacant Ext4 partition in a position relocated from its original place. I want to get Windows booting again as a priority; the user can wait for Linux, although I certainly am not averse to the recovery tools of Debian derived distros.

Can't boot from a LiveUSB with grub-recovery; when I do, I get a Windows boot manager error message. Without the LiveUSB, I get a Grub error prompt.

Looked for the original Windows 10 recovery USB, found it was physically destroyed (two moves = one fire, as they say).

Created a Recovery USB from another Windows 10 (ver 1803) machine and ran bootrec.exe /fixmbr Enter responded with "The operation completed successfully". Closed the command window, powered down, unplugged the USB and powered up; failed to boot with "BOOTMGR is missing."

Bootrec.exe /rebuildbcd tells me 0 drives repaired and rebooting failed to boot with "BOOTMGR is missing."

Bootrec.exe /fixboot tells me "Access is denied."

Since, as previously stated, there are no FAT32 partitions, and since M$ states a FAT32 partition is required for GPT: "The device must contain a system partition. On GPT drives, this is known as the EFI System Partition, or the ESP. This partition is usually stored on the primary hard drive. The device boots to this partition. The minimum size of this partition is 100 MB, and must be formatted using the FAT32 file format" I suspect the partitioning is all-MBR.

However, since Lenovo has its own partition GUIDs, should I look at that as well?

DISKPART shows

list disk

Disk ### Status Size Free Dyn Gpt

-------- ------ ----- ---- --- ----

Disk 0 Online 298GB 0B

list part

Partition ### Type Size Offset

----------- ------ ------ ------

Partition 1 Primary 100MB 1024KB

Partition 2 Primary 279GB 101MB

Partition 4 Primary 17GB 279GB

Partition 3 Recovry 953MB 297GB

How may I resolve this?

K7AAY
  • 9,725

2 Answers2

7

Create a windows recovery drive on a usb using the Windows Media Creation Tool. You should not need to format the USB, as it will do this for you. Use the boot menu or BIOS/UEFI to boot from the usb. Once the utility has loaded, select to repair your computer with command prompt. In the command window that appears type bootrec.exe /fixmbr and press [Enter]. Exit the command window and power down the computer. Unplug the USB and attempt to boot.

Trenly
  • 1,091
1

I assume Partition P1 was EFI, P2 Windows, P3 Linux.

According to your constraint of getting Windows to work first, the following procedure might help:

  1. Take an image of the whole disk as backup
  2. Take raw backup of each partition
  3. Re-format the disk and re-partition with P1 as EFI and P2 as NTFS with exactly the same sizes
  4. Install a fresh Windows version in P2 and let it install its own EFI bootloader in P1
  5. Backup the new P2 and then raw over-write it with the salvaged backup of P2
  6. Worry later about Linux and grub.

This will not work if the user has also destroyed the Windows partition. In that case you might need forensic support, and the most you could do without it is to return the new Windows P2, so as to at least have a working Windows installation. You will need lots of external disk space for taking all these backups.

harrymc
  • 498,455