tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Boot wedges



So far, the netbsd kernel supported several methods to determine a
root disk.

1. A literal device denoted by major/minor number in the
   kernel configuration.

2. A literal device name in the kernel configuration. The kernel
   accepts either a driver+unit string (e.g. "sd0") or the
   string "wedge:name-of-wedge" to look up a wedge by name (*).

3. Interactively query the device name on the console. The kernel
   accepts the same strings as in 2.

4. Use the boot device and partition number, MD code interprets
   information from the boot loader to determine a device (driver/unit)
   and partition number.

5. Use the boot device and an offset/size pair, MD code interprets
   information from the boot loader to determine a disk device
   and partition or a wedge that matches the offset/size.

I have added another option. The bootloader may pass a string
that is interpreted as in 2. or 3. Like the other options, the
data is passed in a global variable from MD to MI code.

Previously defined variables are:

boothowto           - boot flags
booted_device       - the boot disk and unit
booted_partition    - the boot partition 
booted_startblk     - the offset of the boot partition
booted_nblks        - the sizee of the boot partition

Now there is also:

bootspec            - the name of the boot device


This allows f.e. the evbarm bootloader to specify a root device
by (wedge-)name. 

The x86 multiboot code could also be modified to pass a string
to specify the root device by name. Currently it interprets
the string as a device name and unit only.


(*) The config program currently does not parse wedge names.



Home | Main Index | Thread Index | Old Index