installer: Add serial number and /etc/devtab support.
authorSascha Wildner <saw@online.de>
Mon, 14 Sep 2009 18:30:06 +0000 (20:30 +0200)
committerSascha Wildner <saw@online.de>
Mon, 14 Sep 2009 18:30:06 +0000 (20:30 +0200)
commitf59b7dfa1b99e73a6b5338bdf61246d9edf12f4b
treedc1daea1a6a066135a238379a4b85181a09ed0c7
parentfd43fc00b09e2bbfc1641b01f542e0d07634cb16
installer: Add serial number and /etc/devtab support.

If a disk has a corresponding entry in /dev/serno with identical
major/minor, use that for all further references of the disk in the
installation process.

In the installed system, set up a /etc/devtab entry (with the labels
named disk0, disk1 etc. using the order of the disks appearing in
'sysctl kern.disks' output) and use this label for the system's
/etc/fstab entries.

/boot/loader.conf still has to use /dev/serno for its vfs.root.mountfrom
entry.

The dumpdev entry in /etc/rc.conf could use the devtab label but (as
of this commit) doesn't do so yet. This will be fixed at a later point.

If no /dev/serno is found, or if no corresponding entry in /dev/serno
is found for a specific disk, we use the traditional scheme.

While I'm here, perform some cleanup, namely remove some duplicate
functions.

Requested-by-and-in-discussion-with: dillon
share/installer/cmdnames.conf
usr.sbin/installer/dfuibe_installer/flow.c
usr.sbin/installer/dfuibe_installer/fn_disk.c
usr.sbin/installer/dfuibe_installer/fn_install.c
usr.sbin/installer/libinstaller/diskutil.c
usr.sbin/installer/libinstaller/diskutil.h
usr.sbin/installer/libinstaller/survey.c