NOTE! If you have a BitLockered Windows partition and TPM this may fail in ways I don't want to comprehend. Un-bitlock first if I were you should that be the case.
NOTE! I wrote most of this from memory, one I regularly volunteer is shocking ;)
- Boot into Windows and backup your current UEFI partition using BCDEDIT /export
- Backup Windows if you really give a shit
Before you do anything else
- Turn off SECURE BOOT in the BIOS and make sure it still boots up into Windows
- Double-check UEFI boot is enabled and Legacy CSM is not (for me anyway)
- Go to Power Options in Windows (in particular the 'what the power buttons do') and DISABLE 'Turn on Fast Startup', then reboot and check again it's STILL turned off!
- Using Windows Disk Management shrink the existing volume as/if required to make space for your linux partitions
Start the snizzle
Boot off the Arch Linux UEFI boot (presumably on a USB stick like me) and select x64 UEFI install
At the command prompt do something like (from memory);
- efivar -l (check it lists variables so we know we are really UEFI)
- lsblk (ascertain which device is the target HD e.g. /dev/sda)
- gdisk /dev/sda
- 'b' backup partition table (obviously copy this to external/safe)
- 'n' new partition - 8300 @ 1024M (for boot)
- 'n' new partition - 8300 @ 20GB (for root)
- 'n' new partition - 8300 @ 12GB (for var)
- 'n' new partition - 8300 @ **GB (for home - I do this by doing a end segment of -4GB which should leave 4)
- 'n' new partition - 8200 @ 4GB (for swap - I just take the remaining which should be 4)
- 'p' print partitions
- 'w' write and exit
REBOOT THE MACHINE and make sure Windows still boots! .. once confirmed boot back into installer as before
Make a note of the output identifying the EFI partition (use gdisk and 'p' print partition table looking for EF00 code if necessary) and the ones created earlier. For example a fabricated one;
sda 8:0 0 496.5G 0 disk
├─sda1 8:1 0 1024M 0 Windows EFI? gdisk confirm EF00 code?
├─sda2 8:2 0 4G 0 Windows Recovery?
├─sda3 8:3 0 293G 0 Windows itself?
├─sda4 8:4 0 1G 0 part /boot
├─sda5 8:5 0 20G 0 part /
├─sda6 8:6 0 12G 0 part /var
├─sda7 8:7 0 201.5G 0 part /home
└─sda8 8:8 0 4G 0 part [SWAP]
For the above my notes would say;
- EFI = sda1
- Linux Boot = sda4
- Linux Root = sda5
- Linux Var = sda6
- Linux Home = sda7
- Linux Swap = sda8
NB: For some reason I found the below order in which I created and mounted mattered for fstab creation, perhaps a fluke, but who knows?!
mount /dev/sda5 /mnt
mkdir -p /mnt/boot
mount /dev/sda4 /mnt/boot
mount /dev/sda1 /mnt/boot/efi (should detect as vfat)
mkdir -p /mnt/var
mount /dev/sda6 /mnt/var
mkdir -p /mnt/home
mount /dev/sda7 /mnt/home
ls -la /mnt/boot/efi/EFI (should reveal /Microsoft and /Boot directories, if not, don't continue)
genfstab -U -p /mnt
NB: Doing a dummy fstab creation above to check it has everything I expect, including the UEFI partition. If I don't see every one (1,4,5,6,7,8) then I reboot and mount again.
- genfstab -U -p /mnt > /etc/fstab (do this ONLY ONCE or edit/delete accordingly, dups will kill you)
NOW wifi-menu+pacstrap that bugger and install as normally would. For boot-loader I'd suggest rEFInd and if 'ls -la $efi' works it's script should update the Windows EFI without issue, gummiboot should work too though. The new boot-loader will become the UEFI default, this can be changed with EFI shell. It is also possible to add the Linux boot to the Windows graphical loader, but meh.