Triple Booting Fedora, Ubuntu and PC-BSD

My Triple-boot system

Triple Booting Fedora, Ubuntu and PC-BSD
Triple Booting Fedora, Ubuntu and PC-BSD

I’ve been wanting to try a non-Linux OS for quite sometime, and managed to download PC-BSD today. My PC ¬†already runs Fedora 13 and Ubuntu 10.04. I use Fedora’s GRUB to manage my boot process. After installing PC-BSD, I stuck with the same bootloader to manage the boot process.

I primarily use Fedora 13. The rest of the folks at home use Ubuntu or Fedora. I’ve messed around a lot with GRUB 2, but I do not like fiddling with a new version of the bootloader. So I remain loyal to the ‘legacy’ version of GRUB and will be using it until Fedora migrates to the new version.

You can also set up a triple boot (or any n-boot) system by using the older version GRUB. The process takes just a few steps.

Here’s how I did it:

1. I installed Fedora 13 first, and with it the GRUB to the MBR.

2. Later, I installed Ubuntu 10.04, but chose not to install the bootloader in the last step in the installer. You can do this by clicking on the Advanced button.

3. To add Ubuntu to Fedora’s GRUB, I just had to add the title, root and kernel entries for Lucid:

title Ubuntu 10.04

      root (hd0,2)
      kernel /vmlinuz ro quiet splash
      initrd /initrd.img

4. I installed PC-BSD, once again without the bootloader.

5. To add PC-BSD to the boot menu, I added just 3 lines:

title PC-BSD 8.0
      root (hd0,3)
      chainloader +1

An advantage of using GRUB 2 in one of the distros is that I never need to update the GRUB menu on Fedora. GRUB 2 automatically places a shortcut to the latest kernel in the / directory of the Ubuntu partition, so one doesn’t have to keep updating Fedora’s GRUB menu whenever Ubuntu’s kernel is updated.

Note: The logos in the image are copyright of their respective owners.

Playing with Python: Starting off with anagrams

I’m really into Python this summer, and thought I might share some of my work. I started off with a (simple enough) web application to connect to MySQL on Fedora 12, trying to make a cricket statistics site. It went off pretty well, but I got pretty bored and went off to do an Anagram generator. This morning I started off, with a basic tool to check if two strings are anagrams of one another.

The flow I thought of was:

1. Remove spaces from the strings, and sort them in ascending order.

2. Compare the sorted strings to see if they are equal. The two steps can be done in a single line.

return sorted(list(in1)) == sorted(list(in2))

This will show if the two strings are anagrams of each other.

I need to create a dictionary of words, and then think of a way to get the major anagram generation part going. I hope to complete that over the weekend. I also hope to check my code on Python 2 and 3, using Fedora 13’s parallel installable stacks.

My classmates are tilting towards Linux!

It seems that most of my classmates are moving to Linux, mostly Ubuntu and Fedora, although it is for the sake of their projects. Here goes a comparison why Linux is infinitely better than Windows here:

Tools for the job:

  • For my friends who need to do image or signal processing as part of their work, there are two options: Matlab or Octave. But Matlab isn’t free while Octave is. One professor recommended Octave to his students, and others are following suit.
  • For the project I’m working on, I need a SCM tool, and one that runs on Linux. I’m using git, python, pyxml and umbrello for my project since I’m more comfortable with Linux than Windows (At places where I must use Windows, such as internet cafes, I still press Alt-F2 to run a program ūüôā ) Thankfully, my teammates are also comfy with Linux, one being a RHCE.
  • Some friends of mine are working on cloud-based projects, so they have been using Ubuntu server (since their guide has heard of Eucalyptus)

One of the reasons I love Linux is the fact that the whole household can use it for work and play, and I can type in my native Tamil as fast as I type in English. I admit that the Unicode keyboard profile is not the best thing out there, but practice and patience mean that it is far easier now to type in Tamil than to transliterate.

There are some people who’re reluctant to come out of their Windows shell (oops, is there a shell in windows?), mainly due to fear or fan-worshipping Bill Gates.¬† The former category would do better to read this:

“After closing the doors that lead you nowhere, throw away the key! Because our tendency is to look back and regret.” – Paulo Coelho. But I don’t regret it, and so won’t you.

Dual booting Windows 7 and Fedora 12 (or any other distro)

Lately some people I know have been upgrading their PCs to Windows 7, and have trouble with dual booting it alongwith Linux based operating systems. I looked around and found a way that works. The problem lies in the way Windows 7 creates partitions. If you set aside say, 32000 MB to install the OS, it’ll create two partitions: one small partition (< 100 MB) for the boot manager (I guess this is taken from /boot partition of Linux distros) and another one with 31900 MB where the actual files are copied (In most PCs this is C:). I tackled this problem in my own way:

1. Boot up the system from a live Linux CD.
2. Create an NTFS partition in which you will install Windows 7, with enough space.
3. Create ext3/4 partitions for /, /boot and /home as you wish.
4. Create a swap partition if needed.
5. Now install Windows, choosing the NTFS partition.
6. Then install Linux, the usual way.
7. GRUB will automatically detect Windows 7, and add it up to the boot menu.

That’s it, and you’ve got a nice (but not fully free) dual boot PC running.

Note: I tested this for installing Fedora 12 and Debian 5 alongside Windows 7, and both attempts were successful. It works for openSUSE 11.2 as well.

A month of Fedora 12

To be frank, I’ve been using Fedora 12 since the latter half of October from the release candidates, and it is a surprise that there has not been a single issue. There were bugs in the Fedora 11 anaconda installer, and I didn’t like the wallpaper as much as the older ones. But I just love the default Leonidas wallpaper, and many other UI quirks don’t exist, at least for me.

I had installed the release candidates from 1 to 4, and thereon, updated from release candidate 4 to final release two days after November 17. Two exams on 17th and 18th had made me postpone the update. I have modified the base install to make it more convenient and productive for me:

I deleted the lower panel and moved the window changer to the top panel since my display is a measly 15.6 inches at 1366×768 pixels. My laptop too has the same resolution, albeit at 14.1 inches. Then I added the System Monitor applet and power button to the panel since I need to keep a tab on my bandwidth.

As Rahul Sundaram suggested on Fedora Forums, I’ve switched over to OpenJDK, and all my Java code (there’s not much code actually) runs smooth without any issue. In fact the Java Mail API and MySQL connector run better than the stock Sun JDK which had a few issues. I’d been a NetBeans user for long, but the Eclipse bundled in Fedora 12 is better than NetBeans and it didn’t take much for me to switch allegiance.

Meanwhile KDE has got better compared to previous iterations, but is still short of the KDE Gold Standard set by openSUSE. While on openSUSE, I have a serious issue: No DHT support in openSUSE 11.2. This might be a fallout of the court rulings on The Pirate Bay, so let’s hark back to Fedora.

Empathy is still nascent with no IRC support (really bad, IM – IRC != IM for me) But for the ability to call friends on Google Talk (Yay!) and better integration with GNOME, I’d not have used it much. I use xchat for IRC anyway, but this is something that Empathy should be having.

Last week, my younger brother got some CD for his board exams, which had a few xls files and a massive mdb file. I was scratching my head, and then headed to I installed mdbtools and the gui that goes with it, and then imported the tables to a csv file. I used Python to extract the data into a text document, and converted the CSV file to SQL so that I can create an app emulating the windows one using MySQL and Python. That is an example of the power of open source. I often rant about the need for open formats and¬† ban proprietary formats. Some are plain evil, like Sony’s vem format that you cannot read unless you have the ‘MicroVault’ flash drive.

I’ve installed Qt 4.6 on my desktop, and it is really a ‘cutie’ for developing cross platform apps. Qt + Python = cross platform heaven. I’m going to move over to Qt now on, to get some experience developing using SDK.

Overall, Fedora 12 is just about the best desktop distribution for folks with prior Linux experience, but people who are new to computers can jump onto the bandwagon right away.

Fedora Post-Installation

After I installed Fedora 12 for a friend, he asked me what software he’d need for using it as a primarily home desktop user. I have some experience with home users who just need things to work, without the hassle of installing software whenever they want to open a file. Add to that the lack of broadband penetration, or even basic internet connectivity in India, it makes for an awful situation.

I already had many packages cached in my /var/cache/yum directory. We both had the same 32 bit install, so I figured it’d work. I first deleted his /var/cache/yum directory as root, then copied my directory which was around 15 GB to his hard disk. Then I wrote him a small script, which proved pretty useful to install all that he would ever want.

Here goes a slightly modified version of the script that works for Fedora 13:


# Post Install Update script
# To install many required packages that are missing from the default Fedora 12 installation
# Login as root to install the packages
# The -y flag is used to accept downloading and installing all dependencies

su -

# Update all currently installed software

yum update

# This group contains the GNU Compiler Collection and other utilities:

yum groupinstall 'Build Essentials' -y

yum groupinstall 'Office/Productivity' -y

# Add the RPMFusion repositories to your system

rpm -ivh
rpm -ivh

# RPMFusion contains the VLC packages:

yum install vlc* -y

# .. and also the unrar package to extract data from rar archives:

yum install unrar -y

# To install Adobe's flash plugin:

rpm -ivh

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

yum install flash-plugin alsa-plugins-pulseaudio libcurl ndiswrapper -y

yum groupinstall 'Sound and Video'

# LXDE is a lightweight desktop environment, recommended for older and low end computers.

yum install @lxde-desktop

# Need to be installed from RPMFusion in order to play media files encoded using proprietary codecs.

yum install gstreamer* -y

# To install Google Chrome
echo "[google]
name=Google - i386
gpgkey= " > /etc/yum.repos.d/google.repo

yum install google-chrome -y

Upgrading to Fedora 12 in college

Well, most of my college department labs run on Fedora but they are passionate followers of the “If it ain’t broken, don’t fix it” school of thought. They’re still using Fedora Core 5, which feels like eons ago. I myself started using Fedora from the last core version, 6. I was wondering whether they would upgrade any of those labs, which are all now unsupported, of course! I’ve spoken to the person managing one of the labs, and he told that it’d be nice to upgrade if there were no issues.

So, after I’m done with my end semester exams, I’m gonna go try and convince the lab in-charge to install Fedora 12 before students start using the lab for the next semester. Hopefully there won’t be any compatibility issues now. These days, all the problems are with proprietary OSes. I once tried to install the latest version of one, but had to spend the better part of a day searching for drivers. So I just kicked that out of my PC, and it is pure once more.

I’d need to explain him the need to update it asap due to what is a vulnerability on publicly accessible computers: The unrooted installation permission.

And having exams wrapped around the release day sucks, I’ve just downloaded the 32 bit and about to complete the 64-bit DVD. My desktop has been running Fedora 12 since the beta versions, and has never had a problem.

I hope to go one step forward, and start using the SSN-CTS open source lab for something useful to the community. There’s a long way to go, but these first steps are what count,

Fedora 12 Installation Guide

The latest version of Fedora, 12 is about to be released in a week or so, and here is how to install it:

Download the Live CD, or the DVD if you wish to. I downloaded the Live CD, and it weighs in at 653 MB, smaller than most other distros that tend to cram the CD with 690 MB and over. Burn the image onto a CD, and then boot your system off the live CD, and you’ll see this screen:

The initial screen on the Fedora 12 Live CD
Figure 1: The initial screen on the Fedora 12 Live CD

Now, if you don’t press any key, you’ll get into the login screen (Figure 3). If you do press a key, you’ll view this boot options screen:

Boot Options Menu
Figure 2: Boot Options Menu

Select the second option to test your live media or the third to test your system’s memory. But most probably, you’d want to check just the media, and then after that select the first option to get into the login screen:

The Login Screen
Figure 3: The Login Screen

You can choose your language, and then login as the Live System User. You’ll see the Fedora 12 Live desktop in all its glory:

First Glimpse of Fedora 12 Desktop
Figure 4: First Glimpse of Fedora 12 Desktop

Now, start the installation procedure by double clicking the Install to Hard Drive icon on the desktop:

Initializing the procedure
Figure 5: Initializing the procedure

Once you fire up the installer, you get to this screen, click Next to proceed:

Installer: First Screen
Figure 6: Installer: First Screen

In the Keyboard Selection screen, choose the appropriate keyboard for your system. I use the default US International keyboard. There are many languages supported:

Keyboard Selection
Figure 7: Keyboard Selection

Click on Next after selecting your keyboard, and the computer name screen comes up. Let it default to localhost.localdomain if your system is standalone, and if you are on a network, ask your network administrator and change it. If you are installing Fedora 12 on your server, give it the domain name you use for the server.

Choosing your domain name: Default for standalone PC
Figure 8: Choosing your domain name: Default for standalone PC

Click on Next and on the next screen, choose your time zone. It is set by default to New York, USA. Hover over the map to locate your time zone:

Choosing your time zone
Figure 9: Choosing your time zone

Remember to uncheck the System clock uses UTC if it is not set that way, else you may see a discrepancy in time by the cutoff between your timezone and GMT. Your selected time zone should appear below the map:

Make sure your time zone is selected=
Figure 10: Make sure your time zone is selected and displayed below the map

The next step is to choose a root password. This is a main part of securing your system, so make sure the password is atleast 12 characters long. And use a password with alphabets in both cases and numerals. It is good practice to have a strong password, especially for the root user:

Create a strong password for the root user
Figure 11: Create a strong password for the root user

The next screen is the disk partitioning. If you are going to dual boot, choose to Use Free Space. This option works well for a fresh installation too:

Use Free Space for a Dual Boot. It works for a fresh install too.
Figure 12: Use Free Space for a Dual Boot. It works for a fresh install too.

The installer will ask if you want to write the changes in partitioning to disk. Click on Write changes to disk:

Apply the changes in partitioning
Figure 13: Apply the changes in partitioning

The installer will now copy the Live CD image onto the hard disk, and this might take from 40 seconds to 3 minutes:

Copying the image to hard disk
Figure 14: Copying the image to hard disk

The installer will also install the boot loader. If you have another OS installed, it’ll autodetect it and setup the bootloader. I’m installing this on a fresh Virtual Hard Disk, so I didn’t need that:

Configuring the grand unified boot loader.
Figure 15: Configuring the boot loader

Now, the installer has done its job, and you can either continue using the Live CD, or setup the installed system after exiting the installer:

Installer Done!
Figure 16: Installation Completed!

We’re halfway through the install, the harder parts are over though. Now, exit the Live CD:

Quitting the Live CD
Figure 17: Quitting the Live CD

After this, restart the system:

Figure 18: Restart the system
Figure 18: Restart the system

Remove the Live CD when it pops out, or while rebooting the system. Once the system restarts with the Live CD inserted, however, you can also choose to Boot from local drive in Figure 2.

The post installation activity starts now, with the welcome screen:

Post Installation: First Steps
Figure 19: Post Installation: First Steps

Click on Next to view the License Information. Click on Next to accept it:

License Screen
Figure 20: License Screen

Now, the user creation screen comes up, where you create the non-root user. Don’t use the same password as the root user(allowed, but never recommended) and use a strong password here too:

User Creation
Figure 21: User Creation

In the next step, set the date and time. You can choose to synchronize it with the NTP(Network Time Protocol) server pool, or set it manually too:

Setting Date and Time
Figure 22: Setting Date and Time

The next step asks you if you want to upload your hardware profile. This is actually a good thing to do, since if your install fails for some reason, the profile can be used to locate the error, or any bugs unique to your profile can be fixed:

Send your hardware profile
Figure 23: Send your hardware profile

After you click Next for the final time, you’ll enter the login screen:

Destination Desktop! The Login Screen
Figure 24: Destination Desktop! The Login Screen

That’s all there is to the installation process. Once you get into the desktop, you can install more packages for the applications that you use.

Note: This install was done over a Virtual Machine using KVM assigned 512MB memory on Fedora 12 RC3. The installation process worked the same way on my desktop, when I installed it alongside a previous install of Fedora 11. The final release is due on November 17, but I doubt there will be any change in the installation process. It’ll just work the same way.

Fedora 12 Beta Installation.. A Breeze!

I’ve been using Fedora since Fedora Core 6 back in 2006 when I was in my first year. I’ve wandered a lot in distroland, and since have stuck to Fedora since Fedora 9. I get kicks out of using the latest and greatest software available, so I downloaded the nightly build for Fedora 12 beta last weekend from and then installed it on my desktop last Sunday. The first thing that surprised me was the speed at which the live system loaded onto my desktop. I tried out the live system just for fun, and it was speedier than the previous versions and also Karmic Koala’s release candidate live CD. (It is faster than the Ubuntu 9.10 Final Live CD too!)

This excited me a lot, so I went ahead and installed the system onto my hard disk. Installation went really smooth, and there was not a single problem. So, I rebooted and went into my shiny new system. And God, I do love the default wallpaper! Light Blue and Light Green are my favorite colors, and this one has Light Blue as default!

Now, I wanted to do some work on this new machine. So I installed jdk, netbeans and eclipse to see if a few programs ran well. Then I installed gcc and all the other development tools. I’ve installed the multimedia codecs and many other essential software that could not be accomodated on the 653MB CD image.

GNOME 2.28 seems very stable and Empathy rocks! The Google Talk call feature is the real talking point of this GNOME IM client. I installed my own Eclipse from the IBM site, and had to change SELinux mode to permissive and execute

$ su -c 'chcon -t execmem_exec_t '/usr/local/eclipse/eclipse' '

to let SELinux allow eclipse to run.

I’ve copied over my Drupal installation on my laptop to this one, and the LAMP stack runs well, no issues at all. (The site is on localhost!)

I’ll upload the screenshots for the installation on my VM and other details in subsequent posts. The way this beauty seems to run, it makes me think twice of delaying the installation on my laptop till the final release!

Fedoraaaaaaaaa!!! Rocking @ SSN!

I’ve been using Fedora 11 on my laptop right from the day I bought it a month back. I did the usual work like installing the media and development packages which I use often. I didn’t update it though, as I do with my desktop. Yesterday at college I had an idea, and presto, it worked! Yeah, presto made it work. Fedora’s yum-presto plugin is my latest obsession, and I’m playing with it for a week or so on my desktop. Basically this is what presto does in a nutshell:

  • It compares the local package copy on your PC with the latest updated RPM on the repository mirror. I use the IIT-K mirror, it is blazing fast for me.
  • Delta RPMs on the mirror store the difference(delta) between the versions, so the plugin downloads the drpms, then builds the entire rpm files using the local sources and the drpms.
  • Thus, you save on a lot of bandwidth, and spare the mirrors from overload (which is a very good thing to do).

My idea was this:

Behind the college proxy server, we can only download files which are smaller than 25MB in size. I guessed that since I had saved 65 to 80% on bandwidth using yum-presto on my desktop, I’d surely save 40 to 50 % on my laptop since the packages are a bit older than the desktop.

I edited the yum config file to include the proxy server settings:

$ su -c ‘gedit /etc/yum.conf’

Add a line:


Then save and close the file.

Now I had already installed yum-presto on my laptop using:

$ su -c ‘yum install yum-presto’

Now I started updating my system, using:

$ su -c ‘yum update’

I left it running from 11 am to 2 pm, and by then all packages had been downloaded. Another few minutes, and my system was up to date. As I had predicted, none of the packages downloaded exceeded the 25MB limit. So I guess that Fedora is the best OS to use and update at SSN!