See also Multistrap
Sometimes, packages need a little help to configure in a multistrap environment. ssl-cert requires a random device which can be prepared using mknod. From outside the chroot (top level directory), use:
mount -t proc /proc ./proc mknod ./dev/random c 1 8 chmod 640 ./dev/random chown 0:0 ./dev/random mknod ./dev/urandom c 1 9 chmod 640 ./dev/urandom chown 0:0 ./dev/urandom mknod ./dev/null c 1 3 chmod 666 ./dev/null
Alternative:
mount -t proc /proc ./proc mount -t sysfs /sys ./sys mount udev -t devtmpfs /dev
Other files may also need to be copied in or created inside the chroot:
/etc/hosts /etc/hostname /etc/fstab
For other info on this, use the device-table.pl script with the --dry-run option. Example device_table.txt file packaged with multistrap. See also DeviceTableScripting
Then use the chroot setupscript in your multistrap configuration file:
setupscript=/usr/share/multistrap/chroot.sh
This results in:
sysvinit: All runlevel operations denied by policy invoke-rc.d: policy-rc.d denied execution of restart.