Tuesday, October 23, 2012

A Seasoned Ubuntu User, Using Fedora for the First Time

I love Ubuntu, really, even now after my recent problems. And I can't wait to install Ubuntu 12.10 "Quantal Quetzal" on my personal netbook which I use every day. But I have recently switched my office computer to Fedora for a variety of reasons. TL;DR, I really like Fedora.

After preforming a routine software update, I found "GRUB" booting my computer into a kernel panic. This and a host of other recent glitches prompted me to make the switch. With deadlines looming and only my personal netbook to get my work done, I decided that as long as I was going to be doing a fresh install, I might as well switch to something more stable.

Don't get me wrong, Ubuntu is very stable, but not compared to Red Hat. Red Hat's business depends on stability for it's use in enterprise servers at multi-billion dollar companies, unlike Ubuntu, which depends on attractive design and ease of use for individual consumers, regardless of how it works under the hood.

First of all, Fedora 17 has support for the latest stable 64-bit Linux Kernel, at this time they are at 3.6.3. Ubuntu was stuck at 3.2 for the past 6 months. Ubuntu 12.10 now uses Linux kernel version 3.5.3 -- still not at the latest stable release. Like I said, Ubuntu's goals do not so much concern what is under the hood as to how it looks on the surface.

The 64-bit kernel seems to run much faster on my Intel Core-2 computer. I don't have any hard data to back this claim, I simply noticed that cleaning and re-compiling my software projects takes noticeably less time now. But when I use a cross compile GCC toolchain linked against the 32-bit glibc, then it runs as slow as it did under Ubuntu.

One thing I learned was that the 32-bit glibc is not installed by default under the 64-bit Fedora, and if you don't have it, older software compliled for 32-bit glibc will not work. This caused me a bit of grief when my cross-compile toolchain didn't work anymore. But after a bit of Googling, I found the solution. It is really easy to install 32-bit glibc, just type: yum install glibc.i686 and boom, it works.

I also learned that most software packages come in 32-bit and 64-bit versions: the 32-bit versions can be installed by typing yum install package-name.i686 whereas the 64-bit versions are installed by default, but you can install them explicitly by typing yum install package-name.x86_64. This is a big difference from Ubuntu where only 32-bit Linux is supported and therefore this distinction is unimportant.

I also learned that you can install multiple versions of a package using yum by specifying the version number after the package name, but before before the ".i686" or ".x86_64", so yum install package-name.1.2.3-r45 or yum install package-name.1.2.3-r45.i686. However, when you use "yum erase", it only works on the latest version. This was another thing I learned: you don't use yum for everything sometimes you use "rpm". This is different from Ubuntu, where you use "apt-get" for pretty much everything, and hardly ever use "dpkg".

In fedora, "rpm" tells you which versions of what packages are installed and lets you delete older versions. List the versions you have installed with the command: rpm -q package-name --listduplicates. I kept having to look at the manual page for "rpm" because I kept typing rpm -d for "delete". NO, it is rpm -e for "erase". Also a bit confusing was the fact that you can install an ".rpm" file by typing the filename: rpm -i /path/to/package-file.1.2.3-r45.i684.rpm, but to erase the package you need to know the actual name of the package, not the ".rpm" file's filename. So if your "package-file.rpm" installs a package called "foo-bar-baz", you need to earse "foo-bar-baz" and not "package-file."

Now that I have got used to the differences between "yum" and "apt-get", and "rpm" and "dpkg", I am starting to really like Fedora's software repository, and Yum has been much more fun to use than "apt-get". With "apt-get" I get frustrated and often resort to using "aptitude's" nice menu-based interface. For some reason, I never feel the urge to use a menu-based alternative to Yum, I think the commands to search for packages and list installed packages are just easier to use. But it could just be the novelty makes it seem more fun to me.

One frustrating bit with Fedora is that public package repositories are much slower than Ubuntu's. At first, I thought I was having problems with the proxy because it was taking so long to download the updates list. But eventually the system was up to date.I guess that is an incentive to buy support from Red Hat. But it is frustrating. By the way yum upgrade is equivalent to apt-get upgrade, so it is easy to remember.

Since I bought my netbook in early 2009, I have gone fully Ubuntu Linux, not using Windows or Mac OS for anything, not at home, not at the office. Since mid 2010, I switched my work computer to Ubuntu as well. But unfortunately, Ubuntu isn't really intended for software developers. They make subtle changes, like how software links to glibc. They also set their "/bin/sh" to point to the lightweight "dash" interpreter, which effects how the C "system()" function works. Dash is actually more POSIX compatible than Bash, but most of the build scripts I use assume you are using Bash and all of it's non-POSIX functionality. Using "Dash" can cause very random problems to crop up.

These tiny changes can actually throw a wrench into the works if you compile large, complex source code trees that have been maintained over tens of years, all the while being written with the assumption that "/bin/sh" links to "Bash," and that the linking rules decided by GNU "ld" default to the same linker options used to compile "glibc" but Ubuntu has since changed how the linker options to "glibc" which changes how every other dynamic library is linked with "ld".

In all, I owe so much to Ubuntu for how they introduced me to the world of Linux. But now that I have graduated from "Linux Lieutenant" to "Linux Captain," Fedora might well be what I use from now on. I haven't switched away from Ubuntu yet though. I really like Unity. Although Gnome 3 is very nice, and I have had no problems using it, Unity is unquestionably better than Gnome 3. I especially like the Global Menu, I was a life-long Apple fan-boy before I switched to Linux and that global menu is most comfortable to me. Plus, my tiny netbook screen is easier to use when I use all of my screen realestate for content, no space wasted on window decorations or menus -- this isn't possible in Gnome 3. So I will continue to use Ubuntu on my 32-but Intel Atom netbook, for now.

No comments: