GNU/Linux Distros Are Amazing
On October 20th, which also happens to be my birthday, Canonical made the first release of the Ubuntu distribution– Ubuntu 4.10 – Warty Warthog. A friend who I took some courses with at the University of Winnipeg helped me install it on my computer, and I've been using it since, occasionally trying out Debian, but not finding it to offer anything more than Ubuntu to me. For the past 6 years, I've been using the GNU/Linux operating system, and it's been an amazing ride. Being able to use any and all of the programming languages and servers I came across, right on my PC, has had a tremendous impact on my professional development as a software developer.
At Canada's Web Shop, we use the RedHat Enterprise Linux on our production servers, and it's free counterpart, the Commmunity ENTerprise OS [CentOS] GNU/Linux distribution on the development server. This is a great opportunity for me to get experience with using the RedHat set of administration tools, so I decided to install CentOS on my laptop, to have a sandbox to experiment in, without inadvertently affecting the servers we use for work.
My Lenovo 3000 N500, although just about a year old, has a few battle scars, and its CD/DVD drive "does not work". I opted for installing the OS using a USB stick as the installation medium. I started like a good schoolboy by following the HowTo from the CentOS Wiki, but that states at the top of the document in big letters on a colored background that it is deprecated, and to follow the articles listed on the bottom. After trying one of the articles, I could not really get it installed by just following the steps, so I decided to write this article. Without further ado, the CentOS USB installation instructions.
CentOS USB Install
I used a 2GB USB stick, although I eventually found out that a 4GB stick could have saved me some bandwidth. A ~500MB stick would have been plenty, providing that you don't mind the slightly longer installation caused by having to download the packages over the Internet, which you still have to do with a 2GB. A 4GB would have been nice.
Formatting the USB Stick
I used the GPartEd program to format the USB stick. I created 2 partitions, although I ended up not needing one of them. The relevant partition was ~980MB, with the bootable flag set, and the filesystem type was FAT32. Follow these steps to delete all files on your USB stick and format it:
- Plug in the USB stick.
- Open GParted. The main GParted screen will appear.
- Select your USB stick in the device drop-down in the top right.
- Right click on each of the current partitions in the bar on the top, then select 'Unmount' from the list of options.
- Right click each of the partitions, then select 'Delete', to delete the current partitions. The bar will turn gray.
- Right click in the gray bar, then select 'New'. The 'Create new Partition' window will come up.
- Select 'fat32' in the 'File System' drop-down, then press the 'Add' button to finish creating the partition.
- Right click the newly-created partition in the bar on the top, then select 'Manage Flags'. The 'Manage Flags on /dev/XXXX' window will come up.
- Check off the 'boot' flag, then press the 'Close' button. You will be back at the GParted main window.
- Press the check icon in the toolbar on the top to apply the partion configuration and format your USB stick. The 'Applying pending operations' progress window will open and disappear after it is done formatting your USB stick.
Your USB stick is now ready to become a bootable CentOS installation medium.
Making the USB Stick into a Bootable Installer of CentOS
I used CD #1 of CentOS 5.5 for the i386 CPU architecture, and UNetbootin to make the USB stick into a bootable installer of CentOS. Follow these steps to do the same:
- Download CD #1 for your CPU architecture here: http://mirror.centos.org/centos/5/isos/.
- Mount your USB stick.
- Open UNetbootin. The main UNetbootin screen will appear.
- Select CentOS as the distribution, and 5 as the Version using the drop-downs on the top.
- Check the Disk Image option, and press the '...' button to select CD#1 .iso you downloaded in step 1.
- Select your USB drive in the 'Drive' drop-down.
- Press 'OK' to apply the selection, and set up your USB stick as a bootable installer. The progress screen will appear.
Your USB stick is now ready. You will need to specify that you want to boot from your USB key in your BIOS.
There is a pretty good guide for the installation at the HowtoForge. However, it shows the steps to take if you are installing on a computer that does not have any data partitions, and no already installed operating systems. I on the other hand have a /home partition that all my operating systems mount, and an Ubuntu installation that I would prefer not to lose. During the installation, there were a few gotchas that made me have to re-do the installation several times.
- At the Installation method screen, choose HTTP, then enter mirror.centos.org into the 'Web site name' field, and /centos/5.5/os/i386 as the CentOS directory field.
- At the partitioning step, I had to choose create custom layout, so that the next screen would allow me to indicate manually which partition to use as / and which partition to use as /home.
- At the boot loader configuration screen, check off the 'Configure advanced boot loader options'. On the following screen, you will be able to select the hard disk to be used to install the boot loader. The installer will install the boot loader onto the USB key by default, and this would be a problem for me.
Other than that, the install went smooth for me, and I hope it does for you too! Feel free to comment on this post with any questions.
Although the OS does an even better job of supporting some of the hardware than Ubuntu 10.04, like on any new installation, there are a few things to take care of that don't "work out of the box":
- Subversion setup
- Setting up .avi playback capability
- Installing the wireless driver