Alexander Leidinger

Just another weblog

Oct
20

Jumstart/JET for FreeBSD (brainstorming)

There are some HOW­TOs out there in the net which describe some auto­matic net­work based install via PXE-booting a machine from a server which has a spe­cific FreeBSD release in the PXE-booting area and a non-interactive con­fig for sysin­stall to install this FreeBSD ver­sion on the machine which PXE-boots this.

The setup of this is com­pletely man­ual and only allows to net­boot one FreeBSD ver­sion. The server-side setup for the clients is also com­pletely man­ual (and only allows to install one client at a time, it seems). This is not very user-friendly, and far away from the power of Jumpstart/JET for Solaris where you cre­ate a tem­plate (maybe from another tem­plate with auto­matic value (IP, name, MAC) replace­ment) and can spec­ify dif­fer­ent OS releases for dif­fer­ent clients and then just run a com­mand to gen­er­ate a good con­fig for this.

I thought a lit­tle bit how it could be done and decided to write down all the stuff (so far 160 lines, 830 words) to not for­get some details. All in all I think this could be done (at least a sen­si­ble sub­set) in a week or two (full­time) if you have the hard­ware, moti­va­tion, and time. As always, the prob­lems are within the details, so I may be off with my esti­ma­tion a lit­tle bit (also depends upon the knowledge-level (shell, tftp, dhcpd, install–soft­ware) of the per­son doing this).

Unfor­tu­nately I do not know if I have the hard­ware at home to do some­thing like this. I have some unused hard­disks which could be used in a machine which is used tem­po­rary as a test-install-client (nor­mally I use this machines as my Desk­top… if I do not use my lit­tle Net­book instead, as I do not do much at home cur­rently), but I’ve never checked if this machine is PXE-booting-capable (VIA KT133 chipset with a 3Com 3c905CTX Fast Ether­link XL). I also do not have the time to do this (with the cur­rent rate of free time I would expect to need about a year), except maybe some­one would call my boss and nego­ti­ate something.

I can not remem­ber any request to have some­thing like this on the freebsd-current, freebsd-arch or freebsd-hackers list since I read them (and that is since about at least 3.0-RELEASE). Is this because nearly nobody is inter­ested in some­thing like this, or are the cur­rent pos­si­bil­i­ties enough for your needs? Do you work at a place where this would be wel­come (= directly used when it would be done)? If you use a sim­ple solu­tion to make a net-install, what is your expe­ri­ence with this (pros/cons)?

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…
Jumstart/JET for FreeBSD (brain­storm­ing), 8.0 out of 10 based on 1 rating
Tags: , , , , , , , , ,

6 Responses to “Jumstart/JET for FreeBSD (brainstorming)”

  1. tykling Says:

    I haven’t used net­boot­ing, but the main rea­son for that seems to be the very same rea­son that made you look into this.
    Every time I’ve looked up how to do it I’ve aban­doned the idea because it seems trou­ble­some and inflex­i­ble. Indeed, if some­thing like this would be included in FreeBSD I would likely use it at my place of employ­ment.
    I guess what I’m try­ing to say is that just because noone requested it doesn’t mean noone would use it. Per­haps noone really knew net­boot­ing could be made a lot more flex­i­ble with a weeks work. I cer­taintly didn’t :)

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  2. BSDr Says:

    Can’t you select dif­fer­ent OS ver­sions to boot via PXE in your dhcpd configuration?

    Sort of related: there were some use­ful changes made to tftpd in drag­on­fly (to allow for larger boot images etc) that applied cleanly to FreeBSD tftpd.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  3. netchild Says:

    It is not that you can not do it some­how by hand (I think this is just a mat­ter of con­fig files, and the 1 – 2 weeks of work I describe is not about extend­ing tftpd or dhcpd), it is about sim­pli­fi­ca­tion so that you can let even a juinior-admin add new ver­sions / machines. So instead of a day or two (for some­one who really knows what he does) to setup some­thing like this, it will only need maybe half an hour. And instead of an hour or two to add another OSVERSION, it could be just 5 – 10 min­utes to add a new one. And instead of one machine-install at a time (with con­fig changes in-between), you could install as many machines in par­al­lel as your network/server band­with allows it.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  4. Erik Cederstrand Says:

    I hacked up some­thing like this a cou­ple of years back. The result was a sys­tem where I could install any FreeBSD ver­sion on any netboot-capable machine in a cou­ple of minutes.

    dhcpd first: it seems a bit like a hack to build extra fields onto the DHCP mes­sage, but DHCP is really the only sen­si­ble way to dis­trib­ute “boot from here” infor­ma­tion. Typ­ing the cor­rect incan­ta­tions in the dhcpd con­fig file is a sep­a­rate tuto­r­ial worthy.

    Since the pos­si­bil­i­ties of the FreeBSD non-interactive installscript really sucked and were entirely inad­e­quate for my needs, I ended up cre­at­ing a full dis­tri­b­u­tion (make dis­tri­b­u­tion) before­hand, open­ing as a chroot and installing any ports, and mak­ing all rel­e­vant changes to con­fig­u­ra­tion files, and then archiv­ing the dis­tri­b­u­tion files on my file server. The archive would then con­tain a tar­ball for every FreeBSD ver­sion + con­fig­u­ra­tion com­bi­na­tion I needed.

    I then pointed the pxe­loader at a stripped-down ramdisk FreeBSD instal­la­tion with the sole task of run­ning a cus­tom rc.local script which would for­mat the hard­disk, fetch the dis­tri­b­u­tion tar­ball from the file server via NFS and write the tar­ball to the disk. For my light­weight dis­tri­b­u­tion this took ca. 2 min­utes, MUCH faster than run­ning through a tra­di­tional non-interactive install process. The rc.local script con­tained the logic to select the the cor­rect dis­tri­b­u­tion (ver­sion + con­fig) on the file server, although I had to change the script when I wanted another ver­sion (unless I always wanted HEAD). The con­fig was cho­sen auto­mat­i­cally based on the MAC address of the machine.

    I ended up set­ting up a TFTP server only for the ramdisk instal­la­tion. It would be really nice if the pxe­loader sup­ported fetch­ing via HTTP too, in addi­tion to NFS and TFTP.

    As these were throw-away instal­la­tions intended to run tests, I needed to also be able to nuke the instal­la­tion and install a new ver­sion auto­mat­i­cally. I did this by set­ting the hard­disk as pri­mary boot option in the BIOS and net­boot as sec­ond option. When I needed to rein­stall the machine, I just nuked the MBR and let the machine reboot.

    If you find the time for your project, con­sider hack­ing up an easy way of cre­at­ing cus­tom, fully-functional dis­tri­b­u­tions fast on a build machine. Some­thing like NanoBSD. The instal­la­tion process would then only involve cre­at­ing a ramdisk-based FreeBSD dis­tri­b­u­tion and writ­ing a sim­ple rc.local instal­la­tion script that pre­pares the sys­tem disk, selects a dis­tri­b­u­tion based on some logic and pipes the files to the disk.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  5. netchild Says:

    PXE HTTP sup­port: this was a Google Sum­mer of Code project in 2007.

    Regard­ing your sug­ges­tion: My idea is a lit­tle bit more com­plex than wat you have in mind. It would only work for suit­able releases — ones which come with pc-sysinstall (and maybe the netinstall rc scripts… which have to be writ­ten first off-course) — but then you have some­thing like the Solaris JET out-of-the-box (except for the dhcpd) in FreeBSD. I try to get some time next week to write a blog post of what I have in mind.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  6. darkfader Says:

    You will find the peo­ple look­ing for proper netinstall mech­a­nisms — i.e. on freebsd-isp this is a topic to come up more reg­u­larly.
    Some friends and I used scripted sysinst back in 2001 and I’m sur­prised how rarely it is being used, and even more that it wasn’t replaced by now.
    Nonethe­less it worked like a charm, PXE boot, disk setup, freebsd install.

    I think most peo­ple are just not aware of the option and by today it’s of course out­dated. No ZFS root with that. ;)

    But I think bsdin­staller has some net­work­ing, at least some guy from the project asked for my old notes…
    Any­way, I don’t wanna go into tech­ni­cal options here, just say­ing there are always peo­ple inter­ested in PXE and some jumpstart-ish capabilities.

    GD Star Rating
    loading...
    GD Star Rating
    loading...

Leave a Reply