Monday, October 4, 2010

dnsmasq as tftp boot server

I upgraded my main workstation to 10.10 today. I may have missed a step where I was supposed to edit the grub2 setup. At any rate I ended up with a machine that booted to "grub rescue>".

Easy fix with a livecd. But with a machine that won't boot from a cd, what do you do?

Well my boy spinach can PXE boot. He's set to do that first in his BIOS.

Spinach is fairly modern hardware he just has a flacky IDE2 channel.

So...I used to do this with a fancy schmacy setup on a fedora box I was using for study. Today I needed quick.

I have another local machine, already running 10.10, that has a static IP on my local network. Her name is turnip. It's _my network, I'll name them what I want.

Cut to Turnip

I need the netboot image, dhcpd, tftpd. But wait! I can do all this with dynmasq.

Get the netboot image; unpack; copy to boot directory
Make sure you have dynmasq installed.

sudo apt-get -s install dnsmasq

The dash s means simulate. You decide.

I installed it.

Now my router is setup to serve up DHCP addresses from, I know that new hosts on my network will ask for the first available dhcpd assigned address. So I am going to make my dynmasq service start serving addresses at a lower number than my router.

I haven't covered getting the netboot image...sigh

The following is my current working dnsmasq.conf; just the lines that matter...

# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
# make sure this range is lower than what is provided by your router

# Override the default route supplied by dnsmasq, which assumes the
# router is the same machine as the one running dnsmasq.
# change it to the address of your router

# Set the boot filename for netboot/PXE. You will only need
# this is you want to boot machines over the network and you will need
# a TFTP server; either dnsmasq's built in TFTP server or an
# external one. (See below for how to enable the TFTP server.)

# Enable dnsmasq's built-in TFTP server

# Set the root directory for files availble via FTP.
# set this to where you put the unpacked and moved the netboot tarball

I'm missing the steps to get the netboot image.

tftp-hpa is not running

To get my netboot image I did the following...

cd /mydownloaddirectory

# example mark@flounder:~$ cd /data/downloads/isos/ubuntu/

wget -c

# remember I'm in my download directory
# unpack it here

tar xzv netboot.tar.gz

# this gives me

ls -lh /mydownloaddirectory

# example
# mark@flounder:/data/downloads/isos/ubuntu$ ls -lh
# total 1.4G
# -rw-r--r-- 1 mark mark 693M 2010-10-04 10:10 maverick-desktop-i386.iso
# drwxr-xr-x 3 mark mark 4.0K 2010-09-28 08:53 netboot
# -rw-r--r-- 1 mark mark 13M 2010-09-28 09:03 netboot.tar.gz
# -rw-r--r-- 1 mark mark 673M 2010-09-10 14:16 ubuntu-10.04.1-server-i386.iso

# now I need to move the netboot directory some where that will be owned by root
# if you are using a tftp boot server this should be where it looks
# I did a bunch of rtfm today and decided on /var/lib/tftboot even though I wasn't using tftp-hpa

# again note this is issued from my download directory

sudo cp -r netboot /var/lib/tftpboot

# now I just need to restart dnsmasq

sudo service dnsmasq restart

Back to Spinach

Rebooted via PXE boot server; repaired grub2, rebooted to Maverick Meerkat


Tuesday, April 13, 2010

Ubuntu Hour becomes InstallFest

but not the kind you're thinking of...

It all began the night before the Ubuntu Hour in Winston-Salem. I went to the local food store and noticed the Brake and Battery warning lights were on in my truck. I jiggled the emergency brake handle which didn't change anything. "Well I'll check it in the morning..."

In the morning jiggling the emergency brake handle; checking the battery connections did nothing. Having seen this condition clear up on its own a few times in the last month I set off for the Ubuntu Hour. Just before turning out of my neighbourhood I tried to use the windshield washer, the wiper blades barely moved. Reverse, back down the hill into my driveway, 9.6 volts at the battery while it's running; not good.

So I missed the Ubuntu Hour; bummer man! Being cash strapped I decided to do the work myself. Another Ubuntu North Carolina Local Team member graciously offered to come over and help. To be that second set of hands and eyes on a task that isn't my forte at all.

What began as a missed Ubuntu Hour became an InstallFest: installing an alternator on a Nissan Frontier. John Ghormley was a big help; not only as the second set of hands but as the second set of eyes he saw several ways to make the process complete more quickly. But he didn't get nearly as greasy as I did...

Many, many thanks John; without your input I don't know how long it would have taken me to figure out to move that bushing. Plus you met SuperDave; he would have been my next choice for second set of hands/eyes.

Wednesday, March 3, 2010

Old Beast

My old faithful Toshiba laptop has decided to boot when it wants to boot. I have managed to, well quite frankly, bum an old beast of a laptop from a friend.

It is a Dell Inspiron 3800. It has a Windows ME sticker on the bottom. I installed Xubuntu and fluxbox. Now I hear there's a fluxbox Ubuntu flavor; I'll have to check that out soon. I did name the thing "oldbeast". It was usable with battery life of about an hour and twenty minutes. I did a couple of minor hacks to the get the network and battery applets to start when fluxbox starts. The 800 x 600 screen is rather limiting. Then the keyboard started going all flacky. I, K and < don't respond. So I connected it to my KVM switch...

WOW! Oldbeast's video card can display to my 20 inch LCD monitor! I'm going to put a screenshot in here but I don't know if blogger will link to the full size image.

There are a couple of irssi sessions, gimp, gnome system monitor, gkrellm and htop running in that shot. With a bad keyboard I don't know how useful this machine will be for anything but it is interesting that it can do 1680 x 1050.

File under "ways to waste time"?

Thursday, January 7, 2010

An Empathy How-To

Just for the Ubuntu North Carolina LoCo Team.

Here's a screencast I made to help new users that prefer to use an IM client to connect to the team's IRC channel.

The sound quality isn't very good due to all the fan noise from four pc's running in "The Bat Cave". That's what we call my computer room. It is "my" computer room until my wife decides she wants to decorate for some holiday...

Hopefully this is helpful to someone.