Yet another dual boot Windows/Linux horror tale

7 Sep

In preparation of studying for the RHCSA 7 cert, I wanted to install CentOS 7 in addition to my existing Windows desktop.

Unfortunately, I (in)conveniently forgot my past issues when trying to get CentOS 6 installed for dual boot. Back in my unconscious I had assumed that with my new UEFI motherboard, it could handle things that my previous motherboard couldn’t. And thus I forgot the painful distinction between MBR for Windows (and Windows only) and GRUB (at least it tries to play nice, even if it looks ugly). For reference, my past solution was to use Neosmart EasyBCD to dual boot from MBR.

What follows is a tale of horrors if you just stick to the defaults.

My installation process was pretty straightforward. Download an ISO, make it bootable on a USB drive using the amazingly useful tool Rufus. Then proceed to set a spare partition in Windows, and reboot to the USB.

Everything went fine, I was very impressed by GNOME3, right until at the end of installation and having to reboot – that I found myself without an option for booting to Windows 7. Uh oh. Quick googling on my phone reminded me that to boot to Windows, you had to rely on MBR no matter what. I also found by accident that going into command line GRUB2 then typing exit reverted to the MBR bootloader, but even then I encountered a 0xc000000e STOP error, possibly related to my screwing around with the MBR using Neosmart EasyBCD.

At any rate, I had to rely on GRUB2 now. Or at least fix the MBR back. But then I hit yet another hitch – CentOS doesn’t support NTFS right out of the bat, wtf! I needed the ntfs-3g rpm, but I had no internet access. I rely on a wireless USB dongle and had my DVD drive removed, so I lacked the drivers to get wireless up which were on a mini-CD that came with the adapter I bought (even then it probably only has Windows drivers). No yum option for me.

A couple minutes later I remembered I had a dusty old unused Chromebook lying around, phew. Getting the EPEL6 version of ntfs-3g (the source RPM for “ALL versions” does not mean universal installer, it means source code. Classical newbie mistake right there!) worked, and a quick configuration of GRUB2 later:

1) Open up GRUB2 file for editing:

vim /etc/grub.d/40_custom

2) Add to the bottom (the MBR partition was on /dev/sda1, hence the 1 in hd0,1):

menuentry "Windows"{
set root='(hd0,1)'
chainloader +1

3) Generate configuration AND persist the changes on boot (didn’t know I had to do the latter till more googling):

grub2-mkconfig -o /boot/grub2/grub.cfg

And I was back in action!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: