Skip navigation

Tag Archives: xkcd

I’ve been planning to get a new laptop for quite some time now, maybe at around December. However, certain miscalculations and one heartbreaking failure from the charger of my previous one means that I’m now typing this on a new machine, bought pretty way earlier than expected. And, like all good (or semi-good, depending on your loyalties) geeks do, I set-up the machine to dual-boot Windows 8 (pre-packaged with the hardware) and Linux the first time I had the opportunity (i.e., this long weekend).

It was hell.

Almost like this. Thankfully, only took me 1.5 days.

It seems that my hardships are all courtesy of UEFI/Secure Boot. Maybe there exists an easy way to achieve what I wanted but, judging by the volume of unresolved posts related to my problem scattered on the internet, it is not an obvious way. To anyone who might come across the same problems as me, here’s the complete narrative of how I managed to dual boot my machine.

0 Prologue

I dual-booted on an Acer Aspire-471G laptop. The OSes I want side-by-side is Windows 8 and Ubuntu 12.04 (Precise Pangolin). Since we’re dealing with the BIOS, I think it’s just proper that we get my machine on the record. If you run these steps on another machine, there might be some differences along the way.

Also, it seems that UEFI (and related dual-boot problems) has been around since Windows 7. However, I have never tried dual-booting a Windows 7 machine with Ubuntu—my experiences were all with XP and Vista, and it was all easy. And yes, I also encountered some 7-specific questions along the way.

1 Make sure that your LiveCD is 64-bit

There is no such thing as 32-bit UEFI. You will not be able to boot your machine in UEFI mode from your LiveCD if your LiveCD is  32-bit. While UEFI has support for legacy BIOS (and, from legacy BIOS, allow you to boot from a 32-bit LiveCD) this will result to a rather awkward and possibly-dangerous dual-boot set-up: you’d need to switch your BIOS mode from UEFI to legacy and back, depending on the OS you want to load.

(Blooper disclosure: I almost bricked my BIOS trying to boot from a 32-bit installer in UEFI mode: I ended up installing rEFInd through Windows and renaming stuff from my EFI System Partition, and got all sorts of weird and horrifying errors. The thing is, I just got the installer from one of our sysads at work and have used it previously to dual-boot an old 64-bit machine running XP. I’m glad I realized my mistake early.)

How do you determine then the bitness of your LiveCD installer?

At the root of your LiveCD, there is a file named README.diskdefines. Open that file (right-click->Open with->Notepad, or any other plain text editor). If you are looking at a 32-bit installer, that file will read like this (notice the ARCH variables):

#define DISKNAME  Ubuntu 12.04 LTS "Precise Pangolin" - Release i386
#define TYPE  binary
#define TYPEbinary  1
#define ARCH  i386
#define ARCHi386  1
#define DISKNUM  1
#define DISKNUM1  1
#define TOTALNUM  0
#define TOTALNUM0  1

On the other hand, if on a 64-bit installer, you’ll get:

#define DISKNAME  Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64
#define TYPE  binary
#define TYPEbinary  1
#define ARCH  amd64
#define ARCHamd64  1
#define DISKNUM  1
#define DISKNUM1  1
#define TOTALNUM  0
#define TOTALNUM0  1

Also, the 64-bit version will have a directory named “efi” at the root. If you are seeing a 64-bit README.diskdefines and no “efi” directory, there is something wrong with your installer.

2 Get comfortable tweaking your BIOS

Warning: This can be dangerous! Proceed with a well-rested mind.

As you may have guessed earlier, there will be a lot of BIOS dealings involved here. To get to the BIOS set-up, press F2 while your machine boots.1

You need to be comfortable with two things: changing your boot order and adding .efis to the white list (“trusted”) of your machine. The first one is pretty basic but the second one has bit more technical details involved.

(For the first one, aside from being pretty basic, it is oftentimes unnecessary. You just need to make sure that your computer considers the HDD/Windows bootloader later than your optical drive and USB drive for bootable media. This is often the case. ACER ASPIRE-471G USERS, I must note that I was a bit surprised to find out that on this machine, this is not the case.)

White listing .efis involves setting a password and navigating your EFI System Partition (ESP) as well as other possibly-bootable media (like your LiveCD). Just remember two things here:

  • If you mess-up your system and suddenly can’t boot Windows, the .efis which Windows uses are at EFI/Microsoft/Boot and EFI/Boot, not case-sensitive, AFAIK. Might be worthwhile re-white listing the .efis inside these two.
  • If, after setting your boot order, you still can’t boot from your LiveCD installer, you need to white list the LiveCD efi, efi/boot/bootx64.efi

3 Installing Ubuntu

(I’ll be linking this part mostly.)

Now we get to the fun part. If your circumstances are anywhere like mine, you might need to partition your drive first. While you can partition your drive from the Ubuntu installer, in the interest of dual-booting, I recommend that you partition from Windows beforehand2. Here’s how.

Finally, you can proceed with installing Ubuntu. This tutorial pretty much says it all.

Note that the linked tutorial uses an older version of Ubuntu (11.10) which may or may not have caused the existence of the next section of this post which is…


After successfully installing Ubuntu, I rebooted. Sure the boot-up screen looked a bit different (there was a Unix-y underscore cursor present) but it still loaded directly to Windows 8!

I tried white listing the new EFI/ubuntu/grubx64.efi found in my ESP. However, that resulted to Ubuntu loading directly without even a shadow of GRUB showing up.

I then used the boot-repair utility and got these results. I had to re-white list EFI/ubuntu/grubx64.efi. Indeed, GRUB now shows up but without any option to boot Windows 8.

At this point, it’s been close to 1.5 days since I embarked on this task. I’m glad that xkcd got most of this stuff documented. And I’m also glad that, though I went beyond the 24-hour mark, nothing became a lost cause.

Besides, I’m not a very good swimmer!

In a moment of almost-frustrated defeat, I found zen from an earlier episode in this adventure. It dawned on me: just install rEFInd.

(Yep, my boot-up is now managed by rEFInd. Far from a perfect solution, in my opinion but it does what I wanted it to do. So long for now!)

  1. That’s on this Acer machine. If F2 does not work on yours, other candidates might be F10 and F8. []
  2. In my case, the Ubuntu installer didn’t detect another OS in my machine, didn’t detect Windows 8. I don’t know what would’ve happened if I made a wrong move while partitioning from the Ubuntu installer in this case. Hence, not recommended. []

I miss coding. The period between my last update and this was a period of fast-changing requirements, Photoshop, and deadlines. It was so busy that I had to put in some mini-overtimes to the effect that, by April’s end, I’ve already clocked in at least 100 hours of work, at most around 108.

Throughout the said period, I’ve had moments where I thought I should’ve volunteered for the API team. They were the ones who got to code a lot, and coding a lot is something I do even while sleeping. But I’m thankful that I had the crazy urge to sign-up for the UI team. UI isn’t something I get to do everyday (cf. my previous post) and, at least, I learned a lot of new things.

Take wrong turns. Talk to strangers. Open unmarked doors... Do things without always knowing how they'll turn outA Toast to following crazy urges from xkcd. Pun intended.

Is there a school teaching UI design as part of the curriculum? The closest my schooling has ever taught me about UI design was a few slides of PowerPoint, all discussed in a single meeting. In any case, I don’t really think that UI is something you can learn from school; it’s more about practice than theory.

The first thing asked from the UI team was to design an icon set. After 146 discussion messages over at Google Wave over 88 images—UI layouts and icons alike—we ended up agreeing to use a pre-made icon pack from the internet. Wow. I never knew that there are free and legally downloadable icon packs from the internet. I seem to have forgotten internet rule number whatever that states “If you need it, you can download it from the internet”. Everytime for those few times that I had to design icons for a UI (in our Software Engineering project, for instance), I always built them starting with an empty canvas of Photoshop/GIMP; I have too much pride to use the work of someone else—especially someone not a part of my team, someone I don’t know personally—even if offered for free and in good will.

Sigh. So much for being the man who always built things from the ground-up.

Photoshop, for all its awesomeness, isn’t a very nice prototyping tool in my opinion. I don’t know much about prototyping tools but a good one, I guess, will allow me to define a base template and then build screens from that. Any changes on the template immediately reflects on the screens created from the template. Something like CSS. Or MVC, save that I’m only interested with the “Views” this time.

Then again I don’t really believe in prototyping using images. The only time I was asked to prototype prior to this was in my Software Engineering class. Throughout the first 3 consultations our teacher advised our team to use prototyping tools and all 3 times I stubbornly proceeded with my approach. I had my team prototype using HTML and CSS directly, my rationale being, we’ll still code that later anyway so why bother using prototyping tools?

(For all my stubbornness, we got a grade of 90 out of 100 during the prototyping demo. The ten points deduction came from a few screens I totally forgot about. That was, if I remember correctly, the highest grade given during that demo. But that’s another story…)

The requirements changed faster than you can say “Photoshop”. But with every iteration of the design I slowly realized that we are no longer just making a product. We are crafting an experience for the user to feel.

Sideshow: Selling a Product vs Offering an Experience

A product is sold. User can type on the text box, the buttons are tappable, stuff function. Amateur. Awesome.

An experience is offered. User can type on the text box and screen reacts dynamically based on user input. The buttons are tappable and functional and they look and feel soooo Android. Professional. MORE AWESOMER!!!!

For comparison, this is the Google IO App for this year. Notice the toolbar.

(Image taken from . Plus, more Android UI design tips and examples!)

I guess my biggest handicap in this part of my adventure is the fact the I have never used Android apps (I don’t even have an Android phone!). I don’t even use mobile apps for that matter. My XpressMusic phone is capable and loaded with some apps but I’ve never used them. The most used apps of my phone is 1) the music player, and 2) the camera and their amount of use is different by a very wide margin at that. How do I design an experience for something I’ve never experienced myself?

But still a lovely learning experience, designing an experience for something I never experienced yet.

Looking forward to code finally next week,
The Chad Estioco