Nanobsd boot slice selection via switch plugged on gpio port (for Alix) ?

  • I use my alixes on the road, i like to have different kinds of setups on each slice (wifi to ethernet bridge / regular wan + wifi hotspot / etc)
    And i was struck by how beautifull it would be to just select what slice to boot, before applying power to the unit, by triggering a switch mounted on the case ..

    I guess this would involve making a simple schematic to hook a switch to the gpio port on Alix (or any GPIO enabled) motherboards.
    Could be 2 way switch or rotary switch (if more than 2 nanobsd images on the storage device)

    Only problem i have no clues what / how the active slice is setup for the next reboot.
    Nor if it is "easilly" possible to add some code (understand in my case php, or shell) somewhere

    Any advices are welcomed

  • Another approach, still using GPIO, and possibly easier to do, would be to still hook a push button to the gpio, but, this time, while the board is lit..
    If the button is pressed, trigger the slice selection routine, than reboot the box
    But i really feel it'll be better if done before the board is turned on ..

Log in to reply