DEVTAB - Add mountroot & fstab support for serial numbers, and devtab.
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 6 Aug 2009 02:37:53 +0000 (19:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 6 Aug 2009 02:37:53 +0000 (19:37 -0700)
commit6507240b2fcfebaacc0f92f997dad76922e1d8c0
tree54b5245d743f171c7982f8150cfa5bc3758e0665
parentc86793ea41204c3bb344640aaf959d8b6fea7b9a
DEVTAB - Add mountroot & fstab support for serial numbers, and devtab.

* The vfs.root.mountfrom /boot/loader.conf variable may now specify
  devfs aliases, allowing it to specify root mounts by serial number.
  Here is an example:

    vfs.root.mountfrom="hammer:serno/L41JYE0G.s1d"

  Note that vfs.root.mountfrom may NOT currently specify /etc/devtab labels.

* /etc/fstab may now specify devfs relative paths (such as serial numbers)
  as well as /etc/devtab labels.  A ".suffix" may be used to extend the
  translation so /etc/devtab only needs to specify the base label.

  Example /etc/fstab:

    # Device                Mountpoint FStype  Options  Dump    Pass
    #
    driveA.s1d              /          hammer  rw       1       1
    driveA.s1b              none       swap    sw       0       0
    driveA.s1a              /boot      ufs     rw       1       1
    serno/L41JYE0G.s1d      /fubar     hammer  rw       1       1

   /etc/devtab:

    driveA          serno   L41JYE0G
13 files changed:
include/fstab.h
lib/libc/gen/Makefile.inc
lib/libc/gen/fstab.c
lib/libc/gen/getdevpath.3 [moved from lib/libutil/getdevpath.3 with 99% similarity]
lib/libc/gen/getdevpath.c [moved from lib/libutil/getdevpath.c with 79% similarity]
lib/libutil/Makefile
lib/libutil/libutil.h
sbin/getdevpath/Makefile
sbin/getdevpath/getdevpath.c
share/man/man5/fstab.5
sys/boot/common/loader.8
sys/kern/vfs_conf.c
sys/vfs/devfs/devfs_core.c