# I can install FreeBSD system on USB memory or SD card?



## teo (Oct 19, 2016)

Hello!

Not to be confused encumber iso image on USB memory, there are  USB memory  and  SD cards with 200 or 500 GB of disk.


----------



## SirDice (Oct 19, 2016)

Yes, you can install FreeBSD to a USB disk or SD card. From the system's point of view, it's just a type of disk. But not all hardware is capable of booting from USB or SD though. Especially older hardware. 

Make sure you use labels instead of direct references to the device. USB devices tend to "move" around (da0 will move to da1 for example) if you have more than one plugged in.

http://www.wonkity.com/~wblock/docs/html/labels.html


----------



## Rosendoktor (Oct 19, 2016)

I have very bad experience with FreeBSD (10.3 and 11.0) installations on USB devices.

It works in principle, but performance and stability are really bad. This affects USB HDD/SSD drives as well as USB memory sticks. FreeBSD installed on USB HDD was never stable, very long lags (10-30 seconds), freezes and crashes. FreeBSD on USB memory stick runs stable, but very (VERY!) slow, and also suffers from very long lags all the time.

Linux and Windows on the same hardware run stable and 5-10 times faster than FreeBSD.

EDIT: If you want to try it (maybe you're lucky with your USB hardware and get better results than I did), make sure to use labels to access your USB drive and partitions, rather than /dev/da0, since these can change depending on other USB hardware attached.


----------



## teo (Oct 19, 2016)

It would be a good installation of the system FreeBSD on a USB memory device or SD card.


----------



## SirDice (Oct 19, 2016)

Rosendoktor said:


> FreeBSD on USB memory stick runs stable, but very (VERY!) slow, and also suffers from very long lags all the time.


Haven't tried this myself but using USB 3.0 ports and devices should improve things immensely. Another option is to use something the 'old' floppy based installs did, boot from the device, load everything into memory disks and run from there. But this does require a fair amount of available RAM.


----------



## von_Gaden (Oct 19, 2016)

I am using several systems installed on USB and I can't confirm it's slow or unstable. Once booted the system runs as it would if booted from a harddrive. No swap of course, and better mount filesystems as read only. This might help:
https://forums.freebsd.org/threads/11715/
http://www.a1poweruser.com/30.00-USB_installing_article.php
(the last link seems temporarily offline)


----------



## teo (Oct 20, 2016)

von_Gaden said:
			
		

> (the last link seems temporarily offline)


Your general evaluation about this way of a system installed in USB memory or SD card.


----------



## Qoo (Oct 20, 2016)

I run FreeBSD off a USB stick exclusively for my NAS without any performance or stability issues at all and no requirement for labels.


----------



## Rosendoktor (Oct 20, 2016)

Qoo said:


> I run FreeBSD off a USB stick exclusively for my NAS without any performance or stability issues at all and no requirement for labels.



Of course you do not need labels if you plug it into the same machine / same configuration all the time... 

Googling around, I found lots of threads from people complaining about very poor USB performance in FreeBSD. But there was never a solution.

It seems that either you're lucky, or you're not. I am not. Just as an example, I run Linux and FreeBSD on the same stick (multiboot). Installing the MATE Desktop on a basic Linux system took 45 Minutes, doing the same on a basic FreeBSD system took 14 hours (!).

That's my (and many others) experience.

Maybe it depends on the specific machine's chip, maybe on the USB hardware itself, maybe it's a problem with USB 2.0 only (that's all I have). Nobody seems to know. I would appreciate any solution.


----------



## Phishfry (Oct 21, 2016)

I just used my USB stick with FreeBSD installed to easily show details of a Pico ITX machine for a user here. I find it very convenient.
I did not have any drives installed on the machine and was able to easily pull up everything I need via my USB installation.

Adding network adapters to rc.conf is all that is really needed for multi-machine use. It makes life easier.
I do see slower speeds than a SSD install.
That makes sense as I am using USB2.0 at 25mb/s compared to a SSD at 10x the speed.
Creating the USB Installation took a while.
I add comconsole settings so it works for headless machines too. Been a real time saver for me.
I run Xfce4 off of it and it runs fine for me. Installing my standard packages took quite a while.
Makes for great browser setup without disturbing host machine install.

I do custom format the disk during setup eliminating swap drive.

Wonder if works on a UEFI only board.. I hate them but they are the future it seems.


----------



## Phishfry (Oct 21, 2016)

I defiantly agree about disk labeling problem. It is easily overcome by using a CD/DVD Install disk to build.
Using the Memstick installer version to install to another USB stick can be problematic.


----------



## ANOKNUSA (Oct 21, 2016)

SirDice said:


> Another option is to use something the 'old' floppy based installs did, boot from the device, load everything into memory disks and run from there. But this does require a fair amount of available RAM.



This is also what nanobsd(8) does, isn't it?


----------



## Qoo (Oct 21, 2016)

Rosendoktor said:


> Of course you do not need labels if you plug it into the same machine / same configuration all the time...
> 
> Googling around, I found lots of threads from people complaining about very poor USB performance in FreeBSD. But there was never a solution.
> 
> ...



J1800 Celeron NAS running FreeBSD NAS on a 32 GB Samsung Fit
Core i3-2100t running FreeBSD Router on a 32 GB Cruzer
Core i3-6100 running FreeBSD Desktop 32 GB Samsung Bar

None of which have ever had performance issues. Seems either you know what you're doing or you don't.

Cool, that's your experience...and "many others". Searching for USB performance issues for Linux and Windows into Google also turns up many users also experience "very (VERY!) slow" performance.  Guess what? You can find anything on the internet. Try Googling "the earth is flat."  To imply that somehow your experience is definitive and the end-all answer is simply absurd and the burden of proof is on you to demonstrate that everyone that's tried running from USB only get slow performance. Good luck with that because last I checked, there weren't to many users who've complained in threads about problems of their drives running at full speed.


----------

