diff --git a/en_US.ISO8859-1/books/faq/book.sgml b/en_US.ISO8859-1/books/faq/book.sgml index 1385a1b89d..17b064439a 100644 --- a/en_US.ISO8859-1/books/faq/book.sgml +++ b/en_US.ISO8859-1/books/faq/book.sgml @@ -15,7 +15,7 @@ - $FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.85 2000/08/04 21:46:18 jim Exp $ + $FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.86 2000/08/05 10:05:07 alex Exp $ This is the FAQ for FreeBSD versions 2.X, 3.X, and 4.X. All entries @@ -23,7 +23,7 @@ otherwise noted. Any entries with a <XXX> are under construction. If you are interested in helping with this project, send email to the FreeBSD documentation project mailing list - <freebsd-doc@FreeBSD.org>. + freebsd-doc@FreeBSD.org. The latest version of this document is always available from the FreeBSD World Wide Web server. It may also be downloaded as one large mission is to provide code to any and all comers, and for whatever purpose, so that the code gets the widest possible use and provides the widest possible benefit. This is, we believe, one of the most fundamental goals of Free Software @@ -138,9 +138,9 @@ For those of our readers whose first language is not - English, it may be worth pointing out that the word ``free'' - is being used in two ways here, one meaning ``at no cost'', - the other meaning ``you can do whatever you like''. Apart + English, it may be worth pointing out that the word free + is being used in two ways here, one meaning at no cost, + the other meaning you can do whatever you like. Apart from one or two things you cannot do with the FreeBSD code, for example pretending you wrote it, you really can do @@ -203,8 +203,8 @@ and can be un-buildable for a number of days at a time. People that use FreeBSD-CURRENT are expected to be able to analyze any problems and only report them if they are deemed - to be mistakes rather than ``glitches''. Questions such as - ``make world produces some error about groups'' on the + to be mistakes rather than glitches. Questions such as + make world produces some error about groups on the -CURRENT mailing list are sometimes treated with contempt. @@ -244,7 +244,7 @@ No claims are made that any -CURRENT snapshot can be considered - “production quality” for any purpose. + production quality for any purpose. If you want to run a stable and fully tested system, you will have to stick to full releases, or use the -STABLE snaphosts. @@ -282,7 +282,7 @@ 5.0-RELEASE (and beyond) since 2.0 was released. If a little ASCII art would help, this is how it looks: - 2.0 + 2.0 | | | [2.1-STABLE] @@ -310,7 +310,7 @@ | (Jul 2000) \|/ + - [5.0-CURRENT continues] + [5.0-CURRENT continues] The -CURRENT branch is slowly progressing towards 5.0 and beyond, the previous 2.2-STABLE branch having been retired @@ -324,8 +324,8 @@ still being committed to 3-STABLE. It is expected that the 3.X branch will be officially obsoleted some time in summer 2000. - 5.0-CURRENT is now the "current - branch", with the no release date planed. + 5.0-CURRENT is now the current + branch, with the no release date planed. @@ -522,7 +522,7 @@ - Channel #FreeBSD on + Channel #FreeBSD on EFNet is a FreeBSD forum, but don't go there for tech support or to try and get folks there to help you avoid the pain of reading man pages or doing your own research. @@ -540,13 +540,13 @@ - Channel #FreeBSD on + Channel #FreeBSD on DALNET is available at irc.dal.net in the US and irc.eu.dal.net in Europe. - Channel #FreeBSD on + Channel #FreeBSD on UNDERNET is available at us.undernet.org in the US and eu.undernet.org in Europe. Since it is a help channel, be prepared to read the @@ -571,21 +571,21 @@ There is a FreeBSD Documentation Project which you may - contact (or even better, join) at the freebsd-doc mailing list: + contact (or even better, join) at the + freebsd-doc mailing list: freebsd-doc@FreeBSD.org. This list is for discussion of the FreeBSD documentation. For - actual questions about FreeBSD, there is the freebsd-questions mailing list: + actual questions about FreeBSD, there is the + freebsd-questions mailing list: freebsd-questions@FreeBSD.org. - A FreeBSD ``handbook'' is available, and can be found as: + A FreeBSD handbook is available, and can be found as: the FreeBSD Handbook. Note that this is a work in progress; some parts may be incomplete or out-of-date. - The definitive printed guide on FreeBSD is ``The Complete - FreeBSD'', written by Greg Lehey and published by Walnut Creek + The definitive printed guide on FreeBSD is The Complete + FreeBSD, written by Greg Lehey and published by Walnut Creek CDROM Books. Now in its second edition, the book contains 1,750 pages of install & system administration guidance, program setup help, and manual pages. The book (and current @@ -670,15 +670,16 @@ Evi Nemeth, Garth Snyder, Scott Seebass & Trent R. Hein, - ``Unix System Administration Handbook'', Prentice-Hall, + Unix System Administration Handbook, Prentice-Hall, 1995 ISBN: 0-13-151051-7 - NOTE make sure you get the second - edition, with a red cover, instead of the first - edition. + + Make sure you get the second edition, with a red + cover, instead of the first edition. + This book covers the basics, as well as TCP/IP, DNS, NFS, SLIP/PPP, sendmail, INN/NNTP, printing, etc.. It's expensive @@ -1221,7 +1222,7 @@ transfer the boot image to floppy. image has been created to be booted into directly. The image has the complete content of the floppy, track for track, and is not meant to be placed on the floppy as a regular file. -You have to transfer it to the floppy ``raw'', using the +You have to transfer it to the floppy raw, using the low-level tools (e.g. fdimage or rawrite) described in the installation guide to FreeBSD. @@ -1266,11 +1267,11 @@ it and then swap it back. There are also situations in which FreeBSD 2.1.7 will not install in 4 MB. To be exact: it does not install with 640 kB base + 3 MB -extended memory. If your motherboard can remap some of the ``lost'' +extended memory. If your motherboard can remap some of the lost memory out of the 640kB to 1MB region, then you may still be able to get FreeBSD 2.1.7 up. -Try to go into your BIOS setup and look for a ``remap'' option. +Try to go into your BIOS setup and look for a remap option. Enable it. You may also have to disable ROM shadowing. It may be easier to get 4 more MB just for the install. Build a @@ -1278,7 +1279,7 @@ custom kernel with only the options you need and then get the 4 MB out again. You may also install 2.0.5 and then upgrade your system to 2.1.7 -with the ``upgrade'' option of the 2.1.7 installation program. +with the upgrade option of the 2.1.7 installation program. After the installation, if you build a custom kernel, it will run in 4 MB. Someone has even succeeded in booting with 2 MB (the @@ -1351,7 +1352,7 @@ used to contain your boot manager (likely the first one) and when you come to the partition editor for it, as the very first thing (e.g. do not make any changes) select (W)rite. This will ask for confirmation, say yes, and when you get the Boot Manager selection -prompt, be sure to select "Boot Manager." +prompt, be sure to select Boot Manager. This will re-write the boot manager to disk. Now quit out of the installation menu and reboot off the hard disk as normal. @@ -1493,11 +1494,8 @@ lp0: TCP/IP capable interface sites as root. For example, if you want connect the host max with moritz - - max <-----> moritz -IP Address 10.0.0.1 10.0.0.2 - - + max <-----> moritz +IP Address 10.0.0.1 10.0.0.2 on max start &prompt.root; ifconfig lp0 10.0.0.1 10.0.0.2 @@ -1680,7 +1678,7 @@ id="geometry"> Which geometry should I use for a disk drive? -(By the "geometry" of a disk, we mean the number of cylinders, +(By the geometry of a disk, we mean the number of cylinders, heads and sectors/track on a disk - I'll refer to this as C/H/S for convenience. This is how the PC's BIOS works out which area on a disk to read/write from). @@ -1688,15 +1686,15 @@ which area on a disk to read/write from). This seems to cause a lot of confusion for some reason. First of all, the physical geometry of a SCSI drive is totally irrelevant, as FreeBSD works in term of disk blocks. In fact, there -is no such thing as "the" physical geometry, as the sector density -varies across the disk - what manufacturers claim is the "true" +is no such thing as the physical geometry, as the sector density +varies across the disk - what manufacturers claim is the quote physical geometry is usually the geometry that they've worked out results in the least wasted space. For IDE disks, FreeBSD does work in terms of C/H/S, but all modern drives will convert this into block references internally as well. All that matters is the logical geometry - the answer that the -BIOS gets when it asks "what is your geometry?" and then uses to access +BIOS gets when it asks what is your geometry? and then uses to access the disk. As FreeBSD uses the BIOS when booting, it's very important to get this right. In particular, if you have more than one operating system on a disk, they must all agree on the geometry, otherwise you @@ -1704,9 +1702,9 @@ will have serious problems booting! For SCSI disks, the geometry to use depends on whether extended translation support is turned on in your controller (this is -often referred to as "support for DOS disks >1GB" or something -similar). If it's turned off, then use N cylinders, 64 heads -and 32 sectors/track, where 'N' is the capacity of the disk in +often referred to as support for DOS disks >1GB or something +similar). If it's turned off, then use N cylinders, 64 heads +and 32 sectors/track, where N is the capacity of the disk in MB. For example, a 2GB disk should pretend to have 2048 cylinders, 64 heads and 32 sectors/track. @@ -1725,7 +1723,7 @@ the DOS partition in the partition editor if you don't want to keep it, or leave it around for programming network cards and the like). Alternatively, there is a freely available utility distributed with -FreeBSD called ``pfdisk.exe'' (located in the tools +FreeBSD called pfdisk.exe (located in the tools subdirectory on the FreeBSD CDROM or on the various FreeBSD ftp sites) which can be used to work out what geometry the other operating systems on the disk are using. You can then enter this @@ -1771,7 +1769,7 @@ reasonably careful, a 20 megabyte boot partition should be plenty. - When I boot FreeBSD I get ``Missing Operating System'' + When I boot FreeBSD I get Missing Operating System @@ -1782,12 +1780,12 @@ instructions given above will almost always get you going. -I can't get past the boot manager's `F?' prompt. +I can't get past the boot manager's F? prompt. This is another symptom of the problem described in the preceding question. Your BIOS geometry and FreeBSD geometry settings do not agree! If your controller or BIOS supports cylinder -translation (often marked as ``>1GB drive support''), try +translation (often marked as >1GB drive support), try toggling its setting and reinstalling FreeBSD. @@ -1796,9 +1794,9 @@ toggling its setting and reinstalling FreeBSD. Do I need to install the complete sources? In general, no. However, we would strongly recommend that you -install, at a minimum, the ``base'' source kit, which +install, at a minimum, the base source kit, which includes several of the files mentioned here, and the -``sys'' (kernel) source kit, which includes sources for the +sys (kernel) source kit, which includes sources for the kernel. There is nothing in the system which requires the presence of the sources to operate, however, except for the kernel-configuration program @@ -1828,7 +1826,7 @@ system installation tool. step in a FreeBSD installation, but more recent releases have benefited from the introduction of a much friendlier kernel configuration tool. When at the FreeBSD boot prompt (boot:), -use the "-c" flag and you will be dropped into a visual +use the flag and you will be dropped into a visual configuration screen which allows you to configure the kernel's settings for most common ISA cards. @@ -1910,13 +1908,13 @@ current versions can generally be obtained by anonymous FTP from There is also a mailing list for the discussion of non-US encryption software. For more information, send -an email message with a single line saying ``help'' in the body +an email message with a single line saying help in the body of your message to majordomo@braae.ru.ac.za. -The boot floppy starts but hangs at the ``Probing Devices...'' +The boot floppy starts but hangs at the Probing Devices... screen. If you have a IDE Zip or Jaz drive installed, remove it and try again. @@ -1927,7 +1925,8 @@ this will be fixed in a later release. -I get a ``panic: cant mount root'' error when rebooting the system after installation. +I get a panic: cant mount root + error when rebooting the system after installation. This error comes from confusion between the boot block's and the kernel's understanding of the disk devices. The error usually @@ -1946,8 +1945,8 @@ think is the boot disk, wd1, while it is really wd2, and fails. For FreeBSD 3.3 and later, reboot the system and hit -"Enter" at the "Booting kernel in 10 seconds; hit -[Enter] to interrupt" prompt. This will drop you into the boot +Enter at the Booting kernel in 10 seconds; hit +[Enter] to interrupt prompt. This will drop you into the boot loader. Then type set root_disk_unit="disk_number". disk_number @@ -1957,7 +1956,7 @@ on the slave on the first IDE controller, 2 if it is installed on the master of the second IDE controller, and 3 if it is installed on the slave of the second IDE controller. -Then type "boot", and your system should boot +Then type boot, and your system should boot correctly. To make this change permanent (ie so you don't have to do this everytime you reboot or turn on your FreeBSD machine), put the line @@ -1969,7 +1968,7 @@ everytime you reboot or turn on your FreeBSD machine), put the line If using FreeBSD 3.2 or earlier, at the Boot: prompt, enter 1:wd(2,a)kernel and press Enter. If the system starts, then run the command -echo "1:wd(2,a)kernel" > /boot.config +echo "1:wd(2,a)kernel" > /boot.config to make it the default boot string. @@ -2142,14 +2141,13 @@ whole 32K of disk space (3 indirect blocks and 1 data block) on a small root partition. The dd command requires a dd that works with large files. - -ttyv0:bde@alphplex:/tmp/q> cat foo +&prompt.user; cat foo df . dd if=/dev/zero of=z bs=1 seek=`echo 2^43 - 2 | bc` count=1 ls -l z du z df . -ttyv0:bde@alphplex:/tmp/q> sh foo +&prompt.user; sh foo Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/da0a 64479 27702 31619 47% / 1+0 records in @@ -2158,16 +2156,14 @@ Filesystem 1024-blocks Used Avail Capacity Mounted on -rw-r--r-- 1 bde bin 8796093022207 Sep 7 16:04 z 32 z Filesystem 1024-blocks Used Avail Capacity Mounted on -/dev/da0a 64479 27734 31587 47% / -ttyv0:bde@alphplex:/tmp/q> exit - +/dev/da0a 64479 27734 31587 47% / Bruce Evans, September 1998 -I compiled a new kernel and now I get the error message "archsw.readin.failed" when booting. +I compiled a new kernel and now I get the error message archsw.readin.failed when booting. You can boot by specifying the kernel directly at the second stage, pressing any key when the | shows up before loader is @@ -2178,7 +2174,7 @@ world. This is not supported. Make world. -How do I upgrade from 3.X -> 4.X? +How do I upgrade from 3.X -> 4.X? We strongly recommend that you use binary snapshots to do this. 4-STABLE snapshots are available at @@ -2205,7 +2201,7 @@ id="hardware"> FreeBSD supports EIDE and SCSI drives (with a compatible controller; see the next section), and all drives using the -original "Western Digital" interface (MFM, RLL, ESDI, and +original Western Digital interface (MFM, RLL, ESDI, and of course IDE). A few ESDI controllers that use proprietary interfaces may not work: stick to WD1002/3/6/7 interfaces and clones. @@ -2276,13 +2272,16 @@ later releases. FreeBSD has contained support for Parallel Port Zip Drives since version 3.0. If you are using a sufficiently up to date version, then -you should check that your kernel contains the scbus0, da0, ppbus0, and vp0 drivers (the GENERIC kernel -contains everything except vp0). With all these drivers present, the -Parallel Port drive should be available as /dev/da0s4. Disks can -be mounted using mount /dev/da0s4 /mnt OR (for dos disks) mount_msdos /dev/da0s4 /mnt as appropriate. +you should check that your kernel contains the scbus0, +da0, ppbus0, and +vp0 drivers (the GENERIC kernel +contains everything except vp0). With all these drivers present, the +Parallel Port drive should be available as /dev/da0s4. Disks can +be mounted using mount /dev/da0s4 /mnt OR (for dos disks) +mount_msdos /dev/da0s4 /mnt as appropriate. Also check out this note on removable drives, -and this note on 'formatting'. +and this note on formatting. @@ -2299,7 +2298,7 @@ the media out while running. You will of course need to dismount the drive before swapping media, and make sure that any external units are powered on when you boot the system so FreeBSD can see them. -See this note on 'formatting'. +See this note on formatting. @@ -2373,10 +2372,10 @@ usbd_flags="" After the system is rebooted, the AT keyboard becomes - /dev/kbd0 and the USB keyboard becomes - /dev/kbd1, if both are connected to the + /dev/kbd0 and the USB keyboard becomes + /dev/kbd1, if both are connected to the system. If there is the USB keyboard only, it will be - /dev/ukbd0. + /dev/ukbd0. If you want to use the USB keyboard in the console, you have to explicitly tell the console driver to use the existence of the USB @@ -2386,7 +2385,7 @@ usbd_flags="" &prompt.root; kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null Note that if the USB keyboard is the only keyboard, it is - accessed as /dev/kbd0, thus, the command + accessed as /dev/kbd0, thus, the command should look like: &prompt.root; kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null @@ -2419,24 +2418,15 @@ following line to the kernel config file In FreeBSD 3.0 or before, add: - - device mse0 at isa? port 0x23c tty irq5 vector mseintr - - +device mse0 at isa? port 0x23c tty irq5 vector mseintr In FreeBSD 3.X, the line should be: - - device mse0 at isa? port 0x23c tty irq5 - - +device mse0 at isa? port 0x23c tty irq5 And in FreeBSD 4.X and later, the line should read: - - device mse0 at isa? port 0x23c irq5 - - +device mse0 at isa? port 0x23c irq5 Bus mice usually comes with dedicated interface cards. These cards may allow you to set the port address and the IRQ number other @@ -2447,7 +2437,8 @@ than shown above. Refer to the manual of your mouse and the - How do I use my PS/2 (``mouse port'' or ``keyboard'') mouse? + How do I use my PS/2 (mouse port + or keyboard) mouse? If you're running a post-2.2.5 version of FreeBSD, the necessary driver, psm, is included and enabled in the kernel. The kernel @@ -2465,24 +2456,15 @@ a new kernel. In FreeBSD 3.0 or earlier, the line should be: - - device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr - - +device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr In FreeBSD 3.1 or later, the line should be: - - device psm0 at isa? tty irq 12 - - +device psm0 at isa? tty irq 12 In FreeBSD 4.0 or later, the line should be: - - device psm0 at atkbdc? irq 12 - - +device psm0 at atkbdc? irq 12 See the Handbook entry on configuring the kernel if you've no experience with building kernels. @@ -2491,10 +2473,7 @@ experience with building kernels. make sure that an entry for psm0 exists in /dev. You can do this by typing: - - cd /dev; sh MAKEDEV psm0 - - +&prompt.root; cd /dev; sh MAKEDEV psm0 when logged in as root. @@ -2509,13 +2488,11 @@ use a mouse pointer in text consoles to cut & paste text. Run the mouse daemon, moused, and turn on the mouse pointer in the virtual console: - - moused -p /dev/xxxx -t yyyy - vidcontrol -m on - - +&prompt.root; moused -p /dev/xxxx -t yyyy +&prompt.root; vidcontrol -m on -Where xxxx is the mouse device name and yyyy +Where xxxx is the mouse device name and +yyyy is a protocol type for the mouse. See the &man.moused.8; man page for supported protocol types. @@ -2523,39 +2500,30 @@ is a protocol type for the mouse. See the system starts. In version 2.2.1, set the following variables in /etc/sysconfig. - - mousedtype="yyyy" - mousedport="xxxx" - mousedflags="" - - +mousedtype="yyyy" +mousedport="xxxx" +mousedflags="" In versions 2.2.2 to 3.0, set the following variables in /etc/rc.conf. - - moused_type="yyyy" - moused_port="xxxx" - moused_flags="" - - +moused_type="yyyy" +moused_port="xxxx" +moused_flags="" In 3.1 and later, assuming you have a PS/2 mouse, all you need -to is add “moused_enable="YES" to +to is add moused_enable="YES" to /etc/rc.conf. In addition, if you would like to be able to use the mouse daemon on all virtual terminals instead of just console at boot-time, add the following to /etc/rc.conf. - - allscreens_flags="-m on" - - +allscreens_flags="-m on" Staring from FreeBSD 2.2.6, the mouse daemon is capable of determining the correct protocol type automatically unless the mouse -is a relatively old serial mouse model. Specify ``auto'' as +is a relatively old serial mouse model. Specify auto the protocol to invoke automatic detection. When the mouse daemon is running, access to the mouse needs to be @@ -2574,7 +2542,7 @@ text. Then, press the button 2 (middle button) or the button 3 (right button) to paste it at the text cursor. In versions 2.2.6 and later, pressing the button 2 will paste -the text. Pressing the button 3 will ``extend'' the selected region +the text. Pressing the button 3 will extend the selected region of text. If your mouse does not have the middle button, you may wish to emulate it or remap buttons using moused options. See the moused(8) @@ -2674,7 +2642,7 @@ Protocol "SysMouse" My mouse has a fancy wheel and buttons. Can I use them in FreeBSD? -The answer is, unfortunately, “It depends”. These mice with +The answer is, unfortunately, It depends. These mice with additional features require specialized driver in most cases. Unless the mouse device driver or the user program has specific support for the mouse, it will act just like a standard two, or @@ -2792,10 +2760,11 @@ There is also limited support for MPU-401 and compatible MIDI cards. Cards conforming to the Microsoft Sound System specification are also supported through the pcm driver. -NOTE This is only for sound! This driver does not support +This is only for sound! This driver does not support CD-ROMs, SCSI or joysticks on these cards, except for the SoundBlaster. The SoundBlaster SCSI interface and some non-SCSI -CDROMS are supported, but you can't boot off this device. +CDROMS are supported, but you can't boot off this +device. @@ -2804,7 +2773,7 @@ CDROMS are supported, but you can't boot off this device. You can run the following command everytime the machine booted up: -mixer pcm 100 vol 100 cd 100 +&prompt.root; mixer pcm 100 vol 100 cd 100 @@ -2819,8 +2788,8 @@ complete list. I don't have a math co-processor - is that bad? -Note This will only affect 386/486SX/486SLC owners - other -machines will have one built into the CPU. +This will only affect 386/486SX/486SLC owners - other +machines will have one built into the CPU. In general this will not cause any problems, but there are circumstances where you will take a hit, either in performance or @@ -2828,9 +2797,9 @@ accuracy of the math emulation code (see the section on FP VERY slow. It is highly recommended that you buy a math co-processor; it's well worth it. -NOTE Some math co-processors are better than others. It pains +Some math co-processors are better than others. It pains us to say it, but nobody ever got fired for buying Intel. Unless -you're sure it works with FreeBSD, beware of clones. +you're sure it works with FreeBSD, beware of clones. @@ -2846,7 +2815,7 @@ for the list of other devices supported. Does FreeBSD support power management on my laptop? FreeBSD supports APM on certain machines. Please look in the -LINT kernel config file, searching for the APM keyword. +LINT kernel config file, searching for the APM keyword. @@ -2857,7 +2826,7 @@ for the list of other devices supported. implementation that causes grief when FreeBSD boots because PCI devices don't get configured at their reported addresses. -Disable the "Plug and Play Operating System" flag in the BIOS +Disable the Plug and Play Operating System flag in the BIOS to work around this problem. More information can be found at http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html#micron @@ -2880,17 +2849,18 @@ beginning. You will need to add the modem's PnP ID to the PnP ID list in the serial driver. -To enable Plug & Play support, compile a new kernel with controller pnp0 in +To enable Plug & Play support, compile a new kernel with +controller pnp0 in the configuration file, then reboot the system. The kernel will print the PnP IDs of all the devices it finds. Copy the PnP ID from the modem to the table in -/sys/i386/isa/sio.c, at about line 2777. Look for the string "SUP1310" -in the structure "siopnp_ids[]" to +/sys/i386/isa/sio.c, at about line 2777. Look for the string SUP1310 +in the structure siopnp_ids[] to find the table. Build the kernel again, install, reboot, and your modem should be found. -You may have to manually configure the PnP devices using the `pnp' command in the +You may have to manually configure the PnP devices using the pnp command in the boot-time configuration with a command like - pnp 1 0 enable os irq0 3 drq0 0 port0 0x2f8 - + +pnp 1 0 enable os irq0 3 drq0 0 port0 0x2f8 to make the modem show. @@ -2904,7 +2874,7 @@ to make the modem show. -Build a kernel with options COMCONSOLE. +Build a kernel with options COMCONSOLE. @@ -2929,8 +2899,8 @@ to make the modem show. implementation that does not configure PCI devices at the addresses reported. This causes grief when FreeBSD boots. -To work around this problem, disable the "Plug and Play Operating -System" flag in the BIOS. +To work around this problem, disable the Plug and Play Operating +System flag in the BIOS. More information on this problem is available at URL: http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html#micron @@ -2979,18 +2949,12 @@ this feature disabled, for some mysterious reason... To enable this, you'll need to edit the first device page mode, which can be done on FreeBSD by giving the command (as root) - - scsi -f /dev/rsd0c -m 1 -e -P 3 - - +&prompt.root; scsi -f /dev/rsd0c -m 1 -e -P 3 and changing the values of AWRE and ARRE from 0 to 1:- - - AWRE (Auto Write Reallocation Enbld): 1 - ARRE (Auto Read Reallocation Enbld): 1 - - +AWRE (Auto Write Reallocation Enbld): 1 +ARRE (Auto Read Reallocation Enbld): 1 The following paragraphs were submitted by Ted Mittelstaedt: @@ -3026,7 +2990,7 @@ means that the disk with bad144 used on it must not exceed 1024 cylinders, 16 heads, and 63 sectors. This places an effective limit of 500MB on a disk that is mapped with bad144. -To use bad144, simply set the "Bad Block" scanning to ON in the +To use bad144, simply set the Bad Block scanning to ON in the FreeBSD fdisk screen during the initial install. This works up through FreeBSD 2.2.7. The disk must have less than 1024 cylinders. It is generally recommended that the disk drive has been in operation for at @@ -3036,8 +3000,8 @@ wandering. If the disk has more than 1024 cylinders (such as a large ESDI drive) the ESDI controller uses a special translation mode to make it work under DOS. The wd driver understands about these translation modes, -IF you enter the "translated" geometry with the "set geometry" command -in fdisk. You must also NOT use the "dangerously dedicated" mode of +IF you enter the translated geometry with the set geometry command +in fdisk. You must also NOT use the dangerously dedicated mode of creating the FreeBSD partition, as this ignores the geometry. Also, even though fdisk will use your overridden geometry, it still knows the true size of the disk, and will attempt to create a too large FreeBSD @@ -3049,7 +3013,7 @@ controller, boot it with a DOS disk and format it with a DOS partition. Then, boot the FreeBSD install and in the fdisk screen, read off and write down the blocksize and block numbers for the DOS partition. Then, reset the geometry to the same that DOS uses, delete the DOS partition, -and create a "cooperative" FreeBSD partition using the blocksize you +and create a cooperative FreeBSD partition using the blocksize you recorded earlier. Then, set the partition bootable and turn on bad block scanning. During the actual install, bad144 will run first, before any filesystems are created. (you can view this with an Alt-F2) @@ -3068,7 +3032,7 @@ replacing the drive. The bad blocks will only get worse as time goes on. This info is specific to the 742a but may also cover other Buslogic cards. (Bustek = Buslogic) -There are 2 general ``versions'' of the 742a card. They are +There are 2 general versions of the 742a card. They are hardware revisions A-G, and revisions H - onwards. The revision letter is located after the Assembly number on the edge of the card. The 742a has 2 ROM chips on it, one is the BIOS chip and @@ -3082,7 +3046,7 @@ Firmware ROM in your adapter card for your hardware revision. The REV A-G cards can only accept BIOS/Firmware sets up to 2.41/2.21. The REV H- up cards can accept the most current BIOS/Firmware sets of 4.70/3.37. The difference between the -firmware sets is that the 3.37 firmware supports ``round robin'' +firmware sets is that the 3.37 firmware supports round robin The Buslogic cards also have a serial number on them. If you have a old hardware revision card you can call the Buslogic RMA @@ -3094,7 +3058,7 @@ young enough they will do so. have a Firmware revision older than this your card will not be recognized as a Buslogic card. It may be recognized as an Adaptec 1540, however. The early Buslogic firmware contains an -AHA1540 ``emulation'' mode. This is not a good thing for an EISA +AHA1540 emulation mode. This is not a good thing for an EISA card, however. If you have an old hardware revision card and you obtain the 2.21 @@ -3109,13 +3073,13 @@ to B-C, the default is A-B. This is basically a known problem. The EISA on-board SCSI controller in the HP Netserver machines occupies EISA slot number 11, so all -the ``true'' EISA slots are in front of it. Alas, the address space +the true EISA slots are in front of it. Alas, the address space for EISA slots >= 10 collides with the address space assigned to PCI, and FreeBSD's auto-configuration currently cannot handle this situation very well. So now, the best you can do is to pretend there is no address -range clash :), by bumping the kernel option EISA_SLOTS +range clash :), by bumping the kernel option EISA_SLOTS to a value of 12. Configure and compile a kernel, as described in the Handbook entry on configuring the kernel. @@ -3123,23 +3087,20 @@ Configure and compile a kernel, as described in the Of course, this does present you with a chicken-and-egg problem when installing on such a machine. In order to work around this problem, a special hack is available inside UserConfig. -Do not use the ``visual'' interface, but the plain command-line +Do not use the visual interface, but the plain command-line interface there. Simply type - - eisa 12 - quit - - +eisa 12 +quit at the prompt, and install your system as usual. While it's recommended you compile and install a custom kernel anyway, Hopefully, future versions will have a proper fix for this problem. -NOTE: You can not use a dangerously dedicated disk with +You can not use a dangerously dedicated disk with an HP Netserver. See this note for -more info. +more info. @@ -3155,13 +3116,13 @@ manual page of the disk driver (man 4 wd). If you're already running FreeBSD 2.2.1 or 2.2.2 with a CMD640 IDE controller and you want to use the second channel, -build a new kernel with options "CMD640" enabled. This +build a new kernel with options "CMD640" enabled. This is the default for 2.2.5 and later. -I keep seeing messages like ``ed1: timeout''. +I keep seeing messages like ed1: timeout. This is usually caused by an interrupt conflict (e.g., two boards using the same IRQ). FreeBSD prior to 2.0.5R used to be tolerant @@ -3181,7 +3142,7 @@ no link on the UTP port or if the cable is disconnected. -When I mount a CDROM, I get ``Incorrect super block''. +When I mount a CDROM, I get Incorrect super block. You have to tell mount the type of the device that you want to mount. By default, mount(8) -will assume the filesystem is of type ``ufs''. You want to mount -a CDROM filesystem, and you do this by specifying the ``'' +will assume the filesystem is of type ufs. You want to mount +a CDROM filesystem, and you do this by specifying the option to mount(8) . This does, of course, assume that the @@ -3199,28 +3160,22 @@ have. As of 1.1R, FreeBSD automatically understands the Rock Ridge (long filename) extensions as well. As an example, if you want to mount the CDROM device, -``/dev/cd0c'', under /mnt, you would execute: +/dev/cd0c, under /mnt, you would execute: - - mount -t cd9660 /dev/cd0c /mnt - - +&prompt.root; mount -t cd9660 /dev/cd0c /mnt -Note that your device name (``/dev/cd0c'' in this +Note that your device name (/dev/cd0c in this example) could be different, depending on the CDROM interface. -Note that the ``'' option just causes the -``mount_cd9660'' command to be executed, and so the +Note that the option just causes the +mount_cd9660 command to be executed, and so the above example could be shortened to: - - mount_cd9660 /dev/cd0c /mnt - - +&prompt.root; mount_cd9660 /dev/cd0c /mnt -When I mount a CDROM, I get ``Device not configured''. +When I mount a CDROM, I get Device not configured. This generally means that there is no CDROM in the CDROM drive, or the drive is not visible on the bus. Feed the drive @@ -3233,10 +3188,7 @@ to answer the bus reset. If you have a SCSI CD-ROM please try to add the following symbol into your kernel configuration file and recompile. - - options "SCSI_DELAY=15" - - +options "SCSI_DELAY=15" @@ -3244,12 +3196,9 @@ and recompile. My printer is ridiculously slow. What can I do ? If it's parallel, and the only problem is that it's terribly -slow, try setting your printer port into ``polled'' mode: +slow, try setting your printer port into polled mode: - - lptcontrol -p - - +&prompt.root; lptcontrol -p Some newer HP printers are claimed not to work correctly in interrupt mode, apparently due to some (not yet exactly @@ -3258,7 +3207,7 @@ understood) timing problem. -My programs occasionally die with ``Signal 11'' errors. +My programs occasionally die with Signal 11 errors. This can be caused by bad hardware (memory, motherboard, etc.). Try running a memory-testing program on your PC. Note that, even @@ -3286,7 +3235,7 @@ the BIOS setup and see if that solves the problem. When I boot, the screen goes black and loses sync! This is a known problem with the ATI Mach 64 video card. -The problem is that this card uses address 2e8, and +The problem is that this card uses address 2e8, and the fourth serial port does too. Due to a bug (feature?) in the sio(4) @@ -3306,7 +3255,8 @@ into configuration mode). -Disable sio0, sio1, sio2 and sio3 +Disable sio0, sio1, +sio2 and sio3 (all of them). This way the sio driver doesn't get activated -> no problems. @@ -3353,36 +3303,37 @@ is fixed, we'll use the extended BIOS functions to get the full memory information...but for now we're stuck with the kernel option. -options "MAXMEM=<n>" +options "MAXMEM=n" -Where n is your memory in Kilobytes. For a 128 MB machine, -you'd want to use 131072. +Where n is your memory in Kilobytes. For a 128 MB machine, +you'd want to use 131072. -FreeBSD 2.0 panics with ``kmem_map too small!'' +FreeBSD 2.0 panics with kmem_map too small! -Note The message may also be ``mb_map too small!'' +The message may also be +mb_map too small! The panic indicates that the system ran out of virtual memory for network buffers (specifically, mbuf clusters). You can increase the amount of VM available for mbuf clusters by adding: -options "NMBCLUSTERS=<n>" +options "NMBCLUSTERS=n" -to your kernel config file, where <n> is a number in the +to your kernel config file, where n is a number in the range 512-4096, depending on the number of concurrent TCP connections you need to support. I'd recommend trying 2048 - this should get rid of the panic completely. You can monitor the number of mbuf clusters allocated/in use on the system with netstat -m. The default value for NMBCLUSTERS is -512 + MAXUSERS * 16. +512 + MAXUSERS * 16. -``CMAP busy panic'' when rebooting with a new kernel. +CMAP busy panic when rebooting with a new kernel. The logic that attempts to detect an out of date /var/db/kvm_*.db files sometimes fails and using a @@ -3390,10 +3341,7 @@ mismatched file can sometimes lead to panics. If this happens, reboot single-user and do: - - rm /var/db/kvm_*.db - - +&prompt.root; rm /var/db/kvm_*.db @@ -3410,7 +3358,7 @@ which is causing the problem. -Sendmail says ``mail loops back to myself'' +Sendmail says mail loops back to myself This is answered in the sendmail FAQ as follows:- @@ -3439,8 +3387,8 @@ release. It is however regularly posted to comp.answers, and news.answers. You can also receive a copy via email by sending a message to -mail-server@rtfm.mit.edu with the command "send -usenet/news.answers/mail/sendmail-faq" as the body of the +mail-server@rtfm.mit.edu +with the command send usenet/news.answers/mail/sendmail-faq as the body of the message. @@ -3450,7 +3398,7 @@ message. The remote machine may be setting your terminal type -to something other than the cons25 terminal type +to something other than the cons25 terminal type required by the FreeBSD console. There are a number of possible work-arounds for this problem: @@ -3458,24 +3406,24 @@ required by the FreeBSD console. After logging on to the remote machine, set your TERM shell -variable to ansi or -sco if the remote machine knows +variable to ansi or +sco if the remote machine knows about these terminal types. Use a VT100 emulator like screen at the FreeBSD console. -screen offers you the ability to run multiple +screen offers you the ability to run multiple concurrent sessions from one terminal, and is a neat program in its own right. -Each screen window behaves like a VT100 terminal, -so the TERM variable at the remote end should be set to -vt100. +Each screen window behaves like a VT100 terminal, +so the TERM variable at the remote end should be set to +vt100. -Install the cons25 terminal database entry on +Install the cons25 terminal database entry on the remote machine. The way to do this depends on the operating system on the remote machine. The system administration manuals for the remote system should be able to help you here. @@ -3483,10 +3431,9 @@ should be able to help you here. Fire up an X server at the FreeBSD end and login to the remote machine -using an X based terminal emulator such as xterm or -rxvt. The TERM variable at the remote host -should be set to xterm or vt100 -. +using an X based terminal emulator such as xterm or +rxvt. The TERM variable at the remote host +should be set to xterm or vt100. @@ -3495,7 +3442,7 @@ should be set to xterm or vt100 -My machine prints "calcru: negative time..." +My machine prints calcru: negative time... This can be caused by various hardware and/or software ailments relating to interrupts. It may be due to bugs but can also happen @@ -3505,19 +3452,19 @@ Graphics accelerators can also get you here, in which case you should check the interrupt setting of the card first. A side effect of this problem are dying processes with the -message "SIGXCPU exceeded cpu time limit". +message SIGXCPU exceeded cpu time limit. For FreeBSD 3.0 and later from Nov 29, 1998 forward: If the problem cannot be fixed otherwise the solution is to set -this sysctl variable: - sysctl -w kern.timecounter.method=1 - +this sysctl variable: + +&prompt.root; sysctl -w kern.timecounter.method=1 This means a performance impact, but considering the cause of this problem, you probably will not notice. If the problem -persists, keep the sysctl set to one and set the "NTIMECOUNTER" +persists, keep the sysctl set to one and set the NTIMECOUNTER option in your kernel to increasingly large values. If by the -time you have reached "NTIMECOUNTER=20" the problem isn't +time you have reached NTIMECOUNTER=20 the problem isn't solved, interrupts are too hosed on your machine for reliable timekeeping. @@ -3528,7 +3475,7 @@ timekeeping. id="commercial"> Commercial Applications -NOTE This section is still very sparse, though we're hoping, of +This section is still very sparse, though we're hoping, of course, that companies will add to it! :) The FreeBSD group has no financial interest in any of the companies listed here but simply lists them as a public service (and feels that commercial interest @@ -3536,7 +3483,7 @@ in FreeBSD can have very positive effects on FreeBSD's long-term viability). We encourage commercial software vendors to send their entries here for inclusion. See the Vendors -page for a longer list. +page for a longer list. @@ -3546,8 +3493,8 @@ page for a longer list. ELF Motif 2.1.20 distribution for FreeBSD (either i386 or Alpha). -There are two distributions, the "developement edition" and the -"runtime edition" (for much less). These distributions includes: +There are two distributions, the developement edition and the +runtime edition (for much less). These distributions includes: @@ -3765,7 +3712,7 @@ form only, in a unified diskette distribution for FreeBSD and Linux. Xi Graphics also offers a high performance X Server taylored for laptop support. -There is a free "compatibility demo" of version 5.0 available. +There is a free compatibility demo of version 5.0 available. Xi Graphics also sells Motif and CDE for FreeBSD (see above). @@ -3849,7 +3796,7 @@ id="applications"> Please take a look at the ports page for info on software packages ported to FreeBSD. The list currently tops 3400 and is growing daily, so come -back to check often or subscribe to the freebsd-announce +back to check often or subscribe to the freebsd-announce mailing list for periodic updates on new entries. @@ -3859,7 +3806,7 @@ well. Each time a FreeBSD release is made, a snapshot of the ports tree at the time of release in also included in the ports/ directory. -We also support the concept of a ``package'', essentially no +We also support the concept of a package, essentially no more than a gzipped binary distribution with a little extra intelligence embedded in it for doing whatever custom installation work is required. A package can be installed and uninstalled @@ -3965,8 +3912,8 @@ the correct port/package for your system. -I get a message "Error: can't find -libc.so.4.0" +I get a message Error: can't find +libc.so.4.0 You accidently downloaded packages meant for 4.X and 5.X @@ -3985,50 +3932,41 @@ You will need to add the alternative math emulator to your kernel; you do this by adding the following to your kernel config file and it will be compiled in. - - options GPL_MATH_EMULATE - - +options GPL_MATH_EMULATE -NOTE You will need to remove the MATH_EMULATE -option when you do this. +You will need to remove the MATH_EMULATE +option when you do this. When I run a SCO/iBCS2 application, it bombs on -socksys (FreeBSD 3.0 and older only). +socksys (FreeBSD 3.0 and older only). You first need to edit the /etc/sysconfig (or /etc/rc.conf) file in the last section to change the -following variable to YES: +following variable to YES: - - # Set to YES if you want ibcs2 (SCO) emulation loaded at startup - ibcs2=NO - - +# Set to YES if you want ibcs2 (SCO) emulation loaded at startup +ibcs2=NO It will load the ibcs2 kernel module at startup. You'll then need to set up /compat/ibcs2/dev to look like: - -lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null +lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null lrwxr-xr-x 1 root wheel 7 Oct 15 22:20 nfsd@ -> socksys -rw-rw-r-- 1 root wheel 0 Oct 28 12:02 null lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 socksys@ -> /dev/null -crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx - - +crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx You just need socksys to go to /dev/null to fake the open & close. The code in -CURRENT will handle the rest. This is much cleaner than the way it was done before. If you -want the spx driver for a local socket X connection, define -SPX_HACK when you compile the system. +want the spx driver for a local socket X connection, define +SPX_HACK when you compile the system. @@ -4075,9 +4013,10 @@ branches. If you want to run some aout applications like Netscape Navigator on an Elf'ened machine such as 3.1-R or later, -it would need /usr/libexec/ld.so and some aout libs. +it would need /usr/libexec/ld.so and some aout libs. They are included in the compat22 distribution. -Use /stand/sysinstall or install.sh in the compat22 subdirectory +Use /stand/sysinstall or +install.sh in the compat22 subdirectory and install it. Also read ERRATAs for 3.1-R and 3.2-R. @@ -4097,24 +4036,25 @@ id="make-kernel"> Not at all! Check out the kernel config section of the Handbook. -NOTE: I recommend making a dated snapshot of your kernel +I recommend making a dated snapshot of your kernel in kernel.YYMMDD after you get it all working, that way if you do something dire the next time you play with your configuration you can boot that kernel instead of having to go all the way back to kernel.GENERIC. This is particularly important if you're now booting off a controller that isn't supported in the GENERIC -kernel (yes, personal experience). +kernel (yes, personal experience). - My kernel compiles fail because _hw_float is missing. + My kernel compiles fail because _hw_float is missing. Let me guess. You removed npx0 from your kernel configuration file because you don't have a math co-processor, -right? Wrong! :-) The npx0 is MANDATORY. Even if you don't -have a mathematic co-processor, you must include the npx0 +right? Wrong! :-) The npx0 is MANDATORY. Even if you don't +have a mathematic co-processor, you must +include the npx0 device. @@ -4172,16 +4112,13 @@ the kernel from getting trashed due to hardware or software conflicts. The way to fix this is to leave out the IRQ settings on all but one port. Here is a example: - - # - # Multiport high-speed serial line - 16550 UARTS - # - device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr - device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr - device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr - device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr - - +# +# Multiport high-speed serial line - 16550 UARTS +# +device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr +device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr +device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr +device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr @@ -4189,37 +4126,31 @@ on all but one port. Here is a example: How do I enable support for QIC-40/80 drives? You need to uncomment the following line in the generic config -file (or add it to your config file), add a ``flags 0x1'' +file (or add it to your config file), add a flags 0x1 on the fdc line and recompile. - -controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 flags 0x1 vector fdintr +controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 flags 0x1 vector fdintr disk fd0 at fdc0 drive 0 ^^^^^^^^^ disk fd1 at fdc0 drive 1 #tape ft0 at fdc0 drive 2 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Next, you create a device called /dev/ft0 by going into /dev and run the following command: - - sh ./MAKEDEV ft0 - - +&prompt.root; sh MAKEDEV ft0 -for the first device. ft1 for a second one and so on. +for the first device. ft1 for a second one and so on. You will have a device called /dev/ft0, which you can write to through a special program to manage it called -``ft'' - see the man page on ft +fd - see the man page on ft for further details. Versions previous to also had some trouble dealing -with bad tape media; if you have trouble where ft seems to +with bad tape media; if you have trouble where ft seems to go back and forth over the same spot, try grabbing the latest -version of ft from /usr/src/sbin/ft in +version of ft from /usr/src/sbin/ft in and try that. @@ -4309,21 +4240,15 @@ pretty much the same for all devices. If it's a ZIP drive or a floppy , you've already got a DOS filesystem on it, you can use a command like this: - - mount -t msdos /dev/fd0c /floppy - - +&prompt.root; mount -t msdos /dev/fd0c /floppy if it's a floppy, or this: - - mount -t msdos /dev/da2s4 /zip - - +&prompt.root; mount -t msdos /dev/da2s4 /zip for a ZIP disk with the factory configuration. -For other disks, see how they're laid out using fdisk or +For other disks, see how they're laid out using fdisk or /stand/sysinstall. The rest of the examples will be for a ZIP drive on da2, the third @@ -4339,11 +4264,8 @@ drive that you don't want to bother with multiple operating system support on, just blow away the whole FAT partition table (slices) and just use the BSD partitioning: - - dd if=/dev/zero of=/dev/rda2 count=2 - disklabel -Brw da2 auto - - +&prompt.root; dd if=/dev/zero of=/dev/rda2 count=2 +&prompt.root; disklabel -Brw da2 auto You can use disklabel or /stand/sysinstall to create multiple BSD partitions. You'll certainly want to do this if you're adding @@ -4353,26 +4275,18 @@ removable drive like a ZIP. Finally, create a new file system, this one's on our ZIP drive using the whole disk: - - newfs /dev/rda2c - - +&prompt.root; newfs /dev/rda2c and mount it: - - mount /dev/da2c /zip - - +&prompt.root; mount /dev/da2c /zip and it's probably a good idea to add a line like this to -/etc/fstab so you can just type "mount /zip" in the +/etc/fstab so you can just type +mount /zip in the future: - - /dev/da2c /zip ffs rw,noauto 0 0 - - +/dev/da2c /zip ffs rw,noauto 0 0 @@ -4418,16 +4332,13 @@ future: How do I mount a secondary DOS partition? The secondary DOS partitions are found after ALL the primary -partitions. For example, if you have an "E" partition as the +partitions. For example, if you have an E partition as the second DOS partition on the second SCSI drive, you need to create -the special files for "slice 5" in /dev, then mount /dev/da1s5: +the special files for slice 5 in /dev, then mount /dev/da1s5: - - # cd /dev - # ./MAKEDEV da1s5 - # mount -t msdos /dev/da1s5 /dos/e - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV da1s5 +&prompt.root; mount -t msdos /dev/da1s5 /dos/e @@ -4463,16 +4374,13 @@ partition. Assuming you name that file something like you can then edit the c:\boot.ini file to come up with something like this: - - [boot loader] - timeout=30 - default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS - [operating systems] - multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT" - C:\BOOTSECT.BSD="FreeBSD" - C:\="DOS" - - +[boot loader] +timeout=30 +default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS +[operating systems] +multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT" +C:\BOOTSECT.BSD="FreeBSD" +C:\="DOS" For 2.2.x systems this procedure assumes that DOS, NT, FreeBSD, or whatever have been installed into their respective fdisk partitions on the @@ -4483,31 +4391,22 @@ to boot from its native partition, not the disk MB Mount a DOS-formatted floppy (if you've converted to NTFS) or the FAT partition, under, say, /mnt. - - dd if=/dev/rda0a of=/mnt/bootsect.bsd bs=512 count=1 - - +&prompt.root; dd if=/dev/rda0a of=/mnt/bootsect.bsd bs=512 count=1 Reboot into DOS or NT. NTFS users copy the bootsect.bsd and/or the bootsect.lnx file from the floppy to -C:\. Modify the attributes (permissions) on +C:\. Modify the attributes (permissions) on boot.ini with: - - attrib -s -r c:\boot.ini - - +C:\> attrib -s -r c:\boot.ini Edit to add the appropriate entries from the example boot.ini above, and restore the attributes: - - attrib +s +r c:\boot.ini - - +C:\> attrib +s +r c:\boot.ini If FreeBSD is booting from the MBR, restore it with the DOS -``fdisk'' command after you reconfigure them to boot from their +fdisk command after you reconfigure them to boot from their native partitions. For FreeBSD 3.x systems the procedure is somewhat simpler. @@ -4549,32 +4448,29 @@ system. Very briefly, these are: Boot Linux, and add the following lines to /etc/lilo.conf: - other=/dev/hda2 - table=/dev/hda - label=FreeBSD - +other=/dev/hda2 + table=/dev/hda + label=FreeBSD (the above assumes that your FreeBSD slice is known to Linux as /dev/hda2; tailor to suit your setup). Then, run lilo as root and you should be done. If FreeBSD resides on another disk, you need to add -``loader=/boot/chain.b'' to the LILO entry. +loader=/boot/chain.b to the LILO entry. For example: - other=/dev/dab4 - table=/dev/dab - loader=/boot/chain.b - label=FreeBSD - +other=/dev/dab4 + table=/dev/dab + loader=/boot/chain.b + label=FreeBSD In some cases you may need to specify the BIOS drive number to the FreeBSD boot loader to successfully boot off the second disk. For example, if your FreeBSD SCSI disk is probed by BIOS as BIOS -disk 1, at the FreeBSD boot loader prompt you need to specify: - Boot: 1:da(0,a)/kernel - - +disk 1, at the FreeBSD boot loader prompt you need to specify: + +Boot: 1:da(0,a)/kernel On FreeBSD 2.2.5 and later, you can configure boot(8) to automatically do this for you at boot time. @@ -4599,58 +4495,58 @@ will bear no other Operating Systems in the Master Boot Record). - Will a ``dangerously dedicated'' disk endanger my health? + Will a dangerously dedicated disk endanger my health? The installation procedure allows you to chose two different methods in partitioning your harddisk(s). The default way makes it compatible with other operating systems on the same machine, -by using fdisk table entries (called ``slices'' in FreeBSD), +by using fdisk table entries (called slices in FreeBSD), with a FreeBSD slice that employs partitions of its own. Optionally, one can chose to install a boot-selector to switch between the possible operating systems on the disk(s). The alternative uses the entire disk for FreeBSD, and makes no attempt to be compatible with other operating systems. -So why it is called ``dangerous''? A disk in this mode +So why it is called dangerous? A disk in this mode doesn't contain what normal PC utilities would consider a valid fdisk table. Depending on how well they have been designed, they might complain at you once they are getting in contact with such a disk, or even worse, they might damage the BSD bootstrap without even asking or notifying -you. In addition, the ``dangerously dedicated'' disk's layout +you. In addition, the dangerously dedicated disk's layout is known to confuse many BIOSsen, including those from AWARD (eg. as found in HP Netserver and Micronics systems as well as many others) and Symbios/NCR (for the popular 53C8xx range of SCSI controllers). This isn't a complete list, there are more. -Symptoms of this confusion include the "read error" message +Symptoms of this confusion include the read error message printed by the FreeBSD bootstrap when it can't find itself, as well as system lockups when booting. Why have this mode at all then? It only saves a few kbytes of disk space, and it can cause real problems for a new -installation. ``Dangerously dedicated'' mode's origins lie +installation. Dangerously dedicated mode's origins lie in a desire to avoid one of the most common problems plaguing -new FreeBSD installers - matching the BIOS ``geometry'' numbers +new FreeBSD installers - matching the BIOS geometry numbers for a disk to the disk itself. -``Geometry'' is an outdated concept, but one still at the +Geometry is an outdated concept, but one still at the heart of the PC's BIOS and its interaction with disks. When the FreeBSD installer creates slices, it has to record the location of these slices on the disk in a fashion that corresponds with the way the BIOS expects to find them. If it gets it wrong, you won't be able to boot. -``Dangerously dedicated'' mode tries to work around this +Dangerously dedicated mode tries to work around this by making the problem simpler. In some cases, it gets it right. But it's meant to be used as a last-ditch alternative - there are better ways to solve the problem 99 times out of 100. -So, how do you avoid the need for ``DD'' mode when you're +So, how do you avoid the need for DD mode when you're installing? Start by making a note of the geometry that your BIOS claims to be using for your disks. You can arrange to have -the kernel print this as it boots by specifying ``-v'' at the -``boot:'' prompt, or using ``boot -v'' in the loader. Just +the kernel print this as it boots by specifying at the +boot: prompt, or using boot -v in the loader. Just before the installer starts, the kernel will print a list of BIOS geometries. Don't panic - wait for the installer to start and then use scrollback to read the numbers. Typically the BIOS @@ -4659,7 +4555,7 @@ disks, first IDE, then SCSI. When you're slicing up your disk, check that the disk geometry displayed in the FDISK screen is correct (ie. it matches the BIOS -numbers); if it's wrong, use the ``g'' key to fix it. You may have +numbers); if it's wrong, use the g key to fix it. You may have to do this if there's absolutely nothing on the disk, or if the disk has been moved from another system. Note that this is only an issue with the disk that you're going to boot from; FreeBSD @@ -4667,28 +4563,22 @@ will sort itself out just fine with any other disks you may have. Once you've got the BIOS and FreeBSD agreeing about the geometry of the disk, your problems are almost guaranteed to be -over, and with no need for ``DD'' mode at all. If, however, -you are still greeted with the dreaded ``read error'' message +over, and with no need for DD mode at all. If, however, +you are still greeted with the dreaded read error message when you try to boot, it's time to cross your fingers and go for it - there's nothing left to lose. -To return a ``dangerously dedicated'' disk for normal PC +To return a dangerously dedicated disk for normal PC use, there are basically two options. The first is, you write enough NULL bytes over the MBR to make any subsequent installation believe this to be a blank disk. You can do this for example with - - dd if=/dev/zero of=/dev/rda0 count=15 - - +&prompt.root; dd if=/dev/zero of=/dev/rda0 count=15 -Alternatively, the undocumented DOS ``feature'' +Alternatively, the undocumented DOS feature - - fdisk /mbr - - +C:\> fdisk /mbr will to install a new master boot record as well, thus clobbering the BSD bootstrap. @@ -4724,7 +4614,7 @@ main memory in order to be able to accomodate a kernel core. IDE drives are not able to allow access to both drives on the same channel at the same time (FreeBSD doesn't support mode 4, so -all IDE disk I/O is ``programmed''). I would still suggest putting +all IDE disk I/O is programmed). I would still suggest putting your swap on a separate drive however. The drives are so cheap, it is not worth worrying about. @@ -4739,10 +4629,7 @@ of course you can use any name that you want). Make sure your kernel was built with the line - - pseudo-device vn 1 #Vnode driver (turns a file into a device) - - +pseudo-device vn 1 #Vnode driver (turns a file into a device) in your config-file. The GENERIC kernel already contains this. @@ -4750,40 +4637,32 @@ of course you can use any name that you want). -create a vn-device +create a vn-device - cd /dev - sh ./MAKEDEV vn0 - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV vn0 - -create a swapfile (/usr/swap0) +create a swapfile (/usr/swap0) - dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 - +&prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 - -set proper permissions on (/usr/swap0) +set proper permissions on (/usr/swap0) - chmod 0600 /usr/swap0 - +&prompt.root; chmod 0600 /usr/swap0 - -enable the swap file in /etc/rc.conf +enable the swap file in /etc/rc.conf - swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired. - +swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired. - @@ -4795,10 +4674,7 @@ of course you can use any name that you want). To enable the swap file immediately, type - - vnconfig -ce /dev/vn0c /usr/swap0 swap - - +&prompt.root; vnconfig -ce /dev/vn0c /usr/swap0 swap @@ -4818,10 +4694,7 @@ should cover most of your problem. See the Under /usr/share/syscons/keymaps are a number of map files. Choose the one relevant to your system and load it. - - kbdcontrol -l uk.iso - - +&prompt.root; kbdcontrol -l uk.iso Both the /usr/share/syscons/keymaps and the .kbd extension are assumed by @@ -4954,7 +4827,7 @@ mapping is in /usr/share/examples/syscons. -Don't turn on quotas on '/', +Don't turn on quotas on /, @@ -4962,11 +4835,10 @@ mapping is in /usr/share/examples/syscons. Put the quota file on the file system that the quotas are to be enforced on. ie: - FS QUOTA FILE - /usr /usr/admin/quotas - /home /home/admin/quotas - ... - +FS QUOTA FILE +/usr /usr/admin/quotas +/home /home/admin/quotas +... @@ -4980,19 +4852,15 @@ to be enforced on. ie: The symptom of this is: - - # ccdconfig -C - ccdconfig: ioctl (CCDIOCSET): /dev/ccd0c: Inappropriate file type or format - # - - +&prompt.root; ccdconfig -C +ccdconfig: ioctl (CCDIOCSET): /dev/ccd0c: Inappropriate file type or format This usually happens when you are trying to concatenate the -`c' partitions, which default to type `unused'. The ccd +c partitions, which default to type unused. The ccd driver requires the underlying partition type to be FS_BSDFFS. Edit the disklabel of the disks you are trying to concatenate and change the types of partitions to -`4.2BSD'. +4.2BSD. @@ -5001,28 +4869,21 @@ to concatenate and change the types of partitions to The symptom of this is: - - # disklabel ccd0 - (it prints something sensible here, so let's try to edit it) - # disklabel -e ccd0 - (edit, save, quit) - disklabel: ioctl DIOCWDINFO: No disk label on disk; - use "disklabel -r" to install initial label - # - - +&prompt.root; disklabel ccd0 +(it prints something sensible here, so let's try to edit it) +&prompt.root; disklabel -e ccd0 +(edit, save, quit) +disklabel: ioctl DIOCWDINFO: No disk label on disk; +use "disklabel -r" to install initial label This is because the disklabel returned by ccd is actually a -`fake' one that is not really on the disk. You can solve +fake one that is not really on the disk. You can solve this problem by writing it back explicitly, as in: - - # disklabel ccd0 > /tmp/disklabel.tmp - # disklabel -Rr ccd0 /tmp/disklabel.tmp - # disklabel -e ccd0 - (this will work now) - - +&prompt.root; disklabel ccd0 > /tmp/disklabel.tmp +&prompt.root; disklabel -Rr ccd0 /tmp/disklabel.tmp +&prompt.root; disklabel -e ccd0 +(this will work now) @@ -5033,13 +4894,11 @@ this problem by writing it back explicitly, as in: memory, messages and semaphores. You need to add the following lines to your kernel config to enable them. - - options SYSVSHM - options SYSVSHM # enable shared memory - options SYSVSEM # enable for semaphores - options SYSVMSG # enable for messaging - - +options SYSVSHM +options SYSVSHM # enable shared memory +options SYSVSEM # enable for semaphores +options SYSVMSG # enable for messaging + In FreeBSD 3.2 and later, these options are already part of the GENERIC kernel, which means they should already be compiled into your system. @@ -5119,7 +4978,7 @@ Cw youruucpnodename.UUCP The nodns and nocanonify features will prevent any usage of the DNS during mail delivery. The -UUCP_RELAY clause is needed for bizarre reasons, +UUCP_RELAY clause is needed for bizarre reasons, don't ask. Simply put an Internet hostname there that is able to handle .UUCP pseudo-domain addresses; most likely, you will enter the mail relay of your ISP there. @@ -5143,11 +5002,13 @@ if-bus.UUCP uucp-dom:if-bus As you can see, this is part of a real-life file. The first three lines handle special cases where domain-addressed mail should not be sent out to the default route, but instead to -some UUCP neighbor in order to ``shortcut'' the delivery +some UUCP neighbor in order to shortcut the delivery path. The next line handles mail to the local Ethernet domain that can be delivered using SMTP. Finally, the UUCP neighbors are mentioned in the .UUCP pseudo-domain notation, -to allow for a ``uucp-neighbor!recipient'' override of the +to allow for a +uucp-neighbor!recipient +override of the default rules. The last line is always a single dot, matching everything else, with UUCP delivery to a UUCP neighbor that serves as your universal mail gateway to the world. All of @@ -5164,7 +5025,7 @@ each time you change your mailertable. Final hint: if you are uncertain whether some particular mail routing would work, remember the option to sendmail. It starts sendmail in address test mode; -simply enter ``0 '', followed by the address you wish to +simply enter 0 , followed by the address you wish to test for the mail routing. The last line tells you the used internal mail agent, the destination host this agent will be called with, and the (possibly translated) address. Leave @@ -5207,19 +5068,13 @@ by your ISP. If you've chosen to use user-ppp, you can automatically fetch your mail when a connection to the 'net is established with the following entry in /etc/ppp/ppp.linkup: - - MYADDR: - !bg su user -c fetchmail - - +MYADDR: + !bg su user -c fetchmail -If you are using sendmail (as shown below) to deliver mail to +If you are using sendmail (as shown below) to deliver mail to non-local accounts, put the command - - !bg su user -c "sendmail -q" - - + !bg su user -c "sendmail -q" after the above shown entry. This forces sendmail to process your mailqueue as soon as the connection to the 'net is established. @@ -5228,10 +5083,7 @@ mailqueue as soon as the connection to the 'net is established. In the home directory of user on bsd.home, create a .fetchmailrc file: - - poll myISP.com protocol pop3 fetchall pass MySecret; - - +poll myISP.com protocol pop3 fetchall pass MySecret Needless to say, this file should not be readable by anyone except user as it contains the password MySecret. @@ -5243,25 +5095,22 @@ mail via relay.myISP.com, allowing quicker mail transmissio The following .mc file should suffice: - - VERSIONID(`bsd.home.mc version 1.0') - OSTYPE(bsd4.4)dnl - FEATURE(nouucp)dnl - MAILER(local)dnl - MAILER(smtp)dnl - Cwlocalhost - Cwbsd.home - MASQUERADE_AS(`myISP.com')dnl - FEATURE(allmasquerade)dnl - FEATURE(masquerade_envelope)dnl - FEATURE(nocanonify)dnl - FEATURE(nodns)dnl - define(SMART_HOST, `relay.myISP.com') - Dmbsd.home - define(`confDOMAIN_NAME',`bsd.home')dnl - define(`confDELIVERY_MODE',`deferred')dnl - - +VERSIONID(`bsd.home.mc version 1.0') +OSTYPE(bsd4.4)dnl +FEATURE(nouucp)dnl +MAILER(local)dnl +MAILER(smtp)dnl +Cwlocalhost +Cwbsd.home +MASQUERADE_AS(`myISP.com')dnl +FEATURE(allmasquerade)dnl +FEATURE(masquerade_envelope)dnl +FEATURE(nocanonify)dnl +FEATURE(nodns)dnl +define(SMART_HOST, `relay.myISP.com') +Dmbsd.home +define(`confDOMAIN_NAME',`bsd.home')dnl +define(`confDELIVERY_MODE',`deferred')dnl Refer to the previous section for details of how to turn this .mc file into a sendmail.cf file. Also, don't forget to @@ -5277,8 +5126,8 @@ at the Boot: prompt (just -s for FreeBSD releases before to enter Single User mode. At the question about the shell to use, hit ENTER. You'll be dropped to a &prompt.root; prompt. Enter mount -u / to remount your root filesystem read/write, then run mount -a to -remount all the filesystems. Run passwd root to -change the root password then run exit +remount all the filesystems. Run passwd root to +change the root password then run exit to continue booting. @@ -5315,21 +5164,17 @@ country, you should edit that one instead. Simply use this perl command: - -perl -i.bak -npe 's/\r\n/\n/g' file ... - +&prompt.user; perl -i.bak -npe 's/\r\n/\n/g' file ... file is the file(s) to process. The modification is done in-place, with the original file stored with a .bak extension. Alternatively you can use the tr command: - -tr -d '\r' < dos-text-file > unix-file - +&prompt.user; tr -d '\r' < dos-text-file > unix-file -dos-text-file is the file containing DOS text while -unix-file will contain the converted output. This can +dos-text-file is the file containing DOS text while +unix-file will contain the converted output. This can be quite a bit faster than using perl. @@ -5358,10 +5203,8 @@ option, or uninstall Kerberos as described in the next question. for the release you are running. If you have the CDROM, you can mount the cd (we'll assume on /cdrom) and run - -cd /cdrom/bin -./install.sh - +&prompt.root; cd /cdrom/bin +&prompt.root; ./install.sh @@ -5375,48 +5218,34 @@ out of pseudoterminals. Here's how to add more: -Build and install a new kernel with the line +Build and install a new kernel with the line - pseudo-device pty 256 - - - - +pseudo-device pty 256 in the configuration file. - -Run the command +Run the commands - # cd /dev - # ./MAKEDEV pty{1,2,3,4,5,6,7} - - - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV pty{1,2,3,4,5,6,7} to make 256 device nodes for the new terminals. - Edit /etc/ttys and add lines for each of the 256 -terminals. They should match the form of the existing entries, i.e. they look like +terminals. They should match the form of the existing entries, i.e. they look +like - ttyqc none network - +ttyqc none network - - - -The order of the letter designations is tty[pqrsPQRS][0-9a-v], +The order of the letter designations is tty[pqrsPQRS][0-9a-v], using a regular expression. - @@ -5449,47 +5278,40 @@ using a regular expression. Go into single user mode and than back to multi user mode. -On the console do: - # shutdown now - (Note: without -r or -h) +On the console do: - # return - # exit - +&prompt.root; shutdown now +(Note: without -r or -h) + +&prompt.root; return +&prompt.root; exit What is a sandbox? -"Sandbox" is a security term. It can mean two things: +Sandbox is a security term. It can mean two things: - A process which is placed inside a set of virtual walls that are designed to prevent someone who breaks into the process from being able to break into the wider system. - - -The process is said to be able to "play" inside the +The process is said to be able to play inside the walls. That is, nothing the process does in regards to executing code is supposed to be able to breech the walls so you do not have to do a detailed audit of its code to be able to say certain things about its security. - - The walls might be a userid, for example. This is the definition used in the security and named man pages. - - -Take the 'ntalk' service, for example (see +Take the ntalk service, for example (see /etc/inetd.conf). This service used to run as userid root. Now it runs as userid tty. The tty user is a sandbox designed to make it more difficult for someone @@ -5498,7 +5320,6 @@ being able to hack beyond that user id. - A process which is placed inside a simulation of the machine. This is more hard-core. Basically it means that @@ -5507,16 +5328,12 @@ that he can break into the wider machine but is, in fact, only breaking into a simulation of that machine and not modifying any real data. - - The most common way to accomplish this is to build a simulated environment in a subdirectory and then run the -processes in that directory chroot'd (i.e. "/" for that -process is this directory, not the real "/" of the +processes in that directory chroot'd (i.e. / for that +process is this directory, not the real / of the system). - - Another common use is to mount an underlying filesystem read-only and then create a filesystem layer on top of it that gives a process a seemingly writeable view into that @@ -5626,7 +5443,7 @@ id="x-and-moused"> If you are using syscons (the default console driver), you can configure FreeBSD to support a mouse pointer on each virtual screen. In order to avoid conflicting with X, syscons supports -a virtual device called ``/dev/sysmouse''. All mouse events +a virtual device called /dev/sysmouse. All mouse events received from the real mouse device are written to the sysmouse device via moused. If you wish to use your mouse on one or more virtual consoles, and use X, @@ -5645,16 +5462,13 @@ Device "/dev/sysmouse" versions, the Protocol should be MouseSystems. -Some people prefer to use ``/dev/mouse'' under X. To -make this work, ``/dev/mouse'' should be linked to +Some people prefer to use /dev/mouse under X. To +make this work, /dev/mouse should be linked to /dev/sysmouse: - - # cd /dev - # rm -f mouse - # ln -s sysmouse mouse - - +&prompt.root; cd /dev +&prompt.root; rm -f mouse +&prompt.root; ln -s sysmouse mouse @@ -5873,15 +5687,12 @@ EndSection Try turning off the Num Lock key. If your Num Lock key is on by default at boot-time, you may add -the following line in the ``Keyboard'' section of the -XF86Config file. +the following line in the Keyboard section of the +XF86Config file. - - # Let the server do the NumLock processing. This should only be - # required when using pre-R6 clients - ServerNumLock - - +# Let the server do the NumLock processing. This should only be +# required when using pre-R6 clients + ServerNumLock @@ -5902,7 +5713,7 @@ session, perhaps to look at documentation for a program you are running or to read your mail while waiting for an FTP transfer to finish. Just do Alt-F2 (hold down the Alt key and press the F2 key), and you will find a login prompt -waiting for you on the second ``virtual console''! When you +waiting for you on the second virtual console! When you want to go back to the original session, do Alt-F1. The default FreeBSD installation has three virtual consoles @@ -5910,61 +5721,50 @@ enabled (8 starting with 3.3-RELEASE), and Alt-F1, Alt-F2, and Alt-F3 will switch between these virtual consoles. To enable more of them, edit /etc/ttys -and add entries for ``ttyv4'' to ``ttyvc'' after the -comment on ``Virtual terminals'': +and add entries for ttyv4 to ttyvc after the +comment on Virtual terminals: - - # Edit the existing entry for ttyv3 in /etc/ttys and change - # "off" to "on". - ttyv3 "/usr/libexec/getty Pc" cons25 on secure - ttyv4 "/usr/libexec/getty Pc" cons25 on secure - ttyv5 "/usr/libexec/getty Pc" cons25 on secure - ttyv6 "/usr/libexec/getty Pc" cons25 on secure - ttyv7 "/usr/libexec/getty Pc" cons25 on secure - ttyv8 "/usr/libexec/getty Pc" cons25 on secure - ttyv9 "/usr/libexec/getty Pc" cons25 on secure - ttyva "/usr/libexec/getty Pc" cons25 on secure - ttyvb "/usr/libexec/getty Pc" cons25 on secure - - +# Edit the existing entry for ttyv3 in /etc/ttys and change +# "off" to "on". +ttyv3 "/usr/libexec/getty Pc" cons25 on secure +ttyv4 "/usr/libexec/getty Pc" cons25 on secure +ttyv5 "/usr/libexec/getty Pc" cons25 on secure +ttyv6 "/usr/libexec/getty Pc" cons25 on secure +ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv8 "/usr/libexec/getty Pc" cons25 on secure +ttyv9 "/usr/libexec/getty Pc" cons25 on secure +ttyva "/usr/libexec/getty Pc" cons25 on secure +ttyvb "/usr/libexec/getty Pc" cons25 on secure Use as many or as few as you want. The more virtual terminals you have, the more resources that are used; this can be important if you have 8MB RAM or less. You may also want to change the -``secure'' to ``insecure''. +secure to insecure. -IMPORTANT NOTE if you want to run an X server you MUST +If you want to run an X server you MUST leave at least one virtual terminal unused (or turned off) for it to use. That is to say that if you want to have a login prompt pop up for all twelve of your Alt-function keys, you're out of luck - you can only do this for eleven of them -if you also want to run an X server on the same machine. +if you also want to run an X server on the same +machine. The easiest way to disable a console is by turning it off. For example, if you had the full 12 terminal allocation mentioned above and you wanted to run X, you would change settings for virtual terminal 12 from: - - ttyvb "/usr/libexec/getty Pc" cons25 on secure - - +ttyvb "/usr/libexec/getty Pc" cons25 on secure to: - - ttyvb "/usr/libexec/getty Pc" cons25 off secure - - +ttyvb "/usr/libexec/getty Pc" cons25 off secure If your keyboard has only ten function keys, you would end up with: - - ttyv9 "/usr/libexec/getty Pc" cons25 off secure - ttyva "/usr/libexec/getty Pc" cons25 off secure - ttyvb "/usr/libexec/getty Pc" cons25 off secure - - +ttyv9 "/usr/libexec/getty Pc" cons25 off secure +ttyva "/usr/libexec/getty Pc" cons25 off secure +ttyvb "/usr/libexec/getty Pc" cons25 off secure (You could also just delete these lines.) @@ -5972,21 +5772,15 @@ virtual terminal 12 from: the next step is to make sure that you have enough virtual terminal devices. The easiest way to do this is: - - # cd /dev - # ./MAKEDEV vty12 # For 12 devices - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV vty12 Next, the easiest (and cleanest) way to activate the virtual consoles is to reboot. However, if you really don't want to reboot, you can just shut down the X Window system and execute (as -root): +root): - - kill -HUP 1 - - +&prompt.root; kill -HUP 1 It's imperative that you completely shut down X Window if it is running, before running this command. If you don't, your system @@ -6004,7 +5798,7 @@ that once you've switched away from X Window to a virtual terminal, you may use only the Alt- function key to switch to another virtual terminal or back to X Window. You do not need to also press the Ctrl key. If you use the control key to switch back to X on some -older releases, you can find your text console stuck in ``control-lock'' +older releases, you can find your text console stuck in control-lock mode. Tap the control key to wake it up again. @@ -6025,7 +5819,7 @@ of documenting which vty X will start on and passing the responsibility of restarting the X server on logout to init. The rc.local method makes it easy to kill xdm if there is a problem starting the X server. -If loaded from rc.local, xdm should be started without any +If loaded from rc.local, xdm should be started without any arguments (i.e., as a daemon). xdm must start AFTER getty runs, or else getty and xdm will conflict, locking out the console. The best way around this is to have the script sleep 10 seconds or so then @@ -6047,9 +5841,10 @@ launch xdm. -When I run xconsole, I get ``Couldn't open console''. +When I run xconsole, I get Couldn't open console. -If you start X with startx, the permissions on /dev/console will not get +If you start X with startx, +the permissions on /dev/console will not get changed, resulting in things like xterm -C and xconsole not working. This is because of the way console permissions are set by default. @@ -6061,10 +5856,7 @@ file exists to solve such problems. In a nutshell, make sure an uncommented line of the form - - /dev/ttyv0 0600 /dev/console - - +/dev/ttyv0 0600 /dev/console is in /etc/fbtab and it will ensure that whomever logs in on /dev/ttyv0 will own the console. @@ -6082,10 +5874,7 @@ virtual terminal and getting back to X again may make them re-synchronized. If the problem occurs often, you may add the following option in your kernel configuration file and recompile it. - - options PSM_CHECKSYNC - - +options PSM_CHECKSYNC See the section on building a kernel if you've no experience with building kernels. @@ -6096,7 +5885,7 @@ still see the problem, click any mouse button while holding the mouse still to re-synchronize the mouse and the driver. Note that unfortunately this option may not work with all the -systems and voids the ``tap'' feature of the ALPS GlidePoint +systems and voids the tap feature of the ALPS GlidePoint device attached to the PS/2 mouse port. In versions 2.2.6 and later, synchronization check is done @@ -6106,30 +5895,21 @@ a standard feature, PSM_CHECKSYNC option is not available in these versions.) However, in rare case the driver may erroneously report synchronization problem and you may see the kernel message: - - psmintr: out of sync (xxxx != yyyy) - - +psmintr: out of sync (xxxx != yyyy) and find your mouse doesn't seem to work properly. If this happens, disable the synchronization check code by setting the driver flags for the PS/2 mouse driver to 0x100. -Enter UserConfig by giving the ``'' option +Enter UserConfig by giving the option at the boot prompt: - - boot: -c - - +boot: -c Then, in the UserConfig command line, type: - - UserConfig> flags psm0 0x100 - UserConfig> quit - - +UserConfig> flags psm0 0x100 +UserConfig> quit @@ -6137,7 +5917,7 @@ at the boot prompt: My PS/2 mouse from MouseSystems doesn't seem to work. There have been some reports that certain model of PS/2 mouse -from MouseSystems works only if it is put into the ``high resolution'' +from MouseSystems works only if it is put into the high resolution mode. Otherwise, the mouse cursor may jump to the upper-left corner of the screen every so often. @@ -6147,9 +5927,7 @@ to /sys/i386/isa/psm.c and rebuild the kernel. See the section on building a kernel if you've no experience with building kernels. - -diff -u psm.c.orig psm.c -@@ -766,6 +766,8 @@ +@@ -766,6 +766,8 @@ if (verbose >= 2) log(LOG_DEBUG, "psm%d: SET_DEFAULTS return code:%04x\n", unit, i); @@ -6157,27 +5935,19 @@ if you've no experience with building kernels. + #if 0 set_mouse_scaling(sc->kbdc); /* 1:1 scaling */ - set_mouse_mode(sc->kbdc); /* stream mode */ - - + set_mouse_mode(sc->kbdc); /* stream mode */ In versions 2.2.6 or later, specify the flags 0x04 to the PS/2 mouse driver to put the mouse into the high resolution mode. -Enter UserConfig by giving the ``'' option +Enter UserConfig by giving the option at the boot prompt: - - boot: -c - - +boot: -c Then, in the UserConfig command line, type: - - UserConfig> flags psm0 0x04 - UserConfig> quit - - +UserConfig> flags psm0 0x04 +UserConfig> quit See the previous section for another possible cause of mouse problems. @@ -6185,7 +5955,7 @@ problems. -When building an X app, imake can't find Imake.tmpl. Where is it? +When building an X app, imake can't find Imake.tmpl. Where is it? Imake.tmpl is part of the Imake package, a standard X application building tool. @@ -6199,7 +5969,7 @@ manually from the X distribution files. How do I reverse the mouse buttons? -Run the command xmodmap -e "pointer = 3 2 1" from your .xinitrc or .xsession. +Run the command xmodmap -e "pointer = 3 2 1" from your .xinitrc or .xsession. @@ -6208,16 +5978,16 @@ manually from the X distribution files. Just prior to the release of FreeBSD 3.1, a new feature was -added to allow the display of "splash" screens during +added to allow the display of splash screens during the boot messages. The splash screens currently must be a 256 color bitmap (*.BMP) or ZSoft PCX (*.PCX) file. In addition, they must have a resolution of 320x200 or less to work on standard VGA adapters. If you compile VESA support into your kernel, then you can use larger bitmaps up to 1024x768. Note that VESA support requires -the VM86 kernel option to be compiled into the +the VM86 kernel option to be compiled into the kernel. The actual VESA support can either be compiled directly -into the kernel with the VESA kernel config option +into the kernel with the VESA kernel config option or by loading the VESA kld module during bootup. To use a splash screen, you need to modify the startup files @@ -6240,13 +6010,11 @@ copy it to /boot/splash.bmp. Next, you need to have a /boot/loader.rc file that contains the following lines: - - load kernel - load -t splash_image_data /boot/splash.bmp - load splash_bmp - autoboot - - +load kernel +load -t splash_image_data /boot/splash.bmp +load splash_bmp +autoboot + @@ -6258,30 +6026,20 @@ following lines: FreeBSD 3.2 includes a nicer way of configuring the boot process. If you wish, you can use the method listed above for FreeBSD 3.1. If you do and you want to use PCX, replace -splash_bmp with splash_pcx. If, +splash_bmp with splash_pcx. If, on the other hand, you want to use the newer boot configuration, you need to create a /boot/loader.rc file that contains the following lines: - - include /boot/loader.4th - start - - - - +include /boot/loader.4th +start and a /boot/loader.conf that contains the following: - - splash_bmp_load="YES" - bitmap_load="YES" - - - - +splash_bmp_load="YES" +bitmap_load="YES" This assumes you are using /boot/splash.bmp for your splash screen. If you'd rather use a PCX file, @@ -6289,12 +6047,10 @@ copy it to /boot/splash.pcx, create a /boot/loader.rc as instructed above, and create a /boot/loader.conf that contains: - - splash_pcx_load="YES" - bitmap_load="YES" - bitmap_name="/boot/splash.pcx" - - +splash_pcx_load="YES" +bitmap_load="YES" +bitmap_name="/boot/splash.pcx" + @@ -6314,7 +6070,7 @@ on over to the gallery at Yes. All you need to do is use &man.xmodmap.1; to define what function you wish them to perform. - Assuming all "Windows(tm)" keyboards are standard + Assuming all Windows(tm) keyboards are standard then the keycodes for the 3 keys are @@ -6392,9 +6148,9 @@ id="networking"> -Where can I get information on ``diskless booting''? +Where can I get information on diskless booting? -``Diskless booting'' means that the FreeBSD box is booted over a +Diskless booting means that the FreeBSD box is booted over a network, and reads the necessary files from a server instead of its hard disk. For full details, please read the Handbook entry on diskless booting @@ -6408,15 +6164,12 @@ its hard disk. For full details, please read Internet standards and good engineering practice prohibit us from providing packet forwarding by default in FreeBSD. You can however enable this feature by changing the following variable to -YES in rc.conf: +YES in rc.conf: - - gateway_enable=YES # Set to YES if this host will be a gateway - - +gateway_enable=YES # Set to YES if this host will be a gateway This option will put the sysctl variable -net.inet.ip.forwarding to 1. +net.inet.ip.forwarding to 1. In most cases, you will also need to run a routing process to tell other systems on your network about your router; FreeBSD @@ -6461,7 +6214,7 @@ look at the natd section of this FAQ. Why does recompiling the latest BIND from ISC fail? -There is a conflict between the ``cdefs.h'' file in the +There is a conflict between the cdefs.h file in the distribution and the one shipped with FreeBSD. Just remove compat/include/sys/cdefs.h. @@ -6474,7 +6227,7 @@ distribution and the one shipped with FreeBSD. Just remove slattach, sliplogin, pppd and ppp. -pppd and ppp provide support for both incoming and outgoing +pppd and ppp provide support for both incoming and outgoing connections. Sliplogin deals exclusively with incoming connections and slattach deals exclusively with outgoing connections. @@ -6506,8 +6259,8 @@ connections. Sliplogi -If you only have access to the Internet through a "shell -account", you may want to have a look at the slirp +If you only have access to the Internet through a shell +account, you may want to have a look at the slirp package. It can provide you with (limited) access to services such as ftp and http direct from your local machine. @@ -6522,7 +6275,7 @@ id="natd"> been allocated only a single IP number from your Internet provider (or even if you receive a dynamic IP number), you may want to look at the natd -program. Natd allows you to connect an entire subnet to the +program. natd allows you to connect an entire subnet to the internet using only a single IP number. The ppp program has similar functionality built in via @@ -6550,13 +6303,10 @@ Ultrix. How can I setup Ethernet aliases? -Add ``netmask 0xffffffff'' to your ifconfig +Add netmask 0xffffffff to your ifconfig command-line like the following: - - ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff - - +&prompt.root; ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff @@ -6566,8 +6316,8 @@ command-line like the following: If you want to use the other ports, you'll have to specify an additional parameter on the ifconfig command line. The -default port is ``link0''. To use the AUI port instead of -the BNC one, use ``link2''. These flags should be specified +default port is link0. To use the AUI port instead of +the BNC one, use link2. These flags should be specified using the ifconfig_* variables in /etc/rc.conf. @@ -6590,10 +6340,7 @@ for more information on this topic. Some versions of the Linux NFS code only accept mount requests from a privileged port; try - - mount -o -P linuxbox:/blah /mnt - - +&prompt.root; mount -o -P linuxbox:/blah /mnt @@ -6603,10 +6350,7 @@ from a privileged port; try Sun workstations running SunOS 4.X only accept mount requests from a privileged port; try - - mount -o -P sunbox:/blah /mnt - - +&prompt.root; mount -o -P sunbox:/blah /mnt @@ -6616,10 +6360,7 @@ from a privileged port; try Try disabling the TCP extensions in /etc/rc.conf by changing the following variable to NO: - - tcp_extensions=NO - - +tcp_extensions=NO Xylogic's Annex boxes are also broken in this regard and you must use the above change to connect thru them. @@ -6631,13 +6372,14 @@ use the above change to connect thru them. Multicast host operations are fully supported in FreeBSD 2.0 and later by default. If you want your box to run as a multicast router, -you will need to recompile your kernel with the MROUTING -option and run mrouted. FreeBSD 2.2 and later will start -mrouted at boot time if the flag mrouted_enable is set -to "YES" in /etc/rc.conf. +you will need to recompile your kernel with the MROUTING +option and run mrouted. FreeBSD 2.2 and later will start +mrouted at boot time if the flag mrouted_enable is set +to "YES" in /etc/rc.conf. MBONE tools are available in their own ports category, mbone. If -you are looking for the conference tools vic and vat, +you are looking for the conference tools vic and +vat, look there! For more information, see the @@ -6650,28 +6392,25 @@ look there! Here is a list compiled by Glen Foster, with some more modern additions: - - Vendor Model - ---------------------------------------------- - ASUS PCI-L101-TB - Accton ENI1203 - Cogent EM960PCI - Compex ENET32-PCI - D-Link DE-530 - Dayna DP1203, DP2100 - DEC DE435, DE450 - Danpex EN-9400P3 - JCIS Condor JC1260 - Linksys EtherPCI - Mylex LNP101 - SMC EtherPower 10/100 (Model 9332) - SMC EtherPower (Model 8432) - TopWare TE-3500P - Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348 - (3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442, - ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd) - - +Vendor Model +---------------------------------------------- +ASUS PCI-L101-TB +Accton ENI1203 +Cogent EM960PCI +Compex ENET32-PCI +D-Link DE-530 +Dayna DP1203, DP2100 +DEC DE435, DE450 +Danpex EN-9400P3 +JCIS Condor JC1260 +Linksys EtherPCI +Mylex LNP101 +SMC EtherPower 10/100 (Model 9332) +SMC EtherPower (Model 8432) +TopWare TE-3500P +Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348 + (3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442, + ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd) @@ -6680,47 +6419,41 @@ look there! You will probably find that the host is actually in a different domain; for example, if you are in foo.bar.edu and you wish to reach -a host called ``mumble'' in the bar.edu domain, you will have to -refer to it by the fully-qualified domain name, ``mumble.bar.edu'', -instead of just ``mumble''. +a host called mumble in the bar.edu domain, you will have to +refer to it by the fully-qualified domain name, mumble.bar.edu, +instead of just mumble. Traditionally, this was allowed by BSD BIND resolvers. However the current version of bind that ships with FreeBSD no longer provides default abbreviations for non-fully qualified domain names other than the domain you are in. -So an unqualified host mumble must either be found -as mumble.foo.bar.edu, or it will be searched for +So an unqualified host mumble must either be found +as mumble.foo.bar.edu, or it will be searched for in the root domain. This is different from the previous behavior, where the -search continued across mumble.bar.edu, and -mumble.edu. Have a look at RFC 1535 for why this +search continued across mumble.bar.edu, and +mumble.edu. Have a look at RFC 1535 for why this was considered bad practice, or even a security hole. As a good workaround, you can place the line - - search foo.bar.edu bar.edu - - +search foo.bar.edu bar.edu instead of the previous - - domain foo.bar.edu - - +domain foo.bar.edu into your /etc/resolv.conf file. However, make sure that the search order -does not go beyond the ``boundary between local and public -administration'', as RFC 1535 calls it. +does not go beyond the boundary between local and public +administration, as RFC 1535 calls it. -``Permission denied'' for all networking operations. +Permission denied for all networking operations. -If you have compiled your kernel with the IPFIREWALL +If you have compiled your kernel with the IPFIREWALL option, you need to be aware that the default policy as of 2.1.7R (this actually changed during 2.1-STABLE development) is to deny all packets that are not explicitly allowed. @@ -6729,12 +6462,9 @@ is to deny all packets that are not explicitly allowed. firewalling, you can restore network operability by typing the following while logged in as root: - - ipfw add 65534 allow all from any to any - - +&prompt.root; ipfw add 65534 allow all from any to any -You can also set "firewall_type='open'" in /etc/rc.conf. +You can also set firewall_type="open" in /etc/rc.conf. For further information on configuring a FreeBSD firewall, see the Handbook section. @@ -6751,35 +6481,29 @@ actual measurements to satisfy your curiosity, read on. The following measurements were made using 2.2.5-STABLE on a 486-66. IPFW was modified to measure the time spent within -the ip_fw_chk routine, displaying the results to the console +the ip_fw_chk routine, displaying the results to the console every 1000 packets. Two rule sets, each with 1000 rules were tested. The first set was designed to demonstrate a worst case scenario by repeating the rule: - - ipfw add deny tcp from any to any 55555 - - +&prompt.root; ipfw add deny tcp from any to any 55555 This demonstrates worst case by causing most of IPFW's packet check routine to be executed before finally deciding that the packet does not match the rule (by virtue of the port number). -Following the 999th iteration of this rule was an allow ip -from any to any. +Following the 999th iteration of this rule was an allow ip +from any to any. The second set of rules were designed to abort the rule check quickly: - - ipfw add deny ip from 1.2.3.4 to 1.2.3.4 - - +&prompt.root; ipfw add deny ip from 1.2.3.4 to 1.2.3.4 The nonmatching source IP address for the above rule causes these rules to be skipped very quickly. As before, the 1000th -rule was an allow ip from any to any. +rule was an allow ip from any to any. The per-packet processing overhead in the former case was approximately 2.703ms/packet, or roughly 2.7 microseconds per @@ -6803,8 +6527,8 @@ few things to keep in mind when building an efficient rule set: -Place an `established' rule early on to handle the -majority of TCP traffic. Don't put any allow tcp +Place an established rule early on to handle the +majority of TCP traffic. Don't put any allow tcp statements before this rule. @@ -6827,15 +6551,13 @@ statistics with ipfw -a l. How can I redirect service requests from one machine to another? -You can redirect FTP (and other service) request with the 'socket' -package, available in the ports tree in category 'sysutils'. +You can redirect FTP (and other service) request with the socket +package, available in the ports tree in category sysutils. Simply replace the service's commandline to call socket instead, like so: - -ftp stream tcp nowait nobody /usr/local/bin/socket socket ftp.foo.com ftp - +ftp stream tcp nowait nobody /usr/local/bin/socket socket ftp.foo.com ftp -where 'ftp.foo.com' and 'ftp' are the host and port to redirect to, +where ftp.foo.com and ftp are the host and port to redirect to, respectively. @@ -6851,27 +6573,19 @@ a commercial product. -Why do I get “/dev/bpf0: device not configured”? +Why do I get /dev/bpf0: device not configured? The Berkeley Packet Filter (bpf) driver needs to be enabled before running programs that utilize it. Add this to your kernel config file and build a new kernel: - - pseudo-device bpfilter # Berkeley Packet Filter - - +pseudo-device bpfilter # Berkeley Packet Filter Secondly, after rebooting you will have to create the device node. This can be accomplished by a change to the /dev directory, followed by the execution of: - - - # sh MAKEDEV bpf0 - - - +&prompt.root; sh MAKEDEV bpf0 Please see the handbook's entry on device nodes for more information on creating devices. @@ -6905,28 +6619,22 @@ id="userppp"> You should first read the ppp man page and the ppp section of the handbook. Enable logging with the command - - set log Phase Chat Connect Carrier lcp ipcp ccp command - - +set log Phase Chat Connect Carrier lcp ipcp ccp command This command may be typed at the ppp command prompt or it may be entered in the /etc/ppp/ppp.conf configuration file (the start of the default section is the best place to put it). Make sure that /etc/syslog.conf contains the lines - - !ppp - *.* /var/log/ppp.log - - +!ppp +*.* /var/log/ppp.log and that the file /var/log/ppp.log exists. You can now find out a lot about what's going on from the log file. Don't worry if it doesn't all make sense. If you need to get help from someone, it may make sense to them. -If your version of ppp doesn't understand the "set log" +If your version of ppp doesn't understand the set log command, you should download the latest version. It will build on FreeBSD version 2.1.5 and higher. @@ -6939,14 +6647,11 @@ It will build on FreeBSD version 2.1.5 and higher. This is usually because your hostname won't resolve. The best way to fix this is to make sure that /etc/hosts is consoluted by your resolver first by editing /etc/host.conf -and putting the hosts line first. Then, simply put an +and putting the hosts line first. Then, simply put an entry in /etc/hosts for your local machine. If you have -no local network, change your localhost line: +no local network, change your localhost line: - -127.0.0.1 foo.bar.com foo localhost - - +127.0.0.1 foo.bar.com foo localhost Otherwise, simply add another entry for your host. Consult the relevant man pages for more details. @@ -6963,31 +6668,23 @@ when you're done. netstat -rn, you should see two entries like this: - -Destination Gateway Flags Refs Use Netif Expire +Destination Gateway Flags Refs Use Netif Expire default 10.0.0.2 UGSc 0 0 tun0 -10.0.0.2 10.0.0.1 UH 0 0 tun0 - - +10.0.0.2 10.0.0.1 UH 0 0 tun0 This is assuming that you've used the addresses from the handbook, the man page or from the ppp.conf.sample file. If you haven't got a default route, it may be because you're running an old version of ppp that doesn't understand the -word HISADDR in the ppp.conf file. If your version of +word HISADDR in the ppp.conf file. If your version of ppp is from before FreeBSD 2.2.5, change the - - add 0 0 HISADDR - - +add 0 0 HISADDR line to one saying - - add 0 0 10.0.0.2 - - + +add 0 0 10.0.0.2 Another reason for the default route line being missing is that you have mistakenly set up a default router in your @@ -6995,10 +6692,7 @@ you have mistakenly set up a default router in your /etc/sysconfig prior to release 2.2.2), and you have omitted the line saying - - delete ALL - - +delete ALL from ppp.conf. If this is the case, go back to the Final system configuration section of the handbook. @@ -7006,16 +6700,13 @@ omitted the line saying -What does "No route to host" mean +What does No route to host mean This error is usually due to a missing - - MYADDR: - delete ALL - add 0 0 HISADDR - - +MYADDR: + delete ALL + add 0 0 HISADDR section in your /etc/ppp/ppp.linkup file. This is only necessary if you have a dynamic IP address or don't know the @@ -7023,11 +6714,8 @@ address of your gateway. If you're using interactive mode, you can type the following after entering packet mode (packet mode is indicated by the capitalized PPP in the prompt): - - delete ALL - add 0 0 HISADDR - - +delete ALL +add 0 0 HISADDR Refer to the PPP and Dynamic IP addresses section of the handbook for further details. @@ -7040,13 +6728,10 @@ for further details. The default ppp timeout is 3 minutes. This can be adjusted with the line - - set timeout NNN - - +set timeout NNN -where NNN is the number of seconds of inactivity before the -connection is closed. If NNN is zero, the connection is +where NNN is the number of seconds of inactivity before the +connection is closed. If NNN is zero, the connection is never closed due to a timeout. It is possible to put this command in the ppp.conf file, or to type it at the prompt in interactive mode. It is also possible to adjust it on the fly while @@ -7068,10 +6753,7 @@ be bad, and disconnects. Prior to FreeBSD version 2.2.5, LQR was enabled by default. It is now disabled by default. LQR can be disabled with the line - - disable lqr - - +disable lqr @@ -7088,10 +6770,7 @@ Sportster for example, this is measured by the S10 register in tenths of a second. To make your modem more forgiving, you could add the following send-expect sequence to your dial string: - - set dial "...... ATS10=10 OK ......" - - +set dial "...... ATS10=10 OK ......" Refer to your modem manual for details. @@ -7105,17 +6784,17 @@ explaination. The first thing to establish is which side of the link is hung. If you are using an external modem, you can simply try using -ping to see if the TD light is flashing when you +ping to see if the TD light is flashing when you transmit data. If it flashes (and the RD light doesn't), the problem is with the remote end. If TD doesn't flash, the problem -is local. With an internal modem, you'll need to use the set -server command in your ppp.conf file. When the hang occurs, +is local. With an internal modem, you'll need to use the set +server command in your ppp.conf file. When the hang occurs, connect to ppp using pppctl. If your network connection suddenly revives (ppp was revived due to the activity on the diagnostic socket) -or if you can't connect (assuming the set socket command +or if you can't connect (assuming the set socket command succeeded at startup time), the problem is local. If you can connect -and things are still hung, enable local async logging with set log -local async and use ping from another window or terminal to make +and things are still hung, enable local async logging with set log +local async and use ping from another window or terminal to make use of the link. The async logging will show you the data being transmitted and received on the link. If data is going out and not coming back, the problem is remote. @@ -7130,7 +6809,7 @@ you now have two possibilities: There's very little you can do about this. Most ISPs will refuse to help if you're not running a Microsoft OS. You can -enable lqr in your ppp.conf file, allowing ppp to +enable lqr in your ppp.conf file, allowing ppp to detect the remote failure and hang up, but this detection is relatively slow and therefore not that useful. You may want to avoid telling your ISP that you're running user-ppp.... @@ -7138,11 +6817,8 @@ to avoid telling your ISP that you're running user-ppp.... First, try disabling all local compression by adding the following to your configuration: - - disable pred1 deflate deflate24 protocomp acfcomp shortseq vj - deny pred1 deflate deflate24 protocomp acfcomp shortseq vj - - +disable pred1 deflate deflate24 protocomp acfcomp shortseq vj +deny pred1 deflate deflate24 protocomp acfcomp shortseq vj Then reconnect to ensure that this makes no difference. If things improve or if the problem is solved completely, @@ -7155,12 +6831,12 @@ running a Microsoft product). and wait until the connection hangs again. This may use up quite a bit of disk space. The last data read from the port may be of interest. It is usually ascii data, and may even -describe the problem (``Memory fault, core dumped'' ?). +describe the problem (Memory fault, core dumped ?). If your ISP is helpful, they should be able to enable logging on their end, then when the next link drop occurs, they may be able to tell you why their side is having a problem. Feel free -to send the details to brian@Awfulhak.org, or even to ask your ISP to +to send the details to &a.brian;, or even to ask your ISP to contact me directly. @@ -7170,12 +6846,12 @@ contact me directly. Your best bet here is to rebuild ppp by adding CFLAGS+=-g and STRIP= to the end of the Makefile, then doing a -make clean && make && make install. When -ppp hangs, find the ppp process id with ps ajxww | fgrep ppp -and run gdb ppp PID. From the gdb prompt, you can then use -bt to get a stack trace. +make clean && make && make install. When +ppp hangs, find the ppp process id with ps ajxww | fgrep ppp +and run gdb ppp PID. From the gdb prompt, you can then use +bt to get a stack trace. -Send the results to brian@Awfulhak.org. +Send the results to brian@Awfulhak.org. @@ -7188,10 +6864,7 @@ Protocol (LCP). Many ISPs will not initiate negotiations and expect the client to do so. To force ppp to initiate the LCP, use the following line: - - set openmode active - - +set openmode active Note: It usually does no harm if both sides initiate negotiation, so openmode is now active by default. However, @@ -7203,7 +6876,7 @@ the next section explains when it does do some har I keep seeing errors about magic being the same Occasionally, just after connecting, you may see messages in -the log that say "magic is the same". Sometimes, these +the log that say magic is the same. Sometimes, these messages are harmless, and sometimes one side or the other exits. Most ppp implementations cannot survive this problem, and even if the link seems to come up, you'll see repeated configure @@ -7217,10 +6890,10 @@ of it happening consistently when using slirp. The reason is that in the time taken between getty exiting and ppp starting, the client-side ppp starts sending Line Control Protocol (LCP) packets. Because ECHO is still switched on for the port on -the server, the client ppp sees these packets "reflect" back. +the server, the client ppp sees these packets reflect back. One part of the LCP negotiation is to establish a magic number -for each side of the link so that "reflections" can be detected. +for each side of the link so that reflections can be detected. The protocol says that when the peer tries to negotiate the same magic number, a NAK should be sent and a new magic number should be chosen. During the period that the server @@ -7238,19 +6911,13 @@ becomes happy just in time to see a hangup from the server. This can be avoided by allowing the peer to start negotiating with the following line in your ppp.conf file: - - set openmode passive - - +set openmode passive This tells ppp to wait for the server to initiate LCP negotiations. Some servers however may never initiate negotiations. If this is the case, you can do something like: - - set openmode active 3 - - +set openmode active 3 This tells ppp to be passive for 3 seconds, and then to start sending LCP requests. If the peer starts sending requests during @@ -7297,26 +6964,17 @@ nowhere and gives up. passive - that is, make one side wait for the other to start negotiating. This can be done with the - - set openmode passive - - +set openmode passive command. Care should be taken with this option. You should also use the - - set stopped N - - +set stopped N command to limit the amount of time that ppp waits for the peer to begin negotiations. Alternatively, the - - set openmode active N - - +set openmode active N command (where N is the number of seconds to wait before starting negotiations) can be used. Check the manual page for @@ -7335,26 +6993,24 @@ Compression Control Protocols (CCP). This problem is now corrected, but if you're still running an old version of ppp, the problem can be circumvented with the line - - disable pred1 - - +disable pred1 Ppp locks up when I shell out to test it -When you execute the shell or ! command, ppp -executes a shell (or if you've passed any arguements, ppp +When you execute the shell or ! command, +ppp +executes a shell (or if you've passed any arguements, ppp will execute those arguements). Ppp will wait for the command to complete before continuing. If you attempt to use the ppp link while running the command, the link will appear to have -frozen. This is because ppp is waiting for the command +frozen. This is because ppp is waiting for the command to complete. If you wish to execute commands like this, use the -!bg command instead. This will execute the given command +!bg command instead. This will execute the given command in the background, and ppp can continue to service the link. @@ -7368,10 +7024,7 @@ lines that are used in a null-modem serial cable. When using this sort of connection, LQR should always be enabled with the line - - enable lqr - - +enable lqr LQR is accepted by default if negotiated by the peer. @@ -7385,10 +7038,7 @@ cause, and set up Dial filters (dfilters) to prevent such dialing. To determine the cause, use the following line: - - set log +tcp/ip - - +set log +tcp/ip This will log all traffic through the connection. The next time the line comes up unexpectedly, you will see the reason @@ -7400,12 +7050,9 @@ DNS lookups from establishing a connection (this will notppp from passing the packets through an established connection), use the following: - - set dfilter 1 deny udp src eq 53 - set dfilter 2 deny udp dst eq 53 - set dfilter 3 permit 0/0 0/0 - - +set dfilter 1 deny udp src eq 53 +set dfilter 2 deny udp dst eq 53 +set dfilter 3 permit 0/0 0/0 This is not always suitable, as it will effectively break your demand-dial capabilities - most programs will need a DNS lookup @@ -7420,14 +7067,11 @@ details on how to create your own configuration file and what should go into it. You may also want to add the following line to your .mc file: - - define(`confDELIVERY_MODE', `d')dnl - - +define(`confDELIVERY_MODE', `d')dnl This will make sendmail queue everything until the queue is -run (usually, sendmail is invoked with ``-bd -q30m'', telling it -to run the queue every 30 minutes) or until a ``sendmail -q'' +run (usually, sendmail is invoked with , telling it +to run the queue every 30 minutes) or until a sendmail -q is done (perhaps from your ppp.linkup file). @@ -7437,11 +7081,8 @@ is done (perhaps from your ppp.linkup file). I keep seeing the following errors in my log file: - - CCP: CcpSendConfigReq - CCP: Received Terminate Ack (1) state = Req-Sent (6) - - +CCP: CcpSendConfigReq +CCP: Received Terminate Ack (1) state = Req-Sent (6) This is because ppp is trying to negotiate Predictor1 compression, and the peer does not want to negotiate any @@ -7449,10 +7090,7 @@ compression at all. The messages are harmless, but if you wish to remove them, you can disable Predictor1 compression locally too: - - disable pred1 - - +disable pred1 @@ -7479,28 +7117,23 @@ less than 1500 under FreeBSD 2.2.2 or before. Why doesn't ppp log my connection speed? -In order to log all lines of your modem ``conversation'', +In order to log all lines of your modem conversation, you must enable the following: - - set log +connect - - +set log +connect This will make ppp -log everything up until the last requested "expect" string. +log everything up until the last requested expect string. If you wish to see your connect speed and are using PAP or CHAP -(and therefore don't have anything to "chat" after the CONNECT -in the dial script - no "set login" script), you must make sure that -you instruct ppp to "expect" the whole CONNECT line, something like +(and therefore don't have anything to chat after the CONNECT +in the dial script - no set login script), you must make sure that +you instruct ppp to expect the whole CONNECT line, something like this: - - set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 4 \"\" ATZ OK-ATZ-OK ATDT\\T TIMEOUT 60 CONNECT \\c \\n" - - +set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 4 \ + \"\" ATZ OK-ATZ-OK ATDT\\T TIMEOUT 60 CONNECT \\c \\n" Here, we get our CONNECT, send nothing, then expect a line-feed, forcing ppp to read the whole CONNECT response. @@ -7508,54 +7141,42 @@ forcing ppp to read the whole CONNECT response.

-Ppp ignores the `\' character in my chat script +Ppp ignores the \ character in my chat script Ppp parses each line in your config files so that it can -interpret strings such as set phone "123 456 789" correctly +interpret strings such as set phone "123 456 789" correctly (and realize that the number is actually only one argument. -In order to specify a “"” character, you must escape it using -a backslash (“\”). +In order to specify a " character, you must escape it using +a backslash (\). When the chat interpreter parses each argument, it re-interprets the argument in order to find any special escape sequences such -as “\P” or “\T” (see the man page). As a result of this +as \P or \T (see the man page). As a result of this double-parsing, you must remember to use the correct number of escapes. -If you wish to actually send a “\” character to (say) your +If you wish to actually send a \ character to (say) your modem, you'd need something like: - - set dial "\"\" ATZ OK-ATZ-OK AT\\\\X OK" - - +set dial "\"\" ATZ OK-ATZ-OK AT\\\\X OK" resulting in the following sequence: - - ATZ - OK - AT\X - OK - - +ATZ +OK +AT\X +OK or - - set phone 1234567 - set dial "\"\" ATZ OK ATDT\\T" - - +set phone 1234567 +set dial "\"\" ATZ OK ATDT\\T" resulting in the following sequence: - - ATZ - OK - ATDT1234567 - - +ATZ +OK +ATDT1234567 @@ -7571,17 +7192,14 @@ signal that normally causes core to be dumped, and sure you're using the latest version (see the start of this section), then you should do the following: - - $ tar xfz ppp-*.src.tar.gz - $ cd ppp*/ppp - $ echo STRIP= >>Makefile - $ echo CFLAGS+=-g >>Makefile - $ make clean all - $ su - # make install - # chmod 555 /usr/sbin/ppp - - +&prompt.user; tar xfz ppp-*.src.tar.gz +&prompt.user; cd ppp*/ppp +&prompt.user; echo STRIP= >>Makefile +&prompt.user; echo CFLAGS+=-g >>Makefile +&prompt.user; make clean all +&prompt.user; su +&prompt.root; make install +&prompt.root; chmod 555 /usr/sbin/ppp You will now have a debuggable version of ppp installed. You will have to be root to run ppp as all of its privileges have @@ -7592,19 +7210,16 @@ your current directory was at the time. will dump a core file called ppp.core. You should then do the following: - - $ su - # gdb /usr/sbin/ppp ppp.core - (gdb) bt - ..... - (gdb) f 0 - ..... - (gdb) i args - ..... - (gdb) l - ..... - - +&prompt.user; su +&prompt.root; gdb /usr/sbin/ppp ppp.core +(gdb) bt +..... +(gdb) f 0 +.... +(gdb) i args +.... +(gdb) l +..... All of this information should be given alongside your question, making it possible to diagnose the problem. @@ -7643,7 +7258,7 @@ but most other implementations don't. tun interface IP number, but instead to change all outgoing packets so that the source IP number is changed from the interface IP to the negotiated IP on the fly. This is essentially what the -iface-alias option in the latest version of ppp is +iface-alias option in the latest version of ppp is doing (with the help of libalias(3) and ppp's switch) - it's maintaining all previous interface addresses and NATing them to the last negotiated address. @@ -7680,7 +7295,7 @@ it should send these packets to the interior machine. To make things work, make sure that the only thing running is the software that you're having problems with, then either run tcpdump on the tun interface of the gateway or enable ppp -tcp/ip logging (``set log +tcp/ip'') on the gateway. +tcp/ip logging (set log +tcp/ip) on the gateway. When you start the offending software, you should see packets passing through the gateway machine. When something comes back @@ -7690,14 +7305,11 @@ software. Do this a few times to see if the port numbers are consistent. If they are, then the following line in the relevant section of /etc/ppp/ppp.conf will make the software functional: - - nat port proto internalmachine:port port - - +nat port proto internalmachine:port port -where ``proto'' is either ``tcp'' or ``udp'', -``internalmachine'' is the machine that you want the packets -to be sent to and ``port'' is the destination port number of +where proto is either tcp or udp, +internalmachine is the machine that you want the packets +to be sent to and port is the destination port number of the packets. You won't be able to use the software on other machines @@ -7709,25 +7321,25 @@ network as being just a single machine. If the port numbers aren't consistent, there are three more options: -1) Submit support in libalias. Examples of ``special -cases'' can be found in /usr/src/lib/libalias/alias_*.c (alias_ftp.c +1) Submit support in libalias. Examples of special +cases can be found in /usr/src/lib/libalias/alias_*.c (alias_ftp.c is a good prototype). This usually involves reading certain recognised outgoing packets, identifying the instruction that tells the outside machine to initiate a connection back to the internal machine on a specific (random) port and setting up a -``route'' in the alias table so that the subsequent packets +route in the alias table so that the subsequent packets know where to go. This is the most difficult solution, but it is the best and will make the software work with multiple machines. 2) Use a proxy. The application may support socks5 -for example, or (as in the ``cvsup'' case) may have a ``passive'' +for example, or (as in the cvsup case) may have a passive option that avoids ever requesting that the peer open connections back to the local machine. 3) Redirect everything to the internal machine using -``nat addr''. This is the sledge-hammer approach. +nat addr. This is the sledge-hammer approach. @@ -7735,98 +7347,66 @@ back to the local machine. Has anybody made a list of useful port numbers ? Not yet, but this is intended to grow into such a list (if -any interest is shown). In each example, internal should +any interest is shown). In each example, internal should be replaced with the IP number of the machine playing the game. - -Asheron's Call +Asheron's Call -nat port udp internal:65000 65000 +nat port udp internal:65000 65000 Manually change the port number within the game to 65000. If you've got a number of machines that you wish to play on assign a unique port number for each (i.e. 65001, 65002, etc) and add a -nat port line for each one. +nat port line for each one. - - - - - - -Half Life +Half Life -nat port udp internal:27005 27015 +nat port udp internal:27005 27015 - - - - - - -PCAnywhere 8.0 +PCAnywhere 8.0 -nat port udp internal:5632 5632 +nat port udp internal:5632 5632 -nat port tcp internal:5631 5631 +nat port tcp internal:5631 5631 - - - - - - -Quake +Quake -nat port udp internal:6112 6112 +nat port udp internal:6112 6112 Alternatively, you may want to take a look at www.battle.net for Quake proxy support. - + +Quake 2 - - +nat port udp internal:27901 27910 + -Quake 2 +Red Alert -nat port udp internal:27901 27910 +nat port udp internal:8675 8675 + +nat port udp internal:5009 5009 - - - - - - -Red Alert - - -nat port udp internal:8675 8675 - -nat port udp internal:5009 5009 - - - - @@ -7838,7 +7418,7 @@ ppp packet has a checksum attached to ensure that the data being received is the data being sent. If the FCS of an incoming packet is incorrect, the packet is dropped and the HDLC FCS count is increased. The HDLC error values can be -displayed using the show hdlc command. +displayed using the show hdlc command. If your link is bad (or if your serial driver is dropping packets), you will see the occasional FCS error. This is not @@ -7850,18 +7430,18 @@ interference - this may eradicate the problem. If your link freezes as soon as you've connected and you see a large number of FCS errors, this may be because your link is not 8 bit clean. Make sure your modem is not using software -flow control (XON/XOFF). If your datalink must use +flow control (XON/XOFF). If your datalink must use software flow control, use the command -set accmap 0x000a0000 to tell ppp to escape -the ^Q and ^S characters. +set accmap 0x000a0000 to tell ppp to escape +the ^Q and ^S characters. Another reason for seeing too many FCS errors may be that the remote end has stopped talking PPP. You may want to -enable async logging at this point to determine if the +enable async logging at this point to determine if the incoming data is actually a login or shell prompt. If you have a shell prompt at the remote end, it's possible to terminate ppp without dropping the line by using the -close lcp command (a following term command +close lcp command (a following term command will reconnect you to the shell on the remote machine. If nothing in your log file indicates why the link might @@ -7885,12 +7465,12 @@ have been terminated, you should ask the remote administrator - This is due to what's called a "Black Hole" router. MacOS and Windows 98 (and + This is due to what's called a Black Hole router. MacOS and Windows 98 (and maybe other Microsoft OSs) send TCP packets with a requested segment size too big to fit into a PPPoE frame (MTU is 1500 by default - for ethernet) and have the "don't fragment" - bit set (default of TCP) and the Telco router is not sending ICMP "must - fragment" back to the www site you are trying to load. When the www + for ethernet) and have the don't fragment + bit set (default of TCP) and the Telco router is not sending ICMP must + fragment back to the www site you are trying to load. When the www server is sending you frames that don't fit into the PPPoE pipe the Telco router drops them on the floor and your page doesn't load (some pages/graphics do as they are smaller than a MSS.) This seems to be the @@ -7943,7 +7523,7 @@ have been terminated, you should ask the remote administrator including your config files, how you're starting ppp, the relevant parts of your log file and the output of the netstat -rn command (before and after connecting) to the -freebsd-questions@FreeBSD.org mailing list or the +freebsd-questions@FreeBSD.org mailing list or the comp.unix.bsd.freebsd.misc news group, and someone should point you in the right direction. @@ -7967,31 +7547,25 @@ in your system for which the kernel was configured. You can either watch your system closely for the messages it prints or run the command - - dmesg | grep sio - - +&prompt.user; dmesg | grep sio after your system's up and running. Here's some example output from the above command: - - sio0 at 0x3f8-0x3ff irq 4 on isa - sio0: type 16550A - sio1 at 0x2f8-0x2ff irq 3 on isa - sio1: type 16550A - - +sio0 at 0x3f8-0x3ff irq 4 on isa +sio0: type 16550A +sio1 at 0x2f8-0x2ff irq 3 on isa +sio1: type 16550A This shows two serial ports. The first is on irq 4, is using port address 0x3f8, and has a 16550A-type UART chip. The second uses the same kind of chip but is on irq 3 and is at port address 0x2f8. Internal modem cards are treated just like -serial ports---except that they always have a modem ``attached'' +serial ports---except that they always have a modem attached to the port. -The GENERIC kernel includes support for two serial ports +The GENERIC kernel includes support for two serial ports using the same irq and port address settings in the above example. If these settings aren't right for your system, or if you've added modem cards or have more serial ports than your @@ -8009,9 +7583,9 @@ more details. -I just upgraded to 2.0.5 and my tty0X are missing! +I just upgraded to 2.0.5 and my tty0X are missing! -Don't worry, they have been merged with the ttydX devices. +Don't worry, they have been merged with the ttydX devices. You'll have to change any old configuration files you have, though. @@ -8024,13 +7598,14 @@ COM3 in DOS), is on /dev/cuaa2 for dial-out devices, and on /dev/ttyd2 for dial-in devices. What's the difference between these two classes of devices? -You use ttydX for dial-ins. When opening /dev/ttydX +You use ttydX for dial-ins. When opening /dev/ttydX in blocking mode, a process will wait for the corresponding -cuaaX device to become inactive, and then wait +cuaaX device to become inactive, and then wait for the carrier detect line to go active. When you open the -cuaaX device, it makes sure the serial port isn't already in -use by the ttydX device. If the port's available, it -``steals'' it from the ttydX device. Also, the cuaXX +cuaaX device, it makes sure the serial port isn't already in +use by the ttydX device. If the port's available, it +steals it from the ttydX device. Also, +the cuaXX device doesn't care about carrier detect. With this scheme and an auto-answer modem, you can have remote users log in and you can still dialout with the same modem and the system will take @@ -8047,19 +7622,16 @@ place an sio line fo kernel configuration file. But place the irq and vector specifiers on only one of the entries. All of the ports on the card should share one irq. For consistency, use the last serial -port to specify the irq. Also, specify the COM_MULTIPORT +port to specify the irq. Also, specify the COM_MULTIPORT option. The following example is for an AST 4-port serial card on irq 7: - - options "COM_MULTIPORT" - device sio4 at isa? port 0x2a0 tty flags 0x781 - device sio5 at isa? port 0x2a8 tty flags 0x781 - device sio6 at isa? port 0x2b0 tty flags 0x781 - device sio7 at isa? port 0x2b8 tty flags 0x781 irq 7 vector siointr - - +options "COM_MULTIPORT" +device sio4 at isa? port 0x2a0 tty flags 0x781 +device sio5 at isa? port 0x2a8 tty flags 0x781 +device sio6 at isa? port 0x2b0 tty flags 0x781 +device sio7 at isa? port 0x2b8 tty flags 0x781 irq 7 vector siointr The flags indicate that the master port has minor number 7 (0x700), diagnostics enabled during probe (0x080), and @@ -8077,47 +7649,40 @@ all the ports share an irq (0x001). Can I set the default serial parameters for a port? -The ttydX (or cuaaX) device is the regular device +The ttydX (or cuaaX) device is the regular device you'll want to open for your applications. When a process opens the device, it'll have a default set of terminal I/O settings. You can see these settings with the command - - stty -a -f /dev/ttyd1 - - +&prompt.root; stty -a -f /dev/ttyd1 When you change the settings to this device, the settings are in effect until the device is closed. When it's reopened, it goes back to the default set. To make changes to the default set, you -can open and adjust the settings of the ``initial state'' device. +can open and adjust the settings of the initial state device. For example, to turn on CLOCAL mode, 8 bits, and XON/XOFF flow control by default for ttyd5, do: - - stty -f /dev/ttyid5 clocal cs8 ixon ixoff - - +&prompt.root; stty -f /dev/ttyid5 clocal cs8 ixon ixoff A good place to do this is in /etc/rc.serial. Now, an application will have these settings by default when it opens -ttyd5. It can still change these settings to its liking, +ttyd5. It can still change these settings to its liking, though. You can also prevent certain settings from being changed by an -application by making adjustments to the ``lock state'' device. -For example, to lock the speed of ttyd5 to 57600 bps, do +application by making adjustments to the lock state device. +For example, to lock the speed of ttyd5 to 57600 bps, do - - stty -f /dev/ttyld5 57600 - - +&prompt.root; stty -f /dev/ttyld5 57600 -Now, an application that opens ttyd5 and tries to change the +Now, an application that opens ttyd5 and tries to change the speed of the port will be stuck with 57600 bps. Naturally, you should make the initial state and lock state -devices writable only by root. The MAKEDEV script does NOT do this when it creates the +devices writable only by root. The +MAKEDEV +script does NOT do this when it creates the device entries. @@ -8139,10 +7704,7 @@ and the remote modem. For many Hayes command-set--compatible modems, this command will make these settings and store them in nonvolatile memory: - - AT &C1 &D3 &K3 &Q6 S0=1 &W - - +AT &C1 &D3 &K3 &Q6 S0=1 &W See the section on sending AT commands below for information on how to make these settings without resorting to an MS-DOS terminal program. @@ -8151,50 +7713,38 @@ without resorting to an MS-DOS terminal program. modem. This file lists all the ports on which the operating system will await logins. Add a line that looks something like this: - - ttyd1 "/usr/libexec/getty std.57600" dialup on insecure - - +ttyd1 "/usr/libexec/getty std.57600" dialup on insecure This line indicates that the second serial port (/dev/ttyd1) has a modem connected running at 57600 bps -and no parity (std.57600, which comes from the file +and no parity (std.57600, which comes from the file /etc/gettytab). The terminal type for this port is -``dialup.'' The port is ``on'' and is ``insecure''---meaning +dialup. The port is on and is insecure---meaning root logins on the port aren't allowed. For dialin ports like -this one, use the ttydX entry. +this one, use the ttydX entry. -It's common practice to use ``dialup'' as the terminal type. +It's common practice to use dialup as the terminal type. Many users set up in their .profile or .login files a prompt for the actual terminal type if the starting type is dialup. The example shows the port as insecure. To become root on this port, -you have to login as a regular user, then ``su'' to -root. If you use ``secure'' then root can login in -directly. +you have to login as a regular user, then su to become +root. If you use secure then +root can login in directly. After making modifications to /etc/ttys, you need to send a hangup or HUP signal to the init process: - - kill -HUP 1 - - +&prompt.root; kill -HUP 1 This forces the init process to reread /etc/ttys. The -init process will then start getty processes on all ``on'' ports. +init process will then start getty processes on all on ports. You can find out if logins are available for your port by typing - - ps -ax | grep '[t]tyd1' - - +&prompt.user; ps -ax | grep '[t]tyd1' You should see something like: - - 747 ?? I 0:00.04 /usr/libexec/getty std.57600 ttyd1 - - +747 ?? I 0:00.04 /usr/libexec/getty std.57600 ttyd1 @@ -8209,33 +7759,31 @@ instructions. Then, modify /etc/ttys, like above. For example, if you're hooking up a WYSE-50 terminal to the fifth serial port, use an entry like this: - - ttyd4 "/usr/libexec/getty std.38400" wyse50 on secure - - +ttyd4 "/usr/libexec/getty std.38400" wyse50 on secure This example shows that the port on /dev/ttyd4 has a wyse50 terminal connected at 38400 bps with no parity -(std.38400 from /etc/gettytab) and root logins are allowed (secure). +(std.38400 from /etc/gettytab) and +root logins are allowed (secure). -Why can't I run tip or cu? +Why can't I run tip or cu? On your system, the programs tip and cu are probably -executable only by uucp and group dialer. You can use the group dialer +executable only by uucp and group +dialer. You can use the group dialer to control who has access to your modem or remote systems. Just add yourself to group dialer. -Alternatively, you can let everyone on your system run tip -and cu by typing: +Alternatively, you can let everyone on your system run tip +and cu by typing: - - # chmod 4511 /usr/bin/cu - # chmod 4511 /usr/bin/tip - - +&prompt.root; chmod 4511 /usr/bin/cu +&prompt.root; chmod 4511 /usr/bin/tip @@ -8244,25 +7792,25 @@ and cu by typing: Actually, the man page for tip is out of date. There is a generic Hayes dialer already built in. Just use -``at=hayes'' in your /etc/remote file. +at=hayes in your /etc/remote file. The Hayes driver isn't smart enough to recognize some of the -advanced features of newer modems---messages like BUSY, -NO DIALTONE, or CONNECT 115200 will just confuse it. +advanced features of newer modems---messages like BUSY, +NO DIALTONE, or CONNECT 115200 will just confuse it. You should turn those messages off when you use tip (using -ATX0&W). +ATX0&W). -Also, the dial timeout for tip is 60 seconds. Your modem +Also, the dial timeout for tip is 60 seconds. Your modem should use something less, or else tip will think there's a communication problem. Try ATS7=45&W. -Actually, as shipped tip doesn't yet support it fully. The +Actually, as shipped tip doesn't yet support it fully. The solution is to edit the file tipconf.h in the directory /usr/src/usr.bin/tip/tip. Obviously you need the source distribution to do this. -Edit the line ``#define HAYES 0'' to ``#define HAYES -1''. Then ``make'' and ``make install''. Everything +Edit the line #define HAYES 0 to #define HAYES 1. +Then make and make install. Everything works nicely after that. @@ -8272,15 +7820,12 @@ id="direct-at"> How am I expected to enter these AT commands? -Make what's called a ``direct'' entry in your +Make what's called a direct entry in your /etc/remote file. For example, if your modem's hooked up to the first serial port, /dev/cuaa0, then put in the following line: - - cuaa0:dv=/dev/cuaa0:br#19200:pa=none - - +cuaa0:dv=/dev/cuaa0:br#19200:pa=none Use the highest bps rate your modem supports in the br capability. Then, type tip cuaa0 and @@ -8288,22 +7833,16 @@ you'll be connected to your modem. If there is no /dev/cuaa0 on your system, do this: - - # cd /dev - # ./MAKEDEV cuaa0 - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV cuaa0 Or use cu as root with the following command: - - # cu -l``line'' -s``speed'' - - +&prompt.root; cu -lline -sspeed with line being the serial port (e.g./dev/cuaa0) -and speed being the speed (e.g.57600). When you are done -entering the AT commands hit ~. to exit. +and speed being the speed (e.g.57600). When you are done +entering the AT commands hit ~. to exit. @@ -8322,37 +7861,31 @@ also a special character in capability files like How can I dial a phone number on the command line? -Put what's called a ``generic'' entry in your +Put what's called a generic entry in your /etc/remote file. For example: - - tip115200|Dial any phone number at 115200 bps:\ - :dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du: - tip57600|Dial any phone number at 57600 bps:\ - :dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du: - - +tip115200|Dial any phone number at 115200 bps:\ + :dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du: +tip57600|Dial any phone number at 57600 bps:\ + :dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du: -Then you can do something like ``tip -115200 5551234''. If you +Then you can do something like tip -115200 5551234. If you prefer cu over tip, use a generic cu entry: - - cu115200|Use cu to dial any number at 115200bps:\ - :dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du: - - +cu115200|Use cu to dial any number at 115200bps:\ + :dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du: -and type ``cu 5551234 -s 115200''. +and type cu 5551234 -s 115200. Do I have to type in the bps rate every time I do that? -Put in an entry for tip1200 or cu1200, but go ahead and +Put in an entry for tip1200 or cu1200, but go ahead and use whatever bps rate is appropriate with the br capability. tip thinks a good -default is 1200 bps which is why it looks for a ``tip1200'' entry. +default is 1200 bps which is why it looks for a tip1200 entry. You don't have to use 1200 bps, though. @@ -8361,22 +7894,20 @@ You don't have to use 1200 bps, though. I access a number of hosts through a terminal server. Rather than waiting until you're connected and typing -``CONNECT <host>'' each time, use tip's cm +CONNECT host each time, use tip's cm capability. For example, these entries in /etc/remote: - - pain|pain.deep13.com|Forrester's machine:\ - :cm=CONNECT pain\n:tc=deep13: - muffin|muffin.deep13.com|Frank's machine:\ - :cm=CONNECT muffin\n:tc=deep13: - deep13:Gizmonics Institute terminal server:\ - :dv=/dev/cua02:br#38400:at=hayes:du:pa=none:pn=5551234: - - +pain|pain.deep13.com|Forrester's machine:\ + :cm=CONNECT pain\n:tc=deep13: +muffin|muffin.deep13.com|Frank's machine:\ + :cm=CONNECT muffin\n:tc=deep13: +deep13:Gizmonics Institute terminal server:\ + :dv=/dev/cua02:br#38400:at=hayes:du:pa=none:pn=5551234: -will let you type ``tip pain'' or ``tip muffin'' to -connect to the hosts pain or muffin; and ``tip deep13'' to +will let you type tip pain or tip muffin to +connect to the hosts pain or muffin; +and tip deep13 to get to the terminal server. @@ -8388,94 +7919,79 @@ get to the terminal server. and several thousand students trying to use them... Make an entry for your university in /etc/remote -and use <\@> for the pn capability: +and use <\@> for the pn capability: - - big-university:\ - :pn=\@:tc=dialout - dialout:\ - :dv=/dev/cuaa3:br#9600:at=courier:du:pa=none: - - +big-university:\ + :pn=\@:tc=dialout +dialout:\ + :dv=/dev/cuaa3:br#9600:at=courier:du:pa=none: Then, list the phone numbers for the university in /etc/phones: - - big-university 5551111 - big-university 5551112 - big-university 5551113 - big-university 5551114 - - +big-university 5551111 +big-university 5551112 +big-university 5551113 +big-university 5551114 tip will try each one in the listed order, then give up. If -you want to keep retrying, run tip in a while loop. +you want to keep retrying, run tip in a while loop. Why do I have to hit CTRL+P twice to send CTRL+P once? -CTRL+P is the default ``force'' character, used to tell +CTRL+P is the default force character, used to tell tip that the next character is literal data. You can set the force -character to any other character with the ~s escape, which -means ``set a variable.'' +character to any other character with the ~s escape, which +means set a variable. -Type ``~sforce=<single-char>'' followed by a newline. -<single-char> is any single character. If you leave -out <single-char>, then the force character is the nul +Type ~sforce=single-char followed by a newline. +single-char is any single character. If you leave +out single-char, then the force character is the nul character, which you can get by typing CTRL+2 or CTRL+SPACE. A -pretty good value for <single-char> is SHIFT+CTRL+6, +pretty good value for single-char is SHIFT+CTRL+6, which I've seen only used on some terminal servers. You can have the force character be whatever you want by specifying the following in your $HOME/.tiprc file: - - force=<single-char> - - +force=single-char Suddenly everything I type is in UPPER CASE?? -You must've pressed CTRL+A, tip ``raise -character,'' specially designed for people with broken caps-lock keys. -Use ~s as above and set the variable ``raisechar'' to something +You must've pressed CTRL+A, tip raise +character, specially designed for people with broken caps-lock keys. +Use ~s as above and set the variable raisechar to something reasonable. In fact, you can set it to the same as the force character, if you never expect to use either of these features. Here's a sample .tiprc file perfect for Emacs users who need to type CTRL+2 and CTRL+A a lot: - - force=^^ - raisechar=^^ - - +force=^^ +raisechar=^^ The ^^ is SHIFT+CTRL+6. -How can I do file transfers with tip? +How can I do file transfers with tip? If you're talking to another UNIX system, you can send and -receive files with ~p (put) and ~t (take). These +receive files with ~p (put) and ~t (take). These commands run cat and echo on the remote system to accept and send files. The syntax is: - - ~p <local-file> [<remote-file>] - ~t <remote-file> [<local-file>] - - +~p <local-file> [<remote-file>] +~t <remote-file> [<local-file>] There's no error checking, so you probably should use another protocol, like zmodem. @@ -8491,12 +8007,12 @@ collection (such as one of the two from the comms category, and rzsz). To receive files, start the sending program on the remote end. -Then, press enter and type ``~C rz'' (or ``~C lrz'' if -you installed lrzsz) to begin receiving them locally. +Then, press enter and type ~C rz (or ~C lrz if +you installed lrzsz) to begin receiving them locally. To send files, start the receiving program on the remote end. -Then, press enter and type ``~C sz <files>'' (or -``~C lsz <files>'') to send them to the +Then, press enter and type ~C sz files (or +~C lsz files) to send them to the remote system. @@ -8563,7 +8079,7 @@ morning after leaving it idle overnight. To understand why FreeBSD uses the ELF format, you must -first know a little about the 3 currently "dominant" executable +first know a little about the 3 currently dominant executable formats for UNIX: Prior to FreeBSD 3.x, FreeBSD used the a.out format. @@ -8576,7 +8092,7 @@ formats for UNIX: -The oldest and `classic' unix object format. It uses a +The oldest and classic unix object format. It uses a short and compact header with a magic number at the beginning that's often used to characterize the format (see a.out(5) for more details). It contains three loaded @@ -8619,11 +8135,11 @@ See the man page for -FreeBSD comes from the "classic" camp and has traditionally used +FreeBSD comes from the classic camp and has traditionally used the a.out format, a technology tried and proven through many generations of BSD releases. Though it has also been possible for some time to build and run native ELF binaries (and -kernels) on a FreeBSD system, FreeBSD initially resisted the "push" +kernels) on a FreeBSD system, FreeBSD initially resisted the push to switch to ELF as the default format. Why? Well, when the Linux camp made their painful transition to ELF, it was not so much to flee the a.out executable format @@ -8631,7 +8147,7 @@ as it was their inflexible jump-table based shared library mechanism, which made the construction of shared libraries very difficult for vendors and developers alike. Since the ELF tools available offered a solution to the shared library -problem and were generally seen as "the way forward" anyway, the +problem and were generally seen as the way forward anyway, the migration cost was accepted as necessary and the transition made. @@ -8740,29 +8256,26 @@ eventually removed from the kernel once the need to run legacy However, the permissions on foo will not have changed. -You have to use either ``'' or ``'' together with -the ``'' option to make this work. See the chmod and +You have to use either or together with +the option to make this work. See the chmod and symlink man pages for more info. -WARNING the ``'' option does a RECURSIVE +The option does a RECURSIVE chmod. Be careful about specifying directories or symlinks to directories to chmod. If you want to change the permissions of a directory referenced by a symlink, use chmod without any options and follow the symlink with a trailing slash -(``/''). For example, if ``foo'' is a symlink to -directory ``bar'', and you want to change the permissions of -``foo'' (actually ``bar''), you would do something like: +(/). For example, if foo is a symlink to +directory bar, and you want to change the permissions of +foo (actually bar), you would do something like: - - chmod 555 foo/ - - +&prompt.user; chmod 555 foo/ With the trailing slash, chmod will -follow the symlink, ``foo'', to change the permissions of the -directory, ``bar''. +follow the symlink, foo, to change the permissions of the +directory, bar. @@ -8770,11 +8283,11 @@ directory, ``bar''. Why are login names still restricted to 8 characters? -You'd think it'd be easy enough to change UT_NAMESIZE and rebuild +You'd think it'd be easy enough to change UT_NAMESIZE and rebuild the whole world, and everything would just work. Unfortunately there are often scads of applications and utilities (including system tools) -that have hard-coded small numbers (not always "8" or "9", but oddball -ones like "15" and "20") in structures and buffers. Not only will +that have hard-coded small numbers (not always 8 or 9, but oddball +ones like 15 and 20) in structures and buffers. Not only will this get you log files which are trashed (due to variable-length records getting written when fixed records were expected), but it can break Sun's NIS clients and potentially cause other problems in @@ -8814,7 +8327,7 @@ System (provided as XFree86). - What is ``sup'', and how do I use it? + What is sup, and how do I use it? SUP @@ -8844,10 +8357,10 @@ that I can remember. We eventually had to throw the results of this survey out entirely anyway when we found that too many volunteers were wandering out of the room during the tests, thus skewing the results. I think most of the volunteers are at Apple -now, working on their new ``scratch and sniff'' GUI. It's a +now, working on their new scratch and sniff GUI. It's a funny old business we're in! -Seriously, both FreeBSD and Linux use the ``HLT'' (halt) +Seriously, both FreeBSD and Linux use the HLT (halt) instruction when the system is idle thus lowering its energy consumption and therefore the heat it generates. Also if you have APM (automatic power management) configured, then FreeBSD @@ -8858,20 +8371,20 @@ can also put the CPU into a low power mode. Who's scratching in my memory banks?? -Q. Is there anything "odd" that FreeBSD does when compiling the +Q. Is there anything odd that FreeBSD does when compiling the kernel which would cause the memory to make a scratchy sound? When compiling (and for a brief moment after recognizing the floppy drive upon startup, as well), a strange scratchy sound emanates from what appears to be the memory banks. -A. Yes! You'll see frequent references to ``daemons'' in the BSD +A. Yes! You'll see frequent references to daemons in the BSD documentation, and what most people don't know is that this refers to genuine, non-corporeal entities that now possess your computer. The scratchy sound coming from your memory is actually high-pitched whispering exchanged among the daemons as they best decide how to deal with various system administration tasks. -If the noise gets to you, a good ``fdisk /mbr'' from DOS +If the noise gets to you, a good fdisk /mbr from DOS will get rid of them, but don't be surprised if they react adversely and try to stop you. In fact, if at any point during the exercise you hear the satanic voice of Bill Gates coming from @@ -8885,25 +8398,25 @@ noises, myself! -What does 'MFC' mean? +What does MFC mean? -MFC is an acronym for 'Merged From -CURRENT.' It's used in the CVS +MFC is an acronym for Merged From -CURRENT. It's used in the CVS logs to denote when a change was migrated from the CURRENT to the STABLE branches. -What does 'BSD' mean? +What does BSD mean? It stands for something in a secret language that only members can know. It doesn't translate literally but its ok to -tell you that BSD's translation is something between, 'Formula-1 -Racing Team', 'Penguins are tasty snacks', and 'We have a better -sense of humor than Linux.' :-) +tell you that BSD's translation is something between, Formula-1 +Racing Team, Penguins are tasty snacks, and We have a better +sense of humor than Linux. :-) -Seriously, BSD is an acronym for 'Berkeley Software -Distribution', which is the name the Berkeley CSRG (Computer +Seriously, BSD is an acronym for Berkeley Software +Distribution, which is the name the Berkeley CSRG (Computer Systems Research Group) chose for their Unix distribution way back when. @@ -8912,8 +8425,8 @@ back when. What is a repo-copy? -A repo-copy (which is a short form of “repository -copy”) refers to the direct copying of files within the CVS +A repo-copy (which is a short form of repository +copy) refers to the direct copying of files within the CVS repository. Without a repo-copy, if a file needed to be copied or moved to @@ -9126,32 +8639,33 @@ a year, which is why there are only three active branches of development): -RELENG_2_2 AKA 2.2-STABLE +RELENG_2_2 AKA 2.2-STABLE -RELENG_3 AKA 3.X-STABLE +RELENG_3 AKA 3.X-STABLE -RELENG_4 AKA 4-STABLE +RELENG_4 AKA 4-STABLE -HEAD AKA AKA 5.0-CURRENT +HEAD AKA -CURRENT + AKA 5.0-CURRENT -HEAD is not an actual branch tag, like the other two; it's +HEAD is not an actual branch tag, like the other two; it's simply a symbolic constant for -"the current, non-branched development stream" which we simply -refer to as . +the current, non-branched development stream which we simply +refer to as -CURRENT. -Right now, is the 5.0 development stream and the +Right now, -CURRENT is the 5.0 development stream and the 4-STABLE branch, RELENG_4, forked off from - in Mar 2000. +-CURRENT in Mar 2000. The 2.2-STABLE branch, RELENG_2_2, departed -CURRENT in November 1996, and has pretty much been retired. @@ -9167,34 +8681,28 @@ id="custrel"> be running a kernel with the vn driver configured in. Add this to your kernel config file and build a new kernel: - - pseudo-device vn #Vnode driver (turns a file into a device) - - +pseudo-device vn #Vnode driver (turns a file into a device) Second, you have to have the whole CVS repository at hand. To get this you can use CVSUP but in your supfile set the release name to cvs and remove any tag or date fields: - - *default prefix=/home/ncvs - *default base=/a - *default host=cvsup.FreeBSD.org - *default release=cvs - *default delete compress use-rel-suffix +*default prefix=/home/ncvs +*default base=/a +*default host=cvsup.FreeBSD.org +*default release=cvs +*default delete compress use-rel-suffix - ## Main Source Tree - src-all - src-eBones - src-secure +## Main Source Tree +src-all +src-eBones +src-secure - # Other stuff - ports-all - www - doc-all - - +# Other stuff +ports-all +www +doc-all Then run cvsup -g supfile to suck all the good bits onto your box... @@ -9235,38 +8743,38 @@ would build an up-to-the- minute 2.2-STABLE snapshot. binary archives is automated by various targets in /usr/src/release/Makefile. The information there should be enough to get you started. However, it should be said that this -involves doing a ``make world'' and will therefore take up a lot of +involves doing a make world and will therefore take up a lot of time and disk space. -``make world'' clobbers my existing installed binaries. +make world clobbers my existing installed binaries. Yes, this is the general idea; as its name might suggest, -``make world'' rebuilds every system binary from scratch, so you can be +make world rebuilds every system binary from scratch, so you can be certain of having a clean and consistent environment at the end (which is why it takes so long). -If the environment variable DESTDIR is defined while running -``make world'' or ``make install'', the newly-created +If the environment variable DESTDIR is defined while running +make world or make install, the newly-created binaries will be deposited in a directory tree identical to the -installed one, rooted at ${DESTDIR}. +installed one, rooted at ${DESTDIR}. Some random combination of shared libraries modifications and -program rebuilds can cause this to fail in ``make world'', +program rebuilds can cause this to fail in make world however. - When my system boots, it says ``(bus speed defaulted)''. + When my system boots, it says (bus speed defaulted). The Adaptec 1542 SCSI host adapters allow the user to configure their bus access speed in software. Previous versions of the 1542 driver tried to determine the fastest usable speed and set the adapter to that. We found that this breaks some users' -systems, so you now have to define the ``TUNE_1542'' kernel +systems, so you now have to define the TUNE_1542 kernel configuration option in order to have this take place. Using it on those systems where it works may make your disks run faster, but on those systems where it doesn't, your data could be @@ -9287,20 +8795,17 @@ by using the CTM facility.

How did you split the distribution into 240k files? -Newer BSD based systems have a ``'' option to split that +Newer BSD based systems have a option to split that allows them to split files on arbitrary byte boundaries. Here is an example from /usr/src/Makefile. - - bin-tarball: - (cd ${DISTDIR}; \ - tar cf - . \ - gzip --no-name -9 -c | \ - split -b 240640 - \ - ${RELEASEDIR}/tarballs/bindist/bin_tgz.) - - +bin-tarball: +(cd ${DISTDIR}; \ +tar cf - . \ +gzip --no-name -9 -c | \ +split -b 240640 - \ +${RELEASEDIR}/tarballs/bindist/bin_tgz.)
@@ -9323,13 +8828,13 @@ respond to when the host asks if anyone is out there. So when the PnP probe routine starts, he asks if there are any PnP boards present, and all the PnP boards respond with their model # to a I/O read of the same port, so the probe routine gets a wired-OR -``yes'' to that question. At least one bit will be on in that +yes to that question. At least one bit will be on in that reply. Then the probe code is able to cause boards with board model IDs (assigned by Microsoft/Intel) lower than X to go -``off-line''. It then looks to see if any boards are still -responding to the query. If the answer was ``0'', then +off-line. It then looks to see if any boards are still +responding to the query. If the answer was 0, then there are no boards with IDs above X. Now probe asks if there -are any boards below ``X''. If so, probe knows there are boards +are any boards below X. If so, probe knows there are boards with a model numbers below X. Probe then asks for boards greater than X-(limit/4) to go off-line. If repeats the query. By repeating this semi-binary search of IDs-in-range enough times, @@ -9381,7 +8886,7 @@ the general idea. do PnP, on the logic that no boards decoded those addresses for the opposing I/O cycles. I found a genuine IBM printer board that did decode writes of the status port during the early PnP -proposal review period, but MS said ``tough''. So they do a +proposal review period, but MS said tough. So they do a write to the printer status port for setting addresses, plus that use that address + 0x800, and a third I/O port for reading that can be located anywhere between 0x200 and 0x3ff. @@ -9464,18 +8969,16 @@ is an area ripe for experimentation. freebsd-current mailing list by &a.des;, who fixed a few typos and added the bracketed comments]
- -From: Bill Paul <wpaul@skynet.ctr.columbia.edu> +From: Bill Paul <wpaul@skynet.ctr.columbia.edu> Subject: Re: the fs fun never stops To: ben@rosengart.com Date: Sun, 20 Sep 1998 15:22:50 -0400 (EDT) -Cc: current@FreeBSD.org - - +Cc: current@FreeBSD.org [<ben@rosengart.com> posted the following panic message] -> Fatal trap 12: page fault while in kernel mode + +> Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x40 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xf014a7e5 @@ -9488,11 +8991,9 @@ message] > current process = 80 (mount) > interrupt mask = > trap number = 12 -> panic: page fault - - +> panic: page fault - [When] you see a message like this, it's not enough to just +[When] you see a message like this, it's not enough to just reproduce it and send it in. The instruction pointer value that I highlighted up there is important; unfortunately, it's also configuration dependent. In other words, the value varies @@ -9515,8 +9016,8 @@ it's the 0xf0xxxxxx part that we want. When the system reboots, do the following: -% nm /kernel.that.caused.the.panic | grep f0xxxxxx - + +&prompt.user; nm /kernel.that.caused.the.panic | grep f0xxxxxx where f0xxxxxx is the instruction pointer value. The odds are you will not get an exact match since the symbols @@ -9525,8 +9026,8 @@ functions and the instruction pointer address will be somewhere inside a function, not at the start. If you don't get an exact match, omit the last digit from the instruction pointer value and try again, i.e.: -% nm /kernel.that.caused.the.panic | grep f0xxxxx - + +&prompt.user; nm /kernel.that.caused.the.panic | grep f0xxxxx If that doesn't yield any results, chop off another digit. Repeat until you get some sort of output. The result will be @@ -9557,18 +9058,18 @@ CDs ship). -Set up a kernel config file, optionally adding 'options DDB' if you +Set up a kernel config file, optionally adding options DDB if you think you need the kernel debugger for something. (I use this mainly for setting beakpoints if I suspect an infinite loop condition of some kind.) -Use config -g KERNELCONFIG to set up the build directory. +Use config -g KERNELCONFIG to set up the build directory. -cd /sys/compile/KERNELCONFIG; make +cd /sys/compile/KERNELCONFIG; make @@ -9603,7 +9104,7 @@ recovered using savecore(8); if dumpdevsavecore(8) automatically and put the crash dump in /var/crash. - NOTE: FreeBSD crash dumps are usually the same size as the +FreeBSD crash dumps are usually the same size as the physical RAM size of your machine. That is, if you have 64MB of RAM, you will get a 64MB crash dump. Therefore you must make sure there's enough space in /var/crash to hold the dump. @@ -9614,16 +9115,13 @@ room. It's possible to limit the size of the crash dump by using will use to something a little more sensible. For example, if you have 128MB of RAM, you can limit the kernel's memory usage to 16MB so that your crash dump size will be 16MB instead of -128MB. +128MB. Once you have recovered the crash dump, you can get a stack trace with gdb(1) as follows: - -% gdb -k /sys/compile/KERNELCONFIG/kernel.debug /var/crash/vmcore.0 -(gdb) where - - +&prompt.user; gdb -k /sys/compile/KERNELCONFIG/kernel.debug /var/crash/vmcore.0 +(gdb) where Note that there may be several screens worth of information; ideally you should use script(1) to capture all of them. @@ -9685,21 +9183,18 @@ lower the load address so it doesn't bump its head against the ceiling. The first goal is achieved by increasing the value of -NKPDE in src/sys/i386/include/pmap.h. Here's what +NKPDE in src/sys/i386/include/pmap.h. Here's what it looks like for a 1 GB address space: - -#ifndef NKPDE +#ifndef NKPDE #ifdef SMP #define NKPDE 254 /* addressable number of page tables/pde's */ #else #define NKPDE 255 /* addressable number of page tables/pde's */ #endif /* SMP */ -#endif - - +#endif -To find the correct value of NKPDE, divide the desired +To find the correct value of NKPDE, divide the desired address space size (in megabytes) by four, then subtract one for UP and two for SMP. @@ -9711,8 +9206,7 @@ to that value; then set the location counter in the beginning of the section listing in src/sys/i386/conf/kernel.script to the same value, as follows: - -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(btext) SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/obj/elf/home/src/tmp/usr/i386-unknown-freebsdelf/lib); @@ -9720,9 +9214,7 @@ SECTIONS { /* Read-only sections, merged into text segment: */ . = 0xc0100000 + SIZEOF_HEADERS; - .interp : { *(.interp) } - - + .interp : { *(.interp) } Then reconfig and rebuild your kernel. You will probably have problems with ps(1), top(1) and the like; make @@ -9746,15 +9238,13 @@ expected at least 256MB granularity.] id="acknowledgments"> ACKNOWLEDGMENTS - - If you see a problem with this FAQ, or wish to submit an entry, - please mail the &a.faq;. We appreciate your - feedback, and cannot make this a better FAQ without your help! +
+ FreeBSD Core Team - - FreeBSD Core Team - - + If you see a problem with this FAQ, or wish to submit an + entry, please mail the &a.faq;. We appreciate your feedback, and + cannot make this a better FAQ without your help! +
diff --git a/en_US.ISO_8859-1/books/faq/book.sgml b/en_US.ISO_8859-1/books/faq/book.sgml index 1385a1b89d..17b064439a 100644 --- a/en_US.ISO_8859-1/books/faq/book.sgml +++ b/en_US.ISO_8859-1/books/faq/book.sgml @@ -15,7 +15,7 @@ - $FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.85 2000/08/04 21:46:18 jim Exp $ + $FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.86 2000/08/05 10:05:07 alex Exp $ This is the FAQ for FreeBSD versions 2.X, 3.X, and 4.X. All entries @@ -23,7 +23,7 @@ otherwise noted. Any entries with a <XXX> are under construction. If you are interested in helping with this project, send email to the FreeBSD documentation project mailing list - <freebsd-doc@FreeBSD.org>. + freebsd-doc@FreeBSD.org. The latest version of this document is always available from the FreeBSD World Wide Web server. It may also be downloaded as one large mission is to provide code to any and all comers, and for whatever purpose, so that the code gets the widest possible use and provides the widest possible benefit. This is, we believe, one of the most fundamental goals of Free Software @@ -138,9 +138,9 @@
For those of our readers whose first language is not - English, it may be worth pointing out that the word ``free'' - is being used in two ways here, one meaning ``at no cost'', - the other meaning ``you can do whatever you like''. Apart + English, it may be worth pointing out that the word free + is being used in two ways here, one meaning at no cost, + the other meaning you can do whatever you like. Apart from one or two things you cannot do with the FreeBSD code, for example pretending you wrote it, you really can do @@ -203,8 +203,8 @@ and can be un-buildable for a number of days at a time. People that use FreeBSD-CURRENT are expected to be able to analyze any problems and only report them if they are deemed - to be mistakes rather than ``glitches''. Questions such as - ``make world produces some error about groups'' on the + to be mistakes rather than glitches. Questions such as + make world produces some error about groups on the -CURRENT mailing list are sometimes treated with contempt. @@ -244,7 +244,7 @@ No claims are made that any -CURRENT snapshot can be considered - “production quality” for any purpose. + production quality for any purpose. If you want to run a stable and fully tested system, you will have to stick to full releases, or use the -STABLE snaphosts. @@ -282,7 +282,7 @@ 5.0-RELEASE (and beyond) since 2.0 was released. If a little ASCII art would help, this is how it looks: - 2.0 + 2.0 | | | [2.1-STABLE] @@ -310,7 +310,7 @@ | (Jul 2000) \|/ + - [5.0-CURRENT continues] + [5.0-CURRENT continues] The -CURRENT branch is slowly progressing towards 5.0 and beyond, the previous 2.2-STABLE branch having been retired @@ -324,8 +324,8 @@ still being committed to 3-STABLE. It is expected that the 3.X branch will be officially obsoleted some time in summer 2000. - 5.0-CURRENT is now the "current - branch", with the no release date planed. + 5.0-CURRENT is now the current + branch, with the no release date planed. @@ -522,7 +522,7 @@ - Channel #FreeBSD on + Channel #FreeBSD on EFNet is a FreeBSD forum, but don't go there for tech support or to try and get folks there to help you avoid the pain of reading man pages or doing your own research. @@ -540,13 +540,13 @@ - Channel #FreeBSD on + Channel #FreeBSD on DALNET is available at irc.dal.net in the US and irc.eu.dal.net in Europe. - Channel #FreeBSD on + Channel #FreeBSD on UNDERNET is available at us.undernet.org in the US and eu.undernet.org in Europe. Since it is a help channel, be prepared to read the @@ -571,21 +571,21 @@ There is a FreeBSD Documentation Project which you may - contact (or even better, join) at the freebsd-doc mailing list: + contact (or even better, join) at the + freebsd-doc mailing list: freebsd-doc@FreeBSD.org. This list is for discussion of the FreeBSD documentation. For - actual questions about FreeBSD, there is the freebsd-questions mailing list: + actual questions about FreeBSD, there is the + freebsd-questions mailing list: freebsd-questions@FreeBSD.org. - A FreeBSD ``handbook'' is available, and can be found as: + A FreeBSD handbook is available, and can be found as: the FreeBSD Handbook. Note that this is a work in progress; some parts may be incomplete or out-of-date. - The definitive printed guide on FreeBSD is ``The Complete - FreeBSD'', written by Greg Lehey and published by Walnut Creek + The definitive printed guide on FreeBSD is The Complete + FreeBSD, written by Greg Lehey and published by Walnut Creek CDROM Books. Now in its second edition, the book contains 1,750 pages of install & system administration guidance, program setup help, and manual pages. The book (and current @@ -670,15 +670,16 @@ Evi Nemeth, Garth Snyder, Scott Seebass & Trent R. Hein, - ``Unix System Administration Handbook'', Prentice-Hall, + Unix System Administration Handbook, Prentice-Hall, 1995 ISBN: 0-13-151051-7 - NOTE make sure you get the second - edition, with a red cover, instead of the first - edition. + + Make sure you get the second edition, with a red + cover, instead of the first edition. + This book covers the basics, as well as TCP/IP, DNS, NFS, SLIP/PPP, sendmail, INN/NNTP, printing, etc.. It's expensive @@ -1221,7 +1222,7 @@ transfer the boot image to floppy. image has been created to be booted into directly. The image has the complete content of the floppy, track for track, and is not meant to be placed on the floppy as a regular file. -You have to transfer it to the floppy ``raw'', using the +You have to transfer it to the floppy raw, using the low-level tools (e.g. fdimage or rawrite) described in the installation guide to FreeBSD. @@ -1266,11 +1267,11 @@ it and then swap it back. There are also situations in which FreeBSD 2.1.7 will not install in 4 MB. To be exact: it does not install with 640 kB base + 3 MB -extended memory. If your motherboard can remap some of the ``lost'' +extended memory. If your motherboard can remap some of the lost memory out of the 640kB to 1MB region, then you may still be able to get FreeBSD 2.1.7 up. -Try to go into your BIOS setup and look for a ``remap'' option. +Try to go into your BIOS setup and look for a remap option. Enable it. You may also have to disable ROM shadowing. It may be easier to get 4 more MB just for the install. Build a @@ -1278,7 +1279,7 @@ custom kernel with only the options you need and then get the 4 MB out again. You may also install 2.0.5 and then upgrade your system to 2.1.7 -with the ``upgrade'' option of the 2.1.7 installation program. +with the upgrade option of the 2.1.7 installation program. After the installation, if you build a custom kernel, it will run in 4 MB. Someone has even succeeded in booting with 2 MB (the @@ -1351,7 +1352,7 @@ used to contain your boot manager (likely the first one) and when you come to the partition editor for it, as the very first thing (e.g. do not make any changes) select (W)rite. This will ask for confirmation, say yes, and when you get the Boot Manager selection -prompt, be sure to select "Boot Manager." +prompt, be sure to select Boot Manager. This will re-write the boot manager to disk. Now quit out of the installation menu and reboot off the hard disk as normal.
@@ -1493,11 +1494,8 @@ lp0: TCP/IP capable interface sites as root. For example, if you want connect the host max with moritz - - max <-----> moritz -IP Address 10.0.0.1 10.0.0.2 - - + max <-----> moritz +IP Address 10.0.0.1 10.0.0.2 on max start &prompt.root; ifconfig lp0 10.0.0.1 10.0.0.2 @@ -1680,7 +1678,7 @@ id="geometry"> Which geometry should I use for a disk drive? -(By the "geometry" of a disk, we mean the number of cylinders, +(By the geometry of a disk, we mean the number of cylinders, heads and sectors/track on a disk - I'll refer to this as C/H/S for convenience. This is how the PC's BIOS works out which area on a disk to read/write from). @@ -1688,15 +1686,15 @@ which area on a disk to read/write from). This seems to cause a lot of confusion for some reason. First of all, the physical geometry of a SCSI drive is totally irrelevant, as FreeBSD works in term of disk blocks. In fact, there -is no such thing as "the" physical geometry, as the sector density -varies across the disk - what manufacturers claim is the "true" +is no such thing as the physical geometry, as the sector density +varies across the disk - what manufacturers claim is the quote physical geometry is usually the geometry that they've worked out results in the least wasted space. For IDE disks, FreeBSD does work in terms of C/H/S, but all modern drives will convert this into block references internally as well. All that matters is the logical geometry - the answer that the -BIOS gets when it asks "what is your geometry?" and then uses to access +BIOS gets when it asks what is your geometry? and then uses to access the disk. As FreeBSD uses the BIOS when booting, it's very important to get this right. In particular, if you have more than one operating system on a disk, they must all agree on the geometry, otherwise you @@ -1704,9 +1702,9 @@ will have serious problems booting! For SCSI disks, the geometry to use depends on whether extended translation support is turned on in your controller (this is -often referred to as "support for DOS disks >1GB" or something -similar). If it's turned off, then use N cylinders, 64 heads -and 32 sectors/track, where 'N' is the capacity of the disk in +often referred to as support for DOS disks >1GB or something +similar). If it's turned off, then use N cylinders, 64 heads +and 32 sectors/track, where N is the capacity of the disk in MB. For example, a 2GB disk should pretend to have 2048 cylinders, 64 heads and 32 sectors/track. @@ -1725,7 +1723,7 @@ the DOS partition in the partition editor if you don't want to keep it, or leave it around for programming network cards and the like). Alternatively, there is a freely available utility distributed with -FreeBSD called ``pfdisk.exe'' (located in the tools +FreeBSD called pfdisk.exe (located in the tools subdirectory on the FreeBSD CDROM or on the various FreeBSD ftp sites) which can be used to work out what geometry the other operating systems on the disk are using. You can then enter this @@ -1771,7 +1769,7 @@ reasonably careful, a 20 megabyte boot partition should be plenty. - When I boot FreeBSD I get ``Missing Operating System'' + When I boot FreeBSD I get Missing Operating System @@ -1782,12 +1780,12 @@ instructions given above will almost always get you going. -I can't get past the boot manager's `F?' prompt. +I can't get past the boot manager's F? prompt. This is another symptom of the problem described in the preceding question. Your BIOS geometry and FreeBSD geometry settings do not agree! If your controller or BIOS supports cylinder -translation (often marked as ``>1GB drive support''), try +translation (often marked as >1GB drive support), try toggling its setting and reinstalling FreeBSD. @@ -1796,9 +1794,9 @@ toggling its setting and reinstalling FreeBSD. Do I need to install the complete sources? In general, no. However, we would strongly recommend that you -install, at a minimum, the ``base'' source kit, which +install, at a minimum, the base source kit, which includes several of the files mentioned here, and the -``sys'' (kernel) source kit, which includes sources for the +sys (kernel) source kit, which includes sources for the kernel. There is nothing in the system which requires the presence of the sources to operate, however, except for the kernel-configuration program @@ -1828,7 +1826,7 @@ system installation tool. step in a FreeBSD installation, but more recent releases have benefited from the introduction of a much friendlier kernel configuration tool. When at the FreeBSD boot prompt (boot:), -use the "-c" flag and you will be dropped into a visual +use the flag and you will be dropped into a visual configuration screen which allows you to configure the kernel's settings for most common ISA cards. @@ -1910,13 +1908,13 @@ current versions can generally be obtained by anonymous FTP from There is also a mailing list for the discussion of non-US encryption software. For more information, send -an email message with a single line saying ``help'' in the body +an email message with a single line saying help in the body of your message to majordomo@braae.ru.ac.za. -The boot floppy starts but hangs at the ``Probing Devices...'' +The boot floppy starts but hangs at the Probing Devices... screen. If you have a IDE Zip or Jaz drive installed, remove it and try again. @@ -1927,7 +1925,8 @@ this will be fixed in a later release. -I get a ``panic: cant mount root'' error when rebooting the system after installation. +I get a panic: cant mount root + error when rebooting the system after installation. This error comes from confusion between the boot block's and the kernel's understanding of the disk devices. The error usually @@ -1946,8 +1945,8 @@ think is the boot disk, wd1, while it is really wd2, and fails. For FreeBSD 3.3 and later, reboot the system and hit -"Enter" at the "Booting kernel in 10 seconds; hit -[Enter] to interrupt" prompt. This will drop you into the boot +Enter at the Booting kernel in 10 seconds; hit +[Enter] to interrupt prompt. This will drop you into the boot loader. Then type set root_disk_unit="disk_number". disk_number @@ -1957,7 +1956,7 @@ on the slave on the first IDE controller, 2 if it is installed on the master of the second IDE controller, and 3 if it is installed on the slave of the second IDE controller. -Then type "boot", and your system should boot +Then type boot, and your system should boot correctly. To make this change permanent (ie so you don't have to do this everytime you reboot or turn on your FreeBSD machine), put the line @@ -1969,7 +1968,7 @@ everytime you reboot or turn on your FreeBSD machine), put the line If using FreeBSD 3.2 or earlier, at the Boot: prompt, enter 1:wd(2,a)kernel and press Enter. If the system starts, then run the command -echo "1:wd(2,a)kernel" > /boot.config +echo "1:wd(2,a)kernel" > /boot.config to make it the default boot string. @@ -2142,14 +2141,13 @@ whole 32K of disk space (3 indirect blocks and 1 data block) on a small root partition. The dd command requires a dd that works with large files. - -ttyv0:bde@alphplex:/tmp/q> cat foo +&prompt.user; cat foo df . dd if=/dev/zero of=z bs=1 seek=`echo 2^43 - 2 | bc` count=1 ls -l z du z df . -ttyv0:bde@alphplex:/tmp/q> sh foo +&prompt.user; sh foo Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/da0a 64479 27702 31619 47% / 1+0 records in @@ -2158,16 +2156,14 @@ Filesystem 1024-blocks Used Avail Capacity Mounted on -rw-r--r-- 1 bde bin 8796093022207 Sep 7 16:04 z 32 z Filesystem 1024-blocks Used Avail Capacity Mounted on -/dev/da0a 64479 27734 31587 47% / -ttyv0:bde@alphplex:/tmp/q> exit - +/dev/da0a 64479 27734 31587 47% / Bruce Evans, September 1998 -I compiled a new kernel and now I get the error message "archsw.readin.failed" when booting. +I compiled a new kernel and now I get the error message archsw.readin.failed when booting. You can boot by specifying the kernel directly at the second stage, pressing any key when the | shows up before loader is @@ -2178,7 +2174,7 @@ world. This is not supported. Make world. -How do I upgrade from 3.X -> 4.X? +How do I upgrade from 3.X -> 4.X? We strongly recommend that you use binary snapshots to do this. 4-STABLE snapshots are available at @@ -2205,7 +2201,7 @@ id="hardware"> FreeBSD supports EIDE and SCSI drives (with a compatible controller; see the next section), and all drives using the -original "Western Digital" interface (MFM, RLL, ESDI, and +original Western Digital interface (MFM, RLL, ESDI, and of course IDE). A few ESDI controllers that use proprietary interfaces may not work: stick to WD1002/3/6/7 interfaces and clones. @@ -2276,13 +2272,16 @@ later releases. FreeBSD has contained support for Parallel Port Zip Drives since version 3.0. If you are using a sufficiently up to date version, then -you should check that your kernel contains the scbus0, da0, ppbus0, and vp0 drivers (the GENERIC kernel -contains everything except vp0). With all these drivers present, the -Parallel Port drive should be available as /dev/da0s4. Disks can -be mounted using mount /dev/da0s4 /mnt OR (for dos disks) mount_msdos /dev/da0s4 /mnt as appropriate. +you should check that your kernel contains the scbus0, +da0, ppbus0, and +vp0 drivers (the GENERIC kernel +contains everything except vp0). With all these drivers present, the +Parallel Port drive should be available as /dev/da0s4. Disks can +be mounted using mount /dev/da0s4 /mnt OR (for dos disks) +mount_msdos /dev/da0s4 /mnt as appropriate. Also check out this note on removable drives, -and this note on 'formatting'. +and this note on formatting. @@ -2299,7 +2298,7 @@ the media out while running. You will of course need to dismount the drive before swapping media, and make sure that any external units are powered on when you boot the system so FreeBSD can see them. -See this note on 'formatting'. +See this note on formatting. @@ -2373,10 +2372,10 @@ usbd_flags="" After the system is rebooted, the AT keyboard becomes - /dev/kbd0 and the USB keyboard becomes - /dev/kbd1, if both are connected to the + /dev/kbd0 and the USB keyboard becomes + /dev/kbd1, if both are connected to the system. If there is the USB keyboard only, it will be - /dev/ukbd0. + /dev/ukbd0. If you want to use the USB keyboard in the console, you have to explicitly tell the console driver to use the existence of the USB @@ -2386,7 +2385,7 @@ usbd_flags="" &prompt.root; kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null Note that if the USB keyboard is the only keyboard, it is - accessed as /dev/kbd0, thus, the command + accessed as /dev/kbd0, thus, the command should look like: &prompt.root; kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null @@ -2419,24 +2418,15 @@ following line to the kernel config file In FreeBSD 3.0 or before, add: - - device mse0 at isa? port 0x23c tty irq5 vector mseintr - - +device mse0 at isa? port 0x23c tty irq5 vector mseintr In FreeBSD 3.X, the line should be: - - device mse0 at isa? port 0x23c tty irq5 - - +device mse0 at isa? port 0x23c tty irq5 And in FreeBSD 4.X and later, the line should read: - - device mse0 at isa? port 0x23c irq5 - - +device mse0 at isa? port 0x23c irq5 Bus mice usually comes with dedicated interface cards. These cards may allow you to set the port address and the IRQ number other @@ -2447,7 +2437,8 @@ than shown above. Refer to the manual of your mouse and the - How do I use my PS/2 (``mouse port'' or ``keyboard'') mouse? + How do I use my PS/2 (mouse port + or keyboard) mouse? If you're running a post-2.2.5 version of FreeBSD, the necessary driver, psm, is included and enabled in the kernel. The kernel @@ -2465,24 +2456,15 @@ a new kernel. In FreeBSD 3.0 or earlier, the line should be: - - device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr - - +device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr In FreeBSD 3.1 or later, the line should be: - - device psm0 at isa? tty irq 12 - - +device psm0 at isa? tty irq 12 In FreeBSD 4.0 or later, the line should be: - - device psm0 at atkbdc? irq 12 - - +device psm0 at atkbdc? irq 12 See the Handbook entry on configuring the kernel if you've no experience with building kernels. @@ -2491,10 +2473,7 @@ experience with building kernels. make sure that an entry for psm0 exists in /dev. You can do this by typing: - - cd /dev; sh MAKEDEV psm0 - - +&prompt.root; cd /dev; sh MAKEDEV psm0 when logged in as root. @@ -2509,13 +2488,11 @@ use a mouse pointer in text consoles to cut & paste text. Run the mouse daemon, moused, and turn on the mouse pointer in the virtual console: - - moused -p /dev/xxxx -t yyyy - vidcontrol -m on - - +&prompt.root; moused -p /dev/xxxx -t yyyy +&prompt.root; vidcontrol -m on -Where xxxx is the mouse device name and yyyy +Where xxxx is the mouse device name and +yyyy is a protocol type for the mouse. See the &man.moused.8; man page for supported protocol types. @@ -2523,39 +2500,30 @@ is a protocol type for the mouse. See the system starts. In version 2.2.1, set the following variables in /etc/sysconfig. - - mousedtype="yyyy" - mousedport="xxxx" - mousedflags="" - - +mousedtype="yyyy" +mousedport="xxxx" +mousedflags="" In versions 2.2.2 to 3.0, set the following variables in /etc/rc.conf. - - moused_type="yyyy" - moused_port="xxxx" - moused_flags="" - - +moused_type="yyyy" +moused_port="xxxx" +moused_flags="" In 3.1 and later, assuming you have a PS/2 mouse, all you need -to is add “moused_enable="YES" to +to is add moused_enable="YES" to /etc/rc.conf. In addition, if you would like to be able to use the mouse daemon on all virtual terminals instead of just console at boot-time, add the following to /etc/rc.conf. - - allscreens_flags="-m on" - - +allscreens_flags="-m on" Staring from FreeBSD 2.2.6, the mouse daemon is capable of determining the correct protocol type automatically unless the mouse -is a relatively old serial mouse model. Specify ``auto'' as +is a relatively old serial mouse model. Specify auto the protocol to invoke automatic detection. When the mouse daemon is running, access to the mouse needs to be @@ -2574,7 +2542,7 @@ text. Then, press the button 2 (middle button) or the button 3 (right button) to paste it at the text cursor. In versions 2.2.6 and later, pressing the button 2 will paste -the text. Pressing the button 3 will ``extend'' the selected region +the text. Pressing the button 3 will extend the selected region of text. If your mouse does not have the middle button, you may wish to emulate it or remap buttons using moused options. See the moused(8) @@ -2674,7 +2642,7 @@ Protocol "SysMouse" My mouse has a fancy wheel and buttons. Can I use them in FreeBSD? -The answer is, unfortunately, “It depends”. These mice with +The answer is, unfortunately, It depends. These mice with additional features require specialized driver in most cases. Unless the mouse device driver or the user program has specific support for the mouse, it will act just like a standard two, or @@ -2792,10 +2760,11 @@ There is also limited support for MPU-401 and compatible MIDI cards. Cards conforming to the Microsoft Sound System specification are also supported through the pcm driver. -NOTE This is only for sound! This driver does not support +This is only for sound! This driver does not support CD-ROMs, SCSI or joysticks on these cards, except for the SoundBlaster. The SoundBlaster SCSI interface and some non-SCSI -CDROMS are supported, but you can't boot off this device. +CDROMS are supported, but you can't boot off this +device. @@ -2804,7 +2773,7 @@ CDROMS are supported, but you can't boot off this device. You can run the following command everytime the machine booted up: -mixer pcm 100 vol 100 cd 100 +&prompt.root; mixer pcm 100 vol 100 cd 100 @@ -2819,8 +2788,8 @@ complete list. I don't have a math co-processor - is that bad? -Note This will only affect 386/486SX/486SLC owners - other -machines will have one built into the CPU. +This will only affect 386/486SX/486SLC owners - other +machines will have one built into the CPU. In general this will not cause any problems, but there are circumstances where you will take a hit, either in performance or @@ -2828,9 +2797,9 @@ accuracy of the math emulation code (see the section on FP VERY slow. It is highly recommended that you buy a math co-processor; it's well worth it. -NOTE Some math co-processors are better than others. It pains +Some math co-processors are better than others. It pains us to say it, but nobody ever got fired for buying Intel. Unless -you're sure it works with FreeBSD, beware of clones. +you're sure it works with FreeBSD, beware of clones. @@ -2846,7 +2815,7 @@ for the list of other devices supported. Does FreeBSD support power management on my laptop? FreeBSD supports APM on certain machines. Please look in the -LINT kernel config file, searching for the APM keyword. +LINT kernel config file, searching for the APM keyword. @@ -2857,7 +2826,7 @@ for the list of other devices supported. implementation that causes grief when FreeBSD boots because PCI devices don't get configured at their reported addresses. -Disable the "Plug and Play Operating System" flag in the BIOS +Disable the Plug and Play Operating System flag in the BIOS to work around this problem. More information can be found at http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html#micron @@ -2880,17 +2849,18 @@ beginning. You will need to add the modem's PnP ID to the PnP ID list in the serial driver. -To enable Plug & Play support, compile a new kernel with controller pnp0 in +To enable Plug & Play support, compile a new kernel with +controller pnp0 in the configuration file, then reboot the system. The kernel will print the PnP IDs of all the devices it finds. Copy the PnP ID from the modem to the table in -/sys/i386/isa/sio.c, at about line 2777. Look for the string "SUP1310" -in the structure "siopnp_ids[]" to +/sys/i386/isa/sio.c, at about line 2777. Look for the string SUP1310 +in the structure siopnp_ids[] to find the table. Build the kernel again, install, reboot, and your modem should be found. -You may have to manually configure the PnP devices using the `pnp' command in the +You may have to manually configure the PnP devices using the pnp command in the boot-time configuration with a command like - pnp 1 0 enable os irq0 3 drq0 0 port0 0x2f8 - + +pnp 1 0 enable os irq0 3 drq0 0 port0 0x2f8 to make the modem show. @@ -2904,7 +2874,7 @@ to make the modem show. -Build a kernel with options COMCONSOLE. +Build a kernel with options COMCONSOLE. @@ -2929,8 +2899,8 @@ to make the modem show. implementation that does not configure PCI devices at the addresses reported. This causes grief when FreeBSD boots. -To work around this problem, disable the "Plug and Play Operating -System" flag in the BIOS. +To work around this problem, disable the Plug and Play Operating +System flag in the BIOS. More information on this problem is available at URL: http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html#micron @@ -2979,18 +2949,12 @@ this feature disabled, for some mysterious reason... To enable this, you'll need to edit the first device page mode, which can be done on FreeBSD by giving the command (as root) - - scsi -f /dev/rsd0c -m 1 -e -P 3 - - +&prompt.root; scsi -f /dev/rsd0c -m 1 -e -P 3 and changing the values of AWRE and ARRE from 0 to 1:- - - AWRE (Auto Write Reallocation Enbld): 1 - ARRE (Auto Read Reallocation Enbld): 1 - - +AWRE (Auto Write Reallocation Enbld): 1 +ARRE (Auto Read Reallocation Enbld): 1 The following paragraphs were submitted by Ted Mittelstaedt: @@ -3026,7 +2990,7 @@ means that the disk with bad144 used on it must not exceed 1024 cylinders, 16 heads, and 63 sectors. This places an effective limit of 500MB on a disk that is mapped with bad144. -To use bad144, simply set the "Bad Block" scanning to ON in the +To use bad144, simply set the Bad Block scanning to ON in the FreeBSD fdisk screen during the initial install. This works up through FreeBSD 2.2.7. The disk must have less than 1024 cylinders. It is generally recommended that the disk drive has been in operation for at @@ -3036,8 +3000,8 @@ wandering. If the disk has more than 1024 cylinders (such as a large ESDI drive) the ESDI controller uses a special translation mode to make it work under DOS. The wd driver understands about these translation modes, -IF you enter the "translated" geometry with the "set geometry" command -in fdisk. You must also NOT use the "dangerously dedicated" mode of +IF you enter the translated geometry with the set geometry command +in fdisk. You must also NOT use the dangerously dedicated mode of creating the FreeBSD partition, as this ignores the geometry. Also, even though fdisk will use your overridden geometry, it still knows the true size of the disk, and will attempt to create a too large FreeBSD @@ -3049,7 +3013,7 @@ controller, boot it with a DOS disk and format it with a DOS partition. Then, boot the FreeBSD install and in the fdisk screen, read off and write down the blocksize and block numbers for the DOS partition. Then, reset the geometry to the same that DOS uses, delete the DOS partition, -and create a "cooperative" FreeBSD partition using the blocksize you +and create a cooperative FreeBSD partition using the blocksize you recorded earlier. Then, set the partition bootable and turn on bad block scanning. During the actual install, bad144 will run first, before any filesystems are created. (you can view this with an Alt-F2) @@ -3068,7 +3032,7 @@ replacing the drive. The bad blocks will only get worse as time goes on. This info is specific to the 742a but may also cover other Buslogic cards. (Bustek = Buslogic) -There are 2 general ``versions'' of the 742a card. They are +There are 2 general versions of the 742a card. They are hardware revisions A-G, and revisions H - onwards. The revision letter is located after the Assembly number on the edge of the card. The 742a has 2 ROM chips on it, one is the BIOS chip and @@ -3082,7 +3046,7 @@ Firmware ROM in your adapter card for your hardware revision. The REV A-G cards can only accept BIOS/Firmware sets up to 2.41/2.21. The REV H- up cards can accept the most current BIOS/Firmware sets of 4.70/3.37. The difference between the -firmware sets is that the 3.37 firmware supports ``round robin'' +firmware sets is that the 3.37 firmware supports round robin The Buslogic cards also have a serial number on them. If you have a old hardware revision card you can call the Buslogic RMA @@ -3094,7 +3058,7 @@ young enough they will do so. have a Firmware revision older than this your card will not be recognized as a Buslogic card. It may be recognized as an Adaptec 1540, however. The early Buslogic firmware contains an -AHA1540 ``emulation'' mode. This is not a good thing for an EISA +AHA1540 emulation mode. This is not a good thing for an EISA card, however. If you have an old hardware revision card and you obtain the 2.21 @@ -3109,13 +3073,13 @@ to B-C, the default is A-B. This is basically a known problem. The EISA on-board SCSI controller in the HP Netserver machines occupies EISA slot number 11, so all -the ``true'' EISA slots are in front of it. Alas, the address space +the true EISA slots are in front of it. Alas, the address space for EISA slots >= 10 collides with the address space assigned to PCI, and FreeBSD's auto-configuration currently cannot handle this situation very well. So now, the best you can do is to pretend there is no address -range clash :), by bumping the kernel option EISA_SLOTS +range clash :), by bumping the kernel option EISA_SLOTS to a value of 12. Configure and compile a kernel, as described in the Handbook entry on configuring the kernel. @@ -3123,23 +3087,20 @@ Configure and compile a kernel, as described in the Of course, this does present you with a chicken-and-egg problem when installing on such a machine. In order to work around this problem, a special hack is available inside UserConfig. -Do not use the ``visual'' interface, but the plain command-line +Do not use the visual interface, but the plain command-line interface there. Simply type - - eisa 12 - quit - - +eisa 12 +quit at the prompt, and install your system as usual. While it's recommended you compile and install a custom kernel anyway, Hopefully, future versions will have a proper fix for this problem. -NOTE: You can not use a dangerously dedicated disk with +You can not use a dangerously dedicated disk with an HP Netserver. See this note for -more info. +more info. @@ -3155,13 +3116,13 @@ manual page of the disk driver (man 4 wd). If you're already running FreeBSD 2.2.1 or 2.2.2 with a CMD640 IDE controller and you want to use the second channel, -build a new kernel with options "CMD640" enabled. This +build a new kernel with options "CMD640" enabled. This is the default for 2.2.5 and later. -I keep seeing messages like ``ed1: timeout''. +I keep seeing messages like ed1: timeout. This is usually caused by an interrupt conflict (e.g., two boards using the same IRQ). FreeBSD prior to 2.0.5R used to be tolerant @@ -3181,7 +3142,7 @@ no link on the UTP port or if the cable is disconnected. -When I mount a CDROM, I get ``Incorrect super block''. +When I mount a CDROM, I get Incorrect super block. You have to tell mount the type of the device that you want to mount. By default, mount(8) -will assume the filesystem is of type ``ufs''. You want to mount -a CDROM filesystem, and you do this by specifying the ``'' +will assume the filesystem is of type ufs. You want to mount +a CDROM filesystem, and you do this by specifying the option to mount(8) . This does, of course, assume that the @@ -3199,28 +3160,22 @@ have. As of 1.1R, FreeBSD automatically understands the Rock Ridge (long filename) extensions as well. As an example, if you want to mount the CDROM device, -``/dev/cd0c'', under /mnt, you would execute: +/dev/cd0c, under /mnt, you would execute: - - mount -t cd9660 /dev/cd0c /mnt - - +&prompt.root; mount -t cd9660 /dev/cd0c /mnt -Note that your device name (``/dev/cd0c'' in this +Note that your device name (/dev/cd0c in this example) could be different, depending on the CDROM interface. -Note that the ``'' option just causes the -``mount_cd9660'' command to be executed, and so the +Note that the option just causes the +mount_cd9660 command to be executed, and so the above example could be shortened to: - - mount_cd9660 /dev/cd0c /mnt - - +&prompt.root; mount_cd9660 /dev/cd0c /mnt -When I mount a CDROM, I get ``Device not configured''. +When I mount a CDROM, I get Device not configured. This generally means that there is no CDROM in the CDROM drive, or the drive is not visible on the bus. Feed the drive @@ -3233,10 +3188,7 @@ to answer the bus reset. If you have a SCSI CD-ROM please try to add the following symbol into your kernel configuration file and recompile. - - options "SCSI_DELAY=15" - - +options "SCSI_DELAY=15" @@ -3244,12 +3196,9 @@ and recompile. My printer is ridiculously slow. What can I do ? If it's parallel, and the only problem is that it's terribly -slow, try setting your printer port into ``polled'' mode: +slow, try setting your printer port into polled mode: - - lptcontrol -p - - +&prompt.root; lptcontrol -p Some newer HP printers are claimed not to work correctly in interrupt mode, apparently due to some (not yet exactly @@ -3258,7 +3207,7 @@ understood) timing problem. -My programs occasionally die with ``Signal 11'' errors. +My programs occasionally die with Signal 11 errors. This can be caused by bad hardware (memory, motherboard, etc.). Try running a memory-testing program on your PC. Note that, even @@ -3286,7 +3235,7 @@ the BIOS setup and see if that solves the problem. When I boot, the screen goes black and loses sync! This is a known problem with the ATI Mach 64 video card. -The problem is that this card uses address 2e8, and +The problem is that this card uses address 2e8, and the fourth serial port does too. Due to a bug (feature?) in the sio(4) @@ -3306,7 +3255,8 @@ into configuration mode). -Disable sio0, sio1, sio2 and sio3 +Disable sio0, sio1, +sio2 and sio3 (all of them). This way the sio driver doesn't get activated -> no problems. @@ -3353,36 +3303,37 @@ is fixed, we'll use the extended BIOS functions to get the full memory information...but for now we're stuck with the kernel option. -options "MAXMEM=<n>" +options "MAXMEM=n" -Where n is your memory in Kilobytes. For a 128 MB machine, -you'd want to use 131072. +Where n is your memory in Kilobytes. For a 128 MB machine, +you'd want to use 131072. -FreeBSD 2.0 panics with ``kmem_map too small!'' +FreeBSD 2.0 panics with kmem_map too small! -Note The message may also be ``mb_map too small!'' +The message may also be +mb_map too small! The panic indicates that the system ran out of virtual memory for network buffers (specifically, mbuf clusters). You can increase the amount of VM available for mbuf clusters by adding: -options "NMBCLUSTERS=<n>" +options "NMBCLUSTERS=n" -to your kernel config file, where <n> is a number in the +to your kernel config file, where n is a number in the range 512-4096, depending on the number of concurrent TCP connections you need to support. I'd recommend trying 2048 - this should get rid of the panic completely. You can monitor the number of mbuf clusters allocated/in use on the system with netstat -m. The default value for NMBCLUSTERS is -512 + MAXUSERS * 16. +512 + MAXUSERS * 16. -``CMAP busy panic'' when rebooting with a new kernel. +CMAP busy panic when rebooting with a new kernel. The logic that attempts to detect an out of date /var/db/kvm_*.db files sometimes fails and using a @@ -3390,10 +3341,7 @@ mismatched file can sometimes lead to panics. If this happens, reboot single-user and do: - - rm /var/db/kvm_*.db - - +&prompt.root; rm /var/db/kvm_*.db @@ -3410,7 +3358,7 @@ which is causing the problem. -Sendmail says ``mail loops back to myself'' +Sendmail says mail loops back to myself This is answered in the sendmail FAQ as follows:- @@ -3439,8 +3387,8 @@ release. It is however regularly posted to comp.answers, and news.answers. You can also receive a copy via email by sending a message to -mail-server@rtfm.mit.edu with the command "send -usenet/news.answers/mail/sendmail-faq" as the body of the +mail-server@rtfm.mit.edu +with the command send usenet/news.answers/mail/sendmail-faq as the body of the message. @@ -3450,7 +3398,7 @@ message. The remote machine may be setting your terminal type -to something other than the cons25 terminal type +to something other than the cons25 terminal type required by the FreeBSD console. There are a number of possible work-arounds for this problem: @@ -3458,24 +3406,24 @@ required by the FreeBSD console. After logging on to the remote machine, set your TERM shell -variable to ansi or -sco if the remote machine knows +variable to ansi or +sco if the remote machine knows about these terminal types. Use a VT100 emulator like screen at the FreeBSD console. -screen offers you the ability to run multiple +screen offers you the ability to run multiple concurrent sessions from one terminal, and is a neat program in its own right. -Each screen window behaves like a VT100 terminal, -so the TERM variable at the remote end should be set to -vt100. +Each screen window behaves like a VT100 terminal, +so the TERM variable at the remote end should be set to +vt100. -Install the cons25 terminal database entry on +Install the cons25 terminal database entry on the remote machine. The way to do this depends on the operating system on the remote machine. The system administration manuals for the remote system should be able to help you here. @@ -3483,10 +3431,9 @@ should be able to help you here. Fire up an X server at the FreeBSD end and login to the remote machine -using an X based terminal emulator such as xterm or -rxvt. The TERM variable at the remote host -should be set to xterm or vt100 -. +using an X based terminal emulator such as xterm or +rxvt. The TERM variable at the remote host +should be set to xterm or vt100. @@ -3495,7 +3442,7 @@ should be set to xterm or vt100 -My machine prints "calcru: negative time..." +My machine prints calcru: negative time... This can be caused by various hardware and/or software ailments relating to interrupts. It may be due to bugs but can also happen @@ -3505,19 +3452,19 @@ Graphics accelerators can also get you here, in which case you should check the interrupt setting of the card first. A side effect of this problem are dying processes with the -message "SIGXCPU exceeded cpu time limit". +message SIGXCPU exceeded cpu time limit. For FreeBSD 3.0 and later from Nov 29, 1998 forward: If the problem cannot be fixed otherwise the solution is to set -this sysctl variable: - sysctl -w kern.timecounter.method=1 - +this sysctl variable: + +&prompt.root; sysctl -w kern.timecounter.method=1 This means a performance impact, but considering the cause of this problem, you probably will not notice. If the problem -persists, keep the sysctl set to one and set the "NTIMECOUNTER" +persists, keep the sysctl set to one and set the NTIMECOUNTER option in your kernel to increasingly large values. If by the -time you have reached "NTIMECOUNTER=20" the problem isn't +time you have reached NTIMECOUNTER=20 the problem isn't solved, interrupts are too hosed on your machine for reliable timekeeping. @@ -3528,7 +3475,7 @@ timekeeping. id="commercial"> Commercial Applications -NOTE This section is still very sparse, though we're hoping, of +This section is still very sparse, though we're hoping, of course, that companies will add to it! :) The FreeBSD group has no financial interest in any of the companies listed here but simply lists them as a public service (and feels that commercial interest @@ -3536,7 +3483,7 @@ in FreeBSD can have very positive effects on FreeBSD's long-term viability). We encourage commercial software vendors to send their entries here for inclusion. See the Vendors -page for a longer list. +page for a longer list. @@ -3546,8 +3493,8 @@ page for a longer list. ELF Motif 2.1.20 distribution for FreeBSD (either i386 or Alpha). -There are two distributions, the "developement edition" and the -"runtime edition" (for much less). These distributions includes: +There are two distributions, the developement edition and the +runtime edition (for much less). These distributions includes: @@ -3765,7 +3712,7 @@ form only, in a unified diskette distribution for FreeBSD and Linux. Xi Graphics also offers a high performance X Server taylored for laptop support. -There is a free "compatibility demo" of version 5.0 available. +There is a free compatibility demo of version 5.0 available. Xi Graphics also sells Motif and CDE for FreeBSD (see above). @@ -3849,7 +3796,7 @@ id="applications"> Please take a look at the ports page for info on software packages ported to FreeBSD. The list currently tops 3400 and is growing daily, so come -back to check often or subscribe to the freebsd-announce +back to check often or subscribe to the freebsd-announce mailing list for periodic updates on new entries. @@ -3859,7 +3806,7 @@ well. Each time a FreeBSD release is made, a snapshot of the ports tree at the time of release in also included in the ports/ directory. -We also support the concept of a ``package'', essentially no +We also support the concept of a package, essentially no more than a gzipped binary distribution with a little extra intelligence embedded in it for doing whatever custom installation work is required. A package can be installed and uninstalled @@ -3965,8 +3912,8 @@ the correct port/package for your system. -I get a message "Error: can't find -libc.so.4.0" +I get a message Error: can't find +libc.so.4.0 You accidently downloaded packages meant for 4.X and 5.X @@ -3985,50 +3932,41 @@ You will need to add the alternative math emulator to your kernel; you do this by adding the following to your kernel config file and it will be compiled in. - - options GPL_MATH_EMULATE - - +options GPL_MATH_EMULATE -NOTE You will need to remove the MATH_EMULATE -option when you do this. +You will need to remove the MATH_EMULATE +option when you do this. When I run a SCO/iBCS2 application, it bombs on -socksys (FreeBSD 3.0 and older only). +socksys (FreeBSD 3.0 and older only). You first need to edit the /etc/sysconfig (or /etc/rc.conf) file in the last section to change the -following variable to YES: +following variable to YES: - - # Set to YES if you want ibcs2 (SCO) emulation loaded at startup - ibcs2=NO - - +# Set to YES if you want ibcs2 (SCO) emulation loaded at startup +ibcs2=NO It will load the ibcs2 kernel module at startup. You'll then need to set up /compat/ibcs2/dev to look like: - -lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null +lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null lrwxr-xr-x 1 root wheel 7 Oct 15 22:20 nfsd@ -> socksys -rw-rw-r-- 1 root wheel 0 Oct 28 12:02 null lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 socksys@ -> /dev/null -crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx - - +crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx You just need socksys to go to /dev/null to fake the open & close. The code in -CURRENT will handle the rest. This is much cleaner than the way it was done before. If you -want the spx driver for a local socket X connection, define -SPX_HACK when you compile the system. +want the spx driver for a local socket X connection, define +SPX_HACK when you compile the system. @@ -4075,9 +4013,10 @@ branches. If you want to run some aout applications like Netscape Navigator on an Elf'ened machine such as 3.1-R or later, -it would need /usr/libexec/ld.so and some aout libs. +it would need /usr/libexec/ld.so and some aout libs. They are included in the compat22 distribution. -Use /stand/sysinstall or install.sh in the compat22 subdirectory +Use /stand/sysinstall or +install.sh in the compat22 subdirectory and install it. Also read ERRATAs for 3.1-R and 3.2-R. @@ -4097,24 +4036,25 @@ id="make-kernel"> Not at all! Check out the kernel config section of the Handbook. -NOTE: I recommend making a dated snapshot of your kernel +I recommend making a dated snapshot of your kernel in kernel.YYMMDD after you get it all working, that way if you do something dire the next time you play with your configuration you can boot that kernel instead of having to go all the way back to kernel.GENERIC. This is particularly important if you're now booting off a controller that isn't supported in the GENERIC -kernel (yes, personal experience). +kernel (yes, personal experience). - My kernel compiles fail because _hw_float is missing. + My kernel compiles fail because _hw_float is missing. Let me guess. You removed npx0 from your kernel configuration file because you don't have a math co-processor, -right? Wrong! :-) The npx0 is MANDATORY. Even if you don't -have a mathematic co-processor, you must include the npx0 +right? Wrong! :-) The npx0 is MANDATORY. Even if you don't +have a mathematic co-processor, you must +include the npx0 device. @@ -4172,16 +4112,13 @@ the kernel from getting trashed due to hardware or software conflicts. The way to fix this is to leave out the IRQ settings on all but one port. Here is a example: - - # - # Multiport high-speed serial line - 16550 UARTS - # - device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr - device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr - device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr - device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr - - +# +# Multiport high-speed serial line - 16550 UARTS +# +device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr +device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr +device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr +device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr @@ -4189,37 +4126,31 @@ on all but one port. Here is a example: How do I enable support for QIC-40/80 drives? You need to uncomment the following line in the generic config -file (or add it to your config file), add a ``flags 0x1'' +file (or add it to your config file), add a flags 0x1 on the fdc line and recompile. - -controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 flags 0x1 vector fdintr +controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 flags 0x1 vector fdintr disk fd0 at fdc0 drive 0 ^^^^^^^^^ disk fd1 at fdc0 drive 1 #tape ft0 at fdc0 drive 2 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Next, you create a device called /dev/ft0 by going into /dev and run the following command: - - sh ./MAKEDEV ft0 - - +&prompt.root; sh MAKEDEV ft0 -for the first device. ft1 for a second one and so on. +for the first device. ft1 for a second one and so on. You will have a device called /dev/ft0, which you can write to through a special program to manage it called -``ft'' - see the man page on ft +fd - see the man page on ft for further details. Versions previous to also had some trouble dealing -with bad tape media; if you have trouble where ft seems to +with bad tape media; if you have trouble where ft seems to go back and forth over the same spot, try grabbing the latest -version of ft from /usr/src/sbin/ft in +version of ft from /usr/src/sbin/ft in and try that. @@ -4309,21 +4240,15 @@ pretty much the same for all devices. If it's a ZIP drive or a floppy , you've already got a DOS filesystem on it, you can use a command like this: - - mount -t msdos /dev/fd0c /floppy - - +&prompt.root; mount -t msdos /dev/fd0c /floppy if it's a floppy, or this: - - mount -t msdos /dev/da2s4 /zip - - +&prompt.root; mount -t msdos /dev/da2s4 /zip for a ZIP disk with the factory configuration. -For other disks, see how they're laid out using fdisk or +For other disks, see how they're laid out using fdisk or /stand/sysinstall. The rest of the examples will be for a ZIP drive on da2, the third @@ -4339,11 +4264,8 @@ drive that you don't want to bother with multiple operating system support on, just blow away the whole FAT partition table (slices) and just use the BSD partitioning: - - dd if=/dev/zero of=/dev/rda2 count=2 - disklabel -Brw da2 auto - - +&prompt.root; dd if=/dev/zero of=/dev/rda2 count=2 +&prompt.root; disklabel -Brw da2 auto You can use disklabel or /stand/sysinstall to create multiple BSD partitions. You'll certainly want to do this if you're adding @@ -4353,26 +4275,18 @@ removable drive like a ZIP. Finally, create a new file system, this one's on our ZIP drive using the whole disk: - - newfs /dev/rda2c - - +&prompt.root; newfs /dev/rda2c and mount it: - - mount /dev/da2c /zip - - +&prompt.root; mount /dev/da2c /zip and it's probably a good idea to add a line like this to -/etc/fstab so you can just type "mount /zip" in the +/etc/fstab so you can just type +mount /zip in the future: - - /dev/da2c /zip ffs rw,noauto 0 0 - - +/dev/da2c /zip ffs rw,noauto 0 0 @@ -4418,16 +4332,13 @@ future: How do I mount a secondary DOS partition? The secondary DOS partitions are found after ALL the primary -partitions. For example, if you have an "E" partition as the +partitions. For example, if you have an E partition as the second DOS partition on the second SCSI drive, you need to create -the special files for "slice 5" in /dev, then mount /dev/da1s5: +the special files for slice 5 in /dev, then mount /dev/da1s5: - - # cd /dev - # ./MAKEDEV da1s5 - # mount -t msdos /dev/da1s5 /dos/e - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV da1s5 +&prompt.root; mount -t msdos /dev/da1s5 /dos/e @@ -4463,16 +4374,13 @@ partition. Assuming you name that file something like you can then edit the c:\boot.ini file to come up with something like this: - - [boot loader] - timeout=30 - default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS - [operating systems] - multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT" - C:\BOOTSECT.BSD="FreeBSD" - C:\="DOS" - - +[boot loader] +timeout=30 +default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS +[operating systems] +multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT" +C:\BOOTSECT.BSD="FreeBSD" +C:\="DOS" For 2.2.x systems this procedure assumes that DOS, NT, FreeBSD, or whatever have been installed into their respective fdisk partitions on the @@ -4483,31 +4391,22 @@ to boot from its native partition, not the disk MB Mount a DOS-formatted floppy (if you've converted to NTFS) or the FAT partition, under, say, /mnt. - - dd if=/dev/rda0a of=/mnt/bootsect.bsd bs=512 count=1 - - +&prompt.root; dd if=/dev/rda0a of=/mnt/bootsect.bsd bs=512 count=1 Reboot into DOS or NT. NTFS users copy the bootsect.bsd and/or the bootsect.lnx file from the floppy to -C:\. Modify the attributes (permissions) on +C:\. Modify the attributes (permissions) on boot.ini with: - - attrib -s -r c:\boot.ini - - +C:\> attrib -s -r c:\boot.ini Edit to add the appropriate entries from the example boot.ini above, and restore the attributes: - - attrib +s +r c:\boot.ini - - +C:\> attrib +s +r c:\boot.ini If FreeBSD is booting from the MBR, restore it with the DOS -``fdisk'' command after you reconfigure them to boot from their +fdisk command after you reconfigure them to boot from their native partitions. For FreeBSD 3.x systems the procedure is somewhat simpler. @@ -4549,32 +4448,29 @@ system. Very briefly, these are: Boot Linux, and add the following lines to /etc/lilo.conf: - other=/dev/hda2 - table=/dev/hda - label=FreeBSD - +other=/dev/hda2 + table=/dev/hda + label=FreeBSD (the above assumes that your FreeBSD slice is known to Linux as /dev/hda2; tailor to suit your setup). Then, run lilo as root and you should be done. If FreeBSD resides on another disk, you need to add -``loader=/boot/chain.b'' to the LILO entry. +loader=/boot/chain.b to the LILO entry. For example: - other=/dev/dab4 - table=/dev/dab - loader=/boot/chain.b - label=FreeBSD - +other=/dev/dab4 + table=/dev/dab + loader=/boot/chain.b + label=FreeBSD In some cases you may need to specify the BIOS drive number to the FreeBSD boot loader to successfully boot off the second disk. For example, if your FreeBSD SCSI disk is probed by BIOS as BIOS -disk 1, at the FreeBSD boot loader prompt you need to specify: - Boot: 1:da(0,a)/kernel - - +disk 1, at the FreeBSD boot loader prompt you need to specify: + +Boot: 1:da(0,a)/kernel On FreeBSD 2.2.5 and later, you can configure boot(8) to automatically do this for you at boot time. @@ -4599,58 +4495,58 @@ will bear no other Operating Systems in the Master Boot Record). - Will a ``dangerously dedicated'' disk endanger my health? + Will a dangerously dedicated disk endanger my health? The installation procedure allows you to chose two different methods in partitioning your harddisk(s). The default way makes it compatible with other operating systems on the same machine, -by using fdisk table entries (called ``slices'' in FreeBSD), +by using fdisk table entries (called slices in FreeBSD), with a FreeBSD slice that employs partitions of its own. Optionally, one can chose to install a boot-selector to switch between the possible operating systems on the disk(s). The alternative uses the entire disk for FreeBSD, and makes no attempt to be compatible with other operating systems. -So why it is called ``dangerous''? A disk in this mode +So why it is called dangerous? A disk in this mode doesn't contain what normal PC utilities would consider a valid fdisk table. Depending on how well they have been designed, they might complain at you once they are getting in contact with such a disk, or even worse, they might damage the BSD bootstrap without even asking or notifying -you. In addition, the ``dangerously dedicated'' disk's layout +you. In addition, the dangerously dedicated disk's layout is known to confuse many BIOSsen, including those from AWARD (eg. as found in HP Netserver and Micronics systems as well as many others) and Symbios/NCR (for the popular 53C8xx range of SCSI controllers). This isn't a complete list, there are more. -Symptoms of this confusion include the "read error" message +Symptoms of this confusion include the read error message printed by the FreeBSD bootstrap when it can't find itself, as well as system lockups when booting. Why have this mode at all then? It only saves a few kbytes of disk space, and it can cause real problems for a new -installation. ``Dangerously dedicated'' mode's origins lie +installation. Dangerously dedicated mode's origins lie in a desire to avoid one of the most common problems plaguing -new FreeBSD installers - matching the BIOS ``geometry'' numbers +new FreeBSD installers - matching the BIOS geometry numbers for a disk to the disk itself. -``Geometry'' is an outdated concept, but one still at the +Geometry is an outdated concept, but one still at the heart of the PC's BIOS and its interaction with disks. When the FreeBSD installer creates slices, it has to record the location of these slices on the disk in a fashion that corresponds with the way the BIOS expects to find them. If it gets it wrong, you won't be able to boot. -``Dangerously dedicated'' mode tries to work around this +Dangerously dedicated mode tries to work around this by making the problem simpler. In some cases, it gets it right. But it's meant to be used as a last-ditch alternative - there are better ways to solve the problem 99 times out of 100. -So, how do you avoid the need for ``DD'' mode when you're +So, how do you avoid the need for DD mode when you're installing? Start by making a note of the geometry that your BIOS claims to be using for your disks. You can arrange to have -the kernel print this as it boots by specifying ``-v'' at the -``boot:'' prompt, or using ``boot -v'' in the loader. Just +the kernel print this as it boots by specifying at the +boot: prompt, or using boot -v in the loader. Just before the installer starts, the kernel will print a list of BIOS geometries. Don't panic - wait for the installer to start and then use scrollback to read the numbers. Typically the BIOS @@ -4659,7 +4555,7 @@ disks, first IDE, then SCSI. When you're slicing up your disk, check that the disk geometry displayed in the FDISK screen is correct (ie. it matches the BIOS -numbers); if it's wrong, use the ``g'' key to fix it. You may have +numbers); if it's wrong, use the g key to fix it. You may have to do this if there's absolutely nothing on the disk, or if the disk has been moved from another system. Note that this is only an issue with the disk that you're going to boot from; FreeBSD @@ -4667,28 +4563,22 @@ will sort itself out just fine with any other disks you may have. Once you've got the BIOS and FreeBSD agreeing about the geometry of the disk, your problems are almost guaranteed to be -over, and with no need for ``DD'' mode at all. If, however, -you are still greeted with the dreaded ``read error'' message +over, and with no need for DD mode at all. If, however, +you are still greeted with the dreaded read error message when you try to boot, it's time to cross your fingers and go for it - there's nothing left to lose. -To return a ``dangerously dedicated'' disk for normal PC +To return a dangerously dedicated disk for normal PC use, there are basically two options. The first is, you write enough NULL bytes over the MBR to make any subsequent installation believe this to be a blank disk. You can do this for example with - - dd if=/dev/zero of=/dev/rda0 count=15 - - +&prompt.root; dd if=/dev/zero of=/dev/rda0 count=15 -Alternatively, the undocumented DOS ``feature'' +Alternatively, the undocumented DOS feature - - fdisk /mbr - - +C:\> fdisk /mbr will to install a new master boot record as well, thus clobbering the BSD bootstrap. @@ -4724,7 +4614,7 @@ main memory in order to be able to accomodate a kernel core. IDE drives are not able to allow access to both drives on the same channel at the same time (FreeBSD doesn't support mode 4, so -all IDE disk I/O is ``programmed''). I would still suggest putting +all IDE disk I/O is programmed). I would still suggest putting your swap on a separate drive however. The drives are so cheap, it is not worth worrying about. @@ -4739,10 +4629,7 @@ of course you can use any name that you want). Make sure your kernel was built with the line - - pseudo-device vn 1 #Vnode driver (turns a file into a device) - - +pseudo-device vn 1 #Vnode driver (turns a file into a device) in your config-file. The GENERIC kernel already contains this. @@ -4750,40 +4637,32 @@ of course you can use any name that you want). -create a vn-device +create a vn-device - cd /dev - sh ./MAKEDEV vn0 - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV vn0 - -create a swapfile (/usr/swap0) +create a swapfile (/usr/swap0) - dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 - +&prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 - -set proper permissions on (/usr/swap0) +set proper permissions on (/usr/swap0) - chmod 0600 /usr/swap0 - +&prompt.root; chmod 0600 /usr/swap0 - -enable the swap file in /etc/rc.conf +enable the swap file in /etc/rc.conf - swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired. - +swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired. - @@ -4795,10 +4674,7 @@ of course you can use any name that you want). To enable the swap file immediately, type - - vnconfig -ce /dev/vn0c /usr/swap0 swap - - +&prompt.root; vnconfig -ce /dev/vn0c /usr/swap0 swap @@ -4818,10 +4694,7 @@ should cover most of your problem. See the Under /usr/share/syscons/keymaps are a number of map files. Choose the one relevant to your system and load it. - - kbdcontrol -l uk.iso - - +&prompt.root; kbdcontrol -l uk.iso Both the /usr/share/syscons/keymaps and the .kbd extension are assumed by @@ -4954,7 +4827,7 @@ mapping is in /usr/share/examples/syscons. -Don't turn on quotas on '/', +Don't turn on quotas on /, @@ -4962,11 +4835,10 @@ mapping is in /usr/share/examples/syscons. Put the quota file on the file system that the quotas are to be enforced on. ie: - FS QUOTA FILE - /usr /usr/admin/quotas - /home /home/admin/quotas - ... - +FS QUOTA FILE +/usr /usr/admin/quotas +/home /home/admin/quotas +... @@ -4980,19 +4852,15 @@ to be enforced on. ie: The symptom of this is: - - # ccdconfig -C - ccdconfig: ioctl (CCDIOCSET): /dev/ccd0c: Inappropriate file type or format - # - - +&prompt.root; ccdconfig -C +ccdconfig: ioctl (CCDIOCSET): /dev/ccd0c: Inappropriate file type or format This usually happens when you are trying to concatenate the -`c' partitions, which default to type `unused'. The ccd +c partitions, which default to type unused. The ccd driver requires the underlying partition type to be FS_BSDFFS. Edit the disklabel of the disks you are trying to concatenate and change the types of partitions to -`4.2BSD'. +4.2BSD. @@ -5001,28 +4869,21 @@ to concatenate and change the types of partitions to The symptom of this is: - - # disklabel ccd0 - (it prints something sensible here, so let's try to edit it) - # disklabel -e ccd0 - (edit, save, quit) - disklabel: ioctl DIOCWDINFO: No disk label on disk; - use "disklabel -r" to install initial label - # - - +&prompt.root; disklabel ccd0 +(it prints something sensible here, so let's try to edit it) +&prompt.root; disklabel -e ccd0 +(edit, save, quit) +disklabel: ioctl DIOCWDINFO: No disk label on disk; +use "disklabel -r" to install initial label This is because the disklabel returned by ccd is actually a -`fake' one that is not really on the disk. You can solve +fake one that is not really on the disk. You can solve this problem by writing it back explicitly, as in: - - # disklabel ccd0 > /tmp/disklabel.tmp - # disklabel -Rr ccd0 /tmp/disklabel.tmp - # disklabel -e ccd0 - (this will work now) - - +&prompt.root; disklabel ccd0 > /tmp/disklabel.tmp +&prompt.root; disklabel -Rr ccd0 /tmp/disklabel.tmp +&prompt.root; disklabel -e ccd0 +(this will work now) @@ -5033,13 +4894,11 @@ this problem by writing it back explicitly, as in: memory, messages and semaphores. You need to add the following lines to your kernel config to enable them. - - options SYSVSHM - options SYSVSHM # enable shared memory - options SYSVSEM # enable for semaphores - options SYSVMSG # enable for messaging - - +options SYSVSHM +options SYSVSHM # enable shared memory +options SYSVSEM # enable for semaphores +options SYSVMSG # enable for messaging + In FreeBSD 3.2 and later, these options are already part of the GENERIC kernel, which means they should already be compiled into your system. @@ -5119,7 +4978,7 @@ Cw youruucpnodename.UUCP The nodns and nocanonify features will prevent any usage of the DNS during mail delivery. The -UUCP_RELAY clause is needed for bizarre reasons, +UUCP_RELAY clause is needed for bizarre reasons, don't ask. Simply put an Internet hostname there that is able to handle .UUCP pseudo-domain addresses; most likely, you will enter the mail relay of your ISP there. @@ -5143,11 +5002,13 @@ if-bus.UUCP uucp-dom:if-bus As you can see, this is part of a real-life file. The first three lines handle special cases where domain-addressed mail should not be sent out to the default route, but instead to -some UUCP neighbor in order to ``shortcut'' the delivery +some UUCP neighbor in order to shortcut the delivery path. The next line handles mail to the local Ethernet domain that can be delivered using SMTP. Finally, the UUCP neighbors are mentioned in the .UUCP pseudo-domain notation, -to allow for a ``uucp-neighbor!recipient'' override of the +to allow for a +uucp-neighbor!recipient +override of the default rules. The last line is always a single dot, matching everything else, with UUCP delivery to a UUCP neighbor that serves as your universal mail gateway to the world. All of @@ -5164,7 +5025,7 @@ each time you change your mailertable. Final hint: if you are uncertain whether some particular mail routing would work, remember the option to sendmail. It starts sendmail in address test mode; -simply enter ``0 '', followed by the address you wish to +simply enter 0 , followed by the address you wish to test for the mail routing. The last line tells you the used internal mail agent, the destination host this agent will be called with, and the (possibly translated) address. Leave @@ -5207,19 +5068,13 @@ by your ISP. If you've chosen to use user-ppp, you can automatically fetch your mail when a connection to the 'net is established with the following entry in /etc/ppp/ppp.linkup: - - MYADDR: - !bg su user -c fetchmail - - +MYADDR: + !bg su user -c fetchmail -If you are using sendmail (as shown below) to deliver mail to +If you are using sendmail (as shown below) to deliver mail to non-local accounts, put the command - - !bg su user -c "sendmail -q" - - + !bg su user -c "sendmail -q" after the above shown entry. This forces sendmail to process your mailqueue as soon as the connection to the 'net is established. @@ -5228,10 +5083,7 @@ mailqueue as soon as the connection to the 'net is established. In the home directory of user on bsd.home, create a .fetchmailrc file: - - poll myISP.com protocol pop3 fetchall pass MySecret; - - +poll myISP.com protocol pop3 fetchall pass MySecret Needless to say, this file should not be readable by anyone except user as it contains the password MySecret. @@ -5243,25 +5095,22 @@ mail via relay.myISP.com, allowing quicker mail transmissio The following .mc file should suffice: - - VERSIONID(`bsd.home.mc version 1.0') - OSTYPE(bsd4.4)dnl - FEATURE(nouucp)dnl - MAILER(local)dnl - MAILER(smtp)dnl - Cwlocalhost - Cwbsd.home - MASQUERADE_AS(`myISP.com')dnl - FEATURE(allmasquerade)dnl - FEATURE(masquerade_envelope)dnl - FEATURE(nocanonify)dnl - FEATURE(nodns)dnl - define(SMART_HOST, `relay.myISP.com') - Dmbsd.home - define(`confDOMAIN_NAME',`bsd.home')dnl - define(`confDELIVERY_MODE',`deferred')dnl - - +VERSIONID(`bsd.home.mc version 1.0') +OSTYPE(bsd4.4)dnl +FEATURE(nouucp)dnl +MAILER(local)dnl +MAILER(smtp)dnl +Cwlocalhost +Cwbsd.home +MASQUERADE_AS(`myISP.com')dnl +FEATURE(allmasquerade)dnl +FEATURE(masquerade_envelope)dnl +FEATURE(nocanonify)dnl +FEATURE(nodns)dnl +define(SMART_HOST, `relay.myISP.com') +Dmbsd.home +define(`confDOMAIN_NAME',`bsd.home')dnl +define(`confDELIVERY_MODE',`deferred')dnl Refer to the previous section for details of how to turn this .mc file into a sendmail.cf file. Also, don't forget to @@ -5277,8 +5126,8 @@ at the Boot: prompt (just -s for FreeBSD releases before to enter Single User mode. At the question about the shell to use, hit ENTER. You'll be dropped to a &prompt.root; prompt. Enter mount -u / to remount your root filesystem read/write, then run mount -a to -remount all the filesystems. Run passwd root to -change the root password then run exit +remount all the filesystems. Run passwd root to +change the root password then run exit to continue booting. @@ -5315,21 +5164,17 @@ country, you should edit that one instead. Simply use this perl command: - -perl -i.bak -npe 's/\r\n/\n/g' file ... - +&prompt.user; perl -i.bak -npe 's/\r\n/\n/g' file ... file is the file(s) to process. The modification is done in-place, with the original file stored with a .bak extension. Alternatively you can use the tr command: - -tr -d '\r' < dos-text-file > unix-file - +&prompt.user; tr -d '\r' < dos-text-file > unix-file -dos-text-file is the file containing DOS text while -unix-file will contain the converted output. This can +dos-text-file is the file containing DOS text while +unix-file will contain the converted output. This can be quite a bit faster than using perl. @@ -5358,10 +5203,8 @@ option, or uninstall Kerberos as described in the next question. for the release you are running. If you have the CDROM, you can mount the cd (we'll assume on /cdrom) and run - -cd /cdrom/bin -./install.sh - +&prompt.root; cd /cdrom/bin +&prompt.root; ./install.sh @@ -5375,48 +5218,34 @@ out of pseudoterminals. Here's how to add more: -Build and install a new kernel with the line +Build and install a new kernel with the line - pseudo-device pty 256 - - - - +pseudo-device pty 256 in the configuration file. - -Run the command +Run the commands - # cd /dev - # ./MAKEDEV pty{1,2,3,4,5,6,7} - - - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV pty{1,2,3,4,5,6,7} to make 256 device nodes for the new terminals. - Edit /etc/ttys and add lines for each of the 256 -terminals. They should match the form of the existing entries, i.e. they look like +terminals. They should match the form of the existing entries, i.e. they look +like - ttyqc none network - +ttyqc none network - - - -The order of the letter designations is tty[pqrsPQRS][0-9a-v], +The order of the letter designations is tty[pqrsPQRS][0-9a-v], using a regular expression. - @@ -5449,47 +5278,40 @@ using a regular expression. Go into single user mode and than back to multi user mode. -On the console do: - # shutdown now - (Note: without -r or -h) +On the console do: - # return - # exit - +&prompt.root; shutdown now +(Note: without -r or -h) + +&prompt.root; return +&prompt.root; exit What is a sandbox? -"Sandbox" is a security term. It can mean two things: +Sandbox is a security term. It can mean two things: - A process which is placed inside a set of virtual walls that are designed to prevent someone who breaks into the process from being able to break into the wider system. - - -The process is said to be able to "play" inside the +The process is said to be able to play inside the walls. That is, nothing the process does in regards to executing code is supposed to be able to breech the walls so you do not have to do a detailed audit of its code to be able to say certain things about its security. - - The walls might be a userid, for example. This is the definition used in the security and named man pages. - - -Take the 'ntalk' service, for example (see +Take the ntalk service, for example (see /etc/inetd.conf). This service used to run as userid root. Now it runs as userid tty. The tty user is a sandbox designed to make it more difficult for someone @@ -5498,7 +5320,6 @@ being able to hack beyond that user id. - A process which is placed inside a simulation of the machine. This is more hard-core. Basically it means that @@ -5507,16 +5328,12 @@ that he can break into the wider machine but is, in fact, only breaking into a simulation of that machine and not modifying any real data. - - The most common way to accomplish this is to build a simulated environment in a subdirectory and then run the -processes in that directory chroot'd (i.e. "/" for that -process is this directory, not the real "/" of the +processes in that directory chroot'd (i.e. / for that +process is this directory, not the real / of the system). - - Another common use is to mount an underlying filesystem read-only and then create a filesystem layer on top of it that gives a process a seemingly writeable view into that @@ -5626,7 +5443,7 @@ id="x-and-moused"> If you are using syscons (the default console driver), you can configure FreeBSD to support a mouse pointer on each virtual screen. In order to avoid conflicting with X, syscons supports -a virtual device called ``/dev/sysmouse''. All mouse events +a virtual device called /dev/sysmouse. All mouse events received from the real mouse device are written to the sysmouse device via moused. If you wish to use your mouse on one or more virtual consoles, and use X, @@ -5645,16 +5462,13 @@ Device "/dev/sysmouse" versions, the Protocol should be MouseSystems. -Some people prefer to use ``/dev/mouse'' under X. To -make this work, ``/dev/mouse'' should be linked to +Some people prefer to use /dev/mouse under X. To +make this work, /dev/mouse should be linked to /dev/sysmouse: - - # cd /dev - # rm -f mouse - # ln -s sysmouse mouse - - +&prompt.root; cd /dev +&prompt.root; rm -f mouse +&prompt.root; ln -s sysmouse mouse @@ -5873,15 +5687,12 @@ EndSection Try turning off the Num Lock key. If your Num Lock key is on by default at boot-time, you may add -the following line in the ``Keyboard'' section of the -XF86Config file. +the following line in the Keyboard section of the +XF86Config file. - - # Let the server do the NumLock processing. This should only be - # required when using pre-R6 clients - ServerNumLock - - +# Let the server do the NumLock processing. This should only be +# required when using pre-R6 clients + ServerNumLock @@ -5902,7 +5713,7 @@ session, perhaps to look at documentation for a program you are running or to read your mail while waiting for an FTP transfer to finish. Just do Alt-F2 (hold down the Alt key and press the F2 key), and you will find a login prompt -waiting for you on the second ``virtual console''! When you +waiting for you on the second virtual console! When you want to go back to the original session, do Alt-F1. The default FreeBSD installation has three virtual consoles @@ -5910,61 +5721,50 @@ enabled (8 starting with 3.3-RELEASE), and Alt-F1, Alt-F2, and Alt-F3 will switch between these virtual consoles. To enable more of them, edit /etc/ttys -and add entries for ``ttyv4'' to ``ttyvc'' after the -comment on ``Virtual terminals'': +and add entries for ttyv4 to ttyvc after the +comment on Virtual terminals: - - # Edit the existing entry for ttyv3 in /etc/ttys and change - # "off" to "on". - ttyv3 "/usr/libexec/getty Pc" cons25 on secure - ttyv4 "/usr/libexec/getty Pc" cons25 on secure - ttyv5 "/usr/libexec/getty Pc" cons25 on secure - ttyv6 "/usr/libexec/getty Pc" cons25 on secure - ttyv7 "/usr/libexec/getty Pc" cons25 on secure - ttyv8 "/usr/libexec/getty Pc" cons25 on secure - ttyv9 "/usr/libexec/getty Pc" cons25 on secure - ttyva "/usr/libexec/getty Pc" cons25 on secure - ttyvb "/usr/libexec/getty Pc" cons25 on secure - - +# Edit the existing entry for ttyv3 in /etc/ttys and change +# "off" to "on". +ttyv3 "/usr/libexec/getty Pc" cons25 on secure +ttyv4 "/usr/libexec/getty Pc" cons25 on secure +ttyv5 "/usr/libexec/getty Pc" cons25 on secure +ttyv6 "/usr/libexec/getty Pc" cons25 on secure +ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv8 "/usr/libexec/getty Pc" cons25 on secure +ttyv9 "/usr/libexec/getty Pc" cons25 on secure +ttyva "/usr/libexec/getty Pc" cons25 on secure +ttyvb "/usr/libexec/getty Pc" cons25 on secure Use as many or as few as you want. The more virtual terminals you have, the more resources that are used; this can be important if you have 8MB RAM or less. You may also want to change the -``secure'' to ``insecure''. +secure to insecure. -IMPORTANT NOTE if you want to run an X server you MUST +If you want to run an X server you MUST leave at least one virtual terminal unused (or turned off) for it to use. That is to say that if you want to have a login prompt pop up for all twelve of your Alt-function keys, you're out of luck - you can only do this for eleven of them -if you also want to run an X server on the same machine. +if you also want to run an X server on the same +machine. The easiest way to disable a console is by turning it off. For example, if you had the full 12 terminal allocation mentioned above and you wanted to run X, you would change settings for virtual terminal 12 from: - - ttyvb "/usr/libexec/getty Pc" cons25 on secure - - +ttyvb "/usr/libexec/getty Pc" cons25 on secure to: - - ttyvb "/usr/libexec/getty Pc" cons25 off secure - - +ttyvb "/usr/libexec/getty Pc" cons25 off secure If your keyboard has only ten function keys, you would end up with: - - ttyv9 "/usr/libexec/getty Pc" cons25 off secure - ttyva "/usr/libexec/getty Pc" cons25 off secure - ttyvb "/usr/libexec/getty Pc" cons25 off secure - - +ttyv9 "/usr/libexec/getty Pc" cons25 off secure +ttyva "/usr/libexec/getty Pc" cons25 off secure +ttyvb "/usr/libexec/getty Pc" cons25 off secure (You could also just delete these lines.) @@ -5972,21 +5772,15 @@ virtual terminal 12 from: the next step is to make sure that you have enough virtual terminal devices. The easiest way to do this is: - - # cd /dev - # ./MAKEDEV vty12 # For 12 devices - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV vty12 Next, the easiest (and cleanest) way to activate the virtual consoles is to reboot. However, if you really don't want to reboot, you can just shut down the X Window system and execute (as -root): +root): - - kill -HUP 1 - - +&prompt.root; kill -HUP 1 It's imperative that you completely shut down X Window if it is running, before running this command. If you don't, your system @@ -6004,7 +5798,7 @@ that once you've switched away from X Window to a virtual terminal, you may use only the Alt- function key to switch to another virtual terminal or back to X Window. You do not need to also press the Ctrl key. If you use the control key to switch back to X on some -older releases, you can find your text console stuck in ``control-lock'' +older releases, you can find your text console stuck in control-lock mode. Tap the control key to wake it up again. @@ -6025,7 +5819,7 @@ of documenting which vty X will start on and passing the responsibility of restarting the X server on logout to init. The rc.local method makes it easy to kill xdm if there is a problem starting the X server. -If loaded from rc.local, xdm should be started without any +If loaded from rc.local, xdm should be started without any arguments (i.e., as a daemon). xdm must start AFTER getty runs, or else getty and xdm will conflict, locking out the console. The best way around this is to have the script sleep 10 seconds or so then @@ -6047,9 +5841,10 @@ launch xdm. -When I run xconsole, I get ``Couldn't open console''. +When I run xconsole, I get Couldn't open console. -If you start X with startx, the permissions on /dev/console will not get +If you start X with startx, +the permissions on /dev/console will not get changed, resulting in things like xterm -C and xconsole not working. This is because of the way console permissions are set by default. @@ -6061,10 +5856,7 @@ file exists to solve such problems. In a nutshell, make sure an uncommented line of the form - - /dev/ttyv0 0600 /dev/console - - +/dev/ttyv0 0600 /dev/console is in /etc/fbtab and it will ensure that whomever logs in on /dev/ttyv0 will own the console. @@ -6082,10 +5874,7 @@ virtual terminal and getting back to X again may make them re-synchronized. If the problem occurs often, you may add the following option in your kernel configuration file and recompile it. - - options PSM_CHECKSYNC - - +options PSM_CHECKSYNC See the section on building a kernel if you've no experience with building kernels. @@ -6096,7 +5885,7 @@ still see the problem, click any mouse button while holding the mouse still to re-synchronize the mouse and the driver. Note that unfortunately this option may not work with all the -systems and voids the ``tap'' feature of the ALPS GlidePoint +systems and voids the tap feature of the ALPS GlidePoint device attached to the PS/2 mouse port. In versions 2.2.6 and later, synchronization check is done @@ -6106,30 +5895,21 @@ a standard feature, PSM_CHECKSYNC option is not available in these versions.) However, in rare case the driver may erroneously report synchronization problem and you may see the kernel message: - - psmintr: out of sync (xxxx != yyyy) - - +psmintr: out of sync (xxxx != yyyy) and find your mouse doesn't seem to work properly. If this happens, disable the synchronization check code by setting the driver flags for the PS/2 mouse driver to 0x100. -Enter UserConfig by giving the ``'' option +Enter UserConfig by giving the option at the boot prompt: - - boot: -c - - +boot: -c Then, in the UserConfig command line, type: - - UserConfig> flags psm0 0x100 - UserConfig> quit - - +UserConfig> flags psm0 0x100 +UserConfig> quit @@ -6137,7 +5917,7 @@ at the boot prompt: My PS/2 mouse from MouseSystems doesn't seem to work. There have been some reports that certain model of PS/2 mouse -from MouseSystems works only if it is put into the ``high resolution'' +from MouseSystems works only if it is put into the high resolution mode. Otherwise, the mouse cursor may jump to the upper-left corner of the screen every so often. @@ -6147,9 +5927,7 @@ to /sys/i386/isa/psm.c and rebuild the kernel. See the section on building a kernel if you've no experience with building kernels. - -diff -u psm.c.orig psm.c -@@ -766,6 +766,8 @@ +@@ -766,6 +766,8 @@ if (verbose >= 2) log(LOG_DEBUG, "psm%d: SET_DEFAULTS return code:%04x\n", unit, i); @@ -6157,27 +5935,19 @@ if you've no experience with building kernels. + #if 0 set_mouse_scaling(sc->kbdc); /* 1:1 scaling */ - set_mouse_mode(sc->kbdc); /* stream mode */ - - + set_mouse_mode(sc->kbdc); /* stream mode */ In versions 2.2.6 or later, specify the flags 0x04 to the PS/2 mouse driver to put the mouse into the high resolution mode. -Enter UserConfig by giving the ``'' option +Enter UserConfig by giving the option at the boot prompt: - - boot: -c - - +boot: -c Then, in the UserConfig command line, type: - - UserConfig> flags psm0 0x04 - UserConfig> quit - - +UserConfig> flags psm0 0x04 +UserConfig> quit See the previous section for another possible cause of mouse problems. @@ -6185,7 +5955,7 @@ problems. -When building an X app, imake can't find Imake.tmpl. Where is it? +When building an X app, imake can't find Imake.tmpl. Where is it? Imake.tmpl is part of the Imake package, a standard X application building tool. @@ -6199,7 +5969,7 @@ manually from the X distribution files. How do I reverse the mouse buttons? -Run the command xmodmap -e "pointer = 3 2 1" from your .xinitrc or .xsession. +Run the command xmodmap -e "pointer = 3 2 1" from your .xinitrc or .xsession. @@ -6208,16 +5978,16 @@ manually from the X distribution files. Just prior to the release of FreeBSD 3.1, a new feature was -added to allow the display of "splash" screens during +added to allow the display of splash screens during the boot messages. The splash screens currently must be a 256 color bitmap (*.BMP) or ZSoft PCX (*.PCX) file. In addition, they must have a resolution of 320x200 or less to work on standard VGA adapters. If you compile VESA support into your kernel, then you can use larger bitmaps up to 1024x768. Note that VESA support requires -the VM86 kernel option to be compiled into the +the VM86 kernel option to be compiled into the kernel. The actual VESA support can either be compiled directly -into the kernel with the VESA kernel config option +into the kernel with the VESA kernel config option or by loading the VESA kld module during bootup. To use a splash screen, you need to modify the startup files @@ -6240,13 +6010,11 @@ copy it to /boot/splash.bmp. Next, you need to have a /boot/loader.rc file that contains the following lines: - - load kernel - load -t splash_image_data /boot/splash.bmp - load splash_bmp - autoboot - - +load kernel +load -t splash_image_data /boot/splash.bmp +load splash_bmp +autoboot + @@ -6258,30 +6026,20 @@ following lines: FreeBSD 3.2 includes a nicer way of configuring the boot process. If you wish, you can use the method listed above for FreeBSD 3.1. If you do and you want to use PCX, replace -splash_bmp with splash_pcx. If, +splash_bmp with splash_pcx. If, on the other hand, you want to use the newer boot configuration, you need to create a /boot/loader.rc file that contains the following lines: - - include /boot/loader.4th - start - - - - +include /boot/loader.4th +start and a /boot/loader.conf that contains the following: - - splash_bmp_load="YES" - bitmap_load="YES" - - - - +splash_bmp_load="YES" +bitmap_load="YES" This assumes you are using /boot/splash.bmp for your splash screen. If you'd rather use a PCX file, @@ -6289,12 +6047,10 @@ copy it to /boot/splash.pcx, create a /boot/loader.rc as instructed above, and create a /boot/loader.conf that contains: - - splash_pcx_load="YES" - bitmap_load="YES" - bitmap_name="/boot/splash.pcx" - - +splash_pcx_load="YES" +bitmap_load="YES" +bitmap_name="/boot/splash.pcx" + @@ -6314,7 +6070,7 @@ on over to the gallery at Yes. All you need to do is use &man.xmodmap.1; to define what function you wish them to perform. - Assuming all "Windows(tm)" keyboards are standard + Assuming all Windows(tm) keyboards are standard then the keycodes for the 3 keys are @@ -6392,9 +6148,9 @@ id="networking"> -Where can I get information on ``diskless booting''? +Where can I get information on diskless booting? -``Diskless booting'' means that the FreeBSD box is booted over a +Diskless booting means that the FreeBSD box is booted over a network, and reads the necessary files from a server instead of its hard disk. For full details, please read the Handbook entry on diskless booting @@ -6408,15 +6164,12 @@ its hard disk. For full details, please read Internet standards and good engineering practice prohibit us from providing packet forwarding by default in FreeBSD. You can however enable this feature by changing the following variable to -YES in rc.conf: +YES in rc.conf: - - gateway_enable=YES # Set to YES if this host will be a gateway - - +gateway_enable=YES # Set to YES if this host will be a gateway This option will put the sysctl variable -net.inet.ip.forwarding to 1. +net.inet.ip.forwarding to 1. In most cases, you will also need to run a routing process to tell other systems on your network about your router; FreeBSD @@ -6461,7 +6214,7 @@ look at the natd section of this FAQ. Why does recompiling the latest BIND from ISC fail? -There is a conflict between the ``cdefs.h'' file in the +There is a conflict between the cdefs.h file in the distribution and the one shipped with FreeBSD. Just remove compat/include/sys/cdefs.h. @@ -6474,7 +6227,7 @@ distribution and the one shipped with FreeBSD. Just remove slattach, sliplogin, pppd and ppp. -pppd and ppp provide support for both incoming and outgoing +pppd and ppp provide support for both incoming and outgoing connections. Sliplogin deals exclusively with incoming connections and slattach deals exclusively with outgoing connections. @@ -6506,8 +6259,8 @@ connections. Sliplogi -If you only have access to the Internet through a "shell -account", you may want to have a look at the slirp +If you only have access to the Internet through a shell +account, you may want to have a look at the slirp package. It can provide you with (limited) access to services such as ftp and http direct from your local machine. @@ -6522,7 +6275,7 @@ id="natd"> been allocated only a single IP number from your Internet provider (or even if you receive a dynamic IP number), you may want to look at the natd -program. Natd allows you to connect an entire subnet to the +program. natd allows you to connect an entire subnet to the internet using only a single IP number. The ppp program has similar functionality built in via @@ -6550,13 +6303,10 @@ Ultrix. How can I setup Ethernet aliases? -Add ``netmask 0xffffffff'' to your ifconfig +Add netmask 0xffffffff to your ifconfig command-line like the following: - - ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff - - +&prompt.root; ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff @@ -6566,8 +6316,8 @@ command-line like the following: If you want to use the other ports, you'll have to specify an additional parameter on the ifconfig command line. The -default port is ``link0''. To use the AUI port instead of -the BNC one, use ``link2''. These flags should be specified +default port is link0. To use the AUI port instead of +the BNC one, use link2. These flags should be specified using the ifconfig_* variables in /etc/rc.conf. @@ -6590,10 +6340,7 @@ for more information on this topic. Some versions of the Linux NFS code only accept mount requests from a privileged port; try - - mount -o -P linuxbox:/blah /mnt - - +&prompt.root; mount -o -P linuxbox:/blah /mnt @@ -6603,10 +6350,7 @@ from a privileged port; try Sun workstations running SunOS 4.X only accept mount requests from a privileged port; try - - mount -o -P sunbox:/blah /mnt - - +&prompt.root; mount -o -P sunbox:/blah /mnt @@ -6616,10 +6360,7 @@ from a privileged port; try Try disabling the TCP extensions in /etc/rc.conf by changing the following variable to NO: - - tcp_extensions=NO - - +tcp_extensions=NO Xylogic's Annex boxes are also broken in this regard and you must use the above change to connect thru them. @@ -6631,13 +6372,14 @@ use the above change to connect thru them. Multicast host operations are fully supported in FreeBSD 2.0 and later by default. If you want your box to run as a multicast router, -you will need to recompile your kernel with the MROUTING -option and run mrouted. FreeBSD 2.2 and later will start -mrouted at boot time if the flag mrouted_enable is set -to "YES" in /etc/rc.conf. +you will need to recompile your kernel with the MROUTING +option and run mrouted. FreeBSD 2.2 and later will start +mrouted at boot time if the flag mrouted_enable is set +to "YES" in /etc/rc.conf. MBONE tools are available in their own ports category, mbone. If -you are looking for the conference tools vic and vat, +you are looking for the conference tools vic and +vat, look there! For more information, see the @@ -6650,28 +6392,25 @@ look there! Here is a list compiled by Glen Foster, with some more modern additions: - - Vendor Model - ---------------------------------------------- - ASUS PCI-L101-TB - Accton ENI1203 - Cogent EM960PCI - Compex ENET32-PCI - D-Link DE-530 - Dayna DP1203, DP2100 - DEC DE435, DE450 - Danpex EN-9400P3 - JCIS Condor JC1260 - Linksys EtherPCI - Mylex LNP101 - SMC EtherPower 10/100 (Model 9332) - SMC EtherPower (Model 8432) - TopWare TE-3500P - Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348 - (3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442, - ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd) - - +Vendor Model +---------------------------------------------- +ASUS PCI-L101-TB +Accton ENI1203 +Cogent EM960PCI +Compex ENET32-PCI +D-Link DE-530 +Dayna DP1203, DP2100 +DEC DE435, DE450 +Danpex EN-9400P3 +JCIS Condor JC1260 +Linksys EtherPCI +Mylex LNP101 +SMC EtherPower 10/100 (Model 9332) +SMC EtherPower (Model 8432) +TopWare TE-3500P +Znyx (2.2.x) ZX312, ZX314, ZX342, ZX345, ZX346, ZX348 + (3.x) ZX345Q, ZX346Q, ZX348Q, ZX412Q, ZX414, ZX442, + ZX444, ZX474, ZX478, ZX212, ZX214 (10mbps/hd) @@ -6680,47 +6419,41 @@ look there! You will probably find that the host is actually in a different domain; for example, if you are in foo.bar.edu and you wish to reach -a host called ``mumble'' in the bar.edu domain, you will have to -refer to it by the fully-qualified domain name, ``mumble.bar.edu'', -instead of just ``mumble''. +a host called mumble in the bar.edu domain, you will have to +refer to it by the fully-qualified domain name, mumble.bar.edu, +instead of just mumble. Traditionally, this was allowed by BSD BIND resolvers. However the current version of bind that ships with FreeBSD no longer provides default abbreviations for non-fully qualified domain names other than the domain you are in. -So an unqualified host mumble must either be found -as mumble.foo.bar.edu, or it will be searched for +So an unqualified host mumble must either be found +as mumble.foo.bar.edu, or it will be searched for in the root domain. This is different from the previous behavior, where the -search continued across mumble.bar.edu, and -mumble.edu. Have a look at RFC 1535 for why this +search continued across mumble.bar.edu, and +mumble.edu. Have a look at RFC 1535 for why this was considered bad practice, or even a security hole. As a good workaround, you can place the line - - search foo.bar.edu bar.edu - - +search foo.bar.edu bar.edu instead of the previous - - domain foo.bar.edu - - +domain foo.bar.edu into your /etc/resolv.conf file. However, make sure that the search order -does not go beyond the ``boundary between local and public -administration'', as RFC 1535 calls it. +does not go beyond the boundary between local and public +administration, as RFC 1535 calls it. -``Permission denied'' for all networking operations. +Permission denied for all networking operations. -If you have compiled your kernel with the IPFIREWALL +If you have compiled your kernel with the IPFIREWALL option, you need to be aware that the default policy as of 2.1.7R (this actually changed during 2.1-STABLE development) is to deny all packets that are not explicitly allowed. @@ -6729,12 +6462,9 @@ is to deny all packets that are not explicitly allowed. firewalling, you can restore network operability by typing the following while logged in as root: - - ipfw add 65534 allow all from any to any - - +&prompt.root; ipfw add 65534 allow all from any to any -You can also set "firewall_type='open'" in /etc/rc.conf. +You can also set firewall_type="open" in /etc/rc.conf. For further information on configuring a FreeBSD firewall, see the Handbook section. @@ -6751,35 +6481,29 @@ actual measurements to satisfy your curiosity, read on. The following measurements were made using 2.2.5-STABLE on a 486-66. IPFW was modified to measure the time spent within -the ip_fw_chk routine, displaying the results to the console +the ip_fw_chk routine, displaying the results to the console every 1000 packets. Two rule sets, each with 1000 rules were tested. The first set was designed to demonstrate a worst case scenario by repeating the rule: - - ipfw add deny tcp from any to any 55555 - - +&prompt.root; ipfw add deny tcp from any to any 55555 This demonstrates worst case by causing most of IPFW's packet check routine to be executed before finally deciding that the packet does not match the rule (by virtue of the port number). -Following the 999th iteration of this rule was an allow ip -from any to any. +Following the 999th iteration of this rule was an allow ip +from any to any. The second set of rules were designed to abort the rule check quickly: - - ipfw add deny ip from 1.2.3.4 to 1.2.3.4 - - +&prompt.root; ipfw add deny ip from 1.2.3.4 to 1.2.3.4 The nonmatching source IP address for the above rule causes these rules to be skipped very quickly. As before, the 1000th -rule was an allow ip from any to any. +rule was an allow ip from any to any. The per-packet processing overhead in the former case was approximately 2.703ms/packet, or roughly 2.7 microseconds per @@ -6803,8 +6527,8 @@ few things to keep in mind when building an efficient rule set: -Place an `established' rule early on to handle the -majority of TCP traffic. Don't put any allow tcp +Place an established rule early on to handle the +majority of TCP traffic. Don't put any allow tcp statements before this rule. @@ -6827,15 +6551,13 @@ statistics with ipfw -a l. How can I redirect service requests from one machine to another? -You can redirect FTP (and other service) request with the 'socket' -package, available in the ports tree in category 'sysutils'. +You can redirect FTP (and other service) request with the socket +package, available in the ports tree in category sysutils. Simply replace the service's commandline to call socket instead, like so: - -ftp stream tcp nowait nobody /usr/local/bin/socket socket ftp.foo.com ftp - +ftp stream tcp nowait nobody /usr/local/bin/socket socket ftp.foo.com ftp -where 'ftp.foo.com' and 'ftp' are the host and port to redirect to, +where ftp.foo.com and ftp are the host and port to redirect to, respectively. @@ -6851,27 +6573,19 @@ a commercial product. -Why do I get “/dev/bpf0: device not configured”? +Why do I get /dev/bpf0: device not configured? The Berkeley Packet Filter (bpf) driver needs to be enabled before running programs that utilize it. Add this to your kernel config file and build a new kernel: - - pseudo-device bpfilter # Berkeley Packet Filter - - +pseudo-device bpfilter # Berkeley Packet Filter Secondly, after rebooting you will have to create the device node. This can be accomplished by a change to the /dev directory, followed by the execution of: - - - # sh MAKEDEV bpf0 - - - +&prompt.root; sh MAKEDEV bpf0 Please see the handbook's entry on device nodes for more information on creating devices. @@ -6905,28 +6619,22 @@ id="userppp"> You should first read the ppp man page and the ppp section of the handbook. Enable logging with the command - - set log Phase Chat Connect Carrier lcp ipcp ccp command - - +set log Phase Chat Connect Carrier lcp ipcp ccp command This command may be typed at the ppp command prompt or it may be entered in the /etc/ppp/ppp.conf configuration file (the start of the default section is the best place to put it). Make sure that /etc/syslog.conf contains the lines - - !ppp - *.* /var/log/ppp.log - - +!ppp +*.* /var/log/ppp.log and that the file /var/log/ppp.log exists. You can now find out a lot about what's going on from the log file. Don't worry if it doesn't all make sense. If you need to get help from someone, it may make sense to them. -If your version of ppp doesn't understand the "set log" +If your version of ppp doesn't understand the set log command, you should download the latest version. It will build on FreeBSD version 2.1.5 and higher. @@ -6939,14 +6647,11 @@ It will build on FreeBSD version 2.1.5 and higher. This is usually because your hostname won't resolve. The best way to fix this is to make sure that /etc/hosts is consoluted by your resolver first by editing /etc/host.conf -and putting the hosts line first. Then, simply put an +and putting the hosts line first. Then, simply put an entry in /etc/hosts for your local machine. If you have -no local network, change your localhost line: +no local network, change your localhost line: - -127.0.0.1 foo.bar.com foo localhost - - +127.0.0.1 foo.bar.com foo localhost Otherwise, simply add another entry for your host. Consult the relevant man pages for more details. @@ -6963,31 +6668,23 @@ when you're done. netstat -rn, you should see two entries like this: - -Destination Gateway Flags Refs Use Netif Expire +Destination Gateway Flags Refs Use Netif Expire default 10.0.0.2 UGSc 0 0 tun0 -10.0.0.2 10.0.0.1 UH 0 0 tun0 - - +10.0.0.2 10.0.0.1 UH 0 0 tun0 This is assuming that you've used the addresses from the handbook, the man page or from the ppp.conf.sample file. If you haven't got a default route, it may be because you're running an old version of ppp that doesn't understand the -word HISADDR in the ppp.conf file. If your version of +word HISADDR in the ppp.conf file. If your version of ppp is from before FreeBSD 2.2.5, change the - - add 0 0 HISADDR - - +add 0 0 HISADDR line to one saying - - add 0 0 10.0.0.2 - - + +add 0 0 10.0.0.2 Another reason for the default route line being missing is that you have mistakenly set up a default router in your @@ -6995,10 +6692,7 @@ you have mistakenly set up a default router in your /etc/sysconfig prior to release 2.2.2), and you have omitted the line saying - - delete ALL - - +delete ALL from ppp.conf. If this is the case, go back to the Final system configuration section of the handbook. @@ -7006,16 +6700,13 @@ omitted the line saying -What does "No route to host" mean +What does No route to host mean This error is usually due to a missing - - MYADDR: - delete ALL - add 0 0 HISADDR - - +MYADDR: + delete ALL + add 0 0 HISADDR section in your /etc/ppp/ppp.linkup file. This is only necessary if you have a dynamic IP address or don't know the @@ -7023,11 +6714,8 @@ address of your gateway. If you're using interactive mode, you can type the following after entering packet mode (packet mode is indicated by the capitalized PPP in the prompt): - - delete ALL - add 0 0 HISADDR - - +delete ALL +add 0 0 HISADDR Refer to the PPP and Dynamic IP addresses section of the handbook for further details. @@ -7040,13 +6728,10 @@ for further details. The default ppp timeout is 3 minutes. This can be adjusted with the line - - set timeout NNN - - +set timeout NNN -where NNN is the number of seconds of inactivity before the -connection is closed. If NNN is zero, the connection is +where NNN is the number of seconds of inactivity before the +connection is closed. If NNN is zero, the connection is never closed due to a timeout. It is possible to put this command in the ppp.conf file, or to type it at the prompt in interactive mode. It is also possible to adjust it on the fly while @@ -7068,10 +6753,7 @@ be bad, and disconnects. Prior to FreeBSD version 2.2.5, LQR was enabled by default. It is now disabled by default. LQR can be disabled with the line - - disable lqr - - +disable lqr @@ -7088,10 +6770,7 @@ Sportster for example, this is measured by the S10 register in tenths of a second. To make your modem more forgiving, you could add the following send-expect sequence to your dial string: - - set dial "...... ATS10=10 OK ......" - - +set dial "...... ATS10=10 OK ......" Refer to your modem manual for details. @@ -7105,17 +6784,17 @@ explaination. The first thing to establish is which side of the link is hung. If you are using an external modem, you can simply try using -ping to see if the TD light is flashing when you +ping to see if the TD light is flashing when you transmit data. If it flashes (and the RD light doesn't), the problem is with the remote end. If TD doesn't flash, the problem -is local. With an internal modem, you'll need to use the set -server command in your ppp.conf file. When the hang occurs, +is local. With an internal modem, you'll need to use the set +server command in your ppp.conf file. When the hang occurs, connect to ppp using pppctl. If your network connection suddenly revives (ppp was revived due to the activity on the diagnostic socket) -or if you can't connect (assuming the set socket command +or if you can't connect (assuming the set socket command succeeded at startup time), the problem is local. If you can connect -and things are still hung, enable local async logging with set log -local async and use ping from another window or terminal to make +and things are still hung, enable local async logging with set log +local async and use ping from another window or terminal to make use of the link. The async logging will show you the data being transmitted and received on the link. If data is going out and not coming back, the problem is remote. @@ -7130,7 +6809,7 @@ you now have two possibilities: There's very little you can do about this. Most ISPs will refuse to help if you're not running a Microsoft OS. You can -enable lqr in your ppp.conf file, allowing ppp to +enable lqr in your ppp.conf file, allowing ppp to detect the remote failure and hang up, but this detection is relatively slow and therefore not that useful. You may want to avoid telling your ISP that you're running user-ppp.... @@ -7138,11 +6817,8 @@ to avoid telling your ISP that you're running user-ppp.... First, try disabling all local compression by adding the following to your configuration: - - disable pred1 deflate deflate24 protocomp acfcomp shortseq vj - deny pred1 deflate deflate24 protocomp acfcomp shortseq vj - - +disable pred1 deflate deflate24 protocomp acfcomp shortseq vj +deny pred1 deflate deflate24 protocomp acfcomp shortseq vj Then reconnect to ensure that this makes no difference. If things improve or if the problem is solved completely, @@ -7155,12 +6831,12 @@ running a Microsoft product). and wait until the connection hangs again. This may use up quite a bit of disk space. The last data read from the port may be of interest. It is usually ascii data, and may even -describe the problem (``Memory fault, core dumped'' ?). +describe the problem (Memory fault, core dumped ?). If your ISP is helpful, they should be able to enable logging on their end, then when the next link drop occurs, they may be able to tell you why their side is having a problem. Feel free -to send the details to brian@Awfulhak.org, or even to ask your ISP to +to send the details to &a.brian;, or even to ask your ISP to contact me directly. @@ -7170,12 +6846,12 @@ contact me directly. Your best bet here is to rebuild ppp by adding CFLAGS+=-g and STRIP= to the end of the Makefile, then doing a -make clean && make && make install. When -ppp hangs, find the ppp process id with ps ajxww | fgrep ppp -and run gdb ppp PID. From the gdb prompt, you can then use -bt to get a stack trace. +make clean && make && make install. When +ppp hangs, find the ppp process id with ps ajxww | fgrep ppp +and run gdb ppp PID. From the gdb prompt, you can then use +bt to get a stack trace. -Send the results to brian@Awfulhak.org. +Send the results to brian@Awfulhak.org. @@ -7188,10 +6864,7 @@ Protocol (LCP). Many ISPs will not initiate negotiations and expect the client to do so. To force ppp to initiate the LCP, use the following line: - - set openmode active - - +set openmode active Note: It usually does no harm if both sides initiate negotiation, so openmode is now active by default. However, @@ -7203,7 +6876,7 @@ the next section explains when it does do some har I keep seeing errors about magic being the same Occasionally, just after connecting, you may see messages in -the log that say "magic is the same". Sometimes, these +the log that say magic is the same. Sometimes, these messages are harmless, and sometimes one side or the other exits. Most ppp implementations cannot survive this problem, and even if the link seems to come up, you'll see repeated configure @@ -7217,10 +6890,10 @@ of it happening consistently when using slirp. The reason is that in the time taken between getty exiting and ppp starting, the client-side ppp starts sending Line Control Protocol (LCP) packets. Because ECHO is still switched on for the port on -the server, the client ppp sees these packets "reflect" back. +the server, the client ppp sees these packets reflect back. One part of the LCP negotiation is to establish a magic number -for each side of the link so that "reflections" can be detected. +for each side of the link so that reflections can be detected. The protocol says that when the peer tries to negotiate the same magic number, a NAK should be sent and a new magic number should be chosen. During the period that the server @@ -7238,19 +6911,13 @@ becomes happy just in time to see a hangup from the server. This can be avoided by allowing the peer to start negotiating with the following line in your ppp.conf file: - - set openmode passive - - +set openmode passive This tells ppp to wait for the server to initiate LCP negotiations. Some servers however may never initiate negotiations. If this is the case, you can do something like: - - set openmode active 3 - - +set openmode active 3 This tells ppp to be passive for 3 seconds, and then to start sending LCP requests. If the peer starts sending requests during @@ -7297,26 +6964,17 @@ nowhere and gives up. passive - that is, make one side wait for the other to start negotiating. This can be done with the - - set openmode passive - - +set openmode passive command. Care should be taken with this option. You should also use the - - set stopped N - - +set stopped N command to limit the amount of time that ppp waits for the peer to begin negotiations. Alternatively, the - - set openmode active N - - +set openmode active N command (where N is the number of seconds to wait before starting negotiations) can be used. Check the manual page for @@ -7335,26 +6993,24 @@ Compression Control Protocols (CCP). This problem is now corrected, but if you're still running an old version of ppp, the problem can be circumvented with the line - - disable pred1 - - +disable pred1 Ppp locks up when I shell out to test it -When you execute the shell or ! command, ppp -executes a shell (or if you've passed any arguements, ppp +When you execute the shell or ! command, +ppp +executes a shell (or if you've passed any arguements, ppp will execute those arguements). Ppp will wait for the command to complete before continuing. If you attempt to use the ppp link while running the command, the link will appear to have -frozen. This is because ppp is waiting for the command +frozen. This is because ppp is waiting for the command to complete. If you wish to execute commands like this, use the -!bg command instead. This will execute the given command +!bg command instead. This will execute the given command in the background, and ppp can continue to service the link. @@ -7368,10 +7024,7 @@ lines that are used in a null-modem serial cable. When using this sort of connection, LQR should always be enabled with the line - - enable lqr - - +enable lqr LQR is accepted by default if negotiated by the peer. @@ -7385,10 +7038,7 @@ cause, and set up Dial filters (dfilters) to prevent such dialing. To determine the cause, use the following line: - - set log +tcp/ip - - +set log +tcp/ip This will log all traffic through the connection. The next time the line comes up unexpectedly, you will see the reason @@ -7400,12 +7050,9 @@ DNS lookups from establishing a connection (this will notppp from passing the packets through an established connection), use the following: - - set dfilter 1 deny udp src eq 53 - set dfilter 2 deny udp dst eq 53 - set dfilter 3 permit 0/0 0/0 - - +set dfilter 1 deny udp src eq 53 +set dfilter 2 deny udp dst eq 53 +set dfilter 3 permit 0/0 0/0 This is not always suitable, as it will effectively break your demand-dial capabilities - most programs will need a DNS lookup @@ -7420,14 +7067,11 @@ details on how to create your own configuration file and what should go into it. You may also want to add the following line to your .mc file: - - define(`confDELIVERY_MODE', `d')dnl - - +define(`confDELIVERY_MODE', `d')dnl This will make sendmail queue everything until the queue is -run (usually, sendmail is invoked with ``-bd -q30m'', telling it -to run the queue every 30 minutes) or until a ``sendmail -q'' +run (usually, sendmail is invoked with , telling it +to run the queue every 30 minutes) or until a sendmail -q is done (perhaps from your ppp.linkup file). @@ -7437,11 +7081,8 @@ is done (perhaps from your ppp.linkup file). I keep seeing the following errors in my log file: - - CCP: CcpSendConfigReq - CCP: Received Terminate Ack (1) state = Req-Sent (6) - - +CCP: CcpSendConfigReq +CCP: Received Terminate Ack (1) state = Req-Sent (6) This is because ppp is trying to negotiate Predictor1 compression, and the peer does not want to negotiate any @@ -7449,10 +7090,7 @@ compression at all. The messages are harmless, but if you wish to remove them, you can disable Predictor1 compression locally too: - - disable pred1 - - +disable pred1 @@ -7479,28 +7117,23 @@ less than 1500 under FreeBSD 2.2.2 or before. Why doesn't ppp log my connection speed? -In order to log all lines of your modem ``conversation'', +In order to log all lines of your modem conversation, you must enable the following: - - set log +connect - - +set log +connect This will make ppp -log everything up until the last requested "expect" string. +log everything up until the last requested expect string. If you wish to see your connect speed and are using PAP or CHAP -(and therefore don't have anything to "chat" after the CONNECT -in the dial script - no "set login" script), you must make sure that -you instruct ppp to "expect" the whole CONNECT line, something like +(and therefore don't have anything to chat after the CONNECT +in the dial script - no set login script), you must make sure that +you instruct ppp to expect the whole CONNECT line, something like this: - - set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 4 \"\" ATZ OK-ATZ-OK ATDT\\T TIMEOUT 60 CONNECT \\c \\n" - - +set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 4 \ + \"\" ATZ OK-ATZ-OK ATDT\\T TIMEOUT 60 CONNECT \\c \\n" Here, we get our CONNECT, send nothing, then expect a line-feed, forcing ppp to read the whole CONNECT response. @@ -7508,54 +7141,42 @@ forcing ppp to read the whole CONNECT response.

-Ppp ignores the `\' character in my chat script +Ppp ignores the \ character in my chat script Ppp parses each line in your config files so that it can -interpret strings such as set phone "123 456 789" correctly +interpret strings such as set phone "123 456 789" correctly (and realize that the number is actually only one argument. -In order to specify a “"” character, you must escape it using -a backslash (“\”). +In order to specify a " character, you must escape it using +a backslash (\). When the chat interpreter parses each argument, it re-interprets the argument in order to find any special escape sequences such -as “\P” or “\T” (see the man page). As a result of this +as \P or \T (see the man page). As a result of this double-parsing, you must remember to use the correct number of escapes. -If you wish to actually send a “\” character to (say) your +If you wish to actually send a \ character to (say) your modem, you'd need something like: - - set dial "\"\" ATZ OK-ATZ-OK AT\\\\X OK" - - +set dial "\"\" ATZ OK-ATZ-OK AT\\\\X OK" resulting in the following sequence: - - ATZ - OK - AT\X - OK - - +ATZ +OK +AT\X +OK or - - set phone 1234567 - set dial "\"\" ATZ OK ATDT\\T" - - +set phone 1234567 +set dial "\"\" ATZ OK ATDT\\T" resulting in the following sequence: - - ATZ - OK - ATDT1234567 - - +ATZ +OK +ATDT1234567 @@ -7571,17 +7192,14 @@ signal that normally causes core to be dumped, and sure you're using the latest version (see the start of this section), then you should do the following: - - $ tar xfz ppp-*.src.tar.gz - $ cd ppp*/ppp - $ echo STRIP= >>Makefile - $ echo CFLAGS+=-g >>Makefile - $ make clean all - $ su - # make install - # chmod 555 /usr/sbin/ppp - - +&prompt.user; tar xfz ppp-*.src.tar.gz +&prompt.user; cd ppp*/ppp +&prompt.user; echo STRIP= >>Makefile +&prompt.user; echo CFLAGS+=-g >>Makefile +&prompt.user; make clean all +&prompt.user; su +&prompt.root; make install +&prompt.root; chmod 555 /usr/sbin/ppp You will now have a debuggable version of ppp installed. You will have to be root to run ppp as all of its privileges have @@ -7592,19 +7210,16 @@ your current directory was at the time. will dump a core file called ppp.core. You should then do the following: - - $ su - # gdb /usr/sbin/ppp ppp.core - (gdb) bt - ..... - (gdb) f 0 - ..... - (gdb) i args - ..... - (gdb) l - ..... - - +&prompt.user; su +&prompt.root; gdb /usr/sbin/ppp ppp.core +(gdb) bt +..... +(gdb) f 0 +.... +(gdb) i args +.... +(gdb) l +..... All of this information should be given alongside your question, making it possible to diagnose the problem. @@ -7643,7 +7258,7 @@ but most other implementations don't. tun interface IP number, but instead to change all outgoing packets so that the source IP number is changed from the interface IP to the negotiated IP on the fly. This is essentially what the -iface-alias option in the latest version of ppp is +iface-alias option in the latest version of ppp is doing (with the help of libalias(3) and ppp's switch) - it's maintaining all previous interface addresses and NATing them to the last negotiated address. @@ -7680,7 +7295,7 @@ it should send these packets to the interior machine. To make things work, make sure that the only thing running is the software that you're having problems with, then either run tcpdump on the tun interface of the gateway or enable ppp -tcp/ip logging (``set log +tcp/ip'') on the gateway. +tcp/ip logging (set log +tcp/ip) on the gateway. When you start the offending software, you should see packets passing through the gateway machine. When something comes back @@ -7690,14 +7305,11 @@ software. Do this a few times to see if the port numbers are consistent. If they are, then the following line in the relevant section of /etc/ppp/ppp.conf will make the software functional: - - nat port proto internalmachine:port port - - +nat port proto internalmachine:port port -where ``proto'' is either ``tcp'' or ``udp'', -``internalmachine'' is the machine that you want the packets -to be sent to and ``port'' is the destination port number of +where proto is either tcp or udp, +internalmachine is the machine that you want the packets +to be sent to and port is the destination port number of the packets. You won't be able to use the software on other machines @@ -7709,25 +7321,25 @@ network as being just a single machine. If the port numbers aren't consistent, there are three more options: -1) Submit support in libalias. Examples of ``special -cases'' can be found in /usr/src/lib/libalias/alias_*.c (alias_ftp.c +1) Submit support in libalias. Examples of special +cases can be found in /usr/src/lib/libalias/alias_*.c (alias_ftp.c is a good prototype). This usually involves reading certain recognised outgoing packets, identifying the instruction that tells the outside machine to initiate a connection back to the internal machine on a specific (random) port and setting up a -``route'' in the alias table so that the subsequent packets +route in the alias table so that the subsequent packets know where to go. This is the most difficult solution, but it is the best and will make the software work with multiple machines. 2) Use a proxy. The application may support socks5 -for example, or (as in the ``cvsup'' case) may have a ``passive'' +for example, or (as in the cvsup case) may have a passive option that avoids ever requesting that the peer open connections back to the local machine. 3) Redirect everything to the internal machine using -``nat addr''. This is the sledge-hammer approach. +nat addr. This is the sledge-hammer approach. @@ -7735,98 +7347,66 @@ back to the local machine. Has anybody made a list of useful port numbers ? Not yet, but this is intended to grow into such a list (if -any interest is shown). In each example, internal should +any interest is shown). In each example, internal should be replaced with the IP number of the machine playing the game. - -Asheron's Call +Asheron's Call -nat port udp internal:65000 65000 +nat port udp internal:65000 65000 Manually change the port number within the game to 65000. If you've got a number of machines that you wish to play on assign a unique port number for each (i.e. 65001, 65002, etc) and add a -nat port line for each one. +nat port line for each one. - - - - - - -Half Life +Half Life -nat port udp internal:27005 27015 +nat port udp internal:27005 27015 - - - - - - -PCAnywhere 8.0 +PCAnywhere 8.0 -nat port udp internal:5632 5632 +nat port udp internal:5632 5632 -nat port tcp internal:5631 5631 +nat port tcp internal:5631 5631 - - - - - - -Quake +Quake -nat port udp internal:6112 6112 +nat port udp internal:6112 6112 Alternatively, you may want to take a look at www.battle.net for Quake proxy support. - + +Quake 2 - - +nat port udp internal:27901 27910 + -Quake 2 +Red Alert -nat port udp internal:27901 27910 +nat port udp internal:8675 8675 + +nat port udp internal:5009 5009 - - - - - - -Red Alert - - -nat port udp internal:8675 8675 - -nat port udp internal:5009 5009 - - - - @@ -7838,7 +7418,7 @@ ppp packet has a checksum attached to ensure that the data being received is the data being sent. If the FCS of an incoming packet is incorrect, the packet is dropped and the HDLC FCS count is increased. The HDLC error values can be -displayed using the show hdlc command. +displayed using the show hdlc command. If your link is bad (or if your serial driver is dropping packets), you will see the occasional FCS error. This is not @@ -7850,18 +7430,18 @@ interference - this may eradicate the problem. If your link freezes as soon as you've connected and you see a large number of FCS errors, this may be because your link is not 8 bit clean. Make sure your modem is not using software -flow control (XON/XOFF). If your datalink must use +flow control (XON/XOFF). If your datalink must use software flow control, use the command -set accmap 0x000a0000 to tell ppp to escape -the ^Q and ^S characters. +set accmap 0x000a0000 to tell ppp to escape +the ^Q and ^S characters. Another reason for seeing too many FCS errors may be that the remote end has stopped talking PPP. You may want to -enable async logging at this point to determine if the +enable async logging at this point to determine if the incoming data is actually a login or shell prompt. If you have a shell prompt at the remote end, it's possible to terminate ppp without dropping the line by using the -close lcp command (a following term command +close lcp command (a following term command will reconnect you to the shell on the remote machine. If nothing in your log file indicates why the link might @@ -7885,12 +7465,12 @@ have been terminated, you should ask the remote administrator - This is due to what's called a "Black Hole" router. MacOS and Windows 98 (and + This is due to what's called a Black Hole router. MacOS and Windows 98 (and maybe other Microsoft OSs) send TCP packets with a requested segment size too big to fit into a PPPoE frame (MTU is 1500 by default - for ethernet) and have the "don't fragment" - bit set (default of TCP) and the Telco router is not sending ICMP "must - fragment" back to the www site you are trying to load. When the www + for ethernet) and have the don't fragment + bit set (default of TCP) and the Telco router is not sending ICMP must + fragment back to the www site you are trying to load. When the www server is sending you frames that don't fit into the PPPoE pipe the Telco router drops them on the floor and your page doesn't load (some pages/graphics do as they are smaller than a MSS.) This seems to be the @@ -7943,7 +7523,7 @@ have been terminated, you should ask the remote administrator including your config files, how you're starting ppp, the relevant parts of your log file and the output of the netstat -rn command (before and after connecting) to the -freebsd-questions@FreeBSD.org mailing list or the +freebsd-questions@FreeBSD.org mailing list or the comp.unix.bsd.freebsd.misc news group, and someone should point you in the right direction. @@ -7967,31 +7547,25 @@ in your system for which the kernel was configured. You can either watch your system closely for the messages it prints or run the command - - dmesg | grep sio - - +&prompt.user; dmesg | grep sio after your system's up and running. Here's some example output from the above command: - - sio0 at 0x3f8-0x3ff irq 4 on isa - sio0: type 16550A - sio1 at 0x2f8-0x2ff irq 3 on isa - sio1: type 16550A - - +sio0 at 0x3f8-0x3ff irq 4 on isa +sio0: type 16550A +sio1 at 0x2f8-0x2ff irq 3 on isa +sio1: type 16550A This shows two serial ports. The first is on irq 4, is using port address 0x3f8, and has a 16550A-type UART chip. The second uses the same kind of chip but is on irq 3 and is at port address 0x2f8. Internal modem cards are treated just like -serial ports---except that they always have a modem ``attached'' +serial ports---except that they always have a modem attached to the port. -The GENERIC kernel includes support for two serial ports +The GENERIC kernel includes support for two serial ports using the same irq and port address settings in the above example. If these settings aren't right for your system, or if you've added modem cards or have more serial ports than your @@ -8009,9 +7583,9 @@ more details. -I just upgraded to 2.0.5 and my tty0X are missing! +I just upgraded to 2.0.5 and my tty0X are missing! -Don't worry, they have been merged with the ttydX devices. +Don't worry, they have been merged with the ttydX devices. You'll have to change any old configuration files you have, though. @@ -8024,13 +7598,14 @@ COM3 in DOS), is on /dev/cuaa2 for dial-out devices, and on /dev/ttyd2 for dial-in devices. What's the difference between these two classes of devices? -You use ttydX for dial-ins. When opening /dev/ttydX +You use ttydX for dial-ins. When opening /dev/ttydX in blocking mode, a process will wait for the corresponding -cuaaX device to become inactive, and then wait +cuaaX device to become inactive, and then wait for the carrier detect line to go active. When you open the -cuaaX device, it makes sure the serial port isn't already in -use by the ttydX device. If the port's available, it -``steals'' it from the ttydX device. Also, the cuaXX +cuaaX device, it makes sure the serial port isn't already in +use by the ttydX device. If the port's available, it +steals it from the ttydX device. Also, +the cuaXX device doesn't care about carrier detect. With this scheme and an auto-answer modem, you can have remote users log in and you can still dialout with the same modem and the system will take @@ -8047,19 +7622,16 @@ place an sio line fo kernel configuration file. But place the irq and vector specifiers on only one of the entries. All of the ports on the card should share one irq. For consistency, use the last serial -port to specify the irq. Also, specify the COM_MULTIPORT +port to specify the irq. Also, specify the COM_MULTIPORT option. The following example is for an AST 4-port serial card on irq 7: - - options "COM_MULTIPORT" - device sio4 at isa? port 0x2a0 tty flags 0x781 - device sio5 at isa? port 0x2a8 tty flags 0x781 - device sio6 at isa? port 0x2b0 tty flags 0x781 - device sio7 at isa? port 0x2b8 tty flags 0x781 irq 7 vector siointr - - +options "COM_MULTIPORT" +device sio4 at isa? port 0x2a0 tty flags 0x781 +device sio5 at isa? port 0x2a8 tty flags 0x781 +device sio6 at isa? port 0x2b0 tty flags 0x781 +device sio7 at isa? port 0x2b8 tty flags 0x781 irq 7 vector siointr The flags indicate that the master port has minor number 7 (0x700), diagnostics enabled during probe (0x080), and @@ -8077,47 +7649,40 @@ all the ports share an irq (0x001). Can I set the default serial parameters for a port? -The ttydX (or cuaaX) device is the regular device +The ttydX (or cuaaX) device is the regular device you'll want to open for your applications. When a process opens the device, it'll have a default set of terminal I/O settings. You can see these settings with the command - - stty -a -f /dev/ttyd1 - - +&prompt.root; stty -a -f /dev/ttyd1 When you change the settings to this device, the settings are in effect until the device is closed. When it's reopened, it goes back to the default set. To make changes to the default set, you -can open and adjust the settings of the ``initial state'' device. +can open and adjust the settings of the initial state device. For example, to turn on CLOCAL mode, 8 bits, and XON/XOFF flow control by default for ttyd5, do: - - stty -f /dev/ttyid5 clocal cs8 ixon ixoff - - +&prompt.root; stty -f /dev/ttyid5 clocal cs8 ixon ixoff A good place to do this is in /etc/rc.serial. Now, an application will have these settings by default when it opens -ttyd5. It can still change these settings to its liking, +ttyd5. It can still change these settings to its liking, though. You can also prevent certain settings from being changed by an -application by making adjustments to the ``lock state'' device. -For example, to lock the speed of ttyd5 to 57600 bps, do +application by making adjustments to the lock state device. +For example, to lock the speed of ttyd5 to 57600 bps, do - - stty -f /dev/ttyld5 57600 - - +&prompt.root; stty -f /dev/ttyld5 57600 -Now, an application that opens ttyd5 and tries to change the +Now, an application that opens ttyd5 and tries to change the speed of the port will be stuck with 57600 bps. Naturally, you should make the initial state and lock state -devices writable only by root. The MAKEDEV script does NOT do this when it creates the +devices writable only by root. The +MAKEDEV +script does NOT do this when it creates the device entries. @@ -8139,10 +7704,7 @@ and the remote modem. For many Hayes command-set--compatible modems, this command will make these settings and store them in nonvolatile memory: - - AT &C1 &D3 &K3 &Q6 S0=1 &W - - +AT &C1 &D3 &K3 &Q6 S0=1 &W See the section on sending AT commands below for information on how to make these settings without resorting to an MS-DOS terminal program. @@ -8151,50 +7713,38 @@ without resorting to an MS-DOS terminal program. modem. This file lists all the ports on which the operating system will await logins. Add a line that looks something like this: - - ttyd1 "/usr/libexec/getty std.57600" dialup on insecure - - +ttyd1 "/usr/libexec/getty std.57600" dialup on insecure This line indicates that the second serial port (/dev/ttyd1) has a modem connected running at 57600 bps -and no parity (std.57600, which comes from the file +and no parity (std.57600, which comes from the file /etc/gettytab). The terminal type for this port is -``dialup.'' The port is ``on'' and is ``insecure''---meaning +dialup. The port is on and is insecure---meaning root logins on the port aren't allowed. For dialin ports like -this one, use the ttydX entry. +this one, use the ttydX entry. -It's common practice to use ``dialup'' as the terminal type. +It's common practice to use dialup as the terminal type. Many users set up in their .profile or .login files a prompt for the actual terminal type if the starting type is dialup. The example shows the port as insecure. To become root on this port, -you have to login as a regular user, then ``su'' to -root. If you use ``secure'' then root can login in -directly. +you have to login as a regular user, then su to become +root. If you use secure then +root can login in directly. After making modifications to /etc/ttys, you need to send a hangup or HUP signal to the init process: - - kill -HUP 1 - - +&prompt.root; kill -HUP 1 This forces the init process to reread /etc/ttys. The -init process will then start getty processes on all ``on'' ports. +init process will then start getty processes on all on ports. You can find out if logins are available for your port by typing - - ps -ax | grep '[t]tyd1' - - +&prompt.user; ps -ax | grep '[t]tyd1' You should see something like: - - 747 ?? I 0:00.04 /usr/libexec/getty std.57600 ttyd1 - - +747 ?? I 0:00.04 /usr/libexec/getty std.57600 ttyd1 @@ -8209,33 +7759,31 @@ instructions. Then, modify /etc/ttys, like above. For example, if you're hooking up a WYSE-50 terminal to the fifth serial port, use an entry like this: - - ttyd4 "/usr/libexec/getty std.38400" wyse50 on secure - - +ttyd4 "/usr/libexec/getty std.38400" wyse50 on secure This example shows that the port on /dev/ttyd4 has a wyse50 terminal connected at 38400 bps with no parity -(std.38400 from /etc/gettytab) and root logins are allowed (secure). +(std.38400 from /etc/gettytab) and +root logins are allowed (secure). -Why can't I run tip or cu? +Why can't I run tip or cu? On your system, the programs tip and cu are probably -executable only by uucp and group dialer. You can use the group dialer +executable only by uucp and group +dialer. You can use the group dialer to control who has access to your modem or remote systems. Just add yourself to group dialer. -Alternatively, you can let everyone on your system run tip -and cu by typing: +Alternatively, you can let everyone on your system run tip +and cu by typing: - - # chmod 4511 /usr/bin/cu - # chmod 4511 /usr/bin/tip - - +&prompt.root; chmod 4511 /usr/bin/cu +&prompt.root; chmod 4511 /usr/bin/tip @@ -8244,25 +7792,25 @@ and cu by typing: Actually, the man page for tip is out of date. There is a generic Hayes dialer already built in. Just use -``at=hayes'' in your /etc/remote file. +at=hayes in your /etc/remote file. The Hayes driver isn't smart enough to recognize some of the -advanced features of newer modems---messages like BUSY, -NO DIALTONE, or CONNECT 115200 will just confuse it. +advanced features of newer modems---messages like BUSY, +NO DIALTONE, or CONNECT 115200 will just confuse it. You should turn those messages off when you use tip (using -ATX0&W). +ATX0&W). -Also, the dial timeout for tip is 60 seconds. Your modem +Also, the dial timeout for tip is 60 seconds. Your modem should use something less, or else tip will think there's a communication problem. Try ATS7=45&W. -Actually, as shipped tip doesn't yet support it fully. The +Actually, as shipped tip doesn't yet support it fully. The solution is to edit the file tipconf.h in the directory /usr/src/usr.bin/tip/tip. Obviously you need the source distribution to do this. -Edit the line ``#define HAYES 0'' to ``#define HAYES -1''. Then ``make'' and ``make install''. Everything +Edit the line #define HAYES 0 to #define HAYES 1. +Then make and make install. Everything works nicely after that. @@ -8272,15 +7820,12 @@ id="direct-at"> How am I expected to enter these AT commands? -Make what's called a ``direct'' entry in your +Make what's called a direct entry in your /etc/remote file. For example, if your modem's hooked up to the first serial port, /dev/cuaa0, then put in the following line: - - cuaa0:dv=/dev/cuaa0:br#19200:pa=none - - +cuaa0:dv=/dev/cuaa0:br#19200:pa=none Use the highest bps rate your modem supports in the br capability. Then, type tip cuaa0 and @@ -8288,22 +7833,16 @@ you'll be connected to your modem. If there is no /dev/cuaa0 on your system, do this: - - # cd /dev - # ./MAKEDEV cuaa0 - - +&prompt.root; cd /dev +&prompt.root; sh MAKEDEV cuaa0 Or use cu as root with the following command: - - # cu -l``line'' -s``speed'' - - +&prompt.root; cu -lline -sspeed with line being the serial port (e.g./dev/cuaa0) -and speed being the speed (e.g.57600). When you are done -entering the AT commands hit ~. to exit. +and speed being the speed (e.g.57600). When you are done +entering the AT commands hit ~. to exit. @@ -8322,37 +7861,31 @@ also a special character in capability files like How can I dial a phone number on the command line? -Put what's called a ``generic'' entry in your +Put what's called a generic entry in your /etc/remote file. For example: - - tip115200|Dial any phone number at 115200 bps:\ - :dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du: - tip57600|Dial any phone number at 57600 bps:\ - :dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du: - - +tip115200|Dial any phone number at 115200 bps:\ + :dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du: +tip57600|Dial any phone number at 57600 bps:\ + :dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du: -Then you can do something like ``tip -115200 5551234''. If you +Then you can do something like tip -115200 5551234. If you prefer cu over tip, use a generic cu entry: - - cu115200|Use cu to dial any number at 115200bps:\ - :dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du: - - +cu115200|Use cu to dial any number at 115200bps:\ + :dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du: -and type ``cu 5551234 -s 115200''. +and type cu 5551234 -s 115200. Do I have to type in the bps rate every time I do that? -Put in an entry for tip1200 or cu1200, but go ahead and +Put in an entry for tip1200 or cu1200, but go ahead and use whatever bps rate is appropriate with the br capability. tip thinks a good -default is 1200 bps which is why it looks for a ``tip1200'' entry. +default is 1200 bps which is why it looks for a tip1200 entry. You don't have to use 1200 bps, though. @@ -8361,22 +7894,20 @@ You don't have to use 1200 bps, though. I access a number of hosts through a terminal server. Rather than waiting until you're connected and typing -``CONNECT <host>'' each time, use tip's cm +CONNECT host each time, use tip's cm capability. For example, these entries in /etc/remote: - - pain|pain.deep13.com|Forrester's machine:\ - :cm=CONNECT pain\n:tc=deep13: - muffin|muffin.deep13.com|Frank's machine:\ - :cm=CONNECT muffin\n:tc=deep13: - deep13:Gizmonics Institute terminal server:\ - :dv=/dev/cua02:br#38400:at=hayes:du:pa=none:pn=5551234: - - +pain|pain.deep13.com|Forrester's machine:\ + :cm=CONNECT pain\n:tc=deep13: +muffin|muffin.deep13.com|Frank's machine:\ + :cm=CONNECT muffin\n:tc=deep13: +deep13:Gizmonics Institute terminal server:\ + :dv=/dev/cua02:br#38400:at=hayes:du:pa=none:pn=5551234: -will let you type ``tip pain'' or ``tip muffin'' to -connect to the hosts pain or muffin; and ``tip deep13'' to +will let you type tip pain or tip muffin to +connect to the hosts pain or muffin; +and tip deep13 to get to the terminal server. @@ -8388,94 +7919,79 @@ get to the terminal server. and several thousand students trying to use them... Make an entry for your university in /etc/remote -and use <\@> for the pn capability: +and use <\@> for the pn capability: - - big-university:\ - :pn=\@:tc=dialout - dialout:\ - :dv=/dev/cuaa3:br#9600:at=courier:du:pa=none: - - +big-university:\ + :pn=\@:tc=dialout +dialout:\ + :dv=/dev/cuaa3:br#9600:at=courier:du:pa=none: Then, list the phone numbers for the university in /etc/phones: - - big-university 5551111 - big-university 5551112 - big-university 5551113 - big-university 5551114 - - +big-university 5551111 +big-university 5551112 +big-university 5551113 +big-university 5551114 tip will try each one in the listed order, then give up. If -you want to keep retrying, run tip in a while loop. +you want to keep retrying, run tip in a while loop. Why do I have to hit CTRL+P twice to send CTRL+P once? -CTRL+P is the default ``force'' character, used to tell +CTRL+P is the default force character, used to tell tip that the next character is literal data. You can set the force -character to any other character with the ~s escape, which -means ``set a variable.'' +character to any other character with the ~s escape, which +means set a variable. -Type ``~sforce=<single-char>'' followed by a newline. -<single-char> is any single character. If you leave -out <single-char>, then the force character is the nul +Type ~sforce=single-char followed by a newline. +single-char is any single character. If you leave +out single-char, then the force character is the nul character, which you can get by typing CTRL+2 or CTRL+SPACE. A -pretty good value for <single-char> is SHIFT+CTRL+6, +pretty good value for single-char is SHIFT+CTRL+6, which I've seen only used on some terminal servers. You can have the force character be whatever you want by specifying the following in your $HOME/.tiprc file: - - force=<single-char> - - +force=single-char Suddenly everything I type is in UPPER CASE?? -You must've pressed CTRL+A, tip ``raise -character,'' specially designed for people with broken caps-lock keys. -Use ~s as above and set the variable ``raisechar'' to something +You must've pressed CTRL+A, tip raise +character, specially designed for people with broken caps-lock keys. +Use ~s as above and set the variable raisechar to something reasonable. In fact, you can set it to the same as the force character, if you never expect to use either of these features. Here's a sample .tiprc file perfect for Emacs users who need to type CTRL+2 and CTRL+A a lot: - - force=^^ - raisechar=^^ - - +force=^^ +raisechar=^^ The ^^ is SHIFT+CTRL+6. -How can I do file transfers with tip? +How can I do file transfers with tip? If you're talking to another UNIX system, you can send and -receive files with ~p (put) and ~t (take). These +receive files with ~p (put) and ~t (take). These commands run cat and echo on the remote system to accept and send files. The syntax is: - - ~p <local-file> [<remote-file>] - ~t <remote-file> [<local-file>] - - +~p <local-file> [<remote-file>] +~t <remote-file> [<local-file>] There's no error checking, so you probably should use another protocol, like zmodem. @@ -8491,12 +8007,12 @@ collection (such as one of the two from the comms category, and rzsz). To receive files, start the sending program on the remote end. -Then, press enter and type ``~C rz'' (or ``~C lrz'' if -you installed lrzsz) to begin receiving them locally. +Then, press enter and type ~C rz (or ~C lrz if +you installed lrzsz) to begin receiving them locally. To send files, start the receiving program on the remote end. -Then, press enter and type ``~C sz <files>'' (or -``~C lsz <files>'') to send them to the +Then, press enter and type ~C sz files (or +~C lsz files) to send them to the remote system. @@ -8563,7 +8079,7 @@ morning after leaving it idle overnight. To understand why FreeBSD uses the ELF format, you must -first know a little about the 3 currently "dominant" executable +first know a little about the 3 currently dominant executable formats for UNIX: Prior to FreeBSD 3.x, FreeBSD used the a.out format. @@ -8576,7 +8092,7 @@ formats for UNIX: -The oldest and `classic' unix object format. It uses a +The oldest and classic unix object format. It uses a short and compact header with a magic number at the beginning that's often used to characterize the format (see a.out(5) for more details). It contains three loaded @@ -8619,11 +8135,11 @@ See the man page for -FreeBSD comes from the "classic" camp and has traditionally used +FreeBSD comes from the classic camp and has traditionally used the a.out format, a technology tried and proven through many generations of BSD releases. Though it has also been possible for some time to build and run native ELF binaries (and -kernels) on a FreeBSD system, FreeBSD initially resisted the "push" +kernels) on a FreeBSD system, FreeBSD initially resisted the push to switch to ELF as the default format. Why? Well, when the Linux camp made their painful transition to ELF, it was not so much to flee the a.out executable format @@ -8631,7 +8147,7 @@ as it was their inflexible jump-table based shared library mechanism, which made the construction of shared libraries very difficult for vendors and developers alike. Since the ELF tools available offered a solution to the shared library -problem and were generally seen as "the way forward" anyway, the +problem and were generally seen as the way forward anyway, the migration cost was accepted as necessary and the transition made. @@ -8740,29 +8256,26 @@ eventually removed from the kernel once the need to run legacy However, the permissions on foo will not have changed. -You have to use either ``'' or ``'' together with -the ``'' option to make this work. See the chmod and +You have to use either or together with +the option to make this work. See the chmod and symlink man pages for more info. -WARNING the ``'' option does a RECURSIVE +The option does a RECURSIVE chmod. Be careful about specifying directories or symlinks to directories to chmod. If you want to change the permissions of a directory referenced by a symlink, use chmod without any options and follow the symlink with a trailing slash -(``/''). For example, if ``foo'' is a symlink to -directory ``bar'', and you want to change the permissions of -``foo'' (actually ``bar''), you would do something like: +(/). For example, if foo is a symlink to +directory bar, and you want to change the permissions of +foo (actually bar), you would do something like: - - chmod 555 foo/ - - +&prompt.user; chmod 555 foo/ With the trailing slash, chmod will -follow the symlink, ``foo'', to change the permissions of the -directory, ``bar''. +follow the symlink, foo, to change the permissions of the +directory, bar. @@ -8770,11 +8283,11 @@ directory, ``bar''. Why are login names still restricted to 8 characters? -You'd think it'd be easy enough to change UT_NAMESIZE and rebuild +You'd think it'd be easy enough to change UT_NAMESIZE and rebuild the whole world, and everything would just work. Unfortunately there are often scads of applications and utilities (including system tools) -that have hard-coded small numbers (not always "8" or "9", but oddball -ones like "15" and "20") in structures and buffers. Not only will +that have hard-coded small numbers (not always 8 or 9, but oddball +ones like 15 and 20) in structures and buffers. Not only will this get you log files which are trashed (due to variable-length records getting written when fixed records were expected), but it can break Sun's NIS clients and potentially cause other problems in @@ -8814,7 +8327,7 @@ System (provided as XFree86). - What is ``sup'', and how do I use it? + What is sup, and how do I use it? SUP @@ -8844,10 +8357,10 @@ that I can remember. We eventually had to throw the results of this survey out entirely anyway when we found that too many volunteers were wandering out of the room during the tests, thus skewing the results. I think most of the volunteers are at Apple -now, working on their new ``scratch and sniff'' GUI. It's a +now, working on their new scratch and sniff GUI. It's a funny old business we're in! -Seriously, both FreeBSD and Linux use the ``HLT'' (halt) +Seriously, both FreeBSD and Linux use the HLT (halt) instruction when the system is idle thus lowering its energy consumption and therefore the heat it generates. Also if you have APM (automatic power management) configured, then FreeBSD @@ -8858,20 +8371,20 @@ can also put the CPU into a low power mode. Who's scratching in my memory banks?? -Q. Is there anything "odd" that FreeBSD does when compiling the +Q. Is there anything odd that FreeBSD does when compiling the kernel which would cause the memory to make a scratchy sound? When compiling (and for a brief moment after recognizing the floppy drive upon startup, as well), a strange scratchy sound emanates from what appears to be the memory banks. -A. Yes! You'll see frequent references to ``daemons'' in the BSD +A. Yes! You'll see frequent references to daemons in the BSD documentation, and what most people don't know is that this refers to genuine, non-corporeal entities that now possess your computer. The scratchy sound coming from your memory is actually high-pitched whispering exchanged among the daemons as they best decide how to deal with various system administration tasks. -If the noise gets to you, a good ``fdisk /mbr'' from DOS +If the noise gets to you, a good fdisk /mbr from DOS will get rid of them, but don't be surprised if they react adversely and try to stop you. In fact, if at any point during the exercise you hear the satanic voice of Bill Gates coming from @@ -8885,25 +8398,25 @@ noises, myself! -What does 'MFC' mean? +What does MFC mean? -MFC is an acronym for 'Merged From -CURRENT.' It's used in the CVS +MFC is an acronym for Merged From -CURRENT. It's used in the CVS logs to denote when a change was migrated from the CURRENT to the STABLE branches. -What does 'BSD' mean? +What does BSD mean? It stands for something in a secret language that only members can know. It doesn't translate literally but its ok to -tell you that BSD's translation is something between, 'Formula-1 -Racing Team', 'Penguins are tasty snacks', and 'We have a better -sense of humor than Linux.' :-) +tell you that BSD's translation is something between, Formula-1 +Racing Team, Penguins are tasty snacks, and We have a better +sense of humor than Linux. :-) -Seriously, BSD is an acronym for 'Berkeley Software -Distribution', which is the name the Berkeley CSRG (Computer +Seriously, BSD is an acronym for Berkeley Software +Distribution, which is the name the Berkeley CSRG (Computer Systems Research Group) chose for their Unix distribution way back when. @@ -8912,8 +8425,8 @@ back when. What is a repo-copy? -A repo-copy (which is a short form of “repository -copy”) refers to the direct copying of files within the CVS +A repo-copy (which is a short form of repository +copy) refers to the direct copying of files within the CVS repository. Without a repo-copy, if a file needed to be copied or moved to @@ -9126,32 +8639,33 @@ a year, which is why there are only three active branches of development): -RELENG_2_2 AKA 2.2-STABLE +RELENG_2_2 AKA 2.2-STABLE -RELENG_3 AKA 3.X-STABLE +RELENG_3 AKA 3.X-STABLE -RELENG_4 AKA 4-STABLE +RELENG_4 AKA 4-STABLE -HEAD AKA AKA 5.0-CURRENT +HEAD AKA -CURRENT + AKA 5.0-CURRENT -HEAD is not an actual branch tag, like the other two; it's +HEAD is not an actual branch tag, like the other two; it's simply a symbolic constant for -"the current, non-branched development stream" which we simply -refer to as . +the current, non-branched development stream which we simply +refer to as -CURRENT. -Right now, is the 5.0 development stream and the +Right now, -CURRENT is the 5.0 development stream and the 4-STABLE branch, RELENG_4, forked off from - in Mar 2000. +-CURRENT in Mar 2000. The 2.2-STABLE branch, RELENG_2_2, departed -CURRENT in November 1996, and has pretty much been retired. @@ -9167,34 +8681,28 @@ id="custrel"> be running a kernel with the vn driver configured in. Add this to your kernel config file and build a new kernel: - - pseudo-device vn #Vnode driver (turns a file into a device) - - +pseudo-device vn #Vnode driver (turns a file into a device) Second, you have to have the whole CVS repository at hand. To get this you can use CVSUP but in your supfile set the release name to cvs and remove any tag or date fields: - - *default prefix=/home/ncvs - *default base=/a - *default host=cvsup.FreeBSD.org - *default release=cvs - *default delete compress use-rel-suffix +*default prefix=/home/ncvs +*default base=/a +*default host=cvsup.FreeBSD.org +*default release=cvs +*default delete compress use-rel-suffix - ## Main Source Tree - src-all - src-eBones - src-secure +## Main Source Tree +src-all +src-eBones +src-secure - # Other stuff - ports-all - www - doc-all - - +# Other stuff +ports-all +www +doc-all Then run cvsup -g supfile to suck all the good bits onto your box... @@ -9235,38 +8743,38 @@ would build an up-to-the- minute 2.2-STABLE snapshot. binary archives is automated by various targets in /usr/src/release/Makefile. The information there should be enough to get you started. However, it should be said that this -involves doing a ``make world'' and will therefore take up a lot of +involves doing a make world and will therefore take up a lot of time and disk space. -``make world'' clobbers my existing installed binaries. +make world clobbers my existing installed binaries. Yes, this is the general idea; as its name might suggest, -``make world'' rebuilds every system binary from scratch, so you can be +make world rebuilds every system binary from scratch, so you can be certain of having a clean and consistent environment at the end (which is why it takes so long). -If the environment variable DESTDIR is defined while running -``make world'' or ``make install'', the newly-created +If the environment variable DESTDIR is defined while running +make world or make install, the newly-created binaries will be deposited in a directory tree identical to the -installed one, rooted at ${DESTDIR}. +installed one, rooted at ${DESTDIR}. Some random combination of shared libraries modifications and -program rebuilds can cause this to fail in ``make world'', +program rebuilds can cause this to fail in make world however. - When my system boots, it says ``(bus speed defaulted)''. + When my system boots, it says (bus speed defaulted). The Adaptec 1542 SCSI host adapters allow the user to configure their bus access speed in software. Previous versions of the 1542 driver tried to determine the fastest usable speed and set the adapter to that. We found that this breaks some users' -systems, so you now have to define the ``TUNE_1542'' kernel +systems, so you now have to define the TUNE_1542 kernel configuration option in order to have this take place. Using it on those systems where it works may make your disks run faster, but on those systems where it doesn't, your data could be @@ -9287,20 +8795,17 @@ by using the CTM facility.

How did you split the distribution into 240k files? -Newer BSD based systems have a ``'' option to split that +Newer BSD based systems have a option to split that allows them to split files on arbitrary byte boundaries. Here is an example from /usr/src/Makefile. - - bin-tarball: - (cd ${DISTDIR}; \ - tar cf - . \ - gzip --no-name -9 -c | \ - split -b 240640 - \ - ${RELEASEDIR}/tarballs/bindist/bin_tgz.) - - +bin-tarball: +(cd ${DISTDIR}; \ +tar cf - . \ +gzip --no-name -9 -c | \ +split -b 240640 - \ +${RELEASEDIR}/tarballs/bindist/bin_tgz.)
@@ -9323,13 +8828,13 @@ respond to when the host asks if anyone is out there. So when the PnP probe routine starts, he asks if there are any PnP boards present, and all the PnP boards respond with their model # to a I/O read of the same port, so the probe routine gets a wired-OR -``yes'' to that question. At least one bit will be on in that +yes to that question. At least one bit will be on in that reply. Then the probe code is able to cause boards with board model IDs (assigned by Microsoft/Intel) lower than X to go -``off-line''. It then looks to see if any boards are still -responding to the query. If the answer was ``0'', then +off-line. It then looks to see if any boards are still +responding to the query. If the answer was 0, then there are no boards with IDs above X. Now probe asks if there -are any boards below ``X''. If so, probe knows there are boards +are any boards below X. If so, probe knows there are boards with a model numbers below X. Probe then asks for boards greater than X-(limit/4) to go off-line. If repeats the query. By repeating this semi-binary search of IDs-in-range enough times, @@ -9381,7 +8886,7 @@ the general idea. do PnP, on the logic that no boards decoded those addresses for the opposing I/O cycles. I found a genuine IBM printer board that did decode writes of the status port during the early PnP -proposal review period, but MS said ``tough''. So they do a +proposal review period, but MS said tough. So they do a write to the printer status port for setting addresses, plus that use that address + 0x800, and a third I/O port for reading that can be located anywhere between 0x200 and 0x3ff. @@ -9464,18 +8969,16 @@ is an area ripe for experimentation. freebsd-current mailing list by &a.des;, who fixed a few typos and added the bracketed comments] - -From: Bill Paul <wpaul@skynet.ctr.columbia.edu> +From: Bill Paul <wpaul@skynet.ctr.columbia.edu> Subject: Re: the fs fun never stops To: ben@rosengart.com Date: Sun, 20 Sep 1998 15:22:50 -0400 (EDT) -Cc: current@FreeBSD.org - - +Cc: current@FreeBSD.org [<ben@rosengart.com> posted the following panic message] -> Fatal trap 12: page fault while in kernel mode + +> Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x40 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xf014a7e5 @@ -9488,11 +8991,9 @@ message] > current process = 80 (mount) > interrupt mask = > trap number = 12 -> panic: page fault - - +> panic: page fault - [When] you see a message like this, it's not enough to just +[When] you see a message like this, it's not enough to just reproduce it and send it in. The instruction pointer value that I highlighted up there is important; unfortunately, it's also configuration dependent. In other words, the value varies @@ -9515,8 +9016,8 @@ it's the 0xf0xxxxxx part that we want. When the system reboots, do the following: -% nm /kernel.that.caused.the.panic | grep f0xxxxxx - + +&prompt.user; nm /kernel.that.caused.the.panic | grep f0xxxxxx where f0xxxxxx is the instruction pointer value. The odds are you will not get an exact match since the symbols @@ -9525,8 +9026,8 @@ functions and the instruction pointer address will be somewhere inside a function, not at the start. If you don't get an exact match, omit the last digit from the instruction pointer value and try again, i.e.: -% nm /kernel.that.caused.the.panic | grep f0xxxxx - + +&prompt.user; nm /kernel.that.caused.the.panic | grep f0xxxxx If that doesn't yield any results, chop off another digit. Repeat until you get some sort of output. The result will be @@ -9557,18 +9058,18 @@ CDs ship). -Set up a kernel config file, optionally adding 'options DDB' if you +Set up a kernel config file, optionally adding options DDB if you think you need the kernel debugger for something. (I use this mainly for setting beakpoints if I suspect an infinite loop condition of some kind.) -Use config -g KERNELCONFIG to set up the build directory. +Use config -g KERNELCONFIG to set up the build directory. -cd /sys/compile/KERNELCONFIG; make +cd /sys/compile/KERNELCONFIG; make @@ -9603,7 +9104,7 @@ recovered using savecore(8); if dumpdevsavecore(8) automatically and put the crash dump in /var/crash. - NOTE: FreeBSD crash dumps are usually the same size as the +FreeBSD crash dumps are usually the same size as the physical RAM size of your machine. That is, if you have 64MB of RAM, you will get a 64MB crash dump. Therefore you must make sure there's enough space in /var/crash to hold the dump. @@ -9614,16 +9115,13 @@ room. It's possible to limit the size of the crash dump by using will use to something a little more sensible. For example, if you have 128MB of RAM, you can limit the kernel's memory usage to 16MB so that your crash dump size will be 16MB instead of -128MB. +128MB. Once you have recovered the crash dump, you can get a stack trace with gdb(1) as follows: - -% gdb -k /sys/compile/KERNELCONFIG/kernel.debug /var/crash/vmcore.0 -(gdb) where - - +&prompt.user; gdb -k /sys/compile/KERNELCONFIG/kernel.debug /var/crash/vmcore.0 +(gdb) where Note that there may be several screens worth of information; ideally you should use script(1) to capture all of them. @@ -9685,21 +9183,18 @@ lower the load address so it doesn't bump its head against the ceiling. The first goal is achieved by increasing the value of -NKPDE in src/sys/i386/include/pmap.h. Here's what +NKPDE in src/sys/i386/include/pmap.h. Here's what it looks like for a 1 GB address space: - -#ifndef NKPDE +#ifndef NKPDE #ifdef SMP #define NKPDE 254 /* addressable number of page tables/pde's */ #else #define NKPDE 255 /* addressable number of page tables/pde's */ #endif /* SMP */ -#endif - - +#endif -To find the correct value of NKPDE, divide the desired +To find the correct value of NKPDE, divide the desired address space size (in megabytes) by four, then subtract one for UP and two for SMP. @@ -9711,8 +9206,7 @@ to that value; then set the location counter in the beginning of the section listing in src/sys/i386/conf/kernel.script to the same value, as follows: - -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(btext) SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/obj/elf/home/src/tmp/usr/i386-unknown-freebsdelf/lib); @@ -9720,9 +9214,7 @@ SECTIONS { /* Read-only sections, merged into text segment: */ . = 0xc0100000 + SIZEOF_HEADERS; - .interp : { *(.interp) } - - + .interp : { *(.interp) } Then reconfig and rebuild your kernel. You will probably have problems with ps(1), top(1) and the like; make @@ -9746,15 +9238,13 @@ expected at least 256MB granularity.] id="acknowledgments"> ACKNOWLEDGMENTS - - If you see a problem with this FAQ, or wish to submit an entry, - please mail the &a.faq;. We appreciate your - feedback, and cannot make this a better FAQ without your help! +
+ FreeBSD Core Team - - FreeBSD Core Team - - + If you see a problem with this FAQ, or wish to submit an + entry, please mail the &a.faq;. We appreciate your feedback, and + cannot make this a better FAQ without your help! +