Mac

June 11, 2009

Installing Linux Debian Lenny on an Alix board

Filed under: Uncategorized — mac @ 3:42 pm

Goal:
This process shows how to create a bootable CFCard that can be used to boot a PC Engines Alix board. The OS chosen is Debian Lenny.
Setup:

    One Alix 1d board
    One 4 GB Compact Flash Card - although 300 MB should be enough
    One Lenny x86 PC to do the setup

Prepare the CF Card:
Assuming your CF Card is on /dev/sdb, you first need to create a partition:

fdisk /dev/sdb
d1

To delete the old partition… then create a new partition, primary, type 83.

The format the partition and avoid system checks (write cycles are limited on a CF Card):

mkfs.ext3 /dev/sdb1
tune2fs -c 0 /dev/sdb1

Installing the base system

apt-get install debootstrap
mount /dev/sdb1 /mnt/
debootstrap –arch i386 lenny /mnt/ http://ftp.debian.org/debian

Mount /proc and /sys and chroot:

mkdir /mnt/proc
mkdir /mnt/sys
mount –bind /proc /mnt/proc
mount –bind /sys /mnt/sys
chroot /mnt /bin/bash
mount devpts /dev/pts -t devpts

Initial file setup

Create the following files:
Check, create and/or adapt the following lines:

/etc/fstab

proc /proc proc defaults 0 0
/dev/sda1 / ext3 noatime,errors=remount-ro,commit=120 0 1
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/tmp tmpfs defaults,noatime 0 0
tmpfs /var/run tmpfs defaults 0 0
tmpfs /var/log tmpfs defaults 0 0
tmpfs /var/lock tmpfs defaults 0 0

/etc/hostname

debian

/etc/hosts

127.0.0.1 localhost

/etc/resolv.conf

search *
nameserver your.nameserver.com

/etc/network/interfaces

auto lo
iface lo inet loopback
auto eth0
iface eht0 inet dhcp

Create /etc/modules with:

natsemi
hostap_pci
lm90
w83627hf
scx200_acb base=0×810,0×820
geodewdt

Make it bootable!:

(ignore the warnings regarding the locales)

apt-get install grub
cp /usr/lib/grub/i386-pc/ /boot/grub
echo “(hd0) /dev/sdb” > /boot/grub/device.map

Install the Kernel

apt-get install linux-image-2.6.26-2-686

And exist the chroot

exit
umount /mnt/proc
umount /mnt/sys

grub-install –root-directory=/mnt /dev/sdb

Create /mnt/boot/grub/menu.lst with:

default 0
timeout 5
title debian-lenny
root (hd0,0)
kernel /vmlinuz root=LABEL=ROOTFS
initrd /initrd.img

Then:

umount /mnt
e2label /dev/sdb1 ROOTFS

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Powered by WordPress