.\" $OpenBSD: boot_config.8,v 1.4 1998/06/29 05:26:33 angelos Exp $ .\" .\" Copyright (c) 1996 Mats O Jansson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Theo de Raadt. .\" 4. Neither the name of the author nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd September 21, 1996 .Dt boot_config 8 .Os BSD 4 .Sh NAME .Nm boot_config .Nd how to change kernel configuration at boot .Sh DESCRIPTION .Nm BOOT_CONFIG is a kernel option that makes it possible to change the configuration at boot time. .Pp The boot time configuration is invoked by the .Fl c option when OpenBSD prompts for a kernel to boot: .Pp .Bd -literal >> OpenBSD BOOT 640/31744 k [1.29] use ? for file list, or carriage return for defaults use hd(1,a)/bsd to boot sd0 when sd0 is also installed .No "Boot: [[[wd(0,a)]/bsd][-abcdrs]] :" Ic -c Booting... avail mem = 28188672 using 430 buffers containing 1761280 bytes of memory User Kernel Config UKC> .Ed .Sh COMMANDS .Bl -tag -width "disable devno | dev" indent .It Ic add Ar dev Add a device through copying another. .It Ic base Ar 8 | 10 | 16 Change the base of numbers displayed and entered, e.g. I/O addresses in a VAXen are octal. .It Ic change Ar devno | dev Modify one or more devices. .It Ic disable Ar devno | dev Disable one or more devices. .It Ic enable Ar devno | dev Enable one or more devices. .It Ic exit Continue boot. .It Ic find Ar devno | dev Find one or more devices. .It Ic help Give a short summary of all commands and their arguments. .It Ic list Show all known devices, a screen at a time. .It Ic lines Op Ar count Set the number of rows per page. .It Ic quit Continue boot. .It Ic show Op Ar attr Op Ar val Show all devices for which attribute .Ar attr has the value .Ar val . .El .Pp .Sh EXAMPLES The ethernet card is not detected at boot because the kernel configuration does not match the physical hardware configuration, e.g. wrong IRQ in OpenBSD/i386. The ethernet card is supposed to use the .Xr ed 4 driver. .Pp .Bd -literal .No UKC> Ic find ed 81 ed0 at isa0 port 0x280 size 0 iomem 0xd0000 iosiz 0 irq 9 drq -1 pnpid -1 82 ed1 at isa0 port 0x250 size 0 iomem 0xd8000 iosiz 0 irq 9 drq -1 pnpid -1 83 ed2 at isa0 port 0x300 size 0 iomem 0xcc000 iosiz 0 irq 10 drq -1 pnpid -1 84 ed* at pcmcia0 port 0x300 size 0x20 iomem -1 iosiz 0 irq 10 drq -1 slot -1 UKC> .Ed .Pp ed2 seems to match the configuration except it uses IRQ 5 instead of IRQ 10. So the irq on ed2 should be changed via the .Fa change command. The device can be specified by either name or number. .Pp .Bd -literal .No UKC> Ic change ed2 83 E ed2 at isa0 port 0x300 size 0 iomem 0xcc000 iosiz 0 irq 10 drq -1 pnpid -1 .No change (y/n) ? Ic y .No port [0x300] ? .No size [0] ? .No iomem [0xcc000] ? .No iosiz [0] ? .No irq [10] ? Ic 5 .No drq [-1] ? .No pnpid [-1] ? 83 ed2 changed 83 ed2 at isa0 port 0x300 size 0 iomem 0xcc000 iosiz 0 irq 5 drq -1 pnpid -1 UKC> .Ed .Pp Another case is a mistakenly detected non-existing device instead of another device at the probed location. One known case is the Mitsumi ATAPI cdrom in OpenBSD/i386. The simplest thing to solve that problem is to disable mcd0. .Pp .Bd -literal .No UKC> Ic find mcd0 29 mcd0 at isa0 port 0x300 size 0 iomem -1 iosiz 0 irq 10 drq -1 pnpid -1 .No UKC> Ic disable mcd0 29 mcd0 disabled .No UKC> Ic find 29 29 mcd0 at isa0 disable port 0x300 size 0 iomem -1 iosiz 0 irq 10 drq -1 pnpid -1 .Ed .Pp The show command is useful for finding which devices have a certain attribute. It can also be used to find those devices with a particular value for an attribute. .Bd -literal .No UKC> Ic show slot 1 ahc* at eisa0 slot -1 3 ep0 at eisa0 slot -1 6 ep* at eisa0 slot -1 8 ep* at pcmcia* port 0x300 size 0x10 iomem -1 iosiz 0 irq 10 drq -1 slot -1 40 com3 at pcmcia* port 0x2e8 size 8 iomem -1 iosiz 0 irq 3 drq -1 slot -1 84 ed* at pcmcia* port 0x300 size 0x20 iomem -1 iosiz 0 irq 10 drq -1 slot -1 86 ahb* at eisa0 slot -1 87 fea* at eisa0 slot -1 .No UKC> Ic show port 0x300 8 ep* at pcmcia* port 0x300 size 0x10 iomem -1 iosiz 0 irq 10 drq -1 slot -1 29 mcd0 at isa0 port 0x300 size 0 iomem -1 iosiz 0 irq 10 drq -1 pnpid -1 31 wt0 at isa0 port 0x300 size 0 iomem -1 iosiz 0 irq 5 drq 1 pnpid -1 58 el0 at isa0 port 0x300 size 0 iomem -1 iosiz 0 irq 9 drq -1 pnpid -1 60 ie1 at isa0 port 0x300 size 0 iomem -1 iosiz 0 irq 10 drq -1 pnpid -1 83 ed2 at isa0 port 0x300 size 0 iomem 0xcc000 iosiz 0 irq 10 drq -1 pnpid -1 84 ed* at pcmcia* port 0x300 size 0x20 iomem -1 iosiz 0 irq 10 drq -1 slot -1 UKC> .Ed .Pp It is possible to add new devices, but only devices that were linked into the kernel. If a new device is added, following devices will be renumbered. .Pp .Bd -literal .No UKC> Ic "find ep" 2 ep0 at isa0 port -1 size 0 iomem -1 iosiz 0 irq -1 drq -1 pnpid -1 3 ep0 at eisa0 slot -1 4 ep0 at pci0|pci* dev -1 function -1 5 ep* at isa0 port -1 size 0 iomem -1 iosiz 0 irq -1 drq -1 pnpid -1 6 ep* at eisa0 slot -1 7 ep* at pci0|pci* dev -1 function -1 8 ep* at pcmcia* port 0x300 size 0x10 iomem -1 iosiz 0 irq 10 drq -1 slot -1 .No UKC> Ic "add ep1" .No "Clone Device (DevNo, 'q' or '?') ?" Ic 4 .No "Insert before Device (DevNo, 'q' or '?') ?" Ic 5 5 ep1 at pci0|pci* dev -1 function -1 .No UKC> Ic change 5 5 ep1 at pci0|pci* dev -1 function -1 .No change (y/n) ? Ic y .No dev [-1] ? Ic 14 .No function [-1] ? 5 ep1 changed 5 ep1 at pci0|pci* dev 14 function -1 UKC> .Ed .Pp When configuration is completed, booting can proceed by issuing the .Ic quit or .Ic exit commands. .Pp .Bd -literal .No UKC> Ic quit Continuing... mainbus0 (root) .Ed .Pp .Sh BUGS The add command is rather restricted, and might be expanded in the future. .Pp There is no way to save the configuration for next boot. .Sh AUTHOR Mats O Jansson