OpenMicroServerâ„¢ - Support
Debian GNU/Linux 4.0 (etch) Installation Guide
0. Preface
This manual explains the procedures to install the Debian GNU/Linux 4.0 (etch) base system on the Plat'Home OpenMicroServer.
For details on OpenMicroServer settings, please see the OpenMicroServer User's Guide. For Debian, see the Debian Reference.
We use a disk image for installation. See section 2 on how to create the disk image.
The disk image requires about 200 MB of storage space, not counting additional packages. Thus, we recommend a Compact Flash card of 1 GB and above for this installation.
1. Installation
Open the OpenMicroServer case and insert the CompactFlash card into the CF card slot, and close the case. Log in to the OMS via serial port (see user's guide chapter 2.2). You will also need to download files from the Internet, so make sure that the OMS can access the Internet via one of the Ethernet ports.
Boot the OpenMicroServer from initrd (normal boot from internal ROM).
Network setting example
If you have fixed IP addresses and connect over port ETHER-0
# ifconfig eth0 192.168.252.254 # route add -net default gw 192.168.252.1
Add this line to /etc/resolv.conf
nameserver 192.168.252.10
When using a DHCP server and port ETHER-1
# dhclient eth1
If you use a proxy server, add the following line to the file http_proxy:
# export http_proxy=http://[user[:password]@]host[:port]
Format the CF Card
We need to partitions on the CF, /dev/hda1 as an ext3 data partition, and /dev/hda2 as a swap drive. Note that in case of a CF-slot HDD, the device numbering changes to sd*.
If necessary, check / create partitions using fdisk, create an ext3 file system with mke2fs, and create a swap drive with mkswap.
Create the disk image
# e2fsck /dev/hda1 # mount -t ext3 /dev/hda1 /mnt # cd /mnt
Download etch-mipsel-oms-YYYYMMDD-SS.tar.gz from ftp://ftp.plathome.co.jp/pub/OMS400/misc/plathome/.
YYYYMMDD is the release date of the given file, such as 20070409, while SS denotes a serial number, such as 1.
# cd /mnt # tar zxpf etch-mipsel-oms-YYYYMMDD-SS.tar.gz
Install kernel and modules
Download kern.tgz from ftp://ftp.plathome.co.jp/pub/OMS400/0.4-RELEASE-20070901/mipsel-obs1550/binary.
0.4-RELEASE-20070901 is the firmware version. mipsel-obs1550 denotes the platform, while the .ipv6 attribute indicates the version with included IPv6 support.
# cd /mnt # tar zxpf kern.tgz # cd lib/modules # find . -name "*.gz" |xargs gzip -d # depmod -ae -b /mnt -F /mnt/System.map 2.6.16
Edit etc/fstab
You might need to update the file /mnt/etc/fstab.
/dev/hda1 / ext3 defaults 1 1 /dev/hda2 swap swap defaults 0 0 none /proc proc defaults 0 0
Reboot
If you have installed the base system as above and updated the HDD/CF, reboot the system.
# cd / # umount /mnt # flashcfg -c hda1 # shutdown -r now
If you boot the first time, a file system check with fsck is forced, and the system is rebooted.
Log in as root. The default password is root.
Edit /etc/network/interfaces
Next, edit /etc/network/interfaces. In the example below, eth0 and eth1 use a fixed IP address, while eth2 uses the DHCP server.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.252.254
netmask 255.255.255.0
gateway 192.168.252.1
auto eth1
iface eth1 inet static
address 192.168.253.254
netmask 255.255.255.0
auto eth2
iface eth2 inet dhcp
To activate eth0, use the command
# ifup eth0
Edit /etc/resolv.conf
In /etc/resolv.conf, add the IP address of the name server you intend to use.
nameserver 192.168.253.10
Final steps
Install packages using the apt-get command. Refer to the Debian Reference for more information on installing packages under debian.
2. How to create etch-mipsel-oms-YYYYMMDD-SS.tar.gz
2.1. Retrieving the Base system
Make sure you have a CF Card installed in your OpenMicroServer. You will need at least 1 GB of storage space. Also make sure that your CF card has a partition /dev/hda1 (for CF cards) or /dev/sda1 (for CF-slot HDDs), formatted in the ext3 file system.
Log in to the OMS via serial port (see user's guide chapter 2.2). You will also need to download files from the Internet, so allow the OMS direct Internet access via the Ethernet ports.
Network setting example
-
If you have fixed IP addresses
using the port ETHER-0
# ifconfig eth0 192.168.252.254 # route add -net default gw 192.168.252.1
Add this line to /etc/resolv.conf
nameserver 192.168.252.10When using a DHCP server
using the port ETHER-1
# dhclient eth1
If you use a proxy server, add the following line to the file http_proxy:
# export http_proxy=http://[user[:password]@]host[:port]
Installing debootstrap and wget
Precompiled packages are available at ftp://ftp.plathome.co.jp/pub/OMS400/packages/. Confer to the README file for installation instructions.
Running debootstrap
# e2fsck /dev/hda1 # mount -t ext3 /dev/hda1 /mnt # cd /mnt # mkdir etch-mipsel # debootstrap --arch mipsel etch ./etch-mipsel http://ftp.jp.debian.org/debian
In the next chapter (2.2) we will make a customized backup for OpenMicroServer.
# cd etch-mipsel # tar cvpf ../etch-mipsel.tar .
2.2. etch-mipsel-oms-YYYYMMDD-SS
We now customize for the OpenMicroServer.
# cd /mnt # mv etch-mipsel etch-mipsel-oms-YYYYMMDD-SS
Copying individual binaries for the OpenMicroServer
# cd /usr/sbin # cp flashcfg pshd runled /mnt/etch-mipsel-oms-YYYYMMDD-SS/usr/sbin
The files under /mnt/etch-mipsel-oms-YYYYMMDD-SS/etc/ are updated as below.
etc/init.d/pshd
Copy etc/init.d/skeleton, and update DESCANAMEADAEMON_ARGS as below.
DESC="pshd daemon" NAME=pshd DAEMON_ARGS="" # cd /mnt/sarge-mipsel-oms/etc # ln -s ../init.d/pshd rc0.d/K01pshd # ln -s ../init.d/pshd rc2.d/S99pshd # ln -s ../init.d/pshd rc6.d/K01pshd # chmod 755 ./init.d/pshd
etc/init.d/runled
Copy etc/init.d/skeleton, and update DESCANAMEADAEMON_ARGSAPIDFILE as below.
DESC="runled daemon" NAME=runled DAEMON_ARGS="" PIDFILE=/var/run/segled.pid # cd /mnt/sarge-mipsel-oms/etc # ln -s ../init.d/runled rc0.d/K01runled # ln -s ../init.d/runled rc2.d/S99runled # ln -s ../init.d/runled rc6.d/K01runled # chmod 755 ./init.d/runled
Perform a chroot as below.
# chroot /mnt/etch-mipsel-oms-YYYYMMDD-SS /bin/bash
mount the proc file system
Since the proc file system is usually not mounted, mount it manually.
# umount /proc # mount -t proc none /proc
Verify that the environment variables and the network settings are taken over.
Set the root password
Set the root password as root.
# passwd Enter new UNIX password: root Retype new UNIX password: root passwd: password updated successfully
Set the time zone
# tzconfig
Your current time zone is set to Unknown
Do you want to change that? [n]: y
Please enter the number of the geographic area in which you live:
1) Africa 7) Australia
2) America 8) Europe
3) US time zones 9) Indian Ocean
4) Canada time zones 10) Pacific Ocean
5) Asia 11) Use System V style time zones
6) Atlantic Ocean 12) None of the above
Then you will be shown a list of cities which represent the time zone
in which they are located. You should choose a city in your time zone.
Number: 5
Aden Almaty Amman Anadyr Aqtau Aqtobe Ashgabat Ashkhabad Baghdad Bahrain
Baku Bangkok Beirut Bishkek Brunei Calcutta Choibalsan Chongqing Chungking
Colombo Dacca Damascus Dhaka Dili Dubai Dushanbe Gaza Harbin Hong_Kong
Hovd Irkutsk Istanbul Jakarta Jayapura Jerusalem Kabul Kamchatka Karachi
Kashgar Katmandu Krasnoyarsk Kuala_Lumpur Kuching Kuwait Macao Macau
Magadan Makassar Manila Muscat Nicosia Novosibirsk Omsk Oral Phnom_Penh
Pontianak Pyongyang Qatar Qyzylorda Rangoon Riyadh Riyadh87 Riyadh88
Riyadh89 Saigon Sakhalin Samarkand Seoul Shanghai Singapore Taipei
Tashkent Tbilisi Tehran Tel_Aviv Thimbu Thimphu Tokyo Ujung_Pandang
Ulaanbaatar Ulan_Bator Urumqi Vientiane Vladivostok Yakutsk Yekaterinburg
Yerevan
Please enter the name of one of these cities or zones
You just need to type enough letters to resolve ambiguities
Press Enter to view all of them again
Name: [] Tokyo
Your default time zone is set to 'Asia/Tokyo'.
Local time is now: Mon Apr 9 15:07:49 JST 2007.
Universal Time is now: Mon Apr 9 06:07:49 UTC 2007.
Now we'll edit a number of files.
/etc/hosts
# echo "127.0.0.1 localhost" >/etc/hosts
/etc/hostname
# echo "LinuxServer" >/etc/hostname
/etc/apt/sources.list
deb http://ftp.jp.debian.org/debian etch main contrib non-free deb http://security.debian.org/ etch/updates main contrib non-free
/etc/fstab
/dev/hda1 / ext3 defaults 1 1 /dev/hda2 swap swap defaults 0 0 proc /proc proc defaults 0 0
/etc/inittab
1:2345:respawn:/sbin/getty 38400 tty1 2:23:respawn:/sbin/getty 38400 tty2 3:23:respawn:/sbin/getty 38400 tty3 4:23:respawn:/sbin/getty 38400 tty4 5:23:respawn:/sbin/getty 38400 tty5 6:23:respawn:/sbin/getty 38400 tty6 | v #1:2345:respawn:/sbin/getty 38400 tty1 #2:23:respawn:/sbin/getty 38400 tty2 #3:23:respawn:/sbin/getty 38400 tty3 #4:23:respawn:/sbin/getty 38400 tty4 #5:23:respawn:/sbin/getty 38400 tty5 #6:23:respawn:/sbin/getty 38400 tty6 #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 | v T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100 #T1:23:respawn:/sbin/getty -L ttyS0 9600 vt100 | v T1:23:respawn:/sbin/getty -L ttyS0 115200 vt100
/etc/securetty
Confirm that ttyS0 is included, and add ttyS1.
/etc/resolv.conf
Empty this file.
/etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.252.254 netmask 255.255.255.0 gateway 192.168.252.194 auto eth1 iface eth1 inet static address 192.168.253.254 netmask 255.255.255.0 auto eth2 iface eth2 inet static address 192.168.254.254 netmask 255.255.255.0
Exit the chroot
# apt-get clean # exit
Create the tar ball
# cd /mnt/etch-mipsel-oms-YYYYMMDD-SS # tar cvpf ../etch-mipsel-oms-YYMMDD-SS.tar --exclude="./proc/*" . # cd .. # gzip -9 etch-mipsel-oms-YYMMDD-SS.tar
4. Contact and Support
Plat'Home Co., Ltd. support@plathome.com.