Creating the Linux Image
- To get the basic ariane image you have to install and run debootstrap on your Debian system it as shown in the manpage, e.g.
# cd etch-disk # debootstrap etch .
The following steps are done inside the bootstrapped tree, so you should chroot there.
- Cleanup /var/cache/apt/archives.
- Remove some unneeded packages:
dselect (1958kB), tasksel (3416kB), aptitude (8569kB -- there is apt-get, you need only one but the decision is your's), info (336kB -- not a manpage reader and we are going to remove the infopages later). This results in an approx. 130MB image.
- Important: console-tools (913kB), console-data (3408kB), console-common (467kB).
- Install some packages:
lilo (1249kB -- or grub but you need a boot loader), vim (23.6MB, 21MB are below /usr/share/vim which can be removed later -- then remove vim-tiny 1065kB and nano 1663kB), less (274kB -- I want a real pager), udev (326kB), gawk (2011kB), openssh-client (2732kB), openssh-server (569kB), tcpdump (831kB), tftpd-hpa (90kB), tftp-hpa (22kB) and syslinux (684kB).
The image is now grown to 167MB.
- I added some non-standard packages:
my favourite shell interpreter
- command line FTP client
Cleaning /var/cache/apt/archives brings the size down to 166MB.
Todos after bootstrapping
There are some things todo which are usually ready to run on a normal Debian system.
- keyboard configuration
Already done by installing the various console tools above. Run "
dpkg-reconfigure console-data" to set the keymap if you want to change the selection. Hint: you can also simply copy the keymap from /etc/console on your regular Etch system.
the directory does not exist in the base image but is created by the ariane boot process.
is empty, doesn't list anything. But because this doesn't cause any problems for the system boot. So this is more a "good-to-know".
this file is also empty in the image but is set during the ariane boot.
the default configuration make syslogd to write to the usual files in /var/log -- which is not a good idea.
- After bootstrapping the directory is empty. Just take notice of it, the ariane boot loader will install its modules there.
Files to remove
There are files that can be removed for the final target system. But since the files are part of installed Debian packages this "breaks" the package installation.
- /var/cache/apt contains a srcpkgcache.bin which tales 6MB disk space.
- Console related: When you done with the keymap you may remove /usr/share/keymap, fonts are below /usr/share/consolefonts. An interesting question is if the package can be removed if all setup is done.
- /usr/share/doc takes 10MB, doc-base?
- vim: /usr/share/vim/vim70 holds lots of files that are not really required, the lang and syntax directories are perhaps good initial candidates.
- /usr/share/zoneinfo is most probably not required.
- /usr/share/locale holds 25MB of disk space.
- /var/cache/apt/archives/*: everytime you install something with apt-get the package is stored here.
Packing the image
When you are done woth customizing your basic image you have to pack it. The ariane boot loader support tar and cpio archives, so a simple
# cd etch-disk # tar czvf ../linux.tgz *