The Computer Corner Take II (#39) by Bill Kibler

To see more Computer Corner articles look here: CCII page or check out the Home Page .

Win8.1 & Linux

Why Win8.1?

What started out as a simple task of getting new hardware to replace some very old and failing systems, became a dual boot with Win8.1 project. I have had a few systems of late flat out fail and realized everything I was using was at least 5 years old if not many more. With that in mind, I found a cheap - at Fry's $228 - Lenovo H215 with 500GB HD and 1GB of Ram, with a AMD E1 CPU. The AMD E-Class of CPUs draw 9 or 18 Watts, the E1 is 18W. I believe the overall wattage is about 60. Small unit, about 4x8x12 in size, with plenty of free space inside. It comes with one free RAM slot, one PCIe-16 and one PCIe slot.

The first thing I did was pull the hard drive and use an old drive that had Linux on it. After putting the BIOS into legacy mode, the system booted up just fine. Everything seemed to work and I played with the unit for a few days until a friend came by and we started talking. Long story short, I agreed to sell him the unit after making it dual boot with Win8.1. Since the Win8.1 system comes with lots of new features and protocols, I thought this would be a great chance to learn and see for myself why so many users hate Win8.1.

I found 8.1 a mix of love hate experience - it will take lots of time to figure out how to do anything you did before. They have updated somethings and hidden lots of old tools. On a scale of 1 to 10, I put it at a 4 for turning a desktop system into a cellphone like device. What I hate most is all the automatic programs that go out to the internet and get things I don't want - like the Dow Jones updates. As to dual booting, Windows can be used to shrink the partitions, but so can gparted.iso, which is what I started with. However, there are lots of new terms we need to understand before we will be able to get things working correctly.


Despite what some sites might suggest, it is possible and actually not too hard to get Linux and Win8.1 to dual boot. I used several sites advice, some trial and error steps, and got Debian wheezy and jessie to work. There are however lots of little new topics to discuss and for you to understand before attempting the project. The very first of which is stating that "Secure Boot" is mostly a Windows idea to prevent un-licensed users and in preventing viruses from getting into their boot setup. You will need to turn this off in the BIOS, before you can do anything "normal."

What do I mean by normal? For many years, actually too many years, a normal boot meant using a partitioned hard drive with a max of four primary partitions and a MBR that "booted". one of the partitions. The MBR contained code that read the appropriate partition and started running the startup or boot code. A lot has changed in the over 30 years of using MBR. Hard drives are now in the Terabyte range and need to have many more partitions than four. The BIOS has become for the most part useless, and finding assembly language programmers to create new BIOS's is getting harder everyday. So several new processes were needed to fix those issues - try CSM, UEFI, and GPT.

The definition of the acronyms are: CSM - Compatibility Support Module; UEFI - Unified Extensible Firmware Interface; GPT - Guid Partition Table. The sum total of which defines a new and more flexible method of controlling the bootup and hard drive processes. It is a little bit like the ARM U-Boot support, where you chain together various sets of tools that in total represent the boot process. Which is what you need to come away from this part of the discussion. There are now several parts that allow more freedom to change the boot up code, more optional partitions, and more freedom to select and use code in better ways than were possible with the MBR process.

So what does it mean for us - new and different steps if we want to use UEFI. Do we need to use UEFI? No. We can just turn off the UEFI option in the BIOS and do everything as before. In fact I took an old drive with Linux pre-installed and booted in place of the new drive and all worked as expected. I only need concern myself with UEFI if I want to dual boot or use one of the UEFI enabled Linux distros. UEFI tools are available for Linux, it is just not all distros are loading them by default. I expect over the next four or five years to see all Linux distros supporting UEFI and even Secure Boot. For now however you must checkout the distro first to see if it supports UEFI.

GPT and new partitions

The steps start like normal - use gparted.iso to shrink and create new partitions - it knows about GPT setups. Can we use Win8.1 to shrink? As it turns out, if you can find the partition tools, it can now shrink drives. Finding the control panel and admin tools is not easy the first time on Win8.1, but after a few failed attempts, you will find the new menus and it will get easier the more times you need to do so. GPT is the new partitioning standard and the "G" stands for GUID or using UUID labeled partitions of which there are more used - mine had 6, now 8 with dual boot.

What are the partitions? Partition 1, or SDA1, is the restore partition, and in my case, during the install it got activated several times as I messed over the bootup process. I believe the BIOS will try the UEFI boot process and if it fails, goes to the first partition and start it. In my case that was the restore process and a ctl-alt-del will reboot you out of it. Partition 2 is the first VFAT partition and thus the UEFI boot partition. My guess is the BIOS finds the first VFAT partition and expects to find "EFI" directory where it will load the "bootx64.efi" file that starts the boot process. Next was some special Windows formatted partition, think things like license keys or any special raw data M/S feels is needed. The primary partition was next, with minor non-partitioned space, followed by another NTFS partition that I guess might contain the un-bought programs.

Overall, the partitioning now has a more functional concept of a few tools here, some there, and some that M/S will not tell you what they are for, spaces. Personally I think it is about time we better utilize resources, I am just not so sure that M/S's usage ideas are so good. It is still early in the adoption phase, so expect better explanations and more data over the next year or two as everyone gets a better handle on the situation. As for dual booting we shrink the existing main partition, mine was 450GB and is now two 225GB partitions and one 1GB swap. gparted worked fine setting this up, and I ran the Debian stable 7.6 xfce #1 CDRom for the install without any errors or special messages. Reboot however failed.

The New Steps

I suspect many users will start searching the internet at this point - that being, you were successful at shrinking the Win8 partition, partitioning the free space and, installing Linux the old way. You probably installed grub and saved it to the MBR. Reboot however came up in Win8 or worse case the "restore" tool. The problem is the new UEFI stuff and all the steps not done related to it. We need to add the EFI tools to Linux, mount and install EFI programs to the EFI boot partition, and change the order of booting to load the grubefi tools. Not too many things missed, but for sure enough missed items to cause problems for the new user.

Since UEFI support is new, not many distro will have EFI tools loaded by default. A trip to synaptic or apt-get will fix that. "install" "grub-efi-amd64" and "efibootmgr". After they have been installed, we then need a place to mount the EFI boot directory of the current hard drive. In my case, and I suspect most cases, it will be the second partition, the VFAT one, and thus typically "/dev/sda2". So make a directory for mounting the partitions, and it should be "mkdir /boot/efi". Then we mount the EFI partition so we can change it or update it - you do "mount /dev/sda2 /boot/efi" assuming your root, if not try "sudo" as part of the command.

The kernel needs a new module to support EFI and as such we will need to load it and do "modprobe efivars". At this point we now have support for EFI functions and the grub tools will work as needed. Much as normal when updating the MBR we ran the grub update or install and for EFI we do "grub-install /dev/sda" followed by "update-grub". You see messages about it being updated with the new information. If you do a "find /boot/efi" it will show you the new structure and you should see the "/boot/efi/EFI/dbian/grubx64.efi" in among the other "efi" files.

In my case this did not fix the poor booting problem - it still went to Win8.1. I did some digging and found a Windows command that did however work for me. You must find a "admin" command line menu item - it will be hard to find and it must be admin, as all other command line tools will not know about the command. The command is - and do it as it is displayed:

bcdedit /set {bootmgr} path \EFI\debian\grubx64.efi
This should make the default efi boot be the grub tool and no longer drop you back into Win8. There are of course tools in Linux for doing the same, and the BIOS may in fact give you the option of switching what the default is. Here is a very cryptic command that might also change boot order from Linux using the "efibootmgr"- it goes like this:
efibootmgr -c -d /dev/sda -p1 -1 '\EFI\debian\grubx64.efi' -L "window boot manager" -o 000,0001,000a,000b,000c -t 10
As usual "man efibootmgr" will tell you that things like the "-t 10" sets the time delay for 10 second before auto booting.

Hopefully at this point you are booting Linux with the option of booting windows. If you check around you can find lots of help sections on doing this, but I suspect that some were done last year and might not reflect the actual current state of commands and processes needed to make it happen. I must say as well that Win8.1 does have more helpful tools if you can find them or figure out how to use them for your needs. Alot of old windows concepts are just gone and the new ones rarely make sense the first few time through.

Missing Step(s)

If your read the above and came away thinking something is missing, you might be right depending on what you did and what distro your using. If your distro has UEFI support or you managed to load the support before rebooting it might work as stated. If you missed something or made a mistake, then you probably got the Linux system loaded, rebooted and found you were unable to get back to the Linux you just installed to make changes. What to do? Any number of things.

One on-line article suggested using a UEFI enabled flash drive rescue disks. You can created those disks by using "unetbootin" to download and create a UEFI bootable flash drive. "unetbootin" is available in the Debian repository and thus can be loaded using apt. There are plenty of distros to choose from and several are indicated as UEFI. I created one and used it several times to make changes, but you can also just set the BIOS in legacy mode and use the Debian install disk to do a "rescue" of the partition and add the EFI packages. I suppose it just depends on what type of systems your using as to what options you use for the rescue.

It is important to remind readers that all this is a side effect of the new hardware. If your reading this and wonder how it applies to your XP to Linux project, it doesn't. XP systems should all be older hardware without any UEFI support. Can you use old systems with UEFI, I don't think so, as the hardware will only be looking for the MBR and in fact some of the older system can not boot from flash drives at all. Going forward however means that over the next few years, all new systems will be UEFI enabled and know how it works and what you need to do to dual boot will become more important.

Final Notes

During October of 2014, M/S admitted that Win8 was a failure by telling people they had canceled win9 - the supposed new OS in the works. Coming instead is to be Win10 - a whole new approach (again) to updating Windows. Basically as I see it, They misjudged the market, went too heavily into smartphone competition mode and lost the whole corporate user base. Sales of business desktop hardware system fell something like 30% with no sign of recovery insight. Business users need real keyboards, lots of hard drives, I/O by the bundle. Win8 didn't even have a regular desktop so to speak, and thus M/S had to rush out Win8.1 just to cope with the problem. I would expect that some companies will not be providing drivers and tools for Win8.1, especially with it being a short lived OS - think "ME".

My advice before considering dual booting with win8.1, is do you really need it. If you have some windows software that is a must work - please try and be sure it really works. I have read way too many blogs talking about this and that software that will not run anymore under Win8.1. If your looking to buy a new system, notice that Win7 system are now back on the market. I have even seen ads for Win7 OEM disks, at a steep price, but selling again. Most businesses are staying with Win7 if the have upgrade to it, although there is plenty of data suggesting most are still staying with WinXP.

Lastly is trying to explain what some of the problem is about. The term "Desktop" means both a hardware and software feature. You buy hardware desktop computers because they have expansion slots, lots of hard drive space, real I/O features and so on. However, desktop can also mean the windowing application that you use a mouse to point and click with. Businesses use Desktop hardware systems to perform their normal daily work by clicking and typing in data using a real keyboard, while using any number of desktop software packages. In Windows, there is only one desktop with the version of OS that came with your hardware. Under Linux the Desktop of choice may be any one of over 10 choices and is typically not associated with the version of the OS with which it runs on. Remember that android is actually the desktop and not the OS - the OS is Linux and not normally seen by users.

I think that M/S was confused, much like most users, in thinking that they could keep the whole OS and it's desktop as one complete systems and be able to support both tablet users and business user alike. The market has split, not segmented as they thought, and thus you need clearly different tools and desktop applications for desktop hardware user, from tablet and smart phone users. Time will tell if M/S has figured this out or not by giving Win10 the option of multiple desktop application much like Linux has always been.

Updates - Win10

It is now November 2015 and due to some medical issues, I discovered I hadn't finished or posted the above article. The information is still valid and should help you setup a dual boot. I suspect however that the number of sites providing dual boot help is considerably more than when I wrote the above in late 2014. Windows 10 is out and you can upgrade to it for free. This is a new move on the part of Microsoft's new president and shows their concern and better understanding of how the market has changed over the last few years. I still have one legal Win7 system - all my other systems have been declared illegal by M/S update tools, and so decided to checkout the upgrade to Win10.

I must say that the M/S people have learned from and are watching closely the success that Linux has had by making things simpler and having them just work. Linux is pretty much user driven and designed to give users what they want and not what some programmer thinks they need. Win10 is clearly closer to the system that businesses need and less smartphone centered than Win8. It still has lots of smartphone tools and apps, but they are not your only way to use the system. However be warned that menus are as bad as ever and you need to be very careful with the upgrade and their settings.

NOTE: DO NOT EXCEPT THE DEFAULT SETTINGS WHEN UPGRADING!!!! I can not stress this strong enough, as if you do, basically your allowing M/S full access to your computer and all of your personal data and keystrokes. The actual upgrade was painless and went fairly quick, even on my slow internet connection. However, it still reboots too many times, and when done presents you with a selection menu to accept the defaults or changed them. I am not sure what I expected, thinking that what defaults need I be concerned with, so I choose to find out. I was shocked that basically they are saying the default is allowing M/S to collect all your data and settings, including keystrokes for their use - or is that NSA's use, not sure. So be warned to check and think about what your doing before saying yes to any of the options.

My last comment has to do with the smartphone concept and how it is not something you may want on your desktop. M/S took and copied their Win8 menu system of small windows that display apps and made it your default menu selection process. This means those apps are connecting to the internet constantly and getting data non-stop. There is a setting for "metered connection" that I think if selected will turn those features off. The idea being that many users have to pay for every byte of data sent to their phone and thus can not afford to know what their local weather will be right now. I was unable to find the setting in a later hunt, but pretty sure it is part of the default settings and hidden somewhere else as well. So go looking for it if you don't like apps running constantly in the background. Another point to keep in mind, is that M/S is moving to an appstore process for adding programs. At some point in the future, you will only be able to load programs from their appstore and no where else. You need to consider if that is a model you want to follow or not.

Lastly I have too little time using Win10 to feel strongly about it one way or another. My basic feeling is they are getting better, but clearly still miles from the normal experience Mac or Linux users have. I think they are getting the message that most businesses and users are not happy with the last few upgrades to Windows, but they still have a long way to go.

Links,_uncertainty_and_doubt or M/S FUD
The Debian "all about Linux" starting point
Web site that rates and reviews distributions of all types.
Puppy Linux, great for very old hardware, runs from RAM only.
RoboLinux - designed for XP users with special XP VM software.
Download The Robolinux Virtual Machine "VM" Software for Ubuntu.
Zorin - a beginner friendly i386 distro..
OpenSUSE distro, has live and special versions, their YAST setup tools are terrific.
Get Virtual Box from here for Windows XP and later, MacOS, and Linux.
Live example of XFCE i386 400MB image - with install.
List of sections in "wheezy" repositories.
Debian's Live CD WIKI page - great place to start!
Debian Live systems main page - docs and image builder.
Debian Live-build manual page - all you need to know about live images!

Kibler Electronics, PO Box 535, Lincoln, CA 95648-0535, USA.
Copyright © 2014, Kibler Electronics
Written in Aug-2014 by Bill Kibler