Sunday, November 4, 2012

So long Windows 7.

I finally got rid of my Windows 7 installation. Admittedly, Windows 7 was pretty good. It could be used for playing older games like Grand Theft Auto and running one virtual machine (Ubuntu). The problem with Windows 7 for me was licensing; if I wanted to totally rebuild my machine it would be at a price. The installation was also becoming slower- but not nearly as noticeable as with Vista.

I decided to get rid of Windows 7 because I wanted something that was:

  • Dependable.
  • Familiar (must have a Terminal window and easy C++ compiler).
  • Could be used as a centralized SSH server.
  • Thin. Very thin.
The first distro I tried was Ubuntu Server. I chose the server addition because I assumed that it would be thin and that a minimal desktop manager (fvwm2) could be added as needed. Like clockwork the installation would stall- no amount of Googling could resolve the issue. The stall would repeatedly occur during hostname assignment.

An OS is only good if it can be installed and used; therefore Ubuntu Server was thrown out. I tried Arch Linux because I had success with that back in 2009. I found that the install steps had been greatly changed. I'm comfortable with a command line terminal and getting things set up but the instructions proved too daunting for me.

The final distro of Linux that I tried was Fedora. Admittedly I didn't like Fedora when starting out. The rationale was it was using crazy Gnome 3, didn't work well as a guest OS in VirtualBox, and it also uses g++ 4.7. The 4.7 version of the compiler is the most bleeding edge-up to date-latest and greatest offered. Thus it fails to compile some popular projects out of the box.

Nevertheless, I tried Fedora out. I ended up loving the Gnome 3.4 interface (the latest interface). It was smooth and fluid. After using it I wondered "why all the hate?". It was a great experience. It also had support for Wine and Remote Desktop viewing with VNC built in. It was simple enough to use and had a great compiler. SSH was very easy to configure. The only complaint I had was that it wasn't very thin. I'm willing to sacrifice that though.

I rolled on with Fedora 17 and made it over a month with no issues until.... I tried to install VirtualBox. Somewhere online I ran across instructions on how to successfully install it. I did it at work with no issues, so I figured "Why not at home?". I tried- and ended up tripping some security feature that caused writing to my entire system to be blocked. What the hell? I gave up on it at that point- if something can be so easily configured to lock you out, what's the point?

I finally decided to try something off the wall: FreeBSD. FreeBSD is interesting from an engineers perspective. It has support for jails (love this concept for servers), has a wide variety of apps you can pick and choose from in their ports collection (love this because it can make your system very thin), and to a certain extent I was attracted by it's obscurity. Everyone knows about Ubuntu, Fedora, Debian, OpenSuse... never hear much about FreeBSD in the circles I run in.

My first experience with FreeBSD 9.0 was umm.. strained. I'm using old hardware from 2007 (Motherboard: nForce 780i, Video Card: GTS 450). The text based installer wasn't working for me. It would always hang whenever trying to acquire a DHCP lease! It seemed like the same exact problem as I had with Ubuntu Server (see above). After googling around in the tiniest crevices of the world wide internet, I found a bug report about how this motherboard's ethernet will not work with the current nfe driver. This was bad news.

I'd like to say the problem was fixed in a matter of hours; it took a couple of days of trying new things out. Before FreeBSD I never knew about recompiling a kernel or anything about how drivers worked. That area of Linux always scared me. Because I had nothing to lose (with my 2007 hardware) I gave it a try. It was awesome! I loved tweaking the kernel configuration!

FreeBSD has opened up a new world for me; so far I love this system. Through using ports it feels as though my system runs faster. I have a much better understanding of what is loaded on my system and how to fix it. I highly recommend trying it out. However, who knows.. in a month I may trip another security feature and have to start over again. At least I'll have learned something in the meantime.

I'm going to make more entries about how I fixed some of my installation issues relating to FreeBSD. I find some of the tricks incredibly useful for the new user.


Sunday, July 22, 2012

Starting Tips


#!/usr/bin/perl

## ----------------------------------------------------------------------
## Welcome to my Linux From Scratch blog! This blog is formatted 
## completely in perl (or other system-friendly scripting languages). 
## This blog recounts my experience in attempting to put together a
## Linux From Scratch (LFS) distribution. This is primarily a learning 
## experience. 
##
## Getting Started
## ---------------
## You need a "host" system. A host system is a Linux-based system from 
## which the developer can build an LFS system. On the LFS website they 
## do not endorse any particular distro of Linux; it can be anything 
## (RedHat, Debian, Ubuntu, etc.). This statement isn't misleading but 
## the choice of the host system is important. Ask yourself, "How much 
## pain do I want to put myself through?" If your answer is "Very Little"
## then choose a mainstream distro as Googling for answers will make it
## much easier. 
##
## The distro I chose was Debian. The reasons being:
##
## 1) Debian is very stable (2 releases per year).
## 2) Debian's net installer is VERY thin, which is great if you can 
##    work from command line and have no need of a graphical 
##    environment.
## 3) The tools are (almost) all there from the beginning.  
##
## Other distro's are good too, it just comes down to what you the 
## developer feel comfortable with. 
##
## *** Do your work in a virtual machine! I can't say enough about this 
## approach! Using a product like VirtualBox to learn how to put together
## an LFS distro is invaluable because you can use snapshot's to bookmark
## your progress before stepping into a risky set of steps (i.e. building
## gcc). Another suggestion in this regard is to just load from ISO file;
## it seems to go faster this way.
##
## 
## Really Getting Started
## ----------------------
## So you've got your host system distro chosen and VirtualBox is ready
## to go. You start the machine up... now what? Time to set up your 
## host system. If you're like me you go through the distro wizards to
## set up the host system: Language, hostname, auto-prepare 
## the hard drive... WRONG!
##
## Do not let the host distro auto-prepare your drive! Let it set it up
## to the extent you leave a large amount of free space in the file system.
## When I say free space I mean "unpartitioned" space. I typically give
## the host system very little space (10G) and leave the remainder 
## of the space open for LFS. 
##
## Example of Finished Partitioning (on Debian):
##
## SCSI1 (0,0,0) (sda) - 33.1 GB ATA VBOX HARDDISK
##      #1  primary   10.5 GB   B    ext4
##          pri/log   22.0 GB        FREE SPACE  <---- 
##      #5  logical  534.8 MB      F swap         swap
##
## Now just let the host system continue on with the setup wizard. 
## Your Host VBox setup is now complete!