# Freebsd 8.0 from USB



## eyebone (Dec 21, 2009)

hi folks,

was looking already bit through the forum but couldnt find a suiteable thread. ive trying since 2 days to boot a freebsd from usb stick. always if the /root FS shall be mounted it stops with a mount error and did not show the /root device itself in the bootable list:


```
ROOT MOUNT ERROR: 
If you have invalid mount options, reboot, and first try the following from
the loader prompt:

     set vfs.root.mountfrom.options=rw

and then remove invalid mount options from /etc/fstab.
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Ut165 USB2FlashStorage 0.00> Removable Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: 3856MB (7897088 512 byte sectors: 255H 63S/T 491C)
/Loader variables:
vfs.root.mountfrom=ufs:/dev/da0s1a
vfs.root.mountfrom.options=rw

Manual root filesystem specification
```

checking for the bootable devices:


```
mountroot> ?

List of GEOM managed disk devices:
  ad10 ad8
```

shows just 2 fixed hdd's

the loader.conf consists of entries for usb/console and vfs.
running the stick as hdd in qemu is working perfectly if the device in fstab is set to ad0s1a. i also wonder why da0s1a is not presented in the bootlist as the device is recognized.

ty


----------



## jb_fvwm2 (Dec 22, 2009)

search all threads containing geom_mbr *might* reveal
the fix (loading 3 ko before boot) *if* it works.
......
Sorry, I did not comprehend fully "boot from usb". Since
posting this post, I discovered on a laptop (v8) that
it needed a third usb .ko loaded for the intel usb
to appear. Maybe that would help... but I'm very unsure.
without reading the entire thread slowly.


----------



## Alt (Dec 22, 2009)

Funny.. yesterday i had same problem on 8.0 usb stick. I tried to load geom/umass in loader.conf, and some other tricks, but they did not help. Found problem is cus usb devices dont turn on imidiatelly when they get power. So its possible your da0 init just after this prompt.. Try wait some time and it must show on. "Fixed" this problem by putting usb on another port (seems its importand before mouse/kbd or not).. Its not really a clear fix, but there is some problem in umass processing(i guess)


----------



## eyebone (Dec 22, 2009)

jb_fvwm2 said:
			
		

> search all threads containing geom_mbr *might* reveal
> the fix (loading 3 ko before boot) *if* it works.



i found the threads with your suggested modules. put them all in loader.conf, no change in behavior.


----------



## olivier (Jul 8, 2010)

I have the same problem with FreeBSD 8.1-RC2 on 2 different PC.
Did you found a solution for this known bug (usb/143790)?


----------



## zeiz (Jul 9, 2010)

```
vfs.root.mountfrom=[B]ufs:/dev/da0s1a[/B]
```
Also couldn't get usb stick working without typing the highlighted in mountroot.
Tried to glable but no luck.


----------



## olivier (Jul 10, 2010)

I had to use the patch included in PR usb/143790 for booting from USB.


----------



## mav@ (Jul 10, 2010)

Since few month ago it is possible to workaround the issue on 8-STABLE without patching kernel, just by adding to /boot/loader.conf line:


```
kern.cam.boot_delay=10000
```
It makes CAM subsystem to wait at least specified time (in ms) for delayed bus registration.


----------



## zeiz (Jul 11, 2010)

Works like a charm. Thanks!

Typing this from FreeBSD 8.1-RC2 i386 on usb


----------



## mk (Jul 11, 2010)

today i did install of 7.2 in vmware on usb and i boot it. funny but first time it didn't boot,rebooted and with load like charm. however i have strange network problem. this machine is verified to work with fbsd and 7.2 was previously installed and that nic (nfe) work with no problems. now i setup my nic ip/gate/dns and i can't ping my *.1 gateway, but can ping lo0 and nfe0. same nic is working in other os as well.
some hints?


----------

