Billix: a Sysadmin's Swiss Army Knife
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.
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.
Bill Childers is the Virtual Editor for Linux Journal. No one really knows what that means.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- Trying to Tame the Tablet
- Developer Poll
- Paranoid Penguin - Building a Secure Squid Web Proxy, Part IV
- Looking Good
3 hours 4 min ago - Hey God - You may not be
7 hours 17 min ago - Reply to comment | Linux Journal
9 hours 50 min ago - Drupal is an Awesome CMS and a Crappy development framework
14 hours 29 min ago - IT industry leaders
16 hours 52 min ago - Reply to comment | Linux Journal
1 day 9 hours ago - Reply to comment | Linux Journal
1 day 12 hours ago - Reply to comment | Linux Journal
1 day 13 hours ago - great post
1 day 14 hours ago - Google Docs
1 day 14 hours ago





Comments
Billix and FreeBSD
I wonder if booting a netinstall FreeBSD 7 is possible.
Yes indeed
That would really be great!
I modified billix already to use full installation ISO's, but we also use FreeBSD installation so it would be really really great if we can also include those installation on the USB.
Thanks!
Billix - a linux super tool
This is a very good tool to have on a USB/flash drive. I'll give it a try.
Thanks
Alireza Aghamohammadi
needed options for Windows version of syslinux
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/
Syslinux
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?
Have you tried reformatting
Have you tried reformatting it using 'mkfs.msdos' or 'mkfs.vfat'?
TallPaul
http://tallpaul.org
No valid FAT filesystem
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
Same problem
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.
billix and syslinux
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.
permissions on fat16/32
FAT16/32 does not support file permissions. This is why you get the errors. These can be safely ignored.
ownership errors
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=rootin the mount command (I was using a live cd, so my username was ubuntu) then ran
tar -xzvf billix-0.23.tar.gzas 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.
Ownership errors
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."