On Wed, Jul 25, 2007 at 03:37:49AM -0400, Joey Hess wrote: > I thought some today about how to make d-i support installing nfsroot > systems, as I set one up manually. > > While there are plenty of other tools (LTSP, lessdisks, etc) I think > there's still a use case here for d-i. Sometimes you want to customise > an NFS root setup for one system, or don't want to learn a lot of new > stuff, and the easiest way would be to boot d-i on that system and > install over NFS.
Interesting idea. I think the NBD support in d-i that I'm somewhat working on could be related to this (to use it for swap, or whatever). > There seem to be two peices: > > First, partman would need to support NFS mounts. This is probably not very > hard, and seems straightforward enough. > > Secondly, we'd need some kind of nfsroot bootloader installer. > This is the tricky part, but it's getting better. > > Two things would need to be done in base-installer: > It's easy to create an initramfs for NFS booting, just edit > initramfs.conf and set MODULES=netboot, BOOT=nfs. I found it was also > useful to edit /etc/kernel-img.conf and set link_in_boot = yes. This way > the /boot directory can be used as the tftp boot directory, with vmlinuz > and initrd.img pointing to the most recent kernel. (IMHO link_in_boot = yes > would be a nice default in general..) > > Other things the nfsroot bootloader installer would need to do include > setting up a file in /boot/pxelinux.cfg/, either "default" or > a file tuned to the NFS client's MAC address (better), and maybe > installing syslinux so that pxelinux.0 is available. If you're going to create a default link (which is valid for every client that uses the same /boot), then I don't think it's a good idea to set up a file tuned to the client's MAC address; you may want to use the same installation for many clients. OTOH, you may just want to set up this one installation for that NFS root. Perhaps this could be a question for the user. > Finally, it would need to probably display a big nasty message to the > user, since there are some things they'll have to set up on their > server: > > - tftp server setup > - next-server setup in the dhcp server Note that 'next-server' is only necessary if the DHCP and TFTP servers aren't the same (otherwise you can get away with just 'filename'). Not sure whether this is interesting enough to consider, though. > - /etc/exports > - copy or bind mount (symlink won't usually work) the newly installed > system's /boot into /var/lib/tftpboot/. Note that the location it's > put in needs to match what d-i writes to the pxelinux.cfg file. Or change the TFTP server's configuration to point to newly installed system's /boot instead of /var/lib/tftpboot. > - Copy /var/lib/tftpboot/pxelinux.0 into place. > - symlink or otherwise setup /var/lib/tftpboot/pxelinux.cfg/ > > It seems like it would suck to put all this detail on a debconf screen, > especially since you can't even test it properly w/o rebooting. (Unless > we wanted to put a tftp client in d-i. ;-) Best thing would probably be > to give a simple url to a web page somewhere that explains the > server-side setup in detail. You could provide a script in the NFS root to be ran on the server that would set up everything, assuming a Debian NFS server is used. This would need to come with a warning that it would modify config files, and ask whether it may proceed. -- <Lo-lan-do> Home is where you have to wash the dishes. -- #debian-devel, Freenode, 2004-09-22 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

