| CPU_ROOTCONF(9) | Kernel Developer's Manual | CPU_ROOTCONF(9) | 
cpu_rootconf, rootconf,
  setroot —
#include <sys/types.h>
#include <sys/systm.h>
void
  
  cpu_rootconf(void);
void
  
  rootconf(void);
void
  
  setroot(device_t
    bootdv, int
    bootpartition);
cpu_rootconf() is a machine-dependent interface
  invoked during system bootstrap to determine the root file system device and
  initialize machine-dependent file system state.
  cpu_rootconf() provides the global variables
  booted_device, booted_partition,
  booted_startblk, booted_nblks, and
  bootspec. cpu_rootconf invokes the
  machine-independent function rootconf which calls the
  function setroot to record the root device and the root
  partition information for use in machine-independent code.
rootconf may adjust the global variables and determines the parameters for setroot. This is for example used to translate a device and partition number provided by the bootloader into a disk wedge device covering the same partition.
If the bootloader already identified a disk wedge, it passes a non-zero value for booted_nblks, then booted_startblk and booted_nblks specify a disk wedge as the boot device.
setroot evaluates several sources to identify the root device in the following order until a valid device is selected:
RB_ASKNAME. The input uses the same syntax as the
      previous sources. Here also the kernel dump device is queried.If a root device cannot be selected, setroot
    sets the RB_ASKNAME flag and loops.
Otherwise the kernel dump device is identified in a similar manner from
| November 11, 2014 | NetBSD 9.4 |