A few weeks ago, I ran across a couple of articles about a university in Holland that was having difficulty getting all of their Microsoft patches out to all of their systems. What did they decide to do?

Buy more servers? Nope!

Increase bandwidth? Nope!

Use a program that has been essentially outlawed in North American universities? Yep!

The university decided, on the advice of their IT consultant, that they would use bittorrent to deploy the patches.

This really got me thinking about how I would go about creating my own U.Holl server (as I like to call it). These are some of the thoughts that I have come up with.

The Server

Just to add a really strong sense of irony, I would probably build the U.Holl server on Linux, most likely Ubuntu with a typical LAMP installation. Then, for ease of management, I would install a tracker such as phpMyBittorrent or something similar.

In the tracker software, I would create several different categories based on the target systems that I would use. For example, there would be Windows XP, Windows Vista, Office 2007, etc. categories. Each category would have its own RSS feed.

The Clients

Each workstation or server that was to receive updates using bittorrent would have a copy of uTorrent running in the background. This would be critical. You would also need to tweak uTorrent so that it automatically ran an installation script r program each time it finished downloading a new patch. This script would also schedule a reboot at 3:00 AM (or whatever time you wanted) since it seems almost every hotfix from Microsoft needs to reboot the system.

A potential install script might look like this:

The trick to automatically downloading files is to subscribe each uTorrent client to the proper RSS feeds given out by the server. This way, each system only gets the patches it needs.

Potential

I think that this type of a delivery system has great potential. You could even use it across slow bandwidth links or to deploy other software, not just patches.

This is a project that I am hoping to spend some time on over the next while but I am looking for your input/suggestions now so that I can hopefully avoid some pitfalls later. Any input would be greatly appreciated!

Debian LogoThere are a number of Debian based Linux distributions out there. My personal favorite is Ubuntu. I will typically use the desktop or server version for most of my Linux needs.

Each time I build a new system, there are a number of steps that I typically follow which I seem to forget and need to research again. So, both to document my actions and for your benefit, here are the first few things that I do for any new installation.

The Starting Point

This guide assumes that you have just completed the base installation and have access to a command/terminal prompt. You will also need to have the root password but are logged in as a typical user.

Edit Sources

 sudo nano /etc/apt/sources.list

Except for the very first line, remove all of the # in front of each line the begins with # deb and save the file.

Update Distribution

sudo apt-get update
sudo apt-get upgrade

Assign a Static IP

sudo nano /etc/network/interfaces

In this file, find the line that says iface eth0 inet dhcp. Comment out this line (put a # in front of it) and then add after it on the next lines:

iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

Make sure that the network information you enter here is accurate for your network. Once you have saved this file, then restart the network:

sudo /etc/init.d/networking restart

Next, update your host file to reflect your new static IP address:

sudo nano /etc/hosts

Find the line starting with 127.0.1.1 (usually the second line) and change 127.0.1.1 to the IP address you desire. From the example above, it would be 192.168.0.100. Save the file when you are done.

Install the SSH Server

sudo apt-get install ssh openssh-server


Other Useful Tasks

These are some other things that I have found to be useful from time to time. They are not necessarily a part of my default setup but they do come in handy

Determine Your Static IP Address

ifconfig | grep Bcast

Enable root

sudo passwd root

BackTrackIt is always important to know what is going on in your network. And, from time to time, you should perform a simple audit of your network just to determine what is exactly happening.

This is something that I do on a regular basis using an inexpensive network auditor that I built.  (Actually, all I did was install a custom Linux distribution designed for security.)

What You Need

Here are all the tools that you need

  • An old laptop (if you want it to be portable) or desktop
  • BackTrack Linux Distribution

It’s pretty easy to find a computer that will work and BackTrack is available for free as an ISO.  This is something that probably everyone could do with what they have available.

Build The Analyzer

The steps involved to build the analyzer are pretty simple.

  1. Download the ISO.
  2. Burn the ISO to CD.
  3. Boot the computer from the CD.
  4. Log into the BackTrack system with username root and password toor.
  5. Create partitions on the hard drive (Be aware that this will destroy the hard drive so make sure that the drive has no needed data.) using fdisk.
  6. Write the file system using mke2fs.
  7. Mount the devices using mount.
  8. Run the GUI installer (K → System → Backtrack Installer).
  9. Click Install.
  10. Wait for the installation to complete (There is a long pause at about 80% so please be patient.).
  11. Remove the CD and reboot to the new system.

If you are looking for a more complete step by step document, there is one available.

Explore

There is a lot to discover in BackTracks.  Dig through the system and see what you can find, both on the system and in your network.

Slow SignWhile trying to install Ubuntu to an older system today, I thought time had stopped! It was taking literally five to ten minutes to work through the installation screens! I figured that there had to be a better way of doing this and, sure enough, there was!

When you are on the Ubuntu download website and your are looking at downloading an ISO for the desktop installation, there is a checkbox that indicates that you want to download the alternate desktop disk. This disk is not a LiveCD. Rather, it is more like the old text installers that we have come to know in the past.

It has been designed for the slightly more knowledgeable Ubuntu user who is comfortable with a text interface and making more decisions on his/her own. According to the website:

The alternate install CD allows you to perform certain specialist installations of Ubuntu. It provides for the following situations:

  • creating pre-configured OEM systems;
  • setting up automated deployments;
  • upgrading from older installations without network access;
  • LVM and/or RAID partitioning;
  • installs on systems with less than about 256MB of RAM (although note that low-memory systems may not be able to run a full desktop environment reasonably).

Obviously, there are some very useful capabilities that come with this version of the CD. Well worth a look at!

GumstixWell, my Gumstix arrived the other day and I was able to finally get a chance to work on it.

Even though I knew they were the size of a stick of chewing gum, I was still shocked to see how small it really was! My mind still boggles at the fact that this is a fully operational Linux computer on this little motherboard!

There are going to be a number of different things that I am going to have to get accustomed to before I am going to feel completely at home with this new computer but I am really looking forward to playing around with some of the abilities that it will provide me.

In this post, I am going to talk a little bit about my first experience with my Gumstix and what things looked like on first boot up.

Initial Hardware Configuration

Motherboard
Connex 400xm Motherboard

The first thing that my wife asked me when she say the Gumstix computer was, “How do you do anything with it?” This was a very valid question, especially coming from someone who is accustomed to the “traditional” configuration of a computer. That is, a case with disk drives, keyboard, mouse, and a monitor. The Gumstix has none of those. So, how do you work with it?

Luckily, I have some experience with non-traditional computing systems such as network appliances. The key to getting access to these devices is to connect to them via a serial cable.

Tweener
Tweener Board

In order to do this, I needed to connect the motherboard to the tweener board. The tweener gives us a few abilities but the two things that it allowed me to do were to give the motherboard power and connect to it with a serial connector.

It was simple to snap the two boards together, making sure that the tweener board was sticking out from the motherboard. I then connected the serial cable that I purchased from Gumstix to the serial port on my computer.

In order to see what was happing on the Gumstix computer on my Vista laptop, I needed to install terminal software and point it to my serial port that was connected to the Gumstix. Since Vista does not come with HyperTerminal, I used PuTTY to connect to the serial port (PuTTY added serial port access in version beta 0.59 on January 24, 2007, six days before Vista launched!).

It was also important to ensure that the serial connections were set up properly. The connection settings are very similar to that of other network devices with serial connections. The specific connection settings for Gumstix are:

  • Speed (baud rate) - 11520
  • Data bits - 8
  • Stop bits - 1
  • Parity - None
  • Flow control - None

Once I set these up, I was ready to start my PuTTY terminal session. I plugged power in to the tweener board and prepared for the first boot.

First Boot

To be honest, the first boot wasn’t all that exciting. A lot of text whizzed by faster than I was able to read it. Luckily, PuTTY let me log the entire transaction. Here is the complete boot process from start to finish. Admittedly, it isn’t very exciting but I include it for reference. I would not blame you if you were to skip ahead.

U-Boot 1.1.4 (Nov 6 2006 - 11:20:03) - 400 MHz - 1161*** Welcome to Gumstix ***

U-Boot code: A3F00000 -> A3F25DE4 BSS: -> A3F5AF00
RAM Configuration:Bank #0: a0000000 64 MB

Flash: 16 MB

Using default environment

SMC91C1111-0

Net: SMC91C1111-0

Hit any key to stop autoboot:

Instruction Cache is ON

### JFFS2 loading 'boot/uImage' to 0xa2000000

Scanning JFFS2 FS: done.

### JFFS2 load complete: 784636 bytes loaded to 0xa2000000

## Booting image at a2000000 ...

Image Name: uImage

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 784572 Bytes = 766.2 kB

Load Address: a0008000

Entry Point: a0008000

OK

Starting kernel ...

Linux version 2.6.18gum (craig@azazel) (gcc version 3.4.5) #1 Mon Nov 6 11:18:37 PST 2006
CPU: XScale-PXA255 [69052d06] revision 6 (ARMv5TE), cr=0000397f
Machine: The Gumstix Platform
Memory policy: ECC disabled, Data cache writeback
Memory clock: 99.53MHz (*27)
Run Mode clock: 398.13MHz (*4)
Turbo Mode clock: 398.13MHz (*1.0, inactive)
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists. Total pages: 16384
Kernel command line: console=ttyS0,115200n8 root=1f01 rootfstype=jffs2 reboot=cold,hard
PID hash table entries: 512 (order: 9, 2048 bytes)
start_kernel(): bug: interrupts were enabled early
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 63268KB available (1292K code, 250K data, 64K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
Initializing Cryptographic API
io scheduler noop registered (default)
pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 15) is a FFUART
pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 14) is a BTUART
pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 13) is a STUART
pxa2xx-uart.3: ttyS3 at MMIO 0x41600000 (irq = 0) is a HWUART
Probing Gumstix Flash ROM at physical address 0x00000000 (16-bit bankwidth)
Gumstix Flash ROM: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Using static partitions on Gumstix Flash ROM
Creating 2 MTD partitions on "Gumstix Flash ROM":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x01000000 : "RootFS"
TCP bic registered
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a54: 0x0201 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a58: 0x0605 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a5c: 0x0a09 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a60: 0x0e0d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a64: 0x1211 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a68: 0x1615 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a6c: 0x1a19 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a70: 0x1e1d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a74: 0x2221 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00322a78: 0x2625 instead
Further such events for this erase block will not be printed
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 64K
NET: Registered protocol family 1
smc91x: not found (-19).
CPLD responded with: ff
Initializing random number generator... done.
Starting 32kHz clock...Settled
Set (AF1,out,clear) via /proc/gpio/GPIO12
Starting Bluetooth subsystem:Trying baud rate 57600...
Set (GPIO,out,clear) via /proc/gpio/GPIO7
Set (GPIO,out,set) via /proc/gpio/GPIO7
No response after reset
No response from BT module
Trying baud rate 921600...
Set (GPIO,out,clear) via /proc/gpio/GPIO7
Set (GPIO,out,set) via /proc/gpio/GPIO7
No response after reset
No response from BT module
Trying baud rate 115200...
Set (GPIO,out,clear) via /proc/gpio/GPIO7
Set (GPIO,out,set) via /proc/gpio/GPIO7
No response after reset
No response from BT module
Trying baud rate 57600...
Set (GPIO,out,clear) via /proc/gpio/GPIO7
Set (GPIO,out,set) via /proc/gpio/GPIO7
No response after reset
No response from BT module
Can't initialize device: Success
Starting network...
udhcpc (v0.9.9-pre) started
Dec 31 16:01:05 udhcpc[215]: udhcpc (v0.9.9-pre) started

pxa2xx_udc: version 4-May-2005
usb0: Ethernet Gadget, version: May Day 2005
usb0: using pxa2xx_udc, OUT ep2out-bulk IN ep1in-bulk STATUS ep6in-bulk
usb0: MAC 5a:1c:3d:ae:35:61
usb0: HOST MAC 5a:1c:3d:ae:35:62
usb0: RNDIS ready
Nothing to flush.
NET: Registered protocol family 17
udhcpc (v0.9.9-pre) started
Dec 31 16:01:06 udhcpc[247]: udhcpc (v0.9.9-pre) started

Dec 31 16:01:06 udhcpc[247]: [truncated]

cfio: module license 'unspecified' taints kernel.
Before register driver
After register driver
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device mwlan0 ; No such device.
Starting Rendezvous:
Starting dropbear sshd: OK
Starting httpd...

Welcome to the Gumstix Linux Distribution!

gumstix login:

At this point, I needed to log into the system. The default username/password combination for Gumstix computers is root and gumstix so I entered the information and got the typical Linux # command prompt.

I did a bit of digging around and discovered that the file system looks very similar to many other Linux file systems.

My To Learn List

That was about as far as I got on the system. But, from this very basic introduction, there are a number of things that I have discovered that I need to learn:

  • How to use vi, the text editor, to edit files on the system (since I am more of a nano guy)
  • How to copy files between my laptop and the Gumstix system
  • Determine if files remain on the system in flash or do I need to add external storage
  • How to change the root password and add users

Still Excited…

There is so much that I want to explore with this system. I want to determine what it can do and how far I can push it before it pushes back. I also want to see if it can replace some of the big systems that I now have running in my network environment.

Stay tuned.

TuxWe are pretty much entirely a Windows shop where we work. And, of course, most of our tools are Windows based. But, when we wanted to get data from our dead servers, we turned to trusty Linux for a hand.

Specifically, what we wanted to do was get data off the dead server without having to make any changes to the server hard drives. This meant that we could not reinstall or change any of the original configurations.

So, the logical choice was to use a bootable CD as it is the quickest solution to the problem. I was ready to fire up either a customized version of BartPE or Ultimate Boot CD for Windows but my summer student, Jeff, thought that a Linux distribution was a good option.

Since Jeff was going to be performing the procedure, I decided that I would let him use what he was most comfortable with. So, Jeff ran to the local computer store, picked up a large USB drive, and prepared to migrate some data.

Jeff decided that he would use KNOPPIX and this was no surprise to me or anyone else who is familiar with this distribution. From their website:

KNOPPIX is a bootable Live system on CD or DVD, consisting of a representative collection of GNU/Linux software, automatic hardware detection, and support for many graphics cards, sound cards, SCSI and USB devices and other peripherals. KNOPPIX can be used as a productive Linux system for the desktop, educational CD, rescue system, or adapted and used as a platform for commercial software product demos. It is not necessary to install anything on a hard disk. Due to on-the-fly decompression, the CD can have up to 2 GB of executable software installed on it (over 8GB on the DVD “Maxi” edition).

This is really an amazing CD and one that every tech should have in their toolbox. Unfortunately, every OS has its limitations and one of the limitations that Jeff discovered is that KNOPPIX couldn’t read the USB drive. So, on to plan B.

Jeff next went to an Ubuntu LiveCD. Most people are familiar with the desktop version of this popular Linux distribution but many people are surprised to learn that the installation CD is also a LiveCD. So, you can boot from it and do almost everything that you could do from a fully installed version.

This allowed Jeff to get on the dead server, access the data on the drives, and migrate it off to the USB device so that it could be used later.

RouterIt takes a special kind of person to look at an everyday object and ask, “I wonder if I could run Linux on that?” This is exactly what the people of the OpenWrt project did and the results are really impressive.

What the OpenWrt project does is take a regular old wireless router (Wrt) and replace the standard firmware operating system with an open source Linux operating system. And, since this is open source, you can now play away to your heart’s content and fine tune the system all you want.

This is not a project for those of you who do not want to get your hands dirty. Rather, if you are looking for a way to both learn Linux and also develop a better understanding of embedded systems, this may be a great choice for you.

One of the really cool things that you can do with this project is extend the capabilities of the system so that it can do things that it was never originally intended to do. Some examples include:

I really wish that I had more time to work on my copy of this project (I’m using a Linksys WRT54G that I got for under $100). I have even found sites where you can fire up your soldering gun and do some pretty cool customizing such as:

So, if you want to pimp out your wireless router, this may be a perfect project for you!

Important Links

FawnJust a quick post to tell everyone that Ubuntu 7.04 Feisty Fawn has officially been released today. If you are trying to get the ISO files for downloading, you may have some difficulty because a lot of the servers are overloaded today. I am finding that the bittorrent route is probably the best way to go. So, to help spread this around the globe, I am posting all of the latest Ubuntu torrent files and the MD5 checksums for the files.

If you do not have a bittorrent client, I usually use μTorrent and if you are looking for an MD5 checksum tool, I like MD5 Summer.

Here are the files:

Have fun!

OpenOffice.org BoxBeing a Technology Director can sometimes be a tricky job. The budget is nonexistent and trying to keep a wasteland of old machines alive is sometimes impossible. Well, I turned to a few open source solutions to help.

One that most people have heard of is OpenOffice. We have three computer labs with 20 computers each, 25 teacher computers, five administrative staff computers, and three small mobile labs with 10 laptops each. Purchasing that many copies of Office 2007 doesn’t really fit into my budget. Starting with the 2006-2007 school year, we transitioned to OpenOffice in all but one computer lab. The benefits that we have received are numerous. The teachers were all given copies to give to their students. Some students may not be able to afford purchasing MS Office, so giving them a free alternative that they use at school and home is a great way for the students to use the same software in both places.

Another great open source tool is FreeNAS. FreeNAS is a free Network Attached Storage. I found out about it, on this very blog. After reading the multitude of articles featuring this great piece of software, I excitedly visited my computer graveyard. I had 10 to 15 old machines laying around and picked the best two. Then I purchased two 250 gig drives and installed one into each machine. I now use these NAS devices for storage of student profiles, documents, and backups. The software installed onto both systems is a snap to install and includes web-based administration. Both machines sit headless in different parts of the school.

The last open source program that I use is actually a bunch of open source programs combined into one package. K12TSP is the K12 Linux Terminal Server. Basically, install it one beefy server, and it will then serve several diskless thin clients. This project has been installed in many schools across the country. It includes programs such as OpenOffice, Gimp, K-Office, Abiword, Firefox, Acrobat Reader, Gnome, and KDE. My K12TSP lab include 15 laptops that were basically useless, but could boot from the NIC. I gave it a shot, and voila, I had 15 working computers complete with sound.

Overall, my exposure to Open Source software has been great. Above is just a few of the programs that I like. I am positive there are projects that I have not found that would benefit my network. There is a bunch of people out there that can do amazing things with programs. I am not a programmer, but I appreciate those that are.

David e-mailed my dad (I’m just Tim) with a question about using RSYNC in Windows to backup to FreeNAS when the data is in two different locations. Since my dad doesn’t know anything about FreeNAS, I figured I’d answer:

Dear Mr. Fehlman,

Congratulations on your excellent series of articles on FreeNAS. I have got a Dell PIII with 640MB RAM and a single 30GB disc up and running with FreeNAS; the disc has two partitions one for FreeNAS and the second for data. Ultimately, what I would really like to aim for is a RAID FreeNAS to backup family photos, and MYOB business data….and here lies a problem.

It would appear that in FreeNAS each partition represents a single share point. With RSYNC, we need a matching share on the Windows box, and this Windows share (represented by a virtual directory in DeltaCopy) can only point to a single folder. Am I correct in stating that if I wanted to backup two different folders on the Windows box (say, MYPHOTOS and MYOBDATA), I would need two virtual directories in DeltaCopy, and thus would need two matching data partitions on the FreeNAS box? I note your link to “How to partition hard-drives for FreeNAS“, but I’m starting to get out of my depth by this stage (I consider myself a newbie luddite).

Many thanks for your comments,

David

Well, David, you are correct. There needs to be a 1:1 ratio between folder and backup on the FreeNAS using RSYNC. So, how do you go about backing up several different folders that are all over your hard drive? There are three different ways that this can be accomplished.

1. Move All Data One Folder

The first thing that comes to mind is that you can store all of your data in subfolders under one folder (e.g. My Data). Then, all you would have to do is set up one partition on the FreeNAS box and RSYNC the one folder to the FreeNAS partition.

2. Create an Intermediate Backup Folder

“But, what if you can’t move the data?”, you ask, “There are a lot of programs out there that do not let you specify where the data can be stored. How would you back up something like that?”

You could create an intermediate folder where you use a program such as Cobian Backup to copy all of the files to one folder and then RSYNC that folder to the FreeNAS box. Unfortunately, you now have two copies of your data residing on your hard drive which has a tendency to get pretty huge after a period of time.

There is also the issue of the initial file backup still running when RSYNC fires up. This means that you will be copying your data to the FreeNAS box prior to the backup completing. Definitely an issue.

3. Use NTFS Junction Points

The solution that I thing is the geekiest (thus, the coolest) is to use NTFS junction points. Essentially, you make the system think that an empty folder in a backup folder actually contains your data. Then, when RSYNC goes to copy the data, it will follow the junction points and backup everything you want.

Junction Link Magic
If you are new to NTFS junction points, this can be a bit of an odd concept to get used to. The way I wrap my head around it is to think of them like “stealth” shortcuts. Just like a shortcut on your desktop can point to a file or folder somewhere else on your hard drive, junction points point to other folders on your hard drive. The difference between shortcuts and junction points is that the file system sees shortcuts as files with an .LNK extension but it sees junction points as just another folder on your hard drive.

If you are interested in working with junction points, there are a lot of different programs out there that will allow you to create and delete them on your system. The one that I use the most is called Junction Link Magic and is available as freeware (of course). There are a lot of others out there but this is just the one that I am familiar with.

Junction Point Loop
Just a quick word of warning. You can really mess up your system if you go deleting junction points without understanding what they actually are doing. I suggest that you only create new junction points in folders that you have just created for the purpose of redirecting information. I also suggest that you do not delete any junction point that you dis not create. This is another great way to destroy your system. And finally, do not create a junction point that points to a folder higher up in the directory tree. This will create a junction point loop and if you are backing up this folder, you will never finish your backup.
Also be aware that you can only perform NTFS junction points on Windows 2000 and above. Your hard drive also needs to be formatted NTFS.

RSYNCed Data Unavailable

Data UnavailableNow, this brings up another problem. People are finding that they are not able to access their RSYNCed data. This is a know issue but there is a solution….which I will tell you about tomorrow!

Next Page »