Upgrading the BIOS
This is optional: I however believe that it is better be safe than sorry :) The latest BIOS for EN12000EG is V1.09 available for download in the Downloads tab. The bad news is that the BIOS flash tool demands DOS. Because of this, I briefly plugged a CD drive to the system and installed FreeDOS on the CF drive. I burned the flash tool and BIOS binary after this, and copied it to CF disk. Note that the latter is necessary as the flash tool does not run from read-only media such as a CD. It is also important to make sure that the motherboard would not be unplugged from the mains during the flashing process!
Preparing the install
If the BIOS update is not necessary, one can install the system without using a CD/DVD drive, only a usb stick is to be used.
As we anyhow build a server, we shall use Debian :)
There is a good howto on debian.org on installing from usb sticks. The main points are the following:
- You need to download two disk images: One for making the usb stick bootable (using syslinux). This can be obtained here (only boot.img.gz is needed). The second one will be the actual installer, for which we use the netinst image meaning that most of the packages will be downloaded from the internet during install. Iso image is available here (choose i386).
- The boot image needs to be extracted and written to the flash drive. The device needs to be at least 256MB in size. No matter if it is larger, because the resulting partition will be of this size. The operation can be done via dd, which is available for windows as well by simply issuing in the command line:
dd if=boot.img of=flash_drive
with flash_drive being /dev/sdX on linux and \\?\Device\HarddiskY\Partition0 on windows. Note that X=[a,b,c...] or Y=[1,2,3...] for the flash drive that needs to be written. It is important to double-check the actual path before destroying data on another device by mistake! For the windows version this can be done via dd --list which lists all available devices with description. If boot.img is in another directory, then its path needs to be changed as well.
- Replug the flash drive and copy the netinst iso image to flash drive, preferably to the root directory. Note that the iso file should not be extracted, but simply copied, as the installer will mount the image itself.
The bootable flash drive is now ready, the only thing to do is to make sure that a wired internet connection is available so additional packages can be downloaded during install. The preferred way is to use an empty LAN port on a router and to use DHCP.
Booting from the flash drive
In principle this should be simple, yet I found it quite hard to make the motherboard boot from USB flash drive even after reading some earlier manuals on the topic. For me, the following steps worked with V1.09 BIOS:
- Set the first boot device to be USB-ZIP in BIOS.
- Switch off the computer and unplug its mains.
- Remove all IDE or SATA hard disks, and USB keyboard and mice so that only the USB stick remains.
- Replug the computer and switch it on.
- At this point it will boot from the flash drive (most likely), but obviously there is nothing to install to :)
- Switch off the computer and replug everything that is necessary.
- Start install :)
So, in a nutshell, it is necessary to have one power cycle with only the flash drive plugged in. The funny thing is that a mere reboot is not enough, one has to unplug and replug the power supply.
And finally, install
Mostly, one can go with the default options. As I used a 4GB CF card as /dev/hda, I formatted 3.75 GB to be the root filesystem (using ext3), and the rest to be swap. Note that it is indeed not recommended to use any flash drive for swapping, yet my experience is that for the intended kind of operation it is rather seldom used, but sometimes it can be useful. As CF contains internal wear leveling algorithm, mainline filesystems, such as ext3 can be used for the system. The only thing that has to be taken care of is to switch off the atime attribute using noatime mount option (this can be done during partitioning). The default atime causes write to the hard drive for each read operation as it updates the last access time for the files. This is useful for certain applications such as backup and mailing tools, but causes a great deal of unnecessary writing operation.
The rest goes quite straightforward, I chose to install only the option Standard System in order to customize packages later on.
Good-to-have packages
Apart from the default packages that come with the default install, the following ones might be useful as well:
, the rest however are downloaded from other sources and might need some hacking to make them work.
Good-to-have packages
Apart from the default packages that come with the default install, the following ones might be useful as well:
- bzip2, less, mc, ssh-server for convenient use :)
- make, gcc, libncurses5-dev, automake, psmisc to make kernel compiling and installing source packages possible;
- ddclient to make the box accessible via its domain name with a dyndns.com account;
- iptables for firewalling and/or routing: this is installed by default, although I prefer to have the latest stable version from http://www.netfilter.org/
- lm-sensors to read on-board temperature and voltage sensor outputs. It was not straightforward to make it work, so I will write about the details in a separate post.
- samba server from samba.org. Here again make sense to compile from source and setup separately as the version in the debian stable repository is quite old.
- Enhanced ctorrent a nice command-line based torrent client, might be useful as well. Obtained from here.
No comments:
Post a Comment