Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Moving pfSense install from HDD to USB key

    Problems Installing or Upgrading pfSense Software
    2
    4
    7.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      GullMoli
      last edited by

      Greetings!

      I was wonder if there is any super simple way to transfer the install to an USB key?
      I tried installing Smoothwall on to an USB key a couple of times but with no luck at all, and now I'd like to know if it's possible with pfSense, before I go ruining everything :l

      Cheers.

      Ps, you could say I'm "computer retarded" when it comes to networking so be nice.

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        You can use the NanoBSD images on a USB stick.
        You will have to negotiate a boot error the first time though as it expects to be connected via IDE.

        Write one of the Nano images to the stick as described here:
        http://doc.pfsense.org/index.php/Installing_pfSense#Embedded
        As an example you can use this image for a 1GB or larger USB stick:
        http://files.chi.pfsense.org/mirror/downloads/pfSense-2.0.1-RELEASE-1g-i386-nanobsd.img.gz

        Steve

        1 Reply Last reply Reply Quote 0
        • G
          GullMoli
          last edited by

          @stephenw10:

          You can use the NanoBSD images on a USB stick.
          You will have to negotiate a boot error the first time though as it expects to be connected via IDE.

          Write one of the Nano images to the stick as described here:
          http://doc.pfsense.org/index.php/Installing_pfSense#Embedded
          As an example you can use this image for a 1GB or larger USB stick:
          http://files.chi.pfsense.org/mirror/downloads/pfSense-2.0.1-RELEASE-1g-i386-nanobsd.img.gz

          Steve

          Alright, thanks for that. I'll give it a try tomorrow!

          Quick question though, whats the difference between the 1G, 2G and the 4G files? (http://files.chi.pfsense.org/mirror/downloads/)

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            The different files expand to different image sizes for various sized flash media, 1 Gigabyte, 2Gigabytes etc.
            There is very little advantage to using a larger image even if you have a large flash drive. Manufacturers often label a flash drive '2GB' when it's actually something slightly smaller leading to the image failing to write.
            Using a 1GB image on it ensures it will fit.
            It also writes a lot faster, an issue for me since my CF card reader is only USB 1!  ::).

            I was trying to find a post showing what will likely happen when you boot the usb drive but failed.
            Assuming that your system is able to boot from the USB drive without issue it will very liekly fail to a command prompt complaining it can't mount root. This is because, as I said, it expects to mount root from an IDE connected device. It should then give you a list of possible locations and you can type one in.
            Like this:

            
            Trying to mount root from ufs:/dev/ufs/pfsense0
            ROOT MOUNT ERROR:
            If you have invalid mount options, reboot, and first try the following from
            the loader prompt:
            
                 set vfs.root.mountfrom.options=rw
            
            and then remove invalid mount options from /etc/fstab.
            
            Loader variables:
            vfs.root.mountfrom=ufs:/dev/ufs/pfsense0
            vfs.root.mountfrom.options=ro,sync,noatime
            
            Manual root filesystem specification:
              <fstype>:<device>Mount <device>using filesystem <fstype>eg. ufs:/dev/ad0
                                   eg. cd9660:/dev/acd0
                                   This is equivalent to: mount -t cd9660 /dev/ad0 /
            
              ?                  List valid disk boot devices
              <empty line="">Abort manual input
            
            mountroot></empty></fstype></device></device></fstype> 
            

            At that prompt you probably want to type: ufs:/dev/da0s1a
            However I'm not 100% on that!  ::)

            Once it has booted correctly you will have to edit the fstab so that it knows where to mount root from in the future.

            Steve

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.