pfSense Gold Subscription

Author Topic: Moving pfSense install from HDD to USB key  (Read 4847 times)

0 Members and 1 Guest are viewing this topic.

Offline GullMoli

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Moving pfSense install from HDD to USB key
« on: March 13, 2012, 05:12:37 pm »
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.

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8158
  • Karma: +5/-0
    • View Profile
Re: Moving pfSense install from HDD to USB key
« Reply #1 on: March 13, 2012, 05:50:50 pm »
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

Offline GullMoli

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Moving pfSense install from HDD to USB key
« Reply #2 on: March 13, 2012, 08:08:22 pm »
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/)

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8158
  • Karma: +5/-0
    • View Profile
Re: Moving pfSense install from HDD to USB key
« Reply #3 on: March 14, 2012, 07:14:24 am »
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:
Code: [Select]
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>

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