Installing Windows 8 without an optical drive

Finally managed to get Windows 8 installed on a laptop without a optical disc drive.

This was a Lenovo ideapad S405 which came pre installed with Windows 8, but since I was more inclined to use Linux on it, I had somehow managed to get Ubuntu installed on it. Now, I'm usually a Fedora guy, but for some reason the driver for the mouse/touchpad which comes compiled into the kernel was less stable in the version of Fedora that I was using, hence the brief switch to Ubuntu.

Now when I had to give the laptop away to someone who's going to use Windows most of their time, I had to make sure that I could install Windows back onto it. I must say, that in spite of being warned by the salesman at the store to maintain a backup of Windows 8 if I was to wipe out Windows form the laptop; I did not follow his advice.

I started off obtaining the iso for Windows 8, which could then be restored onto a USB drive with at least 4GB of storage capacity. When I tried directly restoring the iso image onto my USB drive, there was no problem until I tried booting from it. Apparently, UEFI reads only FAT, no Ext nor NTFS. And since I just restored the iso onto the USB drive, it created a UDF filesystem which UEFI was not able to read. To fix this, I just had to create a FAT32 filesystem and copy over the contents of the iso onto the FAT32 filesystem.

However the problem was that FAT32 doesn't allow files greater than 4GB and my install.wim was just about 4.2GB. So, next step was to download a tool called WinUSB. You can find more about it here. WinUSB does the copying over of the files onto your USB drive for you. I'm assuming it also handles cases where your install.wim is greater than 4GB, and makes sure your USB drive is bootable. After WinUSB was done, I tried booting from the USB which again didn't really work. Mind you, I had checked and tested each and every setting in my firmware utility to find out why exactly the bootloader is not being identified (I spent about a day and a half just on this!). Now it was time to try out something else. I went to my Grub which was installed for Ubuntu and opened up the console.

Typing "ls" at the grub console showed me this:

(hd0) (hd0,gpt1) (hd0,gpt2) (hd0,gpt3) (hd0,gpt4) (hd1) (hd1,gpt1)

Now I knew my USB drive was (hd1) and the partition where my installation files were located was (hd1,gpt1). That's right, my USB drive was partitioned using GPT and not the BIOS friendly Legacy MBR scheme. Next, all I had to do was try to load the bootx64.efi located in /efi/boot/, because that's what UEFI looks for to identify a UEFI compatible bootloader. Fortunately and as expected I had one. So I just had to run the following commands in the console.

root=(hd0,gpt1)
chainloader /efi/boot/bootx64.efi
boot

And that was it! I had the Windows 8 installer halfway through in a couple of minutes.

Comments

Popular posts from this blog

Errors while trying to monitor Asterisk through Nagios

Configuring remote access for couchdb

Proxy Error 502 “Reason: Error reading from remote server” with Apache 2.2.3