Win 8 - Mint KDE dual boot - lost ability to boot Windows

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
User avatar
obreel
Level 1
Level 1
Posts: 9
Joined: Fri Nov 01, 2013 8:57 am

Win 8 - Mint KDE dual boot - lost ability to boot Windows

Post by obreel »

Greetings all,

I am a noob in Linux. After attempting to set up a 64 bit Win 8 - Mint KDE dual boot, I've lost ability to boot (or see) Windows 8. I've used Boot-Repair (http://paste.ubuntu.com/6340954) being my last attempt, but no Windows bootloader is located. I can boot to Mint when I change from UEFI to CSM in the bios, nothing is seen or boots from the UEFI side. Gparted indicates my partitions are as follows:

/dev/sda1 file system:NTFS, label: System, size: 450MB, used:291.36MB, unused: 158.64MB, flags: hidden/diag

/dev/sda2 file system:unknown, size:260MB flags: bios_grub

/dev/sda3 file system:ntfs, size 128MB, Used:49.92, nused 85.08MB, flags: msftres

/dev/sda4 file system:ntfs, 334.85 GB (Windows 8)

/dev/sda5 file system: ntfs, size 350MB, Used:274.64, nused 75.36MB, flags: msftres

/dev/sda6 file system xfs, size 26GB, mount point: /

/dev/sda8 file system xfs, size 317.84GB, mount point: /home

/dev/sda9 linux swap file

/dev/sda7 file system:ntfs, Label:Recovery, 10.95GB, flags: hidden/diag

As indicated /dev/sda7 being listed last in Gparted after sda9 as shown. I'm sure it's a boot partition issue, any help is welcome. My recovery USB states that there is no windows partition found (in UEFI or CSM) and provides no further assistance.

Thanks,
O B Reel

Toshiba Satellite P855, Core i5, 8GB ram
B Reale

Remember, you are unique...just like everyone else!

srs5694
Level 6
Level 6
Posts: 1390
Joined: Mon Feb 27, 2012 1:42 pm

Re: Win 8 - Mint KDE dual boot - lost ability to boot Window

Post by srs5694 »

You've trashed your [url=http://en.wikipedia.org/wiki/EFI_System_partition]EFI System Partition (ESP),[/url] and with it your Windows boot loader. My guess is that you did this by giving it the "bios_boot" flag in parted or GParted. Some background:
  • On EFI-based computers, all OSes' boot loaders reside in the ESP. This partition has a FAT32 filesystem, and boot loaders are stored as ordinary files. The ESP is usually 100-600MB in size, although the exact size is not defined by the EFI spec. In parted and GParted, the ESP is identified as having its "boot flag" set; however, that was a poor choice by the parted developers, since it's really a partition type code and has nothing to do with the "boot flag" on MBR disks. In GPT fdisk (gdisk, cgdisk, and sgdisk), the ESP is identified as having a type code of EF00.
  • On a BIOS-mode installation of Linux on a GPT disk, GRUB likes to have a [url=http://en.wikipedia.org/wiki/BIOS_Boot_partition]BIOS Boot Partition.[/url] This partition is typically small (32KiB to 2MiB). It holds GRUB boot code that won't fit in the disk's boot sector, and it's identified in parted and GParted as having a "bios_grub flag," or in GPT fdisk by having a type code of EF02.
Your Boot Repair output indicates you've got no ESP and a BIOS Boot Partition (/dev/sda2) that's 260MiB in size. Although it's possible to set this up deliberately, it's much more likely that you switched the "boot flag" on your ESP to a "bios_grub flag" before you installed. (It's conceivable a buggy installer would do this, but I've never heard of Mint or Ubuntu having such a bug.) The result would be that GRUB would then proceed to overwrite the FAT32 filesystem on the ESP with raw GRUB boot code, effectively trashing the Windows boot loader and rendering the computer unable to boot anything from that hard disk in EFI mode. (It should still be able to boot external media in EFI mode, though.)

The good news is that this damage can be repaired. The bad news is that you'll need either a Windows recovery disc or a backup of the ESP from before you tried to install Mint to get it working. There are several possible procedures. What I recommend is:
  1. If you haven't already done so, [url=http://www.rodsbooks.com/efi-bootloaders/secureboot.html#disable]disable Secure Boot.[/url] This step might not be strictly necessary, but Secure Boot can cause problems on some systems, so disabling Secure Boot reduces the odds of running into problems. Alternatively, leave it enabled, but if you have problems booting your Linux recovery system or booting into Linux after recovering, disable Secure Boot at that point.
  2. Find a Windows 8 recovery disc. I don't happen to have any URLs handy, but they are available. Check Microsoft's site. (Be wary of anything found by Googling.) Alternatively, if you have an ESP backup, you can use that.
  3. Use parted or GParted to replace the "bios_grub flag" on /dev/sda2 with a "boot flag;" or use gdisk or cgdisk to change the type code from EF02 to EF00.
  4. Use mkdosfs or GParted to create a fresh FAT32 filesystem on /dev/sda2.
  5. Boot to the Windows recovery disc in EFI mode. If you boot in BIOS mode, it will complain about the use of GPT on the disk and be useless. Alternatively, instead of this step and the next one, restore your ESP backup from before you installed Linux.
  6. Use the Windows tools to re-install the Windows boot loader. Sorry I can't be more specific about this; I'm not very familiar with the Windows tools.
  7. Reboot into your Mint installation disk in EFI mode. Booting in BIOS mode will be useless. Select the "live CD" mode, not the full installation mode.
  8. Run Boot Repair again. It should install a fresh EFI version of GRUB to the ESP.
At this point, your system should be bootable in EFI mode to both Windows and Linux via GRUB. Note, however, that this procedure is not risk-free. If you have problems booting your Windows and/or Linux recovery tools in EFI mode, you could end up being unable to boot the computer at all, or you might trade a Mint-only boot for a Windows-only boot. If that happens, you can post back with details or just re-install Linux. If you re-install Linux, I recommend using a separate ~500MiB /boot partition with ext2fs, ext3fs, ext4fs, or ReiserFS; or using one of these filesystems on your root (/) rather than XFS. The reason is that these filesystems (and Btrfs, which is experimental) are all supported by [url=http://www.rodsbooks.com/refind/]rEFInd[/url] via EFI filesystem drivers. Such support gives you more boot options, and in fact if you'd had such a setup before, you'd be able to use rEFInd now for a less-risky recovery procedure than what I've presented.

Good luck!

User avatar
obreel
Level 1
Level 1
Posts: 9
Joined: Fri Nov 01, 2013 8:57 am

Re: Win 8 - Mint KDE dual boot - lost ability to boot Window

Post by obreel »

Thanks! I deleted the fat 32 partition trying to follow Boot Repair's advice on fixing the situation. I thought it told me to flag it also, but it was about 1 AM and I had been up since 4:30 AM so who knows what it really said. :roll: I thought I probably messed up the boot partiution. I'll try and get a recovery disk until I can convince Mint KDE 15 to scan on my Workforce 610 for me :( . After that I may just toss windows 8, my old Vista machine has been Linux only for a while now. I really appreciate your feedback and I'm amazed how the Linux community rallys and helps us folks with half a brain! Thanks again!

obreel
B Reale

Remember, you are unique...just like everyone else!

User avatar
obreel
Level 1
Level 1
Posts: 9
Joined: Fri Nov 01, 2013 8:57 am

Re: Win 8 - Mint KDE dual boot - lost ability to boot Window

Post by obreel »

*UPDATE* Obtained Windows 8 recovery disc (Majorgeeks.com), utilized boot tools and was informed I had indeed deleted my EFI system partition, disc was unable to repair. Retried my (recently updated to Windows 8.1) usb recovery flashdrive and was informed: unable to boot, missing boot partition :evil: Since my Toshiba Sattellite P-855 did not come with a reformat & start anew recovery disc I disabled UEFI boot and now run Mint KDE 15 exclusively. Now if I could only figure out how to get my Epson Workforce 610 to scan......... :roll:

O B Reel
Toshiba Satellite P855, Core i5, 8GB ram
B Reale

Remember, you are unique...just like everyone else!

Post Reply

Return to “Installation & Boot”