Tuesday, 28 May 2013

Dual-booting with Win7

The first time I installed Linux, in my life ever, was Ubuntu 10.10. Without any dual-booting configurations, installation was simple.

During my first install, all I did was boot the laptop from the Ubuntu disc, and when it asks for partition layout to use, I just selected "wipe entire disk, and install on whole disk". The installer would then wipe everything, and create the necessary partitions.


Then, things get interesting. The Gnome 2 desktop was easy enough to get familiar with, and hardware just worked.

Dual-booting with Win7.

I could not, for the life of me at the time, figure out how to dual-boot. I tried everything, nothing works. Then, I found some guides online on how to do it the simplest way.

We start with a clean Win7 install first. following the installer wizard, we should end up with 2 partitions, one 100 MB NTFS "System" partition and one Win7 install partition with >100GB, depending on how much we assigned to Win7. Some people like me prefer to make an additional NTFS partition for "storage" of work files, pictures and others, so that if the Win7 install get corrupted, we can just format that and leave our files untouched. Whatever we do, we should leave out about 40GB for installing linux. In my case, I had a 160GB hard-drive (lame by today's standard), so ended up with the following.

  1. 100MB, NTFS system partition
  2. 60GB, NTFS Win7 install
  3. 40GB, NTFS "Storage"
  4. 40GB free space
Once install of Win7 is complete, we should then do some updates, or install some drivers to get it working. Next, is to install Ubuntu. A typical desktop linux, should fit nicely into the 40GB free space we set aside. out of that 40GB, we need 500MB for /boot "mount-point", 2GB for "swap", 18GB for / and the rest for /home.

Before that, we should learn a little bit about Disk Partition, with MBR table.

When we install Win7, by default, our hard drive should be formatted with MBR partition table, that can only support up to 4 partition, either Primary, or Extended partitions. Extended partitions works like a container, in which you can have as many Logical partitions as you want. However, by the setup above, Win7 installer has already created 3 primary partitions. We need to create an Extended partition to occupy all the free space, and then create the required logical partitions within that for linux.

  1. Primary : 100MB, NTFS system partition
  2. Primary : 60GB, NTFS Win7 install
  3. Primary : 40GB, NTFS "Storage"
  4. Extended : 40GB
    1. Logical : 500MB, ext4, mount-point /boot
    2. Logical : 2GB, swap
    3. Logical : 18GB, ext4, mount-point /
    4. Logical : 19.5GB, ext4, mount-point /home
All the partitioning above should be done within the Ubuntu installer itself. By selecting "custom layout" option, we are given the power to configure the partitioning scheme according to the above.

Next, the installer should ask where to install the bootloader (GRUB). Here, the default setting usually writes a record in the hard drive's MBR which will point to the GRUB bootloader, which is good. The bootloader is a key component that helps starts gnu/linux systems, and lets us choose between Ubuntu and Win7. When the laptop boots, the bootloader is loaded first. It then gives us the choice of which OS we want to boot.

IF, for some reason, in the future we decided to re-install Win7, Win7 installer will overwrite the MBR record, to point towards its own bootloader, ignoring GRUB. This will prevent us from booting Ubuntu. To fix this, we can try EasyBCD which is like a custom bootloader for windows, which can also boot Linux. Another way (my preference), is to use a boot disk tool called boot-repair. You boot it, and there should be a default option to fix the MBR/GRUB. We can also boot ubuntu from live-cd, connect to internet, install boot-repair package to get the same effect.


This took me a whole lot of learning. First, I had to look for some guides on Ubuntu dual-boot setup. Next, to make sense of it all, had to look up more on hard drive partitioning subject.

In the end, it was worth it.


Tuesday, 14 May 2013

My first Linux Distro

I consider myself a noob at Linux and computers in general. I am not trained in the IT discipline, what I know about computers have always come from the things that I had to pick along the way, when I needed to work (or play) with computers.

The first time I remember ever having to use a computer was when I was 10 years old, or probably younger. I did not even recognize what kind of operating system I was using at the time. Ever since then, I've been using several OSes along the way on several PCs, and now I can even build my own PCs.

The first Microsoft OS I remember using was Windows 98. Then it was Win98SE, Win ME, WinXP. For me who was born into a MS dominated OS world, there was no reason to consider the alternatives. I didn't even know if there were alternatives. Happily switched to Win Vista, quite happy with it for a while, then switched to Win7.

It was around this time, that I started trying out Linux distros. Unsurprisingly, my first distro was Ubuntu 10.10. However, my reasons for trying Ubuntu linux were a bit, peculiar. I did not exactly googled for "linux", "first linux to try for noob" or other related search terms as most would expect. I had an inspiration to try out linux when I was browsing videos on collegehumor youtube channel. At the end of one of their videos, the protagonist said something about Ubuntu.
"Ubuntu? I am going to learn Ubuntu?"
which is of course a parody of a line by Neo in The Matrix, when he was about to learn Ju-jitsu. That is how I started googling for Ubuntu and trying it out.

This happened sometime end of 2010. And so, I installed Ubuntu 10.10 Maverick Meerkat, 32-bit edition on my old Toshiba laptop, cause I thought cool name, what the heck, let's give it a shot. Ubuntu 10.10 ran pretty good on my laptop, with the all-famous Gnome 2 Desktop Environment at the time.

Everything was gold... (or Orange).