Tag: virtualbox

  • Installing Windows 10 when all you have is a Mac (UEFI Version)

    In a previous article I described how to install Windows 10 on a machine when all you have otherwise is a Mac. The problem is that you need Windows 10 to install Windows 10, so I had to use Virtualbox on the Mac to turn my USB device into a Windows-10 installer.

    The Problem

    I installed Windows 10 onto my refurbished Dell T5810 workstation using the process described in the previous article. This however only worked if you booted your destination drive using “Legacy” mode. That was OK for a while, but I wanted to boot using UEFI because, so I’m told, that’s the more modern/sophisticated way to do things and it will make your machine boot faster.

    Now, I originally assumed that my installation of Windows 10, carried out as it was with the official Microsoft Installer software within Virtualbox, would have made my installation of Windows 10 UEFI compatible by default. So I booted my workstation into System Setup (by pressing F2 on restart), and started playing around with settings. I very naively assumed that Dell would not allow me to set things in such a way as to make it impossible for me to get back into System Setup. Nope. I tried some settings following the advice of some random crapy article I googled, and my workstation stopped working altogether. Powering it on left me with a totally blank screen.

    I followed some advice to get the CMOS back to factory settings by TWICE removing the watch battery from the motherboard, holding the power button for 30 seconds (to drain any residual charge from the capacitors, etc.), but this did not solve the problem. However, the third time I tried this I decided to leave the battery out overnight just in case it needed several hours to completely reset and, thankfully, that worked!

    The Solution

    Upon further research, I came to realize that my installation of Windows 10 was fundamentally incapable of UEFI booting because that feature is simply not integrated into my original USB installer; an option that, as I said, the official Microsoft Software does not offer. Again, how naive of me to assume that a product straight from Microsoft to support its historic flagship product would not offer, let alone provide by default, the most modern booting option.

    Anyhow, long story short, you need to create the USB device installer using a different software product called rufus. So follow all the steps in the previous article up to the point where you have a Windows 10 instance running on Virtualbox, you’ve downloaded the Microsoft MediaCreationTool, and you’ve arrived at this window:

    MediaCreationTool: Choose ISO file this time!

    Now, instead of creating our Windows 10 installer directly onto the USB device, you need to instead create an ISO file and save it to your simulated Desktop.

    Next, go to https://rufus.ie/downloads and save the latest .exe file to your Virtualbox instance’s Downloads folder.

    Download the rufus tool from https://rufus.ie/downloads

    Once downloaded, run rufus as administrator to get this interface:

    Under the “Device” field you need to select your USB device (which, here, is confusingly labelled by its partitions). Next, in the “Boot selection” field you need to select “UEFI:NTFS”, and make sure the Partition Scheme is GPT. In the field next to the “Boot selection” field, labelled “Select”, you need to locate the ISO file you downloaded using the MediaCreationTool. Make sure the rest of your settings are the same as in the image above (or are otherwise sensible), and hit START to format your USB device.

    Once that process is finished you can quit Virtualbox and, boot up your target machine with this USB device, and install Windows 10 from scratch, and then you can expect it to boot with UEFI.

  • Installing Windows 10 when all you have is a Mac (Legacy/Non-UEFI Version)

    Important! This advice has been deprecated and is only applicable if you’re trying to install Windows 10 on a machine without UEFI support. If your machine does have UEFI support, then start here.

    Background

    Skip this section if you just want to jump to the “how I did it” content.

    I haven’t used Windows in a serious way for about 15 years now. I enthusiastically converted to Apple in ~2005 and never expected to want to own a PC again. From about 2005 to 2015, I held Microsoft with contempt and couldn’t imagine why anyone would use their products. IMO, Steve Jobs raised the bar incredibly high as to what a modern personal-computer company can be.

    It turns out though that Microsoft eventually took notice (circa Balmer’s exit?) and began raising its own bar. It began to get my notice about ~5 years ago when it started developing some fantastic open source products (typescript and Visual Studio Code in particular).

    I’d also started hearing rumors about linux being integrated into Windows 10. Curiosity to check it out, and to be able to better interact with students and interns who had Windows machines, lead me to finally commit to getting a machine on which I could give Window’s a fresh shot.

    I’d also been wanting to try out some photogrammetry software for a while that requires an Nvidia GPU. That, and other motivations, lead me to seek out a server/workstation on to which I could install Windows 10. I found a great deal on Newegg.com for a Dell Precision T5810. For $290 (+ $15 tax) I got 64 GB DDR4 RAM, a E5-2620 v3 2.4GHz 6-Core (x2 hyper-thread) Intel Xeon CPU, and a simple GPU (Quadro NVS 295). The only catch was it had no drives and, therefore, no starting OS.

    I had some drives sitting around, and figured it would be easy to just install Windows 10 myself. However, I was surprised to learn upon googling “Install Windows from USB” that almost all solutions assumed you already had access to a Windows 10 machine. Getting round this chicken-and-egg problem with just a Mac took some research that I hope others can benefit from.

    Installing Windows 10 without Windows 10

    Requirements

    • Mac with recent OS and Homebrew installed
    • At least ~25GB free hard drive space
    • An external SSD drive (see below; a recent USB 3.0 flash drive is supposed to work but didn’t seem to in my case)

    Basic Approach

    After some digging, I concluded that there are two basic ways to get a Windows 10 installer onto a USB drive starting with just a Mac:

    1. Run a modified “Boot Camp Assistant” from my Mac’s /Applications/Utilities/Boot Camp Assistant.
    2. Emulate Windows 10 on your Mac.

    If you want to go with the first approach then you can consult this gist that seems to be thoroughly researched. However, I it had an aura of hackiness about it, so I opted to go with an emulation solution.

    To be clear, I really dislike emulating whole operating systems, so the goal here is to create-use-delete a VM Windows 10 instance as quickly and simply as possible so that we can get Windows 10 properly installed on a separate dedicated machine.

    Install Windows 10 via Virtualbox

    First, you’ll need to obtain a copy of Windows 10 as an ISO file. You can get that direct from Microsoft. I went for Windows 10, 64-bit, with English language. The downloaded ISO file is ~5GB. Save this to your Downloads folder.

    While that’s downloading, install virtualbox and its extension pack on your Mac with:

    brew cask install virtualbox
    brew cask install virtualbox-extension-pack

    Open virtualbox from /Applications and click on the blue-spiky-ball “New” icon to create a new virtual machine.

    Virtualbox Main UI

    You’ll be guided through a few steps. Give the VM a name, choose Windows (64-bit) as your OS, and decide how much RAM you want the VM to be able to use. (I wasn’t sure what to pick here since I didn’t know how RAM-hungry Windows 10 is or the mechanics of virtualbox in these regards. My machine has 16GB, so I figured I’d allot ~6GB. I monitored virtualbox during the heavy parts and it pretty much maxed out all my Mac’s available memory at times, but I’m still not sure how this setting is handled in that regard.)

    When you’ve chosen your memory size, select “Create a virtual hard disk” and then click “Create”.

    Virtualbox wizard to allot RAM.

    You’ll then be asked about how/where you want the hard disk for the VM to be set up. The first time I did this, I gave a ball park guess of ~20GB, but later found that this wasn’t enough. Windows 10 actually requires a minimum of 22,525MB, hence why I recommended earlier that you allot at least 25GB. However, if you can spare it, then go for even more like 40GB — this is the amount I chose (second time trying!), and it seemed to work fine for me.

    Leave the other default settings and click “Create”.

    Virtualbox wizard to allot hard-disk space and file format.

    Once the VM is created, we need to enable the VM to access the USB device.

    Now, as I mentioned earlier, a USB flashdrive is supposed to work, but I tried 3 different flash drives and found that they would all fail late in the process (and get extremely hot). Luckily for me, I had an external SSD drive lying around so I tried that and it worked no problem. I can only speculate that the work involved in writing to a USB drive passing through the Mac OS to/from the Windows 10 instance was too intense for relatively slow flash drives, and thus requires an SSD. For reference, the SSD drive I used can be found here on Amazon. (If you want to give as fast USB thumdrive a go then good luck to you, but I’ll assume from hereon that you’re using an SSD.)

    Anyhow, once you have your SSD interted into your Mac, select the Windows 10 item in the left column of main virtualbox view so that its various settings and properties and can be viewed on the right of that view. Go down to the USB section and click on the word “USB”.

    The main view of the virtualbox interface.

    This will open a menu enabling you to add the SSD drive that we will want to make available to our virtual Windows 10 instance.

    Virtualbox menu to pass USB device through to virtual Windows 10 instance.

    You also must also make sure to select “USB 3.0 (xHCI) Controller”, or your Windows 10 instance won’t detect the USB. (Note: these USB 2.0 and 3.0 options are only available because you installed the virtualbox-extension-pack earlier.)

    One last thing before we try to start our Windows 10 instance: go to virtualbox preferences, and select the “Display” tab. Change the “Maximum Guest Screen Size” to “none” and then click “OK”. This will prevent the simulated screen from showing up in a smallish box that will make it rather tedious to interact with the Windows 10 simulation.

    Virtualbox preferences; enable the view of instance to scale.

    Now we’re ready to start our Windows 10 instance, so click “Start” at the main interface. The first time you run the Windows 10 instance, virtualbox will prompt you to select a “disk” with which to boot the new virtual machine. You need to go through the drop-down selector to add the ~5GB Windows 10 ISO file that you saved to your Downloads folder earlier.


    Virtualbox wizard to select Windows 10 ISO file.

    Once the disk has been selected from your Downloads folder, click “Start” to launch the VM simulating a first installation of Windows 10. Along the way, you’ll have to answer standard setup questions, accept terms, etc. Keep things simple: don’t sign into a Microsoft account (go with “Offline Account” and “Limited Experience”). When prompted, do not try to use an activation key (just press “I don’t have a key”). When you come to select an OS, I went with Windows 10 Professional (though things might have been more streamlined if I’d gone with the simpler Home Edition). On the screen “Choose privacy settings for your device”, I switched basically every service off. Decline all of the personalization, Cortana-spy-on-you functionality, etc.

    Switch off all of the invasive-data options in the Windows 10 setup.

    This process took me about 10 minutes to get through.

    An important step is to choose “Custom: Install Windows Only” since we are not upgrading a system from a previous incantation of Windows.

    Eventually, you’ll end up with a working Windows 10 interface.

    Installing a Windows 10 installer within an virtual Windows 10 machine onto a USB device

    Once in a working Windows 10 instance, we need to install the program that will turn our USB device into a portable Windows 10 installer. Open the Edge browser (the icon on the Desktop is easiest), go to:

    www.microsoft.com/en-us/software-download/windows10

    … and click on “Download tool now” under “Create Windows 10 installation media”.

    Opt to save this download, and then double click on that exe in the Downloads folder. This will launch the “Windows 10 Setup” wizard. Select “Create installation media (USB flash drive, DVD, ISO file) for another PC” when prompted.

    You’ll then need to select/confirm your Windows version, language and target architecture.

    Finally, you’ll be asked to choose your USB device. If you set up the pass-through options correctly earlier, then it will show up as the sole option.

    Click next to start the installation onto the USB disk. This will take an external SSD drive about 10-15 minutes to complete. As I mentioned, I also tried three USB flash drives, and they each started getting sluggish after about 10 minutes (slowing to a halt at ~50%), and then reported an obscure error after about 20 minutes (having got very hot!). If you don’t have an external SSD handy, then I’ve heard good things about the Sandisk Extreme Pro.

    Once the process completes, you can power down the VM instance, right click on the item in the main virtualbox interface, and remove it. It will then give you an option to remove all related files. This will free up your disk space.

    Using the SSD as a boot drive on a Dell T5810

    It’s beyond the scope of this article to go over the general details of installing an OS from such a USB device, but I’ll quickly mention the smooth ride I had from thereon with my refurbished Dell T5810.

    In my case, I had to add a main drive to the T5810 (a 1TB SSD Samsung), and then I powered on the machine with the external SSD plugged into one of the USB 3.0 slots. The first boot took a while (~1 min as I recall) to show anything, but then the Dell logo showed up and I pressed F2 in order to enter System Setup. There I was able to select Legacy Boot and ensure that the external SSD would be used early on in a legacy-BIOS boot. Exiting that menu caused the system to reboot from the external SSD and entered me into a Windows 10 installation wizard as expected.

    The only hiccup I encountered concerned an error when trying to select the internal SSD drive (I was told Windows 10 could not be installed there), but that problem was quickly solved by this absolutely fantastic ~1 min video on Youtube.

    I now have Windows 10 working great on the T5810, and I’m so impressed with it that I’ll have to write another article soon on that subject!