NBD support in debian-installer

... is now working.

It isn't finished yet; there are still some loose ends. But at least it works; if you combine this kernel with this debian-installer image, you'll be able to install to an NBD target.

Known bugs:

  • if you install your root device on an NBD device, the installer will attempt to install a boot loader to the local hard disk. Make sure to bring it into expert mode before the tasksel part to avoid overwriting your MBR -- or do what I did, and install to a (virtual) diskless computer.
  • Also, due to an issue with the initscripts package, halt will make the kernel panic rather than power down the system—but at that point it's safe to switch off the power, anyway.
  • The installer currently fails to add a nbdroot= parameter to the kernel command line when installing root to NBD. When you're rebooting into the installed system, you should add something like nbdroot=<server>,<port> to your kernel command line, otherwise the installed system will not find the root device.

Other than that, it should work fine; testing is welcome (but note standard development code caveats apply).