* use debootstrap to get the basic system
If you bootstrap from the CD, you will miss a package
devfsd. You can get the basic bootstrap from the CD
and then add "include --devfsd" option and get it
from the debian servers. Only http is supported (no ftp),
and make sure you have that server in your source.list.
I had to download the list of packages first with apt-get
in order for debootstrap to start using http server.
* make swap partition
* get the right /etc/fstab options
* copy kernel modules from user-mode-linux deb package,
or from your own kernel that you're using to new partition
* make sure you've got /etc/modules with a 'isofs' line
to ensure that isofs loads, otherwise you won't be able
to use hosts cd-rom
* setup networking on the host
* make special files (buffered blocked) in /dev
mknod -m660 ubd0 b 98 0
mknod -m660 ubd1 b 98 1
... so on, as many devices as you might need
* tried to boot with such debootraped filesystem, sucees.
However, packages that dpkg reports (dpkg -l) are installed
are not on the system. Apt-get can not work either, it misses
some libraries: zlib1g and libssl. Installed these from mounted
CD, with dpkg -i path_to_deb_files. When a library is reported
missing, "dpkg -S name_of_library" will find out to which package
it belongs.
* copied /etc/init.d/ssh from host and created startup scripts for it
by doing "update-rc.d ssh defaults".
* created /etc/networking/interfaces, added lo and eht0 (with fixed
IP).
* removed pcmcia startup scripts with "update-rc.d pcmcia remove"
* problem: many binaries/includes/libraries where missing, although
debootstrap seem to have installed them, and they were being
reported as installed by the apt-get i.e. dpkg database.
Trying to remove, and then install it again with apt-get was
failing with some errors. After fiddling with it, i found that
the easiest solution seems to be to edit by hand the dpkg list
of installed packages (in file /var/lib/dpkg/status) and remove
the package that you're trying to install. Sometimes, that can
create conflicts that apt won't be able to resolve. I resolved
them by removing those conflicting packages from the dpkg list,
and then reinstalling them all.
* some access issues:
/tmp has to be owned by nobody/nogroup
/dev/null has to be writtable for anyone
(this probably got messed up if i, by mistake, copied without -a)
to top