How to image pfsense onto a SSD for fast installation

8
Copy pfsense image to hard drive - PhysGUI select the correct image
Copy pfsense image to hard drive - PhysGUI select the correct image

One question we have received since the how to build a pfsense box piece is how to quickly install a pfsense image onto a SSD. Recently we sent three Dell C6100 XS23-TY3 servers to our colocation facility but had not yet decided upon a few software items. We used the three day transit and racking time to do some basic software installation. One of these tasks included two instances of pfsense on SSD installations which we prepped offsite. When it was time to do the final installation, each pfsense node received its SSD and the units booted right up. As a result we did a quick guide on the installation after we confirmed it worked perfectly.

Copying pfsense onto a SSD

The first step in the copy process is to install the drive in the physical machine. Although we have done this for a few different SSD implementations, we are actually using an iSCSI volume setup on a Synology DS1812+ that was mounted locally. Disk management shows the following drive ready to use in the system.

Copy pfsense image to hard drive - select hard drive
Copy pfsense image to hard drive – select hard drive

The next step is to get physdiskwrite for Windows here. We are using Windows 8 Pro and thus are using the PhysGUI.exe to make the process a bit easier. One major note about this step is that since one will be making major changes to disks, one will want to run the program as administrator.

Copy pfsense image to hard drive - launch PhysGUI and physdiskwrite
Copy pfsense image to hard drive – launch PhysGUI and physdiskwrite

Once the PhysGUI is loaded, one will see a list of drives installed in the system. In this case we are going to use PHYSICALDRIVE5 because we are going to attach that to an iSCSI boot machine soon. For the purpose of today’s guide, we are going to use it just as we would the OCZ Agility 3 or any other SSD (we used Intel SSDs for our colocation.) PhysGUI is not an English utility so it is slightly less intuitive for native English speakers.

Copy pfsense image to hard drive - PhysGUI select the correct drive
Copy pfsense image to hard drive – PhysGUI select the correct drive

After selecting the correct disk, right click and open the pfsense image that you want to flash on the SSD. For this we are using the pfsense 2.0.2 stable release and are using the 4GB NanoBSD VGA version. You can read more about the versions and download here. With a SSD, we are much less sensitive to size than we are on a small USB flash drive.

Copy pfsense image to hard drive - PhysGUI select the correct image
Copy pfsense image to hard drive – PhysGUI select the correct image

Once clicking on open, and since we are using a 4GB installation, we are asked to confirm that we want to pick a capacity over 2GB for the pfsense installation.

Copy pfsense image to hard drive - PhysGUI remove 2GB restriction
Copy pfsense image to hard drive – PhysGUI remove 2GB restriction

At this point one will get a confirmation about destroying the current content on the disk and overwriting it with the disk image. Beware – you can lose data doing this so triple check before proceeding.

Copy pfsense image to hard drive - PhysGUI write warning message
Copy pfsense image to hard drive – PhysGUI write warning message

Once this is done, it will generally take a few seconds to write everything out. Going back into disk management one will see the image is written to the SSD.

Copy pfsense image to hard drive - hard drive post operation
Copy pfsense image to hard drive – hard drive post operation

One tip here is that you can use this to do extreme overprovisioning. A 60GB drive that is brought down to 8-16GB will see considerably higher write endurance as compared to a fully provisioned drive. This can be important if one is trying to write logs to the drive.

8 COMMENTS

  1. Thank you for this. We were looking for a guide on how to install pfsense in a similar way. This means we can just mass format and image pfsense drives then add them to machines on the shipping floor when they arrive.

  2. I’m guessing that physdiskwrite + PhysGUI does not align the partitions that it creates on the SSD. Is there a different method that does?

  3. I must admit, the reviews are getting better all the time, some a little short but otherwise, good read in the morning. I have played with PFSense and numerous times and love its expandability and flexibility but I do have this to ask, what is the advantage of running it on a SSD? I have plenty running on 50+Mbit symmetrical services but never had any issues with the main drive being an old HDD usually in a pair (I let PF mirror them on install).

  4. If you use embedded installation – you usually don’t care abt alignment since you don’t write connection table.

    You can also use SSD to lower power consumption for pfsense. SSD NAND > flash drive NAND is another good reason.

  5. I was curious, would this installation would be limited to the nano versions or could the full installer version be used?

  6. it isn’t recommend that you use the full version with ssd’s because of the frequent read/writes.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.