Install pfsense to an usb drive
-
i rebooted it remotely via the web interface, didn't touch the pc at all and after reboot it hates me
i'm re-writing the usb stick right now and i'll try again and try to look through logs before i reboot it.i don't know how to get to a shell during the install to see the logs after the reboot, any idea?
-
as stephenw10 said, my problem was certainly due to pfsense detecting that my config had changed because after reboot freebsd showed no indication of the onboard nic at all in the logs.
i put in an additional pci nic from my box of banished hardware and by using just the 2 pci nics and not the onboard, everything is cool now.i still don't know why freebsd/pfsense can't handle the onboard nic vr0 after initial config + reboot (works 100% of the time on "fresh" image before configuring), but i have lost all sympathy for the onboard nic and i'm going to bed
thanks
-
Er…. Uh-oh??! :o
What I am reading here is that my install of the "LiveCD version" (AMD Architecture) direct to my 32GB USB key drive... rather than the "NanoBSD" version... may not be fully supported. It's just that I am up and running just fine, with no issues. I very much regard my USB drive as a "regular" drive.
S'funny. I guess I am used to running VMWare's ESXi product ("Apples and Oranges", I know) off of a USB key drive, I thought I could pull the same stunt with pfSense.
So, is the concern about my method similar to what is expressed to those installing to CF? ... a finite amount of read/writes... maybe I/Ops? Overall performance?
In the link given, I read that the NanoBSD version is "suitable for use on a Compact Flash card (or other mass storage medium)" ... "other mass storage medium" could possibly include USB keys, but until now, I thought they were quite distinct from CF-type drives...
Maybe not so much?
-
Yes the finite write/erase cycles on flash media is the worry here. Many people are running a full install from flash with no issues though. The amount of writing to the card/stick is largely dependant on what your running.
New in 2.1 is the ability to setup /tmp and /var as ram disks the same way it's done in Nano. That will reduce writes to the flash substantially.
If you do run a full install from flash just be aware of the writes issue and keep a spare stick handy. Can you get SMART info from it?Steve
-
Yes the finite write/erase cycles on flash media is the worry here. Many people are running a full install from flash with no issues though. The amount of writing to the card/stick is largely dependant on what your running.
New in 2.1 is the ability to setup /tmp and /var as ram disks the same way it's done in Nano. That will reduce writes to the flash substantially.
If you do run a full install from flash just be aware of the writes issue and keep a spare stick handy. Can you get SMART info from it?Steve
Yup - the SMART widget in my dashboard seems to see my USB key drive fine (the status is "Passed"). But, now I am worried. Gonna switch to HDD ASAP.
Thanks for the insight!
-
I apologize for digging up an old post, but…
I thought that most or all recent USB sticks had controller level wear leveling like newer SSD disks?
I am wondering if the limited write issue is moot now because of this?
(Especially if I buy a large, say 32GB USB stick, to give lots of room for wear leveling)
Could this restriction be removed from the installer eventually to allow easy installation to a USB stick?
-
It's my understanding that most flash drives do have ware leveling of some type but that it's not of the same standard as that found in an SSD. Unlike an SSD they are not designed to be run as a boot drive.
As I said before there are people running a full install from flash and many have been doing so for years.
If you choose to do that make sure you have enough RAM to prevent any swap usage, that will massively increase writes, move /tmp and /var to ram drives. The Nano images mount the slices with the -noatime switch which also reduces the writes considerably. Consider editing the fstab to do that.One thing I must point out here is that earlier in this thread I believe I gave some bad advice. In fact the Nano images do not use the fstab instead using the scripts to mount the slices. I'm not sure how the above posters got past that. :-\ It could explain why the initial setup started again for Drunkbumper.
https://forum.pfsense.org/index.php?topic=66268.msg361539#msg361539Steve
-
Cool thanks. Sounds easier/better to use an SSD overall…
... I have since read more about USB Flash wear levelling... Though it is there, it's usually dynamic wear levelling, not static (as usually used on SSDs), read more here:
-
Been running full install on 4GB USB flash drives for about 18 months now. On the second $5 stick now. The first one die in about 6 months. But I was doing a lot of 2.1 beta upgrades and also running without the tmp and var ram disk during that time. Also the first stick was plugged directly into the notebook so would pick up quite a bit of heat. This second stick is connected with a USB extension cable so it stays much cooler and also not been doing may upgrades and running with the tmp and var ram disk enabled.
Not running any packages.
Performance of USB flash drive can vary significantly between models. USB 3.0 and/or ReadyBoost compatible will probably be the best chance for good performance. Even if USB port is only 2.0, performance may be better with a 3.0 device.
Where I notice performance differences with USB flash drive is 1) during install process, 2) upgrade process, 3) web GUI responsiveness.
-
Been running full install on 4GB USB flash drives for about 18 months now. On the second $5 stick now. The first one die in about 6 months. But I was doing a lot of 2.1 beta upgrades and also running without the tmp and var ram disk during that time. Also the first stick was plugged directly into the notebook so would pick up quite a bit of heat. This second stick is connected with a USB extension cable so it stays much cooler and also not been doing may upgrades and running with the tmp and var ram disk enabled.
Not running any packages.
Performance of USB flash drive can vary significantly between models. USB 3.0 and/or ReadyBoost compatible will probably be the best chance for good performance. Even if USB port is only 2.0, performance may be better with a 3.0 device.
Where I notice performance differences with USB flash drive is 1) during install process, 2) upgrade process, 3) web GUI responsiveness.
Is there a simple way of doing this? I'm going to make a USB installable key for pfsense shortly on a test machine, do I simply plug it in, plug in my destination USB key, boot off the installer and then install to the destination key?
I'm content with it frying the USB key, this is purely for testing.
As a long term solution, I'll consider other means (although some kind of mirrord USB key, like FreeNAS offers would be quite nice)Note: I don't want the basic nano install.
Cheers
-
do I simply plug it in, plug in my destination USB key, boot off the installer and then install to the destination key?
Yes.
You could gmirror across two USB drives. Or even ZFS across them in 2.4Beta if you wanted.
Running from USB is not recommended though. Fine for a test as you said though.
Nano is not particularly limited in 2.3.X. It will probably do all you need to test out pfSense.
Steve