How to install Windows 8 after arch?

8,544

Solution 1

This is actualy far easier than you'd think.

Start off by making space for Windows. I suggest getting a live CD and using Gparted to resize. (There is a Gparted live CD but this didn't work for me instead I used an Ubuntu one but any OS that boots and has GParted will work).

You then install Windows on this new space. After doing that follow the steps here for installing rEFInd inside Windows 8.

Lastly do a victory dance because this was farr easier than you thought it would be (I suggest this one). Remember, location and clothing is everything when it comes do victory dances.

Solution 2

Firstly, (assuming even a half-way sane UEFI implementation, which, sadly, might be assuming a lot...) if you plan only to boot Arch Linux and Windows 8 on that computer, and almost any other recent OS and/or distro then you can safely eschew GRUB altogether. It is completely redundant. Though installing both Arch and Windows in UEFI mode can save you an unnecessary headache, an important caveat in this case is that you should ensure that the Windows initial setup process is loaded in UEFI mode. While it is strictly possible to hack a real-mode BIOS booted Windows installation into behaving, frankly, that would necessitate far more typing than I'd like to do.

Ok. So, first, let's get rid of GRUB. Open a root-user prompt in Arch (or prefix the following commands with sudo as you prefer and as is assumed going forward):

% pacman -Rns grub

Ahh, simplicity. Let's be sure we've got rEFInd as well (and it can't hurt to make sure we're up-to-date) :

% pacman -Syu refind-efi
% mount | grep -Eq 'efivarfs' && echo 'yay! we really are running in UEFI!' ||\
> echo 'big frowny-face...'

The filesystem setup is, in my opinion, the trickiest part, and before we get around to anything else, it must be squared away. So long as your terminal didn't echo big frowny face... at you after executing the mount pipeline above, we can be sure at least that the current configuration:

  • is fully capable of booting without legacy BIOS real-mode/UEFI protected-mode half-assed compatibility hacks (or at least well enough to fool a bootloader, which is good enough for our purposes)
  • is almost definitely comprised at least in part of a GPT partitioned disk containing a FAT formatted UEFI system partition of type EF00 (probably at /dev/sda1) which is already properly configured and at our disposal.

While a big frowny face echo return above does not necessarily rule these things out, it does make them a lot less likely, and, before moving on, you'll definitely want to understand why udev isn't auto-loading the efivarfs module at boot and subsequently mounting the resulting pseudo-filesystem.

That's said; now do this:

% lsblk -f   

Here we get a lay of the land, as it were. The output of that command should provide you with a fairly comprehensive list of the disks currently attached to the system, their partition types/structure, and (if mounted) their mount points.

Now you have a decision to make. You can install Windows many ways, but all that I'm aware of will be at least pretty similar to one of the following:

  • Maintaining the status quo and installing Windows only to a virtual machine to be booted as a user process in your already running Linux environment. While this solution may be the simplest to achieve, it will also likely involve some possibly unacceptable performance drawbacks - especially where video drivers are concerned - depending, of course, on your hardware and your use case. That said, for some it is a possibility to enable near-native graphics performance in a Windows vm via methods like GPU pass-through and others but, of course, that is far out of the scope of this guide.
  • Installing Windows as bootable from firmware, but rather than formatting off entire partitions for it, you instead install it only to a .vhd image-file which can be located on any other partition formatted with a Windows readable filesystem (basically: none of the fun ones). Because, since Windows 7, the Windows BOOTMGR bootloader can natively boot a .vhd image file, this is relatively easy. Because this method also covers most of what would be needed for both methods 1 and 3, this is also the method we will follow in this guide.(NOTE: there can be a slight performance hit using this method as well, but most benchmarks I've seen show it is only on the scale of a couple of percentage points difference from a truly bare-metal boot).
  • The typical installation booted fom bare-metal which is already the default installation on the Windows setup disk. This is basically like the previous method, but possibly requiring more partitions, definitely fewer installation steps, and definitely less flexible down the road. If you want to do it this way, simply follow along here, but ignore the bit involving .vhd files.

Whatever you choose, you are going to need, at the least, one Windows-readable partition large enough for a Windows installation (20GB is practically the bare minimum here; you can go smaller with a lot of effort and some other guides).

It's also important to note that, while this guide might obviate this, the Windows setup process may choke (likely a buggy holdover from the MBR days even if it is not at all applicable to your GPT disk) if you install Windows to any disk that already includes 4 or more partitions.

Keeping the above in mind, combined with the information you've already obtained with the help of lsblk, you can:

## NOT YET% pacman -S gptfdisk --needed
## NOT YET% gdisk /dev/sd${X} # ${X=$(physical disk chosen for Windows partition NOT \
## NOT YET# disk partition || sda && !sda3) 
## NOT YETgdisk> ?
<gdisk displays a short list of available commands>
##NOT YETgdisk> 

In Progress

Share:
8,544

Related videos on Youtube

Griffin
Author by

Griffin

Updated on September 18, 2022

Comments

  • Griffin
    Griffin almost 2 years

    Okay so after a painful 3 days of fixing / changing / reformatting I have finally got Arch Linux install. Now comes the problem. I had to remove Windows when installing Arch but I still need Windows. How would one go about installing Windows after Arch? I am using refined and (what I think is) grub as my bootloaders. Grub coming in before refined. I understand this is backwards and you are supposed to install Windows then Arch because of windows bootloader and other annoying features that like to be annoying.

    Important things to note -

    • UEFI
    • GPT
    • Windows 8
    • Refined
    • Arch Linux

    Is it a different process than this one? I am only asking because I don't think I can handle going through the install again.

    Why I'm concerned-

    • The wonderful recovery partition
    • Windows boot loader
    • I'm not familiar with how W8 installs and while I'm painfully familiar with Arch's install it's still new to me.
    • And most importantly I don't want to go through Arch install again
    • Very new to both OSs

    EDIT: [ During my install I ran into a problem with Grub where it would not over-take the Windows Boot manager. I attempted the following things

    mkdir /foo && mount -t vfat /dev/sda2/foo 
    cd /foo 
    mount -t proc proc proc/ 
    mount -t sysfs sys sys/ 
    mount -o bind /dev dev/ 
    mount -t devpts pts dev/pts/ 
    chroot /foo /usr/bin/bash
    
    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
    grub-mkconfig -o /boot/grub/grub.cfg
    

    And it did not work. This furthers my worry that this will happen again. ]

    • Admin
      Admin over 10 years
      After you install windows, it might (might not, because of UEFI) remove GRUB and you'll need to reinstall. Mention the issue you had when installing Arch that running grub-install did not make grub appear on boot, that is the problem you are likely to run into.
    • Admin
      Admin over 10 years
      On more reasonnable consideration what you can try is use the windows boot loader to boot on linux after windows installation using the tutorial maybe superuser.com/questions/499617/…
  • Griffin
    Griffin over 10 years
    Let me get this strait I install Windows and then boot into the arch partition? I think you're missing the point here...
  • mikeserv
    mikeserv over 10 years
    Absolutely not. I'm not missing the point, though, in fact, I think you might have. This, when I'm through, will load UEFI (from system flash) > rEFInd (from FAT EFI partition) > allow choice of whatever EFI executable you have located on either EFI system partition or any other disk formatted with a filesystem which can be read with rEFInd's filesystem drivers. The point is all either GRUB or rEFInd is doing is pointing UEFI at an EFI executable anyway. It's a handoff via boot-manager, neither acts as a proper boot-loader.
  • Griffin
    Griffin over 10 years
    The commands you gave were not possible in the order you gave them. After installing Windows (Not VM) and trying to boot into Linux without first installing a boot manager I don't see how you'd do it.
  • mikeserv
    mikeserv over 10 years
    What commands couldn't you do exactly? You haven't allowed me to finish. I'm sorry it's not yet complete, but I'm writing as I apply it. I know you "don't see how" which is why you did it wrong in the first place. I'm trying to help you, man. Allow me, please? If you have a question, please be specific.
  • mikeserv
    mikeserv over 10 years
    But I didn't give you that command...?