# FreeBSD installation from USB



## nhanquy (Mar 4, 2010)

I used *unetbootin* on Windows to create a bootable 2G-USB with the *8.0-RELEASE-i386-dvd1.iso*.
I can boot from it. But when it goes to "*Choose Installation Media*"; what should I choose?

Based on *this* it is supposed to be *option 7 (from an existing filesystem)* and then _*/mnt*_. Is this correct?
Or maybe something else?

It did not work for me. Maybe I messed up something?


----------



## Zare (Mar 4, 2010)

Initiate the emergency holographic console (VTY4, hit Alt+F4) and mount your USB thingie somewhere on the filesystem first.


----------



## nhanquy (Mar 5, 2010)

Zare said:
			
		

> Initiate the emergency holographic console (VTY4, hit Alt+F4) and mount your USB thingie somewhere on the filesystem first.



Thanks. That makes sense; but I have given up and burn a DVD instead.


----------



## varda (Mar 5, 2010)

Link you've provided is for virtual machine which emulates hdd (ad drive) from your usb stick. In order to use it in future, i.e. to boot and install correctly from usb flash drive you need first to convert ISO image to usb specific image and then write it to that flash. Because sysinstall is limited in features and waits for specific environment, devices and partitioning. Take a look for detailed procedure how to convert bootable freebsd iso to bootable flash image.


----------



## fbsd1 (Mar 5, 2010)

there is option for source media from USB on same screen you selected existing file susyem. Boot from your USB staick again and this time select USB option.


----------



## nhanquy (Mar 6, 2010)

Thanks! But this is the chicken-and-egg situation.
I didn't have freebsd running at that time. But I did have windows and Linux....


----------



## varda (Mar 6, 2010)

You probably want to try it first in a virtual environment like VirtualBox or VMWare


----------



## nhanquy (Mar 6, 2010)

varda said:
			
		

> ... Take a look for detailed procedure how to convert bootable freebsd iso to bootable flash image.



Actually, the updated script is *here*.

To run it, something like:

```
./iso2flash.sh -t bsd 8.0-RELEASE-i386-dvd1.iso /dev/da0
```


----------



## fbsd1 (Mar 7, 2010)

You should really read the how-to guide section of this forum before posting questions. 

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


----------



## nhanquy (Mar 7, 2010)

fbsd1 said:
			
		

> You should really read the how-to guide section of this forum before posting questions.
> 
> http://forums.freebsd.org/showthread.php?t=11715



You should read carefully! 
install freebsd *from* USB != install freebsd *on* USB


----------



## nhanquy (Mar 7, 2010)

fbsd1 said:
			
		

> You should really read the how-to guide section of this forum before posting questions.
> 
> http://forums.freebsd.org/showthread.php?t=11715



@ fbsd1: I have tried your script, fbsdiso2usb, and it created a bootable USB stick (I replaced disc1 with dvd1 iso image).
However, a couple things should be considered:

1. if the usb stick is one like mine; it would hang and it makes the system crash with a <ctrl>+C !

2. the script doesn't recover well: mdconfig will create md1, md2, ... the next run; newfs would fail when it run into  my usb stick; umount -v would fail with "device busy". I had to use umount -f.

But as I said before it'd be nice if there is another way we can create the bootable USB without freeBSD (my freebsd partition on disk was messed up!). unetbootin may do the trick.


----------



## nhanquy (Mar 7, 2010)

Zare said:
			
		

> Initiate the emergency holographic console (VTY4, hit Alt+F4) and mount your USB thingie somewhere on the filesystem first.



nah! It won't even have *ls*! No *mount* command either!


----------



## varda (Mar 7, 2010)

Second time  You probably want to try it first in a virtual environment like VirtualBox or VMWare. And you will have any OS you dream


----------



## nhanquy (Mar 7, 2010)

varda said:
			
		

> Second time  You probably want to try it first in a virtual environment like VirtualBox or VMWare. And you will have any OS you dream



I have had it long long time ago. I gave up and burn a DVD instead to re-install freebsd.

My laptop, DELL D420, can triple boot: win/linux/bsd. I don't like VB or VMware.

Linux/bsd can access to other OS partitions but not Win! 

Too much build time required on freebsd to make firefox35 work with flash!


----------

