# Need USB To Probe Earlier



## loopy (Jul 23, 2010)

I have FreeBSD 7.3-RELEASE running on an ALIX board, booting from a CF.  It's running quite good, apart from the USB pen drive, which doesn't mount at boot time, and halts the boot, because it isn't ready in time for the filesystem to get mounted from fstab.

To make the system boot, I have put the following in fstab ;


```
/dev/da0s1      /mnt/data ufs     rw,late,noatime         0       0
```

The 'late' option get this to mount later in the boot process, after the USB drive has finally been probed and made available.

BUT, I have to have to prevent the fsck checking, else it will fail the next boot, for example if there is a power cut, or if some dozy idiot thinks they can just unplug and plug it in for whatever reason, like they would on Windows!

This means remote support is kind of risky.

Anyway, I thought, for the time being, we'll brush over the above, it works, in a fashion.

Now, last night I finally put the box on to a static IP Address, as it will act as a server.  The boot fails again!  It seems that the delay during boot where the DHCPOFFER(s) occur is enough to give time for the USB to be probed, before the 'late' mount occurs.

If the system knows the IP Address and doesn't need to wait for DHCP, the 'late' mount still occurs before the USB pen drive is available.

Please, is there any way to get the USB to be available earlier in the boot process?


----------



## aragon (Jul 23, 2010)

Do you have any other pen drives you can try?  It's probably not possible to probe earlier, and your pen drive is probably slow to respond so the device node isn't made available in time.

For USB devices you are probably better off using devd(8).  Add an entry for your pen drive and write an attachment script that performs a fsck preen before mounting it.


----------



## loopy (Jul 24, 2010)

Thank you.  I hadn't tried another USB disk :r  Another one I have works right on time.

Both are SanDisk Cruzer.  Different models and different sizes though.  The one which isn't ready in time is a 16GB, the one that is ready on time is an 8GB.

I assume it's not the size of the disk that counts (or is it?).  Is there anything I should be looking out for with these disks to be sure any future ones are ready on time?


----------



## aragon (Jul 24, 2010)

loopy said:
			
		

> Is there anything I should be looking out for with these disks to be sure any future ones are ready on time?


I think you should be using devd(8) rather than looking out for ghosts.


----------



## wblock@ (Jul 24, 2010)

loopy said:
			
		

> I have FreeBSD 7.3-RELEASE running on an ALIX board, booting from a CF.  It's running quite good, apart from the USB pen drive, which doesn't mount at boot time, and halts the boot, because it isn't ready in time for the filesystem to get mounted from fstab.



If you were running 8-stable, you could use kern.cam.boot_delay=10000.


----------



## loopy (Jul 24, 2010)

Thank you.

I will explore both solutions.  devd for the current solutions, and FreeBSD 8 for future solutions.


----------

