One Unified Global Perspective
Communications with a Global Perspective
Home
Intro
Contact Us
Voice over IP
PBX Solutions
Services
Support
Glossary
Open Source
Blog
Forum

WebMail





2007 Jun 23 - Sat

Debian Linux on a Mini-Box

I picked up a small form factor Mini-Box M200-LCD Barebone System. It is a nice small embedded systems unit with a backlit LCD and front panel buttons. I chose a unit with a 1GHz processor, 512MB of memory, and a 40GB harddrive. The unit does not have a floppy drive or a CDROM drive. It does come with ample USB slots. It also has a Compact Flash slot hidden behind a door on the front.

With a little bit of fiddling, I was able to Debian installed and running on the unit. Here is what I did to get it up and running.

The Compact Flash is configured as a Master device on the second IDE channel.

I chose to use a USB Key to boot strap the unit into network mode to get the full Debian distribution installed.

The USB key needs to be created on another Linux system, in this case I used a VMWare'd version on an XP box, . (WinImage was suggested to me, but I could never get it to work according to what little instruction I could find). In VMWare, I needed to associate the USB controller to the VMWare session. Windows saw the USB drive disappear as a result. When I inserted the USB Key into USB slot, the Linux console indicated the drive name to be used. In this case, it was /dev/sdc.

I downloaded the netinst iso image from the Debian package site. I also obtained the boot.img.gz boot image for the distribution. Pascal Le Bail has a web page called Installing Debian Sarge from a USB memory stick (USB key) where he explains the simple process. The instructions have been incorporated into the Debian Installation Manual.

Once the files are available, a short series of commands makes the key bootable:

zcat boot.img.gz >/dev/sdc1

gets the image onto the USB Key.

mount /dev/sdc1 /mnt
cp netinst.iso /mnt

gets the iso installed on to the key.

The USB key can then be plugged into a USB slot on the Mini-Box and the power turned on. In the bios, the secret is to:

  • set USB ZIP as the first boot device
  • in the USB settings, turn on USB legacy mode

The Mini-Box will boot in to the Debian installer and allow a network download/configuration of a Debian installation.

The interesting part of the Mini-Box is it's LCD/Button front panel. A sample program and SDK have been made available.

There is a demo program called usblcd available to show how things are done. The source and SDK can be downloaded and built.

Assuming Debian's build tools have not been installed, here are the build steps:

apt-get install autoconf
apt-get install gcc-4.1-base
apt-get install gcc-4.1
apt-get install gcc
apt-get install automake
apt-get install binutils
apt-get install binutils-dev
apt-get install libtool
apt-get install libusb-dev
apt-get install libhid-dev
 ./autogen.sh
make
make install

You can then use commands like:

usblcd backlight 1
usblcd backlight 0
usblcd backlight 1
usblcd led 2 1
usblcd led 2 0
usblcd clear

[/OpenSource/Debian] permanent link


Run Levels and Mode Switch Keys

Debian Admin has a some information regarding run levels (switching between single-user, console, and graphic modes). These are the basic run levels:

  • 0 System Halt
  • 1 Single user
  • 2 Full multi-user mode (Default)
  • 3-5 Same as 2
  • 6 System Reboot

The file /etc/inittab has a line in it:

id:2:initdefault:

Supposedly, if you change the 2 to a 3, on boot the system will come up with a console instead of the graphical interface (assuming the graphical interface has been installed).

The command runlevel will return two values, a run level change since powering up, and the current run level.

To change run levels, the command 'telinit x' will change to run level 'x'.

An Introduction to Run-Levels contains further detailed information.

[/OpenSource/Debian] permanent link



Blog Content ©2008
Ray Burkholder
All Rights Reserved
ray@oneunified.net
(441) 505 7293
Available for Contract Work
Resume

RSS: Click to see the XML version of this web page.

View Ray 
Burkholder's profile on LinkedIn
technorati
Add to Technorati Favorites



June
Su Mo Tu We Th Fr Sa
         
23


Main Links:
Monitoring Server
SSH Tools
QuantDeveloper Code

Special Links:
Frink

Blog Links:
Sergey Solyanik
Marc Andreessen
HotGigs
Micro Persuasion
... Reasonable ...
Chris Donnan
BeyondVC
lifehacker
Trader Mike
Ticker Sense
HeadRush
TraderFeed
Stock Bandit
The Daily WTF
Guy Kawaski
J. Brant Arseneau
Steve Pavlina
Matt Cutts
Kevin Scaldeferri
Joel On Software
Quant Recruiter
Blosxom User Group
Wesner Moise
Julian Dunn
Steve Yegge

2007
Months
Jun




Mason HQ

Disclaimer: This site may include market analysis. All ideas, opinions, and/or forecasts, expressed or implied herein, are for informational purposes only and should not be construed as a recommendation to invest, trade, and/or speculate in the markets. Any investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied herein, are committed at your own risk, financial or otherwise.