# Run FreeBSD from USB stick



## unruly (Dec 12, 2011)

Hi all,

It seems I'm coming back to FreeBSD after about 5 years break (I used FreeBSD from 1998 until about 2006, but due to certain reasons other OS after that). Anyway, I'm thinking about building a home NAS server. There is a great chance that I'll be using FreeBSD for that as I want to use zfs and also want to use this machine as domain controller to do user authentication and store user profiles on this machine. The setup I want to do is pretty simple: some low power Intel motherboard with G620T CPU or something like that, "green" and silent PSU. I already have RAM and disks from other home PCs. It sounds all simple and I would not have a problem if I would not want to run FreeBSD from USB memory stick.

I read half the internet and could see that others were successful with running FreeBSD from a thumb drive, but I was not so lucky. The most I got is when PC boots from USB (MBR or boot loader) and when it reaches the step when it mounts root partition from the USB it pukes with error 19. 

I'm wondering if there is a step by step guide on how to install FreeBSD to USB thumb drive so it'll boot properly.

I would appreciate any help, and once everything is working, I'll publish a guide on how to build a NAS with such configuration since I did not find one.

Thanks in advance!


----------



## Kiiski (Dec 12, 2011)

Hi!

 In this BSD magazine there is article about bootable USB stick with FreeBSD:

http://bsdmag.org/magazine/1627-bsds-and-solaris

Hope you find some help from there


----------



## fbsd1 (Dec 13, 2011)

This should give you all the information you need

http://forums.freebsd.org/showthread.php?t=11715


----------



## andyzammy (Dec 13, 2011)

Kiiski said:
			
		

> Hi!
> 
> In this BSD magazine there is article about bootable USB stick with FreeBSD:
> 
> ...



Is there any reason you need to register to read this? I don't mind doing so if I'm sure I won't get spam.


----------



## vermaden (Dec 13, 2011)

andyzammy said:
			
		

> Is there any reason you need to register to read this? I don't mind doing so if I'm sure I won't get spam.



The only mails I get from them are monthly reminders that a new issue is available for download.

You can always use fake/temporary account when in doubt.


----------



## jem (Dec 13, 2011)

I'm running my FreeBSD NAS from a USB stick, having successfully tried with a dedicated bsdlabel and currently with a GPT label.  My setup just boots, loads the kernel and modules from the stick, then mounts the root filesystem from a whole-disk ZFS pool.

There's no reason why the root filesystem couldn't be on the stick as well though.

You can find some of my info here.


----------



## fluca1978 (Dec 14, 2011)

jem said:
			
		

> I'm running my FreeBSD NAS from a USB stick



I'm doing the same. Moreover, FreeNAS installer has a specific option to allow USB stick installation.


----------



## hpg4815 (Dec 28, 2013)

Am *I* missing something in the BSD article about installing the FreeBSD OS on a memstick, because *I*'m not seeing the details of whats involved. It mentions page 36 has information on making a bootable USB, but when you click or go to that page, it doesn't speak on that.


----------



## trh411 (Dec 28, 2013)

hpg4815 said:
			
		

> Am *I* missing something in the BSD article about installing the FreeBSD OS on a memstick, because *I*'m not seeing the details of whats involved. It mentions page 36 has information on making a bootable USB, but when you click or go to that page, it doesn't speak on that.


Does http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-pre.html help?


----------



## wblock@ (Dec 28, 2013)

The standard install should work on a USB stick.  However, it can take USB devices a few seconds to be recognized, sometimes too later after the kernel looks for a disk to boot.  To give a longer timeout:
/boot/loader.conf:

```
kern.cam.boot_delay=10000
kern.cam.scsi_delay=10000
```


----------

