Boot pfsense from pen drive



  • can we use a pen drive to install and run pfsense from it on a alix or is it that memory stick version only to install on a normal system with a HDD?



  • @xbipin:

    can we use a pen drive to install and run pfsense from it on a alix or is it that memory stick version only to install on a normal system with a HDD?

    This is what seems to work for me to install from USB flash drive image to another USB flash drive on an old notebook.  Maybe it will work for you too.  But then again, maybe not.  Be sure to have back up of all valuable data.

    1. Insert install image USB flash drive in USB slot 0 (the one that is the first boot device)

    2. Insert blank USB flash drive in USB slot 1

    3. Boot system and select option 1 (default) from the pfSense boot menu.

    4. When prompted to select Recover, Continue, or Install.  Select Install (I)

    5. Select all the defaults and Quick/Easy Install
      Be sure there are no other hard drives attached to the system as this will install on the first one found.
      Seems like it is going to install on the image USB flash drive, but it actually installs on the other one.

    6. If prompted to unmount subpartitions, do so.

    7. After installation finishes and system has shut down.  Remove the install image USB flash drive so system will boot the USB flash drive with the newly installed pfSense.

    8. Follow the prompts to configure system.


  • Netgate Administrator

    If you're running from a USB stick you should use the NanoBSD images. The standard install will burn through the limited write cycles of a flash drive in short order (potentially).

    Steve



  • @stephenw10:

    If you're running from a USB stick you should use the NanoBSD images. The standard install will burn through the limited write cycles of a flash drive in short order (potentially).

    Steve

    Don't know about OP'er, but yes I'm am aware of that potential and keep a duplicate ready to plug in and go.
    sync
    dd if=/dev/da0 of=/dev/null bs=1m  # Check for Errors
    dd if=/dev/da0 of=/dev/da1 bs=1m

    Thanks for the reminder, now the OP'er should be aware too.



  • wouldnt it be better to have a nanobsd image for the USB pen drive as well rather than having one to install to the other.

    if we use the nanobsd image, should we simply copy the image to the pen drive and boot from it similar to how we do for nanobsd to CF card


  • Netgate Administrator

    Yes, just copy the image onto the USB stick.
    The only issue is that the NanoBSD image expects to be connected via IDE so it will fail to mount root the first time you boot.
    You just have to point it at the right place and then correct the fstab once booted.

    Steve



  • can u provide some more specific info on what commands etc need to be run to do the above?


  • Netgate Administrator

    Hmm, it's the sort of thing I usually just make up as i go along!
    There is a how to about installing nano to USB here:
    http://doc.pfsense.org/index.php/Soekris_6501_USB_Flash_installation#Root_Mount_error
    In that though the mountroot error has a different cause. It's been a while since I tried this.  :-\

    When you boot the first time if it fails to the mountroot> prompt enter '?' to get a list of root locations. If you get no choices add the boot delay as described. If it gives you daxxxxx enter that.

    Steve


Log in to reply