View | Details | Raw Unified | Return to bug 39824 | Differences between
and this patch

Collapse All | Expand All

(-)chapter.sgml (-43 / +39 lines)
Lines 77-83 Link Here
77
77
78
    <para>Traditionally, FreeBSD has had what is called a
78
    <para>Traditionally, FreeBSD has had what is called a
79
      <quote>monolithic</quote> kernel.  This means that the kernel was one
79
      <quote>monolithic</quote> kernel.  This means that the kernel was one
80
      large program, supported a fixed list of devices, and if you wanted to
80
      large program, which supported a fixed list of devices, and if you wanted to
81
      change the kernel's behavior then you had to compile a new kernel, and
81
      change the kernel's behavior then you had to compile a new kernel, and
82
      then reboot your computer with the new kernel.</para>
82
      then reboot your computer with the new kernel.</para>
83
83
Lines 120-126 Link Here
120
120
121
      <listitem>
121
      <listitem>
122
	<para>Additional hardware support.  A custom kernel allows you to
122
	<para>Additional hardware support.  A custom kernel allows you to
123
	  add in support for devices such as sound cards, which are not
123
	  add in support for devices such as sound cards which are not
124
	  present in the <literal>GENERIC</literal> kernel.</para>
124
	  present in the <literal>GENERIC</literal> kernel.</para>
125
      </listitem>
125
      </listitem>
126
    </itemizedlist>
126
    </itemizedlist>
Lines 231-245 Link Here
231
      section slowly and carefully.</para>
231
      section slowly and carefully.</para>
232
232
233
    <note>
233
    <note>
234
      <para>Be sure to always check the file
234
      <para>If you <link linkend="cutting-edge">update your FreeBSD source</link>, be sure to check the file
235
        <filename>/usr/src/UPDATING</filename>, before you perform any update
235
        <filename>/usr/src/UPDATING</filename>.
236
        steps, in the case you <link
236
        This file mentions important issues you should be aware of when working with updated FreeBSD source code.  <filename>/usr/src/UPDATING</filename> always tracks
237
        linkend="cutting-edge">sync your source-tree</link> with the
237
        your version of the FreeBSD source, and is therefore more up to date
238
        latest sources of the FreeBSD project.
238
        for your system than the handbook.</para>
239
        In this file all important issues with updating FreeBSD
240
        are written down.  <filename>/usr/src/UPDATING</filename> always fits
241
        to your version of the FreeBSD source, and is therefore more accurate
242
        for those information than the handbook.</para>
243
    </note>
239
    </note>
244
240
245
    <para>You must now compile the source code for the kernel.  There are two
241
    <para>You must now compile the source code for the kernel.  There are two
Lines 274-280 Link Here
274
    </itemizedlist>
270
    </itemizedlist>
275
    
271
    
276
    <procedure>
272
    <procedure>
277
      <title>Procedure 1.  Building a kernel the <quote>traditional</quote> way</title>
273
      <title>Procedure 1.  Building a kernel the old way</title>
278
      
274
      
279
      <step>
275
      <step>
280
	<para>Run &man.config.8; to generate the kernel source code.</para>
276
	<para>Run &man.config.8; to generate the kernel source code.</para>
Lines 303-309 Link Here
303
    </procedure>
299
    </procedure>
304
300
305
    <procedure>
301
    <procedure>
306
      <title>Procedure 2.  Building a kernel the <quote>new</quote>
302
      <title>Procedure 2.  Building a kernel the new
307
	way</title>
303
	way</title>
308
      
304
      
309
      <step>
305
      <step>
Lines 343-349 Link Here
343
    </indexterm>
339
    </indexterm>
344
340
345
    <para>If you have <emphasis>not</emphasis> upgraded your source
341
    <para>If you have <emphasis>not</emphasis> upgraded your source
346
      tree in any way (you have not run <application>CVSup</application>, 
342
      tree in any way (you have not run <application>CVSup</application> or 
347
      <application>CTM</application>, or used 
343
      <application>CTM</application>, or used 
348
      <application>anoncvs</application>), then you should use the 
344
      <application>anoncvs</application>), then you should use the 
349
      <command>config</command>, <maketarget>make depend</maketarget>,
345
      <command>config</command>, <maketarget>make depend</maketarget>,
Lines 373-379 Link Here
373
  </sect1>
369
  </sect1>
374
370
375
  <sect1 id="kernelconfig-config">
371
  <sect1 id="kernelconfig-config">
376
    <title>The Configuration File</title>
372
    <title>The Kernel Configuration File</title>
377
    <indexterm>
373
    <indexterm>
378
      <primary>kernel</primary>
374
      <primary>kernel</primary>
379
      <secondary>LINT</secondary>
375
      <secondary>LINT</secondary>
Lines 384-390 Link Here
384
      <secondary>config file</secondary>
380
      <secondary>config file</secondary>
385
    </indexterm>
381
    </indexterm>
386
382
387
    <para>The general format of a configuration file is quite simple.
383
    <para>The general format of a kernel configuration file is quite simple.
388
      Each line contains a keyword and one or more arguments.  For
384
      Each line contains a keyword and one or more arguments.  For
389
      simplicity, most lines only contain one argument.  Anything
385
      simplicity, most lines only contain one argument.  Anything
390
      following a <literal>#</literal> is considered a comment and
386
      following a <literal>#</literal> is considered a comment and
Lines 516-525 Link Here
516
    <para>Starting with FreeBSD 4.5, the system will auto-tune this setting
512
    <para>Starting with FreeBSD 4.5, the system will auto-tune this setting
517
      for you if you explicitly set it to <literal>0</literal><footnote>
513
      for you if you explicitly set it to <literal>0</literal><footnote>
518
	<para>The auto-tuning algorithm sets <literal>maxuser</literal> equal
514
	<para>The auto-tuning algorithm sets <literal>maxuser</literal> equal
519
	  to the amount of memory in the system, with a minimum of 32, and a
515
	  to the number of megabytes of memory in the system, with a minimum of 32, and a
520
	  maximum of 384.</para></footnote>.  If you are
516
	  maximum of 384.</para></footnote>.  If you are
521
      using an earlier version of FreeBSD, or you want to manage it
517
      using an earlier version of FreeBSD, or you want to manage it
522
      yourself you will want to set
518
      yourself, you will want to set
523
      <literal>maxusers</literal> to at least 4, especially if you are
519
      <literal>maxusers</literal> to at least 4, especially if you are
524
      using the X Window System or compiling software.  The reason is that
520
      using the X Window System or compiling software.  The reason is that
525
      the most important table set by <literal>maxusers</literal> is the
521
      the most important table set by <literal>maxusers</literal> is the
Lines 540-547 Link Here
540
536
541
    <note>
537
    <note>
542
      <para><literal>maxusers</literal> does <emphasis>not</emphasis>
538
      <para><literal>maxusers</literal> does <emphasis>not</emphasis>
543
	limit the number of users which can log into your machine.  It
539
	limit the number of users who can log into your machine.  It
544
	simply sets various table sizes to reasonable values considering
540
	simply sets various table sizes to reasonable values based on
545
	the maximum number of users you will likely have on your system
541
	the maximum number of users you will likely have on your system
546
	and how many processes each of them will be running.  One keyword
542
	and how many processes each of them will be running.  One keyword
547
	which <emphasis>does</emphasis> limit the number of simultaneous
543
	which <emphasis>does</emphasis> limit the number of simultaneous
Lines 607-613 Link Here
607
    <programlisting>options          UFS_DIRHASH  #Improve performance on big directories</programlisting>
603
    <programlisting>options          UFS_DIRHASH  #Improve performance on big directories</programlisting>
608
604
609
    <para>This option includes some code to speed up disk operations on large
605
    <para>This option includes some code to speed up disk operations on large
610
      directories, at the expense of using a some additional memory.  You
606
      directories, at the expense of using some additional memory.  You
611
      would normally keep this for a large server, or interactive workstation,
607
      would normally keep this for a large server, or interactive workstation,
612
      and remove it if you are using FreeBSD on a smaller system where memory
608
      and remove it if you are using FreeBSD on a smaller system where memory
613
      is at a premium and disk access speed is less important, such as a
609
      is at a premium and disk access speed is less important, such as a
Lines 615-625 Link Here
615
611
616
    <programlisting>options          SOFTUPDATES  #Enable FFS soft updates support</programlisting>
612
    <programlisting>options          SOFTUPDATES  #Enable FFS soft updates support</programlisting>
617
613
618
    <para>This option enables soft updates in the kernel, this will help speed
614
    <para>This option enables soft updates in the kernel; this will help speed
619
      up write access on the disks.  They are enabled by default in the 4.X branch
615
      up write access on the disks.  They are enabled by default in the 4.X branch
620
      but may not be turned on.  Review the output from &man.mount.8; to see
616
      but may not be turned on.  Review the output from &man.mount.8; to see
621
      if you have them enabled.  If you do not see the soft-updates option then
617
      if you have them enabled.  If you do not see the soft-updates option then
622
      you will need to activate it using the &man.tunefs.8; or &man.newfs.8;
618
      you may activate it using &man.tunefs.8; or &man.newfs.8;
623
      for new filesystems.</para>      
619
      for new filesystems.</para>      
624
620
625
    <programlisting>options          MFS          #Memory Filesystem
621
    <programlisting>options          MFS          #Memory Filesystem
Lines 680-686 Link Here
680
676
681
    <programlisting>options          PROCFS       #Process filesystem</programlisting>
677
    <programlisting>options          PROCFS       #Process filesystem</programlisting>
682
678
683
    <para>The process filesystem.  This is a <quote>pretend</quote>
679
    <para>The process filesystem.  This is a special
684
      filesystem mounted on <filename>/proc</filename> which allows
680
      filesystem mounted on <filename>/proc</filename> which allows
685
      programs like &man.ps.1; to give you more information on what
681
      programs like &man.ps.1; to give you more information on what
686
      processes are running.</para>
682
      processes are running.</para>
Lines 688-694 Link Here
688
    <programlisting>options          COMPAT_43    #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
684
    <programlisting>options          COMPAT_43    #Compatible with BSD 4.3 [KEEP THIS!]</programlisting>
689
685
690
    <para>Compatibility with 4.3BSD.  Leave this in; some programs will
686
    <para>Compatibility with 4.3BSD.  Leave this in; some programs will
691
      act strangely if you comment this out.</para>
687
      behave strangely if you comment this out.</para>
692
688
693
    <programlisting>options          SCSI_DELAY=15000    #Delay (in ms) before probing SCSI</programlisting>
689
    <programlisting>options          SCSI_DELAY=15000    #Delay (in ms) before probing SCSI</programlisting>
694
690
Lines 697-710 Link Here
697
      you can ignore this, otherwise you will probably want to lower this
693
      you can ignore this, otherwise you will probably want to lower this
698
      number, perhaps to 5 seconds, to speed up booting.  Of course, if
694
      number, perhaps to 5 seconds, to speed up booting.  Of course, if
699
      you do this, and FreeBSD has trouble recognizing your SCSI devices,
695
      you do this, and FreeBSD has trouble recognizing your SCSI devices,
700
      you will have to raise it back up.</para>
696
      you will have to raise it again.</para>
701
697
702
    <programlisting>options          UCONSOLE            #Allow users to grab the console</programlisting>
698
    <programlisting>options          UCONSOLE            #Allow users to grab the console</programlisting>
703
699
704
    <para>Allow users to grab the console, which is useful for X users.
700
    <para>Allow users to grab the console, which is useful for X users.
705
      For example, you can create a console xterm by typing <command>xterm
701
      For example, you can create a console xterm by typing <command>xterm
706
      -C</command>, which will display any <command>write</command>,
702
      -C</command>, which will display any <command>write</command>,
707
      <command>talk</command>, and any other messages you receive, as well
703
      <command>talk</command>, and other messages you receive, as well
708
      as any console messages sent by the kernel.</para>
704
      as any console messages sent by the kernel.</para>
709
705
710
    <programlisting>options          USERCONFIG          #boot -c editor</programlisting>
706
    <programlisting>options          USERCONFIG          #boot -c editor</programlisting>
Lines 748-754 Link Here
748
    <programlisting>options 	P1003_1B		#Posix P1003_1B real-time extensions
744
    <programlisting>options 	P1003_1B		#Posix P1003_1B real-time extensions
749
options 	_KPOSIX_PRIORITY_SCHEDULING</programlisting>
745
options 	_KPOSIX_PRIORITY_SCHEDULING</programlisting>
750
746
751
    <para>Real-time extensions added in the 1993 POSIX.  Certain
747
    <para>Real-time extensions added in the 1993 POSIX specification.  Certain
752
      applications in the ports collection use these
748
      applications in the ports collection use these
753
      (such as <application>StarOffice</application>).</para>
749
      (such as <application>StarOffice</application>).</para>
754
750
Lines 763-769 Link Here
763
759
764
    <para>This option enables ICMP error response bandwidth limiting.  You
760
    <para>This option enables ICMP error response bandwidth limiting.  You
765
      typically want this option as it will help protect the machine from
761
      typically want this option as it will help protect the machine from
766
      denial of service packet attacks.</para>
762
      ICMP denial of service attacks.</para>
767
763
768
    <indexterm>
764
    <indexterm>
769
      <primary>kernel options</primary>
765
      <primary>kernel options</primary>
Lines 777-785 Link Here
777
773
778
    <programlisting>device          isa</programlisting>
774
    <programlisting>device          isa</programlisting>
779
775
780
    <para>All PCs supported by FreeBSD have one of these.  If you have an
776
    <para>All PCs supported by FreeBSD have ISA.  If you have an
781
      IBM PS/2 (Micro Channel Architecture), you cannot run FreeBSD at
777
      IBM PS/2 (Micro Channel Architecture), you cannot run FreeBSD at
782
      this time (support is being worked on).</para>
778
      this time (support is in development).</para>
783
779
784
    <programlisting>device          eisa</programlisting>
780
    <programlisting>device          eisa</programlisting>
785
781
Lines 790-796 Link Here
790
    <programlisting>device          pci</programlisting>
786
    <programlisting>device          pci</programlisting>
791
787
792
    <para>Include this if you have a PCI motherboard.  This enables
788
    <para>Include this if you have a PCI motherboard.  This enables
793
      auto-detection of PCI cards and gatewaying from the PCI to ISA
789
      auto-detection of PCI cards and gatewaying from the PCI to the ISA
794
      bus.</para>
790
      bus.</para>
795
791
796
    <programlisting># Floppy drives
792
    <programlisting># Floppy drives
Lines 832-839 Link Here
832
828
833
    <programlisting>options         ATA_STATIC_ID           #Static device numbering</programlisting>
829
    <programlisting>options         ATA_STATIC_ID           #Static device numbering</programlisting>
834
830
835
    <para>This makes the controller number static (like the old driver) or
831
    <para>This makes the ATA controller number static (like the old driver);
836
      else the device numbers are dynamically allocated.</para>
832
      otherwise the device numbers are dynamically allocated.</para>
837
833
838
    <programlisting># ATA and ATAPI devices
834
    <programlisting># ATA and ATAPI devices
839
device          ata0        at isa? port IO_WD1 irq 14
835
device          ata0        at isa? port IO_WD1 irq 14
Lines 890-896 Link Here
890
886
891
    <programlisting>device          atkbd0     at atkbdc? irq 1</programlisting>
887
    <programlisting>device          atkbd0     at atkbdc? irq 1</programlisting>
892
888
893
    <para>The <literal>atkbd</literal> driver, together with
889
    <para>The <literal>atkbd</literal> driver, together with the
894
      <literal>atkbdc</literal> controller, provides access to the AT 84
890
      <literal>atkbdc</literal> controller, provides access to the AT 84
895
      keyboard or the AT enhanced keyboard which is connected to the AT
891
      keyboard or the AT enhanced keyboard which is connected to the AT
896
      keyboard controller.</para>
892
      keyboard controller.</para>
Lines 965-978 Link Here
965
    <note>
961
    <note>
966
      <para>If you have an internal modem on COM4 and a serial port at
962
      <para>If you have an internal modem on COM4 and a serial port at
967
	COM2, you will have to change the IRQ of the modem to 2 (for
963
	COM2, you will have to change the IRQ of the modem to 2 (for
968
	obscure technical reasons, IRQ2 = IRQ 9) in order to access it
964
	obscure technical reasons, IRQ 2 = IRQ 9) in order to access it
969
	from FreeBSD.  If you have a multiport serial card, check the
965
	from FreeBSD.  If you have a multiport serial card, check the
970
	manual page for &man.sio.4; for more information on the proper
966
	manual page for &man.sio.4; for more information on the proper
971
	values for these lines.  Some video cards (notably those based on
967
	values for these lines.  Some video cards (notably those based on
972
	S3 chips) use IO addresses in the form of
968
	S3 chipsets) use IO addresses in the form of
973
	<literal>0x*2e8</literal>, and since many cheap serial cards do
969
	<literal>0x*2e8</literal>, and since many cheap serial cards do
974
	not fully decode the 16-bit IO address space, they clash with
970
	not fully decode the 16-bit IO address space, they clash with
975
	these cards making the COM4 port practically unavailable.</para>
971
	these cards, making the COM4 port effectively unavailable.</para>
976
972
977
      <para>Each serial port is required to have a unique IRQ (unless you
973
      <para>Each serial port is required to have a unique IRQ (unless you
978
        are using one of the multiport cards where shared interrupts are
974
        are using one of the multiport cards where shared interrupts are
Lines 983-989 Link Here
983
    <programlisting># Parallel port
979
    <programlisting># Parallel port
984
device          ppc0    at isa? irq 7</programlisting>
980
device          ppc0    at isa? irq 7</programlisting>
985
981
986
    <para>This is the ISA-bus parallel port interface.</para>
982
    <para>This is the ISA bus parallel port interface.</para>
987
983
988
    <programlisting>device          ppbus      # Parallel port bus (required)</programlisting>
984
    <programlisting>device          ppbus      # Parallel port bus (required)</programlisting>
989
985
Lines 1007-1013 Link Here
1007
    <para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
1003
    <para>The general-purpose I/O (<quote>geek port</quote>) + IEEE1284
1008
      I/O.</para>
1004
      I/O.</para>
1009
1005
1010
    <programlisting>#device         vpo        # Requires scbus and da</programlisting>
1006
    <programlisting>#device         vpo        # Zip support; requires scbus and da</programlisting>
1011
1007
1012
    <indexterm><primary>zip drive</primary></indexterm>
1008
    <indexterm><primary>zip drive</primary></indexterm>
1013
    <para>This is for an Iomega Zip drive.  It requires
1009
    <para>This is for an Iomega Zip drive.  It requires
Lines 1109-1115 Link Here
1109
pseudo-device   pty           # Pseudo-ttys (telnet etc)</programlisting>
1105
pseudo-device   pty           # Pseudo-ttys (telnet etc)</programlisting>
1110
1106
1111
    <para>This is a <quote>pseudo-terminal</quote> or simulated login port.
1107
    <para>This is a <quote>pseudo-terminal</quote> or simulated login port.
1112
      It is used by incoming <command>telnet</command> and
1108
      It is used by incoming <command>ssh</command>, <command>telnet</command>, and
1113
      <command>rlogin</command> sessions,
1109
      <command>rlogin</command> sessions,
1114
      <application>xterm</application>, and some other applications such
1110
      <application>xterm</application>, and some other applications such
1115
      as <application>emacs</application>.  A
1111
      as <application>emacs</application>.  A
Lines 1148-1161 Link Here
1148
    <para>This is the Berkeley Packet Filter.  This pseudo-device allows
1144
    <para>This is the Berkeley Packet Filter.  This pseudo-device allows
1149
      network interfaces to be placed in promiscuous mode, capturing every
1145
      network interfaces to be placed in promiscuous mode, capturing every
1150
      packet on a broadcast network (e.g., an Ethernet).  These packets
1146
      packet on a broadcast network (e.g., an Ethernet).  These packets
1151
      can be captured to disk and or examined with the &man.tcpdump.1;
1147
      can be captured to disk and/or examined with the &man.tcpdump.1;
1152
      program.</para>
1148
      program.</para>
1153
1149
1154
    <note>
1150
    <note>
1155
      <para>The <literal>bpf pseudo-device</literal> is also used by
1151
      <para>The <literal>bpf pseudo-device</literal> is also used by
1156
	&man.dhclient.8; to obtain the IP address of the default router
1152
	&man.dhclient.8; to obtain the IP address of the default router
1157
	(gateway) and so on.  If you use DHCP, leave this
1153
	(gateway) and so on.  If you use DHCP, leave this
1158
	uncommented.</para>
1154
	enabled.</para>
1159
    </note>
1155
    </note>
1160
1156
1161
    <programlisting># USB support
1157
    <programlisting># USB support

Return to bug 39824