Billix: a Sysadmin's Swiss Army Knife

August 1st, 2008 by Bill Childers in

Turn that spare USB stick into a sysadmin's dream with Billix.
Your rating: None Average: 4.3 (7 votes)

Does anyone remember Linuxcare? Founded in 1998, Linuxcare was a company that provided support services for Linux users in corporate environments. I remember seeing Linuxcare at the first ever LinuxWorld conference in San Jose, and the thing I took away from that LinuxWorld was the Linuxcare Bootable Business Card (BBC). The BBC was a 50MB cut-down Linux distribution that fit on a business-card-size compact disc. I used that distribution to recover and repair quite a few machines, until the advent of Knoppix. I always loved the portability of that little CD though, and I missed it greatly until I stumbled across Damn Small Linux (DSL) one day.

After reading through the DSL Web site, I discovered that it was possible to run DSL off of a bootable USB key, and that old love for the Bootable Business Card was rekindled in a new way. It wasn't until I had a conversation with fellow sysadmin Kyle Rankin about the PXE boot environment he'd implemented, that I realized it might be possible to set up a USB key to do more than merely boot a recovery environment. Before long, I had added the CentOS and Ubuntu netinstalls to my little USB key. Not long after that, I was mentioning this in my favorite IRC channel, and one of the fellows in there suggested I put the code on SourceForge and call it Billix. I'd had a couple beers by then and thought it sounded like a great idea. In that instant, Billix was born.

Billix is an aggregation of many different tools that can be useful to system administrators, all compressed down to fit within a 256MB bootable USB thumbdrive. The 256MB size is not an arbitrary number; rather, it was chosen because USB thumbdrives are very inexpensive at that size (many companies now give them away as advertising gimmicks). This allows me to have many Billix keys lying around, just waiting to be used. Because the keys are cheap or free, I don't feel bad about leaving one in a server for a day or two. If your USB drive is larger than 256MB, you still can use it for its designed purpose—storing files. Billix doesn't hamper normal use of the USB drive in any way. There also is an ISO distribution of Billix if you want to burn a CD of it, but I feel it's not nearly as convenient as having it on a USB key.

The current Billix distribution (0.21 at the time of this writing) includes the following tools:

  • Damn Small Linux 4.2.5

  • Ubuntu 8.04 LTS netinstall

  • Ubuntu 7.10 netinstall

  • Ubuntu 6.06 LTS netinstall

  • Fedora 8 netinstall

  • CentOS 5.1 netinstall

  • CentOS 4.6 netinstall

  • Debian Etch netinstall

  • Debian Sarge netinstall

  • Memtest86 memory-checking utility

  • Ntpwd Windows password changing utility

  • DBAN disk wiper utility

So, with one USB key, a system administrator can recover or repair a machine, install one of eight different Linux distributions, test the memory in a system, get into a Windows machine with a lost password or wipe the disks of a machine before repurpose or disposal. In order to install any of the netinstall-based Linux distributions, a working Internet connection with DHCP is required, as the netinstall downloads the installation bits for each distribution on the fly from Internet-based mirrors.

Hopefully, you're excited to check out Billix. You simply can download the ISO version and burn it to a CD to get started, but the full utility of Billix really shines when you install it on a USB disk. Before you install it on a USB disk, you need to meet the following prerequisites:

  • 256MB or greater USB drive with FAT- or FAT32-based filesystem.

  • Internet connection with DHCP (for netinstalls only, not required for DSL, Windows password removal or disk wiping with DBAN).

  • install-mbr (part of the mbr package on Ubuntu or Debian, needed for some USB drives).

  • syslinux (from the syslinux package on Ubuntu or Debian, required to create the bootsector on the USB drive).

  • Your system must be capable of booting from USB devices (most have this ability if they're made after 2005).

To install the USB-based version of Billix, first check your drive. If that drive has the U3 Windows software on it, you may want to remove it to unlock all of the drive's capacity (see the Resources section for U3 removal utilities, which are typically Windows-based). Next, if your USB drive has data on it, back up the data. I cannot stress this enough. You will be making adjustments to the partition table of the USB drive, so backing up any data that already is on the key is critical. Download the latest version of Billix from the Sourceforge.net project page to your computer. Once the download is complete, untar the contents of the tarball to the root directory of your USB drive.

Now that the contents of the tarball are on your USB drive, you need to install a Master Boot Record (MBR) on the drive and set a bootsector on the drive. The Master Boot Record needs to be set up on the USB drive first. Issue a install-mbr -p1 <device> (where <device> is your USB drive, such as /dev/sdb). Warning: make sure that you get the device of the USB drive correct, or you run the risk of messing up the MBR on your system's boot device. The -p1 option tells install-mbr to set the first partition as active (that's the one that will contain the bootsector).

Next, the bootsector needs to be installed within the first partition. Run syslinux -s <device/partition> (where <device/partition> is the device and partition of the USB drive, such as /dev/sdb1). Warning: much like installing the MBR, installing the bootsector can be a dangerous operation if you run it on the wrong device, so take care and double-check your command line before pressing the Enter key.

Figure 1. The Billix Boot Menu

At this point, your USB drive can be unmounted safely, and you can test it out by booting from the USB drive. Once your system successfully boots from the USB drive, you should see a menu similar to the one shown in Figure 1. Simply choose the number for what you want to boot, run or install, and that distribution will spring into action. If you don't select a number, Damn Small Linux will boot automatically after 30 seconds.

Damn Small Linux is a miniature version of Knoppix (it actually has much of the automatic hardware-detection routines of Knoppix in it). As such, it makes an excellent rescue environment, or it can be used as a quick “trusted desktop” in the event you need to “borrow” a friend's computer to do something. I have used DSL in the past to commandeer a system temporarily at a cybercafé, so I could log in to work and fix a sick server. I've even used DSL to boot and mount a corrupted Windows filesystem, and I was able to save some of the data. DSL is fairly full-featured for its size, and it comes with two window managers (JWM or Fluxbox). It can be configured to save its data back to the USB disk in a persistent fashion, so you always can be sure you have your critical files with you and that it's easily accessible.

All the Linux distribution installations have one thing in common: they are all network-based installs. Although this is a good thing for Billix, as they take up very little space (around 10MB for each distro), it can be a bad thing during installation as the installation time will vary with the speed of your Internet connection. There is one other upside to a network-based installation. In many cases, there is no need to update the newly installed operating system after installation, because the OS bits that are downloaded are typically up to date. Note that when using the Red Hat-based installers (CentOS 4.6, CentOS 5.1 and Fedora 8), the system may appear to hang during the download of a file called minstg2.img. The system probably isn't hanging; it's just downloading that file, which is fairly large (around 40MB), so it can take a while depending on the speed of the mirror and the speed of your connection. Take care not to specify the USB disk accidentally at the install target for the distribution you are attempting to install.

The memtest86 utility has been around for quite a few years, yet it's a key tool for a sysadmin when faced with a flaky computer. It does only one thing, but it does it very well: it tests the RAM of a system very thoroughly. Simply boot off the USB drive, select memtest from the menu, and press Enter, and memtest86 will load and begin testing the RAM of the system immediately. At this point, you can remove the USB drive from the computer. It's no longer needed as memtest86 is very small and loads completely into memory on startup.

The ntpwd Windows password “cracking” tool can be a controversial tool, but it is included in the Billix distribution because as a system administrator, I've been asked countless times to get into Windows systems (or accounts on Windows systems) where the password has been lost or forgotten. The ntpwd utility can be a bit daunting, as the UI is text-based and nearly nonexistent, but it does a good job of mounting FAT32- or NTFS-based partitions, editing the SAM account database and saving those changes. Be sure to read all the messages that ntpwd displays, and take care to select the proper disk partition to edit. Also, take the program's advice and nullify a password rather than trying to change it from within the interface—zeroing the password works much more reliably.

DBAN (otherwise known as Darik's Boot and Nuke) is a very good “nuke it from orbit” hard disk wiper. It provides various levels of wipe, from a basic “overwrite the disk with zeros” to a full DoD-certified, multipass wipe. Like memtest86, DBAN is small and loads completely into memory, so you can boot the utility, remove the USB drive, start a wipe and move on to another system. I've used to this to wipe clean disks on systems before handing them over to a recycler or before selling a system.

In closing, Billix may not make you coffee in the morning or eradicate Windows from the face of the earth, but having a USB key in your pocket that offers you the functionality to do all of those tasks quickly and easily can make the life of a system administrator (or any Linux-oriented person) much easier.

Bill Childers is an IT Manager in Silicon Valley, where he lives with his wife and two children. He enjoys Linux far too much, and probably should get more sun from time to time. In his spare time, he does work with the Gilroy Garlic Festival, but he does not smell like garlic.

__________________________


Special Magazine Offer -- 2 Free Trial Issues!
Receive 2 free trial issues of Linux Journal as well as instant online access to current and past issues. There's NO RISK and NO OBLIGATION to buy. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Sorry, offer available in the US only. International orders, click here.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mario Guerra's picture

Billix and FreeBSD

On November 9th, 2008 Mario Guerra (not verified) says:

I wonder if booting a netinstall FreeBSD 7 is possible.

Alireza Aghamohammadi's picture

Billix - a linux super tool

On November 2nd, 2008 Alireza Aghamohammadi (not verified) says:

This is a very good tool to have on a USB/flash drive. I'll give it a try.

Thanks
Alireza Aghamohammadi

great topics's picture

he current Billix

On October 29th, 2008 great topics (not verified) says:

he current Billix distribution (0.21 at the time of this writing) includes the following tools:

*

Damn Small Linux 4.2.5
*

Ubuntu 8.04 LTS netinstall
*

Ubuntu 7.10 netinstall
*

Ubuntu 6.06 LTS netinstall
*

Fedora 8 netinstall
*

CentOS 5.1 netinstall
*

CentOS 4.6 netinstall
*

Debian Etch netinstall
*

Debian Sarge netinstall
*

Memtest86 memory-checking utility
*

Ntpwd Windows password changing utility
*

DBAN disk wiper utility
thank you admin it is very great topic.

---------------------------------------------------------------
online film izle

while troubleshooting why my thumb drive wouldn't boot, I came across a forum post that was about installing
Ubuntu on a flash drive from windows, and there was mention of using the m and a options for syslinux if you were running it from Windows. It says it is not needed for the *nix version but is definitely needed for the Windows version. the post is here: http://jsco.org/dectop/

sigint's picture

Syslinux

On July 10th, 2008 sigint says:

Hello

I was extremely excited to read this article. I ran out and purchased a 512 Kingston DT games USB($9.99US), and get to
running this line >> syslinux -s {device},and syslinux is telling me that i don't have a valid FAT filesystem; when i do have a valid FAT filesystem. Where can i for help?

paulatthehug's picture

Have you tried reformatting

On July 19th, 2008 paulatthehug says:

Have you tried reformatting it using 'mkfs.msdos' or 'mkfs.vfat'?

__________________________

TallPaul
http://tallpaul.org

I have the same problem. Running Ubuntu 8.04 LTS, and have tried two different USB sticks, and both FAT16 and FAT32. syslinux will not recognise the file system, for some reason.

Lars Erik

Cwolly's picture

Same problem

On July 14th, 2008 Cwolly (not verified) says:

I continue to have the same problem, and have not yet found a solid answer on how to fix it. when I run the install-mbr, it is doing something to the thumb drive that will not allow syslinux to see it as a valid partition anymore. I also get the "this doesn't look like a valid FAT filesystem" error.

Any help would be greatly appreciated.

mdeschane's picture

billix and syslinux

On July 27th, 2008 mdeschane says:

I was having the same problems; here are the steps I took that finally succeeded:

my USB device is sdc

cfdisk /dev/sdc; create partition and change type to FAT16
mkdosfs /dev/sdc1
mount -t msdos /dev/sdc1 /usbdrive (or where ever)
cd /usbdrive
cp billix-0.23.tar.gz
tar -zxvf billix-0.23.tar.gz (got a whole bunch of error messages "Cannot change ownership to uid 1000, gid 1000: Operation not permitted" even though I am root)
install-mbr -p1 /dev/sdc
cd ~
umount /usbdrive
syslinux -s /dev/sdc1

if you hold you mouth just right and clutch your favorite talisman firmly this should work.

linuxjnl's picture

permissions on fat16/32

On August 4th, 2008 linuxjnl says:

FAT16/32 does not support file permissions. This is why you get the errors. These can be safely ignored.

cosmiclint's picture

ownership errors

On July 29th, 2008 cosmiclint (not verified) says:

I was getting the same errors. I think it's because of the way you mounted the drive. The UID and GID for /usbdrive would both be root, but I think the file wants be be untarred by a regular user.

When I included

-o uid=ubuntu,gid=root

in the mount command (I was using a live cd, so my username was ubuntu) then ran

tar -xzvf billix-0.23.tar.gz

as user ubuntu I didn't get the errors.

I've been able to boot dsl on a toshiba that supports booting from usb drive, but my Latitude doesn't make it past the menu.

Still playing with it, though and having a lot of fun. I routinely use live cds to fix borked windows boxes, so this is another handy tool.

cosmiclint's picture

Ownership errors

On August 3rd, 2008 cosmiclint (not verified) says:

I should have added that I also copied the file in to the root of the drive as a regular user, so the file was also owned by user "ubuntu."

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Featured Videos

The November 13, 2008 edition of Linux Journal Live! Shawn Powers and special guest, Linux Journal Author Daniel Bartholomew, talk e-book readers and Daniel's Kindle, DRM, and other goodness.

From the Magazine

December 2008, #176

The Oxford English Dictionary says the word "gadget" is a placeholder name for a technical item whose precise name one can't remember. Like that book-reader thingy from Amazon...what's it called? Spindle, Gindle...Kindle, that's it. Check it out in this month's gadget issue.

Other gadgets covered include the Nokia tablets, the BlackBerry, the Neo FreeRunner, the Dash Express, the Roku Netflix Player, the Kangaroo TV, The TomTom GO 930 and the MooBella Ice Cream System. On the larger hardware front, read the reviews of the Acer Aspire One and the YDL PowerStation. On the software front, check out the articles and columns on memcached, Samba security, Mutt, desktop gadgets, bash and Puppet. To wrap it all up, read Doc's thoughts on Google and the browser platform.

Read this issue

Sign up for our Email Newsletter