“On a clear disk you can see forever”

My workstation gets less and less use for various reasons; the old dell d410 laptop is seeing most of the action.  A few months back I decided to install a (nominally) upgraded graphics card in order to play minecraft at usable frame rates.

Problem:  The PC has the old AGP video slot which limited my options.  I bought a 512MB card off eBay.

Problem:  my old xubuntu-based workstation was getting crufty after many screw-ups and repair jobs.  It refused to load the nvidia drivers the new card required.  Interference between X11, nvidia drivers, and something else.  Even the highly-touted sgfxi script couldn’t make it happen.  LiveCD of vanilla ubuntu seemed to be willing to load the driver, so wiped the drive and installed ubuntu.

Problem:  my horrible monitor, a HP S2031, refuses to show boot screens (staying black) shuts down, goes to sleep, and is generally infuriating.  Whenever I needed to see what was happening during boot / bios / etc I had to hook my PC up to the wife’s Samsung flatscreen that takes whatever you give it.      If I ever had a problem I couldn’t count on the monitor to show me the screen.  Finally got it wedged when X11 wanted the Samsung and I couldn’t get it to show anything at all on my HP.  Then the KB started going away as soon as X loaded.  Arghhh!  For reasons given below, wiping the drive and reinstalling a distro isn’t a big deal.  So I said screw it, pull the AGP card and play minecraft on the laptop.  Go back to analog vga with a fresh install of something.

Installed Mint 12.  Very pretty and complete.

Problem:  even using the MGSE interface with no effects there was visible lag in the menus and other UI elements.  Too heavy for my PC.  (When I was testing the newfangled DEs earlier they were in virtual machines, so I couldn’t tell how much real lag there was).

Problem:  the new 3.x kernels seem to have random weirdnesses, one of which being kernel panic in some situations.  My samba mounts caused hard locks.  I use samba (cifs) mounts extensively as you will see below.

So I wiped and installed Lubuntu, which defaults to LXDE, a lightweight, openbox-based DE.

Problem:  same 3.x kernel problems  when mounting cifs.  Could have found an older lubuntu with <3.x kernel but was annoyed by this time.

Installed antiX 11 which mounts my cifs fine.  installed lightdm (actively maintained) rather than slim (not maintained AFAIK).  Installed lxde.    Everything is working at this point.

I suspect that when the 3.x kernel kinks get ironed out that lubuntu would be a good choice for someone like me.  antiX is working well but has some wonky edges.  I did install lubuntu as the base for my replacement zoneminder box.  More on that as time allows.

The microCloudification of my workstation

I started thinking about a more cloud or pseudo-cloud setup based on my adventures with the tiny Eee netbook.  I tried about 10 different distros on it and was up and running in a half-hour at the most.  Almost all ran straight from the flash drive as LiveUSB.


Doing a similar thing on a traditional desktop seems like more work, but over time I have kept fewer and fewer stuff on any given workstation.  Data files are stored on cifs-mounted NAS drives, backed up to each other round robin style.  Configs from my box are backed up to the NAS drives.     There’s also a USB drive physically attached to this workstation, also mirrored to the NAS devices.

And I wrote a few scripts to automate setting up any new box.  They are stored on the usb drive.  Looks roughly like this:

collection of configuration files that I use on all instances:  vimrc, conkyrc, openbox menus, bash aliases, rc.local, scripts to mount the nas drives temporarily,

0-prepare.sh create mountpoints, home subdirs, copy rc files into place with correct names.  Install aptitude and update package lists.  Invokes visudo.  I usually update the OS at this point with update.sh:  aptitude autoclean; aptitude update; aptitude dist-upgrade.  Appends a UUID-based entry to /etc/fstab for my USB hard drive;  I don’t like it being done by device (sdb1 or whatever) as that is not 100% predictable and consistent when various USB devices are present at boot time.  UUID makes it consistent.


1-restore-data.sh copies local data back into homedir from NAS mirrors; most important is the ~/scripts/ subdir that contains all my shell scripts.  Repopulates crontab from regularly scheduled (crontabbed!) crontab -l dumps.

2-software.sh installs the packages I use most.

The bottom line is that one can get a new OS up and running quickly if the OS is script-friendly and you think ahead a bit.

0mins – reboot to install from flash.

14mins total – installed and rebooted to first login.  Begin reconstructing workspace as described above.

~30mins total – my configuration is restored.  Start to update OS.

~60mins total – fully patched and up to date.  Normally doesn’t take this long but antix 11 is many months old and there were 700MB of updates (!).

The Trick

The trick to making this painless is:

  • back up all necessary data/configs automatically.  cron is your friend.  Remember you can autodump your cronjobs using cron with something like crontab -l > myCronBackup.txt
  • store your bootstrapping stuff separately but easily accessible.  On a  usb flash drive, usb drive, anything that will be easily available on a fresh install, and that will be regularly backed up.  Script everything that is predictable

From boot to clean OS was 14mins.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s