Push configuration on first boot?


  • LAYER 8 Moderator

    Hi guys'n'gals,

    just a quick question with hopes for a quick answer: As I am vaguely remembering, there is the possibility to run a system from CD and write the config to a USB stick. If it reboots, the config is read from USB and then system goes up.

    As I am having quite a few headless embedded boxes running your nanoBSD images I was asking, if this is a possibility with those nanobsd installs as well?

    What I'm trying to do is:

    1. save configuration from current system or prepare a simple one for a customer's base install
    2. copy that to an USB stick
    3. write a nanobsd image to CF card or flash
    4. put the USB stick into the device and boot the fresh install

    -> 5) config gets copied from USB to flash and afterwards read as default configuration

    Is this possible somehow or already implemented (and I just forgot about it ;))?

    Thanks,
    Jens


  • Netgate Administrator


  • LAYER 8 Moderator

    Yes I do, but not as part of the installation:

    When you install to the HDD, it will copy this configuration

    As described above, I ship out or create and test CF cards and don't actually do classic "installs" to HDD. Thus the question if that process also works with first-time CF deployments?


  • Rebel Alliance Developer Netgate

    I believe the external config loader will read the config from the USB drive but I believe it wants to keep it on the USB drive. It won't automatically copy it for you.

    But you can always manually copy it over /cf/conf/config.xml


  • LAYER 8 Moderator

    Hi Jimp,

    thanks for the answer. So if I'm getting this right, it should work at boot time that it loads the config but don't copy it over automatically? That wouldn't be a problem, as you said, I can always manually copy it over after the system is up. I just have to test this, then it would be a nice workaround to running each CF into a device first, do console setup via serial etc. etc. to bring up its LAN and then restore via web interface.

    Thanks!


  • Rebel Alliance Developer Netgate

    Much easier yet to use a FreeBSD box/vm to image the cards, then mount and copy the config before ever putting it in the target device :-)


Log in to reply