Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jul 2005 17:18:04 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Doug Poland <doug@polands.org>
Cc:        questions@freebsd.org
Subject:   Re: Lock down device name for USB drive
Message-ID:  <20050701221803.GO2392@dan.emsphone.com>
In-Reply-To: <56241.209.103.198.74.1120249277.squirrel@email.polands.org>
References:  <56241.209.103.198.74.1120249277.squirrel@email.polands.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jul 01), Doug Poland said:
> Hello,
> 
> I'm trying to use the automounter to mount a USB thumbdrive on
> -STABLE.  The only problem I'm having is that, between reboots, the
> name of the device changes between da0s1 and da1s1.
> 
> Is there a way to lock down the device name so it doesn't change?

Depends on what you want to lock down.  If you only want a particular
thumbdrive to be mounted, you can give it a label and use geom_label to
provide a /dev/msdosfs/mylabel node.  If you always want the first usb
drive plugged in to be mounted, you can wire down umass and the device
to always appear at the same scbus# and da# numbers, by adding
something like this to loader.conf:

hint.scbus.0.at="umass0"
hint.da.0.at="scbus0"
hint.da.0.target="0"
hint.da.0.unit="0"

If you boot off of scsi devices, you probably would want to wire them
down first, followed by your usb device, to keep them from shifting if
you have more than one usb drive plugged in during bootup.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050701221803.GO2392>