IMHO using network console (d-i over ssh) is most useful when used in conjuction with preseeding the network configuration and the network console password - if you can configure this using local input+output, then why use network console at all ? (Answer: for cold and noisy server rooms for example...)
Using network-console and preseeding
How to create a CD or USB image that enables network-console
After creating a basic CD or USB image, you must edit syslinux.cfg and create a preseeding file to automatically enable network-console.
- Create a new label and give it a name (e.g., netinst). Use the following boot options:
auto=true vga=normal file=/hd-media|cdrom/preseed.cfg initrd=initrd.gz
- If you'd like to do a keyboardless install, change the DEFAULT line to use your new label rather than 'install', and change TIMEOUT to a non-zero number so it is automatically chosen.
- For lenny, change the timeout in syslinux.cfg and prompt.cfg. Do not change the default in syslinux.cfg. Add your new label to text.cfg and change the default there. Include "menu default" and "menu label Netinst" lines in your new label, and remove the "menu default" line from the Install label.
Create a preseed file (see below) named preseed.cfg and place it in the root of your CD or USB media.
Howto build an netboot-initrd
As explained above, you need d-i from sid (rc2 won't work), so you need a sid build environment... so chroot (see Build A Chroot) into it and:
- add '#include "network-console"' in installer/build/pkg-lists/netboot/$arch.cfg
add EXTRAFILES=/tmp/preseed.cfg in installer/build/config/local and put preseed.cfg to tmp (yes, this is outside of the debian-installer source directory)
- run dpkg-checkbuilddeps in debian-installer/installer, install needed packages
- cd to debian-installer/installer/build ; less README
"fakeroot make build_powerpc_netboot" was the command I issued to build netboot images for powerpc - use "make || grep build || grep -v rebuild" to get a list of available targets
- if the build has been successfull you'll find the results in debian-installer/installer/build/dest/
Be sure to enable network autoconfiguration in your preseed.cfg! Also include the following lines to set a passwd for the network console (login with installer@host):
Using the network console in the Amazon Elastic Computer Cloud
Prepare an Elastic Block Store Device that contains the network/xen i386 or amd64 kernel and initrd the DebianInstaller.
Add a GRUB menu.lst configuration file in boot/grub/, and pass the following options to the installer: console=hvc0 auto=true priority=critical url=http://169.254.169.254/latest/user-data.
- Snapshot the block device and register the snapshot as machine image.
When starting an instance, pass the preseed file (see below) to the instance through the -f, --user-data-file option of euca-run-instances or ec2-run-instances.
Since Wheezy (7.6.0) D-I supports logging in the console by SSH key instead of password (592550, LP:184108).
For troubleshooting, pass DEBIAN_FRONTEND=text for a simpler console output.
Preseed file to activate the network console
- Add lines to the file to configure your locale and network as described in section B.4 of the Debian Installation Guide.
Use the following settings to prepare the network-console component for remote installation over SSH, with r00tme as a password (changing it is recommended).
d-i anna/choose_modules string network-console d-i preseed/early_command string anna-install network-console d-i network-console/password-disabled boolean true d-i network-console/authorized_keys_url string http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key # OR d-i network-console/password password r00tme d-i network-console/password-again password r00tme
- (obsolete ?) If you want to use sid-udebs (you should as you build a sid-d-i) and install squeeze use the following:
d-i mirror/suite string squeeze d-i mirror/udeb/suite string sid