# Installing to a USB stick - hanging on boot (when DVD drive is removed?)



## ghell (Apr 15, 2010)

I used a sata dvd drive to install FreeBSD 8 AMD64 to a 4GB USB stick, using a standard install. The only change I made during install was removal of the swap partition (I have 4GB of RAM).

The install seemed to all go fine, and it starts booting off the USB stick but then seems to just hang.


It gives a suggestions about if there are invalid options then try vfs.root.mountfrom.options=rw (is this just a standard troubleshooting suggestion message or is this actually an error?), then it tells me that its one of the loader variables anyway.


```
Loader variables:
vfs.root.mountfrom=ufs:/dev/da0s1a
vfs.root.mountfrom.options=rw
```

With verbose logging, this is where it seems to get stuck:

```
mountroot> (probe0:umass-sim0:0:0:0): Down reving Protocol Version from 2 to 0?
pass0 at umass-sim0 bus 0 target 0 lun 0
pass0: <FLASH Drive SM_USB20 1100> Removable Direct Access SCSI-0 device
pass0: 40.000MB/s transfers
GEOM: new disk da0
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <FLASH Drive SM_USB20 1100> Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0 3824MB (7831552 512 byte sectors: 255H 63S/T 487C)
```

The LED on the USB flash drive itself stays red all the time, as if it is doing something but I have tried leaving it for a long time (1.5 hours) and it never seems to load.

If I press the button on the front of the machine it does come up with a message saying that it is too busy to go to state S5, so maybe it's not completely hanging but it never seems to load.



Should I just try waiting much longer? Is it thrashing the drive for some reason? If it is just taking too long and it's not hanging, is there any way to speed this up and optimize for a USB drive (e.g. memory disks?)


Update: it boots fine if I plug the DVD drive back in, but this is not feasible (because there is nowhere to put it, I open up the case and plug it into the motherboard just to install the OS then I want to ditch the DVD drive entirely)

Update 2: that seemed to work twice but now it is not even booting with the DVD drive connected.


----------



## ghell (Apr 18, 2010)

Another update, the same USB installation doesn't work at all on my dell vostro 1000 laptop (even the DVD doesn't), but works perfectly in my desktop (asus striker extreme 680i motherboard).

Both have run Linux fine in the past.

Is BSD really that picky about motherboards or something?


----------



## fbsd1 (Apr 23, 2010)

When you say, "it starts booting off the USB stick but then seems to just hangs". What do you see on the screen that indicates the USB stick is booting? 

Also take note: On some PCâ€™s you have to disable some BIO settings dealing with MS/windows. You may also have to change the BIOS setting to boot off USB before trying the hard drive. Also some USB sticks will boot fine on one PC and not at all on another PC. This is a USB 1.0 vers USB 2.0 standard in the BIOS.

Do the disc1 sysinstall to the usb stick again and this time use the defaults so swap gets allocated. Do not try to modify the contents of the USB stick after Freebsd 8.0 is installed on it. Post back the results.


----------



## ghell (Apr 23, 2010)

fbsd1 said:
			
		

> When you say, "it starts booting off the USB stick but then seems to just hangs". What do you see on the screen that indicates the USB stick is booting?



I have already said all this but:

It boots right up to the point where it gets to mounting the root filesystem, then stops.

The boot menu appears, the kernel loads, devices are detected, etc.

Then it never gets past this on that machine (this is verbose mode, which I typed out earlier):







The activity LED on the USB remains on constantly but I have tried leaving this for an hour and it never gets past it.

I can't type anything.

If I press the power button quickly it tells me that it could not enter the S5 state (shutdown), so it has not locked up entirely.


In a different machine, it gets right past this point almost instantly without any problems.

The machine it does not work on has a Gigabyte GA-MA785GT-UD3H (AM3, 785G, SB710) motherboard with an AMD Athlon II X2 240 CPU. This is the one I need it to work on.
The machine it works on has an Asus Striker Extreme (680i) motherboard, with an Intel Core 2 Duo E8500 CPU.
It completely panics in my Dell Vostro 1000 laptop, even just from the installation DVD.


It does start booting off the USB, just gets stuck here. It is not that I have not set the correct USB device in the boot sequence, or that the motherboard can't boot from this USB device.



			
				fbsd1 said:
			
		

> Do the disc1 sysinstall to the usb stick again and this time use the defaults so swap gets allocated. Do not try to modify the contents of the USB stick after Freebsd 8.0 is installed on it. Post back the results.



I have also tried this but it made no difference whatsoever.


----------



## Matty (Apr 23, 2010)

had the same issue when i tried to boot from usb disk but I always could type ufs:/dev/da0s1a but only with a ps/2 keyboard usb keyboard never worked.

Later on when the system booted I could use usb. guess it's more a missing module or something.


----------



## ghell (Apr 23, 2010)

Thanks I have had the same USB and PS/2 problem on this machine before, but in this case it happens to me whether I use PS/2, USB or nothing at all. I have also tried changing BIOS settings etc because that has fixed similar problems in the past, but nothing worked.


----------



## jomirguez (Apr 26, 2010)

Have you the SATA ports in ahci/raid mode.  I have all shorts of problems on recent AMD/ATI chipsets not configured in BIOS to plain IDE.  Doing this solve all the problems here.

--
  josemi


----------



## danbi (Apr 27, 2010)

This problem happens because the kernel does not wait long enough for the USB sticks to be recognized, before mounting root. Having other (slow) peripherals such as an CD/DVD somewhat helps.

There is a simple fix, to add delay just before the mountroot call and recompile kernel.
I wonder why it has not made it in -current by now - it is so common case that troubles boot off USB sticks.


----------

