Preinstalled Windows 8 and Linux UEFI dual boot on a laptop
- by itchy355
I am trying to set up Windows 8 and Arch Linux on a new Sony Vaio E14 with preinstalled windows 8.
So far:
installed W8 to my new SSD (switched for the original HDD) using Recovery Media
shrunk the W8 partition, deleted recovery partition, disabled swap
confirmed W8 booting just fine
On to Arch:
disabled Secure Boot in bios
confirmed W8 booting just fine
Booted Arch off the CD and installed everything to 4th and 5th partition
set up rEFInd for EFIstub kernel bootloader
After that it got worse. I was unable to boot anything else than Windows 8 (although I was glad that they at least kept working just fine).
Tried:
creating EFI\refind\ and putting the .efi there (as per Arch manual
overwriting EFI\boot\bootx64.efi
overwriting EFI\Microsoft\Boot\bootmgr.efi
overwriting EFI\Microsoft\Boot\bootmgfw.efi --- YAY rEFInd shown up!
So far, so good. I've kept the whole W8 Boot\ directory in EFI\windows8 and set up a boot menuentry for it; and it booted just fine.
But, upon restart, everything was wrong -- 'Operating system not found' instead of any bootloader (refind or w8).
Booted back into Arch using the live CD to find out that the EFI partition had erroneous FAT table. fsck.vfat fixed it, and I've found that EFI\Microsoft\Boot was back to it's original state (all refind files deleted and replaced with W8 bootloaders). I've overwritten them again and got back to rEFInd showing up correctly and Arch being perfectly bootable.
After that I've tried only renaming EFI\Microsoft\Boot\bootmgfw.efi to bootmgfw.001.efi (then copying refind's .efi to bootmgfw.efi and keeping EVERY OTHER file as it was), but with exactly the same result. Tried marking the GPT EFI partition as read-only, same result.
Now I'm kinda out of luck. Arch boots fine, so does W8 but it destroys the EFI partition in the process.
Thanks for any ideas, Googling brought me this far and I can't find any better.
PS -- windows 8 MAYBE destroys the partition upon shutdown -- when I order a shutdown in W8, it takes unusually long (about half a minute instead of ~5 seconds). So in theory I could solve this by hard-resetting the laptop instead of a normal shutdown, but that's just not nice.