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?

5
  • What is the Disk type? GPT or MBR? – eyoung100 Sep 24 '18 at 6:22
  • I already commented below, but just in case: How to repair the EFI bootloader on a GPT HDD for Windows 7, 8, 8.1 and 10 on your Dell PC – eyoung100 Sep 24 '18 at 7:01
  • 1
    What does diskpart show? Post the output of LIST PART and LIST VOL after using SEL DISK n where n is the desired disk – eyoung100 Sep 25 '18 at 5:48
  • Not sure if this would help, but i know with Rhel I create a live USB to act as a a medium of access to utilize linux's DD command and point at a particular location on the broken system. I'm not sure if it would work with a windows system, but you could try using this process to write a windows 10 image to the desired hard drive...The only issue I see is if Windows will act the same as a linux distro and if the gpt/mbr is corrupted or has been removed entirely. dd if =/(iso image source) of=/desired hard drive path from the live linux usb. again not sure if related but hope this may help! – RickwhoPrograms Sep 28 '18 at 16:56
  • 1
    When you assign a drive letter to your boot partition (partition 1?) do you see a folder named grub or ubuntu? – Zackary Oct 5 '18 at 21:03
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.

0
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.

6
  • It should. The Media Creation Tool creates a separate bootable entity (the usb), and should work with most versions of windows 10 – Trenly Sep 16 '18 at 22:05
  • neosmart.net/wiki/bootmgr-is-missing may be useful.Fix #2,#3 and #5 can all be attempted using the USB you already created. Bootrec.exe /rebuildbcd may fix it. /fixmbr fixes any issues win the master boot record (undoes GRUB). /rebuildbcd rebuilds the boot configuration data. A corrup or incorrectly configured BCD could cause the error. bootec.exe /fixboot may also help – Trenly Sep 23 '18 at 20:30
  • None of the above work w/ a Recovery USB made by Win 10 Pro ver 1803. Bootrec.exe /rebuildbcd tells me 0 drives were repaired. Bootrec.exe /fixboot states "Access is denied." Bootrec.exe /fixmbr does not fix it despite stating "The operation completed successfully." Always at reboot I get "BOOTMGR is missing." NeoSmart.Net's $40 app neosmart.net/blog/2015/windows-10-recovery-cd-free you advocated has numerous complains regarding its failure. Not much of a guarantee, especially considering the admin contact is noreply@data-protected.net 416-000-0000 according to Tucows WHOIS. – K7AAY Sep 23 '18 at 22:25
  • 2
    If the disk is GPT there is no MBR, which is why the repair failed. See How to repair the EFI bootloader on a GPT HDD for Windows 7, 8, 8.1 and 10 on your Dell PC. I know it's a Dell guide, but you're probably forgetting to use DISKPART – eyoung100 Sep 24 '18 at 6:46
  • DISKPART was used, and results shown above. DISKPART shows the disk as neither GPT nor Dynamic; no asterisk for either – K7AAY Oct 1 '18 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.