1

I've been seeing some error messages regarding the formatting and/or partitioning of my hard drive (ie. file descriptor errors, magic number mismatch errors), and while poking around in gdisk, I saw there was an error in a GPT partition on my EFI system parition. My EFI partition is 500MB, and drive is 500GB, yet gdisk said my EFI partition was 800GB. I figured there wouldn't be any harm in loading the backup GPT table (via gdisk > r > c > w), so I wrote the backup GPT table as the main table, and rebooted.

After rebooting, no OSes were detected. I booted from a live usb, and reinstalled grub. This resulted in many 'grub-install.real: warning' messages saying there was an improperly nested parition "hostdisk//dev/nvme0n1, gpt1, msdos2". After reboot, no OSes detected.

I rebooted and ran an auto fix/check partition through gparted (right click > check). This resulted in some messages that seemed relevant:

FSINFO sector has bad magic number(s):
Offset 0: 0x20494645 != expected 0x4161525
Offset 484:0x000000000 != expected 0x61417272
Offset 510: 0x0000 != expected 0xaa55
Auto-correcting it

After this, the gdisk output wasn't happy with the GPT:

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: damaged

But grub now shows no improperly nested partition errors. After updating grub, I rebooted into linux, but can't seem to fix Windows.

I don't currently have access to any Windows Repair disks (besides, my computer doesn't have a CD drive), though I do have Windows Recovery and Image Partitions.

Background info: Dell XPS 15 with a dual boot setup of Windows 10 and Linux Mint.

Select Boot-Repair Output:

no valid partition table found
"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/nvme0n1                                                       
/dev/nvme0n1p1   DE6C-05EA                              vfat       ESP
/dev/nvme0n1p2                                                     
/dev/nvme0n1p3   AADCA51FDCA4E6B3                       ntfs       OS
/dev/nvme0n1p4   1422A1A622A18CF4                       ntfs       WINRETOOLS
/dev/nvme0n1p5   02AEA20EAEA1FA75                       ntfs       Image
/dev/nvme0n1p6   9bfef4c0-4af2-4758-adb9-bb1c08256462   ext4       LinuxMint
/dev/nvme0n1p7   2c2ca336-a7eb-429b-b6ed-12b83750ed73   swap       

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root 13 Jul 23 15:22 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Jul 23 15:23 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 Jul 23 15:23 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208-part5 -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208-part6 -> ../../nvme0n1p6
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-PM951_NVMe_SAMSUNG_512GB__S29PNXAG917208-part7 -> ../../nvme0n1p7
lrwxrwxrwx 1 root root 13 Jul 23 15:22 nvme-eui.00253843591b4338 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-eui.00253843591b4338-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-eui.00253843591b4338-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-eui.00253843591b4338-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Jul 23 15:23 nvme-eui.00253843591b4338-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 Jul 23 15:23 nvme-eui.00253843591b4338-part5 -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-eui.00253843591b4338-part6 -> ../../nvme0n1p6
lrwxrwxrwx 1 root root 15 Jul 23 15:22 nvme-eui.00253843591b4338-part7 -> ../../nvme0n1p7

=============================== StdErr Messages: ===============================

File descriptor 9 (/proc/3448/mounts) leaked on lvs invocation. Parent PID 26812: bash
File descriptor 63 (pipe:[39653]) leaked on lvs invocation. Parent PID 26812: bash

ADDITIONAL INFORMATION :
=================== log of boot-repair 2017-07-23__15h21 ===================
boot-repair version : 4ppa40
boot-sav version : 4ppa40
glade2script version : 3.2.3~ppa1
boot-sav-extra version :
File descriptor 9 (/proc/3448/mounts) leaked on lvs invocation. Parent PID 5297: /bin/sh
Warning: failed to translate partition name
Warning: failed to translate partition name
boot-repair is executed in installed-session (Linux Mint 18.1 Serena, serena, LinuxMint, x86_64)
CPU op-mode(s):        32-bit, 64-bit
BOOT_IMAGE=/boot/vmlinuz-4.8.0-58-generic root=UUID=9bfef4c0-4af2-4758-adb9-bb1c08256462 ro quiet splash crashkernel=384M-:128M vt.handoff=7
nvme0n1 (nvme0n1) has unknown type. Please report this message to boot.repair@gmail.com
nvme0n1 (nvme0n1) has unknown type. Please report this message to boot.repair@gmail.com
mount: /dev/nvme0n1 is already mounted or /mnt/boot-sav/nvme0n1 busy
mount /dev/nvme0n1 : Error code 32
mount -r /dev/nvme0n1 /mnt/boot-sav/nvme0n1
mount: /dev/nvme0n1 is already mounted or /mnt/boot-sav/nvme0n1 busy
mount -r /dev/nvme0n1 : Error code 32

1 disks with OS, 2 OS : 1 Linux, 0 MacOS, 1 Windows, 0 unknown type OS.

mount: /dev/nvme0n1 is already mounted or /mnt/boot-sav/nvme0n1 busy
mount /dev/nvme0n1 : Error code 32
mount -r /dev/nvme0n1 /mnt/boot-sav/nvme0n1
mount: /dev/nvme0n1 is already mounted or /mnt/boot-sav/nvme0n1 busy
mount -r /dev/nvme0n1 : Error code 32
Windows not detected by os-prober on nvme0n1p3.

Update: Solution:

After booting off a windows 10 recovery USB, I noticed the EFI partition was listed as RAW format by diskpart.

After rebooting into ubuntu, I also noticed the windows reserved partition 2 seemed to have an issue. I copied the EFI files off the partition, formatted the drive to ext4, then back to fat32, then copied the files back on. This fixed the error flag on the reserved partition 2, and windows booted perfectly on reboot.

0

I think that you read this forum first.

  1. you can recover Windows booting with Windows 10 Installation Pendrive with EFI.
  2. and then, you can boot on windows only.

  3. type below command in windows with administrative privileges.

    bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
    

you must modify this to fit on your system, so you must write on paper about your EFI installed location before trying to recover Windows booting.

  1. and then, you can boot with Linux mint.
  2. (it maybe optional) move the EFI boot location to others. refer this article for related with your problems.

    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=mint
    

    (but, above article says crash between Mint and Ubuntu dual booting)

Article Says;

After finishing the installation, if you happen to have Windows 8 disabled from booting and it only boots to Ubuntu, do not worry. In Ubuntu after it boots, install Boot-Repair in Ubuntu by opening a Terminal and typing the following: sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update sudo apt-get install boot-repair boot-repair Boot Repair will mention that we have some GRUB error, that we have an EFI system and that Ubuntu rocks. Since Ubuntu rocks (It does not work if Ubuntu does not rock! ^^), just click on Apply so boot repair fixes everything. Now reboot and you should see Windows 8 and Ubuntu side by side. For cases with rare booting problems, partitioning or using old hard drives on newer motherboard, your solution might be checking out FixParts which solves misaligned partitions and other partitioned type problems.

Second Article Says;

Unfortunately, this still doesn't solve the problem in the Ubuntu/Mint case, because as I mentioned above, there appears to be something hard-coded that points to the name 'ubuntu'. What actually happens is that it appears to work, meaning that the new EFI boot directory is created, and it looks like it contains the right files... and in fact, when you change the boot configuration to point to this new directory, the system looks like it works.

  • Thanks for the info! I've been trying everything I can to fix this issue from Linux, since my computer only has USB 3.0 ports and getting a Win10 usb has been proving to be quite difficult. After I get that working I'll try the windows command. – Sydney Jul 25 '17 at 18:31
  • bcdedit commands aren't working, windows isn't seeing the EFI partition as fat32, it's saying the file system is raw... hmm... – Sydney Jul 25 '17 at 22:13
  • @Sydney it maybe damaged, and you can reinstall your EFI file system. first, ReInstall it using Windows Pendrive and then recover Mint with Mint Pendrive with single-user rescue mode. – jay k Jul 25 '17 at 22:42
  • Just fixed the windows boot issues! I also noticed the windows reserved partition 2 seemed to have an issue, which was then fixed by reformatting the EFI partition. I copied the EFI files off the partition, reformatted the drive to ext4, then back to fat32, then copied the files back on. This fixed the error flag on the reserved partition 2, and windows booted perfectly on reboot. – Sydney Jul 26 '17 at 0:17

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.