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,