Installing Debian to the network with NBD
As I've blogged about before, wheezy will be the first release since I've started maintaining NBD for Debian to feature NBD support in the installer. That is, you'll be able to install wheezy to the network, simply by adding "modules=partman-nbd" to the kernel command line:
While I'm happy and, in fact, a bit proud about that fact, there are still a few minor issues that make the whole process a bit less smooth than it could be:
- If you install your system to an NBD device but it's not a diskless system, then we'll still write a bootloader to disk. I think this is a bug; if we're not touching the hard disk for the rest of the installation, we should also not touch it during the final stages of the installation. Unfortunately that's not something that can easily be avoided in the current state of affairs.
- If you install your system to an NBD device and it is a diskless system, the installer will hang for about 30 seconds currently when it's trying to find a hard disk and can't. After that, you have to hit "continue without using a hard disk" to have it work. This isn't a major issue for people with patience, but it's a bit annoying.
- Additionally, when installing to a diskless system, you'll get a spurious error message at the end about the system not being able to install grub to local hard disk. This is the same issue as the first one, really, but it shows in a different way.
- There's a minor bug in partman-nbd where the NBD menu will lag behind reality until the next update. This isn't a major issue (all functionality is still there, the information to the user is just not alwyas up-to-date), and the fix might be somewhat complex, so I won't fix it before wheezy is out the door.
- If you install a desktop system onto an NBD device, then currently network-manager will also be installed, which will try restarting the network at boot time. This will cause the kernel to panic, as the system will suddenly lose all access to its root device when that happens.
- Most importantly, there is currently no way in Debian to configure a network bootloader from the installed system (other than copying and editing files manually). What this means is that while it'll be possible to install a Debian system to an NBD device with wheezy, it won't be possible to reboot into that newly-installed system without performing some manual steps.
In my plan to take over the world of network storage, I plan to work on that last point during the jessy release cycle, at least for x86 architectures; I envision a system which would mount /boot on NFS, and write pxelinux.cfg files, where the name of this config file would be configurable (so it can be configured to only boot the system on which the file was written, or to boot any system on the local network). If done well, it will also fix the point about installing the bootloader to local hard disk when doing a network installation, since we'll have a "install netbootloader" or some such option.