Hitchhiker's Guide to Openbsd


- Using config(8) to change your kernel


Download 1.27 Mb.
Pdf ko'rish
bet80/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   76   77   78   79   80   81   82   83   ...   258
Bog'liq
obsd-faq49

5.9 - Using config(8) to change your kernel
The -e and -u options with 
config(8)
 can be extremely helpful and save wasted time compiling your 
kernel. The -e flag allows you to enter the UKC or User Kernel Config on a running system. These 
changes will then take place on your next reboot. The -u flag tests to see if any changes were made to 
the running kernel during boot, meaning you used boot -c to enter the UKC while booting your system. 
The following example shows the disabling of the ep* devices in the kernel. For safety's sake you must 
use the -o option which writes the changes out to the file specified. For example : config -e -o bsd.new /
bsd will write the changes to bsd.new. The example doesn't use the -o option, therefore changes are just 
ignored, and not written back to the kernel binary. For more information pertaining to error and warning 
messages read the 
config(8)
man page. 
sudo config -e /bsd
OpenBSD 4.7 (GENERIC) #558: Thu Mar 17 20:46:15 MDT 2010
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/
http://www.openbsd.org/faq/faq5.html (19 of 26)9/4/2011 10:02:02 AM


5 - Building the System from Source
GENERIC
warning: no output file specified
Enter 'help' for information
ukc> ?
help Command help 
list
add dev Add a device
base 8|10|16 Base on large 
numbers
change devno|dev Change device
disable attr val|devno|dev Disable device
enable attr val|devno|dev Enable device
find devno|dev Find device
list List 
configuration
lines count # of lines per 
page
show [attr [val]] Show attribute
exit Exit, without 
saving changes
quit Quit, saving 
current changes
timezone [mins [dst]] Show/change 
timezone
bufcachepercent [number] Show/change 
BUFCACHEPERCENT
nkmempg [number] Show/change 
NKMEMPAGES
shmseg [number] Show/change 
SHMSEG
shmmaxpgs [number] Show/change 
SHMMAXPGS
ukc> list
0 video* at uvideo* flags 0x0
1 audio* at uaudio*|btsco*|sb0|sb*|gus0|pas0|sp0|ess*|
wss0|wss*|ym*|eap*|envy*
|eso*|sv*|neo*|cmpci*|clcs*|clct*|auacer*|auglx*|auich*|
auixp*|autri*|auvia*|aza
lia*|fms*|maestro*|esa*|yds*|emu* flags 0x0
2 midi* at umidi*|sb0|sb*|opl*|opl*|opl*|opl*|opl*|ym*|
mpu*|mpu*|autri*|eap* f
lags 0x0
3 midi* at pcppi0 flags 0x0
http://www.openbsd.org/faq/faq5.html (20 of 26)9/4/2011 10:02:02 AM


5 - Building the System from Source
4 drm* at inteldrm*|radeondrm* flags 0x0
5 inteldrm* at vga0|vga* flags 0x0
6 radeondrm* at vga0|vga* flags 0x0
7 radio* at udsbr*|bktr0|fms* flags 0x0
8 softraid0 at root flags 0x0
9 nsphy* at url*|udav*|mos*|axe*|aue*|xe*|ef*|hme*|lii*|
bce*|ale*|age*|jme*|et
*|nfe*|stge*|vge*|bnx*|bge*|lge*|nge*|msk*|sk*|ste*|sis*|
wb*|tl*|vr*|pcn*|sf*|ge
m*|ne0|ne1|ne2|ne*|ne*|ne*|epic*|sm0|sm*|dc*|dc*|re*|re*|
rl*|rl*|mtd*|fxp*|fxp*|
xl*|xl*|ep0|ep0|ep0|ep*|ep*|ep*|ep*|ep* phy -1 flags 0x0
10 nsphyter* at url*|udav*|mos*|axe*|aue*|xe*|ef*|hme*|
lii*|bce*|ale*|age*|jme*
|et*|nfe*|stge*|vge*|bnx*|bge*|lge*|nge*|msk*|sk*|ste*|sis*|
wb*|tl*|vr*|pcn*|sf*
|gem*|ne0|ne1|ne2|ne*|ne*|ne*|epic*|sm0|sm*|dc*|dc*|re*|re*|
rl*|rl*|mtd*|fxp*|fx
p*|xl*|xl*|ep0|ep0|ep0|ep*|ep*|ep*|ep*|ep* phy -1 flags 0x0
[...snip...]
ukc> disable ep
98 ep0 disabled
99 ep* disabled
100 ep* disabled
278 ep0 disabled
279 ep0 disabled
280 ep* disabled
281 ep* disabled
344 ep* disabled
ukc> quit
not forced
In the above example, all ep* devices are disabled in the kernel and will not be probed. In some 
situations where you have used the UKC during boot, via boot -c, you will need these changes to be 
written out permanently. To do this you need to use the -u option. In the following example, the 
computer was booted into the UKC and the 
wi(4)
device was disabled. Since changes made with boot -c 
are NOT permanent, these changes must be written out. This example writes the changes made from 
boot -c into a new kernel binary bsd.new. 
sudo config -e -u -o bsd.new /bsd
OpenBSD 4.7 (GENERIC) #558: Thu Mar 17 20:46:15 MDT 2010
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/
GENERIC
http://www.openbsd.org/faq/faq5.html (21 of 26)9/4/2011 10:02:02 AM


5 - Building the System from Source
Processing history...
162 wi* disabled
163 wi* disabled
416 wi* disabled
Enter 'help' for information
ukc> quit

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   76   77   78   79   80   81   82   83   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling