Boot Drive Nomenclature and How to Figure it out

Martin McCormick martin at dc.cis.okstate.edu
Fri Sep 3 14:10:51 UTC 2010


	I have been writing a script to build a system from a
mfsboot startup and it is going well but I want to revisit part
of the script that I don't think I did a very good job with.

	Is there an automatic way to tell which of the devices
shown in /dev is a likely system drive? This is before anything
is mounted.

	We can usually figure it out ourselves, but is there a
way for a script to figure out automatically which character
device could be the one we are going to put the OS on and use as
our boot drive?

	I know this sounds really obvious and you can tell
scripts not to use /dev/acdx as they are CDROM devices, but
system drives can actually take many different names depending
on whether they are RAIDs SCSI IDE, etc.

	Any good suggestions are appreciated.

Martin McCormick


More information about the freebsd-questions mailing list