Recovering from a Botched CrunchBang Upgrade

I recently botched an upgrade of the kernel in my CrunchBang VM and it broke the X window system leaving me staring at a black screen after boot. Thankfully it wasn’t terribly difficult to fix. See below for the steps to take to re-apply the upgrades and make the system bootable once again.

When initially booting, CrunchBang shows a Grub menu with the kernel to boot and another option with the same kernel in recovery mode. Choose this second kernel option to log in as root and then run these commands in single-user mode.

First we need to get the network interface up:

# ip link set eth0 up

Next we need to get an IP address using DHCP:

# dhclient eth0

Let’s see how the interface looks now:

# ifconfig eth0

And now we can run the update process again:

# apt-get update
# apt-get dist-upgrade

Reboot and it should all just work now:

# shutdown -r now

This is not a cure-all for all booting problems, but for a botched kernel upgrade this did the trick for me!

Optimizing CrunchBang Linux for VirtualBox

CrunchBang is an excellent version of Linux to run in VirtualBox due to the fact that it’s a nimble Openbox Linux distribution. That being said, the OS still requires tweaking after install in a VM to get the most performance and satisfaction out of it. I’ve put together a guide to walk one through the installation and optimization settings. So take this opportunity to grab the requisite softwares:

And then click here to see how it’s done.

Safe(r) Windows Browsing

Unfortunately with the magnet Microsoft Windows is to malware, and the reluctance people have to migrating to an alternate operating system (ie Linux, OSX), there needs to be a way to protect yourself from the majority of vectors out in the wilds of the internets. The sad fact today is that it is not enough to browse “safe” sites anymore (seems as though even the safe sites host ads that contain malware). So, what is one to do? I suggest a combination of a non-Microsoft browser and two plug-ins to get the job done:

1.  Firefox ESR
2.  NoScript
3.  Adblock Plus

Why the ESR version of Firefox? It is geared toward large organizations due to its stability and the fact that it is not upgraded every week whenever the newest feature is added. If you’ve got to have the latest and greatest then this is not for you. As for me, I prefer stability and security over the newer features. If you want the bleeding edge then Chrome is for you, but you’d better have an awesome malware solution in place (or run it in a sandbox on Windows). The NoScript and AdBlock Plus add-ons are a must for a secure browsing environment on Windows. NoScript stops all scripts from running by default and you can enable sites as you visit them. The AdBlock Plus add-on does what the name suggests and blocks most ads and pop-ups. The majority of malware is delivered via adverts now (and you don’t even need to click on them to get infected), and this add-on helps to mitigate these attacks.

CentOS Vagrant Base Box

I will show how to create a headless CentOS minimal installation “box” using Vagrant and VirtualBox. Similar results can be accomplished without Vagrant, but I find that with a little extra work, Vagrant adds enough value to make the effort worth it. According to their website:

Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development/production parity, and makes the “works on my machine” excuse a relic of the past.

Here’s what you’ll need (version used in this tutorial):

Keep in mind, while I did this in Windows 7, the same can be accomplished in OSX and Linux. So let’s get started and see how it’s done. Click here for the tutorial.

Note: If all you want is the Vagrant box you can download it here.

CentOS Development Workstation in VirtualBox

Have you ever wanted to learn how to program or just need a clean & efficient environment to do same? I will demonstrate how to set up a very nice development environment to start off with. This tutorial is Windows-centric and will get you set up to program in Linux under an existing Windows installation. To get started lets grab the requisite pieces needed to get going. Here’s what you’ll need:

Now that you have the prerequisites click here for the particulars.

If all you want is a quick and dirty of how to do similar the CentOS Wiki has a page describing how to install CentOS as a Guest OS in VirtualBox.

LFS Slackware VirtualBox Appliance

I’ve created an optimized Linux From Scratch build environment using Slackware 14.0 and exported it as an Oracle VirtualBox Appliance to ease installation. The size was kept to minimum (less than 200 MB) and the packages included are as follows.

You can get the appliance here.

You can get the tagfiles to modify your Slackware ISO as well as a floppy image with the tagfiles included here.

NOTE: Login as root with password slack

Linux From Scratch Build Environment

Would you like to build Linux From Scratch but are unsure of the optimum environment in which to do so? If so, then this how-to is for you. I’ll be showing you how to install a customized Slackware Linux virtual machine that you can utilize to build Linux From Scratch. The advantage of doing this in a VM is that you leave your base OS untouched and can easily revert to prior images or even start again from scratch (no pun intended) if needed. Unfortunately, according to the LFS site, the LiveCD is no longer maintained (and which was the preferred host for building LFS):

Note: The LiveCD is no longer being maintained. However, it still works well for many purposes, such as a rescue disk. The packages and the rendered LFS book on the CD are quite out of date.


With that said, this how-to is one avenue to proceed and build your LFS in a host that is sure to work without issues. Keep in mind there are other LiveCD type environments (Knoppix for example), but I’ve never found a better one than what I’ll show you here. So roll up your sleeves, grab a cup of Joe or a pint, and get ready to get your geek on.

Click here for the how-to.

Set Java Path in Windows

I’ve created a small executable that takes the work out of setting the java environment variable that some people struggle with. It was created using bat2exe and makes life simple if you just want Java to work from the command line.

Get it here.

HP MediaSmart EX470 Clean Windows Server 2003 Setup

Installing a clean Windows Server 2003 on a headless (no video out) system is not a simple task.  I would not recommend attempting this without having either a lot of experience with OS deployment or a lot of patience and desire to learn.

There are generally two ways to do this on the EX47x series: one is to hook into the network boot loader used for recovery mode and push down an image, and the other is to use a pre-configured hard drive.  With either method you must have an installation of the OS pre-configured.  The most straight forward method is to take a hard drive to another system and install Windows Server 2003, then use Sysprep to prepare for an unattended installation.

I attempted to write a guide herejust remember this is not for the faint of heart.

NOTE: All credit goes to MediaSmartGuy whom I copied and modified these instructions from (and which are tested and known to work flawlessly — Thank you!)

If you just want the driver pack I’ve put together get it here.

Installing Optimized XP in VirtualBox

Last week I demonstrated how to create a custom Microsoft Windows XP setup ISO optimized for installation in a virtual machine environment using nLite (The how-to can be found here.). We started with an approximate 500 MB ISO and removed components/services using the nLite utility and pared that down to less than 80 MB. This week I’ll show you how well the unattended install works in VirtualBox and the benefits of doing so.

If you haven’t done so yet, head over to the VirtualBox website and get the binaries needed installed:

The how-to can be found here.