[patch] functional prototype of root mount enhancement

Marcel Moolenaar xcllnt at mac.com
Tue Sep 28 15:49:43 UTC 2010


On Sep 27, 2010, at 11:22 PM, Marcel Moolenaar wrote:
> 
> The code has some debug output still, which is helpful to
> see what's going on internally. From a boot (with a
> /.mount.conf present on ufs:/dev/ad0s1a):

A more interesting example is using an ISO image as root that
lives on UFS file system (in this case FreeBSD 8.1 livefs):

	:
Root mount waiting for: usbus1
ugen1.2: <Apple Inc.> at usbus1
========
.onfail panic
.timeout 1
ufs:/dev/ad0s1a rw
.ask
========
Trying to mount root from ufs:/dev/ad0s1a [rw]...
XXX: vfs_mountroot_parse: error = 0, mpdevfs=0xc3fa4000, mp=0xc3fa3c94
========
.onfail continue
.md /livefs.iso
#ufs:/dev/da0a
.ask
========
md0 attached to /livefs.iso

Loader variables:
  vfs.root.mountfrom=ufs:/dev/ad0s1a
  vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        cd9660:/dev/acd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)

  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  da0p2 da0p1 da0 acd0 ad0s1a ad0s1 ad0

mountroot> .

mountroot> ?

List of GEOM managed disk devices:
  md0 da0p2 da0p1 da0 acd0 ad0s1a ad0s1 ad0

mountroot> cd9660:/dev/md#
Trying to mount root from cd9660:/dev/md0 []...
XXX: vfs_mountroot_parse: error = 0, mpdevfs=0xc3fa4000, mp=0xc3fa3a10
lock order reversal:
 1st 0xc3e95270 isofs (isofs) @ /usr/src/sys/fs/cd9660/cd9660_vfsops.c:694
 2nd 0xc3e959c4 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2221
KDB: stack backtrace:
	:

# mount
/dev/md0 on / (cd9660, local, read-only)
/dev/ad0s1a on /mnt (ufs, local, read-only)
devfs on /dev (devfs, local)
/dev/md1 on /var (ufs, local)
/dev/md2 on /tmp (ufs, local)

(md1 & md2 are created by /etc/rc)

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-arch mailing list