2.3. Installing Pyramid Linux on a Compact Flash Card

There you are with your new single-board computer, and it looks very nice, but you're wondering how to get an operating system on it.

The two most common methods are via a Compact Flash (CF) writer, or bootstrapping the operating system from a PXE boot server. This recipe tells how to install Pyramid Linux using the first method. You need:

The most common CF writers cost around $20 and connect to a USB port. This is the easiest kind to use. Linux automatically recognizes and mounts the device when you plug it in.

A second option is an IDE CF writer. You'll know if you have one of these because they take up an IDE slot on your system and a front drive bay. A system with one of these needs to be booted with the CF card in the reader, or it won't see it.

First, download the latest dd image:

	$ wget http://metrix.net/support/dist/pyramid-1.0b1.img.gz

Next, find the /dev name of your CF card with the fdisk -l command. A USB CF writer looks like this:

	# fdisk -l
	   Device Boot      Start       End     Blocks   Id  System
	/dev/sdb1               1       977     62512    83  Linux

An IDE CF writer looks like this:

	   Device Boot      Start       End     Blocks   Id  System
	/dev/hdc1   *           1       977     62512    83  Linux

Copy the image to your CF card with these commands, using your own correct image and /dev names. Do not use any partition numbers:

	# gunzip -c pyramid-1.0b1.img.gz | dd of=/dev/sdb bs=16k
	3908+0 records in
	3908+0 records out

And that's all there is to it. Now it's ready to go in your routerboard.

This requires a bootable operating system image. You can't just copy files to the Flash card because it needs a boot sector. dd does a byte-by-byte copy, including the boot sector, which most other copy commands cannot do. The maintainers of Pyramid thoughtfully provide a complete image, which makes for a simple installation.