Mounting USB Hard Drive on boot.

nmahadkar

New Member


Messages: 7

I have googled but have found no clear answer to this. I have an external USB 1 TB HDD that I want to mount on boot. I made a
Code:
dev/da0s1             /media/USB-HDD  ufs     rw              0       0
entry into the /etc/fstab. When the machine boots it aborts the boot saying that /dev/da0s1 is an invalid argument and bring me to the shell. Few seconds later I get a dmesg alert saying that /dev/da0s1 has been detected. I guess I have to figure out how to detect the USB drive before fstab tries to mount it.

PS. I am running 8.2
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,763
Messages: 30,893

Add the "late" option, see fstab(7). I also advise to use labels. USB harddisks tend to move around, if you have another attached, this one might show up as da1 instead of da0.
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 2,819
Messages: 11,308

And make sure you have the leading slash in /etc/fstab ..
 
OP
OP
N

nmahadkar

New Member


Messages: 7

Sorry I did not copy the /. It is in the fstab. I am new to BSD is there a good tutorial on using labels?
 

wblock@

Beastie Himself
Developer

Reaction score: 3,645
Messages: 13,850

Maybe not the greatest, but what it lacks in quality it makes up for with brevity: Moving A FreeBSD System To AHCI And Labeled Filesystems

Ignore the part about loading the AHCI module and modifying /etc/sysctl.conf for now; you may want to do them later if your system supports it. I should probably break that up into two more-focused documents.
 

mav@

Aspiring Daemon
Developer

Reaction score: 218
Messages: 702

Some USB devices are attaching with some delay. You may try to instruct CAM to wait for more devices by setting kern.cam.boot_delay loader tunable. It is measured in milliseconds.
 
Top