Saturday, December 30, 2017

Create a Windows 10 USB Bootable Media when install.wim > 4GB

Generally it's fairly easy to create a USB bootable media for installing Windows 10. You can use Rufus; or Microsoft Media Creation Tool to make such bootable media to install Windows 10 under either UEFI/Secure Boot or legacy BIOS systems. 

Considering UEFI is going main stream after 2012 when Windows 8 was introduced, FAT32 is the file system of choice for the USB bootable media since UEFI Secure Boot only supports FAT32 as boot media. As a result, the max file size is limited to 4GB. With the release of Windows 10 Version 1709 (Updated December 2017; e.g., en_windows_10_multi-edition_vl_version_1709_updated_dec_2017_x64_dvd_100406172.iso), the size of install.wim is ~4.05GB. It can be expected that Microsoft will release more such ISOs with >4GB install.wim, which exceeds the FAT32 file size limit and cannot be copied onto the USB boot media.

Rufus does offer a UEFI:NTFS feature that enables UEFI boot support when the USB boot media is formatted with NTFS. However, Secure Boot has to be turned off (even temporarily) in order for this feature to work. While it is possible to turn off Secure Boot on some Motherboard, it's simply not feasible on most newer systems. What now?

The best and future proof way to get around this file size limit problem on a UEFI/Secure Boot system is to split the install.wim file to several .swm files, so that the size of each .swm file is <4GB. Then you copy all these split.swm files to the same directory to replace install.wim file. Windows 10 offers a simple way to accomplish this task:

1.  On a Windows 10 computer, run cmd as administrator;

2. Mount the Windows 10 ISO. Copy F:\sources\install.wim to C:\images\install.wim and run the command below:
Dism /Split-Image /ImageFile:C:\images\install.wim /SWMFile:C:\images\install.swm /FileSize:4000

where:
  • C:\images\install.wim is the name and the location of the image file that you want to split.
  • C:\images\install.swm is the destination name and the location for the split .swm files.
  • 4000 is the maximum size in MB for each of the split .swm files to be created.
In this example, the /split option creates an install.swm file, an install2.swm file, an install3.swm file, and so on, in the C:\images directory.

3. Format a UFD with FAT32 file system and mark it as Active; copy all files from the mounted Windows 10 ISO to the UFD. You'll see an error message popping up:



4. Click "Skip", let the copy operation finish the rest of the files. Then manually copy all the split install.swm files located in C:\images to X:\sources\ where X: is the drive letter of your UFD.

5. Boot the Windows 10 bootable media and start the fresh install. That's it.

P.S., it may also work if you convert install.wim to install.esd to compress the file and reduce the size. However the install.esd may still be >4GB. In this sense, the wim split method above is better and should work with install.wim of any size.

Tuesday, December 26, 2017

Ubuntu As My Main Desktop OS

About 3 months ago, I formatted the boot drive of my main PC where Windows 10 had been running for 2 years,and installed Ubuntu LTS 16.04.3. Why? On top of the built-in "spying" feature, I was finally fed up with Microsoft's tedious, monthly update that slowly ate up my SSD space and rendered the OS to be bloated and slow. I used to try Ubuntu on and off since about 8 years ago with pretty good impression of it, so I decided that it's time for me embrace Linux/Ubuntu as the main desktop OS.

I have a 120GB Toshiba MLC SATA SSD as the boot drive. A vanilla Windows 10 install takes up ~20GB of disk space. By the time I have Microsoft Office and some common applications (Acrobat, Photoshop etc), ~35GB is occupied. Each month >1GB more of disk space was occupied due to Windows/Office update. Yes I know I could clean up the temp update files, but that'll be another 15-30 minutes depending on hardware configurations. Most importantly, the Windows 10 OS became more and more unstable over time. 

So after I experienced a couple of "bork Tuesday" in late 2017, I fired up Ubuntu 16.04.3 installer boot UFD, the most recent point release of the LTS version of Ubuntu and wiped Windows 10 out of my SSD. A vanilla Ubuntu x64 only took up less than 8GB of disk space. And that was when LibreOffice and GIMP (an open source photo editing program) were installed. When other common programs were also loaded, a total of 9.6GB was used (figure below).


It took me less than two hours to wipe out Windows 10, install Ubuntu and common programs, and optimize the system to make a light and responsive Ubuntu 16.04 LTS that was ready to fly. Another note: Ubuntu uses configuration files (mostly text files) to mange the OS/Software configuration information, as compared to the centrally managed Windows Registry. This effectively avoided the kind of slowness over time caused by corruption and fragmentation of the Registry in Windows.

I am an average dude with no professional IT training experience. Yet I find more comfort using Ubuntu in everyday computing activities as compared to the days when I used Windows 10. So yeah, it's true that Linux desktop today is vastly different from the geeky, difficult to use Linux OS 10 years ago, thanks to the efforts of many parties, especially Canonical who introduced Ubuntu, the Linux for human beings. If an average dude like myself can find peace and comfort in using it, I am sure you can also free yourself from the spying eyes of Microsoft with minimal efforts, if you wish. 

This blog is dedicated to documenting and sharing my way of tweaking Linux/Ubuntu and Windows 10 for everyday computing, typically in a home environment. You may find my tricks useful in helping you transition to Linux. Occasionally, I will also share tricks to make efficient use of Windows 10. After all, Windows is the dominating desktop OS, and I have to turn to Windows 10 to run certain programs that only have Windows versions. So it's a good idea to keep a spare Windows 10 PC if you wouldn't bother running a Windows 10 virtual machine.