diff --git a/en_US.ISO8859-1/books/faq/book.sgml b/en_US.ISO8859-1/books/faq/book.sgml index 928d11f8c3..2dd9a30208 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.102 2000/09/26 10:39:48 marko Exp $ + $FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.103 2000/09/26 12:40:11 marko Exp $ This is the FAQ for FreeBSD versions 2.X, 3.X, and 4.X. @@ -4884,139 +4884,173 @@ disk fd1 at fdc0 drive 1 - -System Administration + + System Administration + + + + Where are the system start-up configuration files? + - -Where are the system start-up configuration files? + -From 2.0.5R to 2.2.1R, the primary configuration file is -/etc/sysconfig. All the options are to be specified in -this file and other files such as /etc/rc and -/etc/netstart just include it. + From 2.0.5R to 2.2.1R, the primary configuration file is + /etc/sysconfig. All the options are to be + specified in this file and other files such as /etc/rc + and /etc/netstart just include it. -Look in the /etc/sysconfig file and change the value to -match your system. This file is filled with comments to show what -to put in there. + Look in the /etc/sysconfig file and + change the value to match your system. This file is filled with + comments to show what to put in there. -In post-2.2.1 and 3.0, /etc/sysconfig was renamed -to a more self-describing rc.conf -file and the syntax cleaned up a bit in the process. -/etc/netstart was also renamed to /etc/rc.network -so that all files could be copied with a cp /usr/src/etc/rc* -/etc command. + In post-2.2.1 and 3.0, /etc/sysconfig + was renamed to a more self-describing rc.conf + file and the syntax cleaned up a bit in the process. + /etc/netstart was also renamed to + /etc/rc.network so that all files could be + copied with a cp + /usr/src/etc/rc* /etc command. -And, in 3.1 and later, /etc/rc.conf has -been moved to /etc/defaults/rc.conf. Do not edit -this file! Instead, if there is any entry in -/etc/defaults/rc.conf that you want to change, -you should copy the line into /etc/rc.conf and -change it there. + And, in 3.1 and later, /etc/rc.conf + has been moved to /etc/defaults/rc.conf. + Do not edit this file! Instead, if there + is any entry in /etc/defaults/rc.conf that + you want to change, you should copy the line into + /etc/rc.conf and change it there. -For example, if you wish to start named, the DNS server included -with FreeBSD in FreeBSD 3.1 or later, all you need to do is: -&prompt.root; echo named_enable="YES" >> -/etc/rc.conf + For example, if you wish to start named, the DNS server + included with FreeBSD in FreeBSD 3.1 or later, all you need to + do is: + &prompt.root; echo named_enable="YES" >> /etc/rc.conf -To start up local services in FreeBSD 3.1 or later, place shell -scripts in the /usr/local/etc.rd directory. These -shell scripts should be set executable, and end with a .sh. In FreeBSD -3.0 and earlier releases, you should edit the -/etc/rc.local file. + To start up local services in FreeBSD 3.1 or later, place + shell scripts in the /usr/local/etc.rd + directory. These shell scripts should be set executable, and + end with a .sh. In FreeBSD 3.0 and earlier releases, you should + edit the /etc/rc.local file. -The /etc/rc.serial is for serial port initialization -(e.g. locking the port characteristics, and so on.). + The /etc/rc.serial is for serial port + initialization (e.g. locking the port characteristics, and so + on.). -The /etc/rc.i386 is for Intel-specifics settings, such -as iBCS2 emulation or the PC system console configuration. + The /etc/rc.i386 is for Intel-specifics + settings, such as iBCS2 emulation or the PC system console + configuration. - + + - -How do I add a user easily? + + + How do I add a user easily? + -Use the adduser command. For more complicated usage, the -pw command. + + Use the adduser + command. For more complicated usage, the pw + command. -To remove the user again, use the rmuser -command. Once again, pw will work as well. + To remove the user again, use the rmuser + command. Once again, pw will work as + well. - + + - -How can I add my new hard disk to my FreeBSD system? + + + How can I add my new hard disk to my FreeBSD system? + -See the Disk Formatting Tutorial at -www.FreeBSD.org. + + See the Disk Formatting Tutorial at + www.FreeBSD.org. - + + - -I have a new removable drive, how do I use it? + + + I have a new removable drive, how do I use it? + -Whether it's a removable drive like a ZIP or an EZ drive (or -even a floppy, if you want to use it that way), or a new hard -disk, once it's installed and recognized by the system, and -you have your cartridge/floppy/whatever slotted in, things are -pretty much the same for all devices. + -(this section is based on Mark Mayo's ZIP FAQ) + Whether it's a removable drive like a ZIP or an EZ drive + (or even a floppy, if you want to use it that way), or a new + hard disk, once it's installed and recognized by the system, + and you have your cartridge/floppy/whatever slotted in, things + are 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: + (this section is based on + Mark Mayo's ZIP FAQ) -&prompt.root; mount -t msdos /dev/fd0c /floppy + 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: -if it's a floppy, or this: + &prompt.root; mount -t msdos /dev/fd0c /floppy -&prompt.root; mount -t msdos /dev/da2s4 /zip + if it's a floppy, or this: -for a ZIP disk with the factory configuration. + &prompt.root; mount -t msdos /dev/da2s4 /zip -For other disks, see how they're laid out using fdisk or -/stand/sysinstall. + for a ZIP disk with the factory configuration. -The rest of the examples will be for a ZIP drive on da2, the third -SCSI disk. + For other disks, see how they're laid out using + fdisk or + /stand/sysinstall. -Unless it's a floppy, or a removable you plan on sharing with -other people, it's probably a better idea to stick a BSD file -system on it. You'll get long filename support, at least a 2X -improvement in performance, and a lot more stability. First, you -need to redo the DOS-level partitions/filesystems. You can either -use fdisk or /stand/sysinstall, or for a small -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: + The rest of the examples will be for a ZIP drive on da2, + the third SCSI disk. -&prompt.root; dd if=/dev/zero of=/dev/rda2 count=2 + Unless it's a floppy, or a removable you plan on sharing + with other people, it's probably a better idea to stick a BSD + file system on it. You'll get long filename support, at least a + 2X improvement in performance, and a lot more stability. First, + you need to redo the DOS-level partitions/filesystems. You can + either use fdisk or + /stand/sysinstall, or for a small 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: + + &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 -swap space on a fixed disk, but it's probably irrelevant on a -removable drive like a ZIP. + You can use disklabel or + /stand/sysinstall to create multiple BSD + partitions. You'll certainly want to do this if you're adding + swap space on a fixed disk, but it's probably irrelevant on a + removable drive like a ZIP. -Finally, create a new file system, this one's on our ZIP drive -using the whole disk: + Finally, create a new file system, this one's on our ZIP + drive using the whole disk: -&prompt.root; newfs /dev/rda2c + &prompt.root; newfs /dev/rda2c -and mount it: + and mount it: -&prompt.root; 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 -future: + 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 future: -/dev/da2c /zip ffs rw,noauto 0 0 + /dev/da2c /zip ffs rw,noauto 0 0 - + + @@ -5057,85 +5091,106 @@ future: - - I made a mistake in rc.conf, and - now I can't edit it because the filesystem is read-only. - What should I do? - + + I made a mistake in rc.conf, and + now I can't edit it because the filesystem is read-only. + What should I do? + - - When you get the prompt to enter the shell - pathname, simply press ENTER, and run - mount / to re-mount the root filesystem - in read/write mode. You may also need to run mount - -a -t ufs to mount the filesystem where your - favourite editor is defined. If your favourite editor is on - a network filesystem, you will need to either configure the - network manually before you can mount network filesystems, - or use an editor which resides on a local filesystem, such - as &man.ed.1;. + + When you get the prompt to enter the shell + pathname, simply press ENTER, and run + mount / to re-mount the root filesystem in + read/write mode. You may also need to run mount -a -t + ufs to mount the filesystem where your favourite + editor is defined. If your favourite editor is on a network + filesystem, you will need to either configure the network + manually before you can mount network filesystems, or use an + editor which resides on a local filesystem, such as + &man.ed.1;. - If you intend to use a full screen editor such - as &man.vi.1; or &man.emacs.1;, you may also need to - run export TERM=cons25 so that these - editors can load the correct data from the &man.termcap.5; - database. + If you intend to use a full screen editor such + as &man.vi.1; or &man.emacs.1;, you may also need to + run export TERM=cons25 so that these + editors can load the correct data from the &man.termcap.5; + database. - Once you have performed these steps, you can edit - /etc/rc.conf as you usually would - to fix the syntax error. The error message displayed - immediately after the kernel boot messages should tell you - the number of the line in the file which is at fault. - + Once you have performed these steps, you can edit + /etc/rc.conf as you usually would + to fix the syntax error. The error message displayed + immediately after the kernel boot messages should tell you + the number of the line in the file which is at fault. + - -How do I mount a secondary DOS partition? + + + 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 -second DOS partition on the second SCSI drive, you need to create -the special files for slice 5 in /dev, then mount /dev/da1s5: + -&prompt.root; cd /dev + The secondary DOS partitions are found after ALL the primary + 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: + + &prompt.root; cd /dev &prompt.root; sh MAKEDEV da1s5 &prompt.root; mount -t msdos /dev/da1s5 /dos/e - + + - -Can I mount other foreign filesystems under FreeBSD? + + + Can I mount other foreign filesystems under FreeBSD? + - Digital UNIX UFS CDROMs can be mounted directly on FreeBSD. -Mounting disk partitions from Digital UNIX and other systems -that support UFS may be more complex, depending on the details -of the disk partitioning for the operating system in question. + + Digital UNIX UFS CDROMs can + be mounted directly on FreeBSD. Mounting disk partitions from + Digital UNIX and other systems that support UFS may be more + complex, depending on the details of the disk partitioning for + the operating system in question. - Linux: 2.2 and later have support for ext2fs partitions. -See mount_ext2fs for more information. + Linux: 2.2 and later have + support for ext2fs partitions. + See mount_ext2fs + for more information. - NT: A read-only NTFS driver exists for FreeBSD. For more -information, see this tutorial by Mark Ovens at -http://ukug.uk.freebsd.org/~mark/ntfs_install.html. + NT: A read-only NTFS driver + exists for FreeBSD. For more information, see this tutorial by + Mark Ovens at + + http://ukug.uk.freebsd.org/~mark/ntfs_install.html. -Any other information on this subject would be appreciated. + Any other information on this subject would be + appreciated. - + + - -How can I use the NT loader to boot FreeBSD? + + + How can I use the NT loader to boot FreeBSD? + -This procedure is slightly different for 2.2.x and 3.x (with the -3-stage boot) systems. + + This procedure is slightly different for 2.2.x and 3.x + (with the 3-stage boot) systems. -The general idea is that you copy the first sector of your -native root FreeBSD partition into a file in the DOS/NT -partition. Assuming you name that file something like -c:\bootsect.bsd (inspired by c:\bootsect.dos), -you can then edit the c:\boot.ini file to come up with -something like this: + The general idea is that you copy the first sector of your + native root FreeBSD partition into a file in the DOS/NT + partition. Assuming you name that file something like + c:\bootsect.bsd (inspired by + c:\bootsect.dos), you can then edit the + c:\boot.ini file to come up with something + like this: -[boot loader] + [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] @@ -5143,583 +5198,666 @@ 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 -same disk. In my case DOS & NT are in the first fdisk -partition and FreeBSD is in the second. I also installed FreeBSD -to boot from its native partition, not the disk MBR. + For 2.2.x systems this procedure assumes that DOS, NT, + FreeBSD, or whatever have been installed into their respective + fdisk partitions on the same + disk. In my case DOS & NT are in the first fdisk partition + and FreeBSD is in the second. I also installed FreeBSD to boot + from its native partition, not + the disk MBR. -Mount a DOS-formatted floppy (if you've converted to NTFS) or the -FAT partition, under, say, /mnt. + Mount a DOS-formatted floppy (if you've converted to NTFS) + or the FAT partition, under, say, + /mnt. -&prompt.root; 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 -boot.ini with: + 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 boot.ini with: -C:\> 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: + Edit to add the appropriate entries from the example + boot.ini above, and restore the + attributes: -C:\> 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 -native partitions. + If FreeBSD is booting from the MBR, restore it with the DOS + fdisk command after you reconfigure them to + boot from their native partitions. -For FreeBSD 3.x systems the procedure is somewhat simpler. + For FreeBSD 3.x systems the procedure is somewhat + simpler. -If FreeBSD is installed on the same disk as the NT boot partition -simply copy /boot/boot1 to -C:\BOOTSECT.BSD However, if FreeBSD is installed -on a different disk /boot/boot1 will not work, -/boot/boot0 is needed. + If FreeBSD is installed on the same disk as the NT boot + partition simply copy /boot/boot1 to + C:\BOOTSECT.BSD However, if FreeBSD is + installed on a different disk /boot/boot1 + will not work, /boot/boot0 is needed. - - DO NOT SIMPLY COPY /boot/boot0 INSTEAD OF - /boot/boot1, YOU WILL OVERWRITE YOUR PARTITION - TABLE AND RENDER YOUR COMPUTER UN-BOOTABLE! + + DO NOT SIMPLY COPY /boot/boot0 + INSTEAD OF /boot/boot1, YOU WILL + OVERWRITE YOUR PARTITION TABLE AND RENDER YOUR COMPUTER + UN-BOOTABLE! + -/boot/boot0 needs to be installed using -sysinstall by selecting the FreeBSD boot manager on the screen which -asks if you wish to use a boot manager. This is because -/boot/boot0 has the partition table area filled -with NULL characters but sysinstall copies the partition table before -copying /boot/boot0 to the MBR. + /boot/boot0 needs to be installed using + sysinstall by selecting the FreeBSD boot manager on the + screen which asks if you wish to use a boot manager. This is + because /boot/boot0 has the partition + table area filled with NULL characters but sysinstall copies + the partition table before copying + /boot/boot0 to the MBR. -When the FreeBSD boot manager runs it records the last OS booted -by setting the active flag on the partition table entry for that OS -and then writes the whole 512-bytes of itself back to the MBR so if -you just copy /boot/boot0 to -C:\BOOTSECT.BSD then it writes an empty partition -table, with the active flag set on one entry, to the MBR. + When the FreeBSD boot manager runs it records the last + OS booted by setting the active flag on the partition table + entry for that OS and then writes the whole 512-bytes of itself + back to the MBR so if you just copy + /boot/boot0 to + C:\BOOTSECT.BSD then it writes an empty + partition table, with the active flag set on one entry, to the + MBR. - + + - - How do I boot FreeBSD and Linux from LILO? - + + + How do I boot FreeBSD and Linux from LILO? + -If you have FreeBSD and Linux on the same disk, just follow -LILO's installation instructions for booting a non-Linux operating -system. Very briefly, these are: + + If you have FreeBSD and Linux on the same disk, just follow + LILO's installation instructions for booting a non-Linux + operating system. Very briefly, these are: -Boot Linux, and add the following lines to -/etc/lilo.conf: -other=/dev/hda2 - table=/dev/hda - label=FreeBSD + Boot Linux, and add the following lines to + /etc/lilo.conf: + 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. + (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. -For example: -other=/dev/dab4 - table=/dev/dab - loader=/boot/chain.b - label=FreeBSD - + If FreeBSD resides on another disk, you need to add + loader=/boot/chain.b to the LILO entry. + For example: + 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: + 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 + 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. + On FreeBSD 2.2.5 and later, you can configure boot(8) + to automatically do this for you at boot time. -The Linux+FreeBSD mini-HOWTO is a good reference for -FreeBSD and Linux interoperability issues. + The + Linux+FreeBSD mini-HOWTO is a good reference for + FreeBSD and Linux interoperability issues. - + + - - How do I boot FreeBSD and Linux using BootEasy? - + + + How do I boot FreeBSD and Linux using BootEasy? + -Install LILO at the start of your Linux boot partition instead of -in the Master Boot Record. You can then boot LILO from BootEasy. + + Install LILO at the start of your Linux boot partition + instead of in the Master Boot Record. You can then boot LILO + from BootEasy. -If you're running Windows-95 and Linux this is recommended anyway, -to make it simpler to get Linux booting again if you should need -to reinstall Windows95 (which is a Jealous Operating System, and -will bear no other Operating Systems in the Master Boot Record). + If you're running Windows-95 and Linux this is recommended + anyway, to make it simpler to get Linux booting again if you + should need to reinstall Windows95 (which is a Jealous + Operating System, and 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), -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 -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 -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 -printed by the FreeBSD bootstrap when it can't find itself, -as well as system lockups when booting. + 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), 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. -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 -in a desire to avoid one of the most common problems plaguing -new FreeBSD installers - matching the BIOS geometry numbers -for a disk to the disk itself. + 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 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 printed by the FreeBSD bootstrap when it + can't find itself, as well as system lockups when + booting. -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. + 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 in a desire to avoid one of the most common + problems plaguing new FreeBSD installers - matching the BIOS + geometry numbers for a disk to the disk + itself. -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. + 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. -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 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 -disk units will be in the same order that FreeBSD lists your -disks, first IDE, then SCSI. + 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. -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 -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 -will sort itself out just fine with any other disks you may have. + 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 + 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 + disk units will be in the same order that FreeBSD lists your + disks, first IDE, then SCSI. -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 -when you try to boot, it's time to cross your fingers and -go for it - there's nothing left to lose. + 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 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 will sort + itself out just fine with any other disks you may have. -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 + 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 when you try to boot, it's time to cross + your fingers and go for it - there's nothing left to + lose. -&prompt.root; dd if=/dev/zero of=/dev/rda0 count=15 + 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 -Alternatively, the undocumented DOS feature + &prompt.root; dd if=/dev/zero of=/dev/rda0 count=15 -C:\> fdisk /mbr + Alternatively, the undocumented DOS + feature -will to install a new master boot record as well, thus clobbering the -BSD bootstrap. + C:\> fdisk /mbr - + will to install a new master boot record as well, thus + clobbering the BSD bootstrap. - -How can I add more swap space? + + -The best way is to increase the size of your swap partition, or -take advantage of this convenient excuse to add another disk. The -general rule of thumb is to have around 2x the swap space as you have -main memory. However, if you have a very small amount of main memory -you may want to configure swap beyond that. It is also a good idea -to configure sufficient swap relative to anticipated future memory -upgrades so you do not have to futz with your swap configuration later. + + + How can I add more swap space? + -Adding swap onto a separate disk makes things faster than -simply adding swap onto the same disk. As an example, if you -are compiling source located on one disk, and the swap is on -another disk, this is much faster than both swap and compile -on the same disk. This is true for SCSI disks specifically. + -When you have several disks, configuring a swap partition on -each one is usually beneficial, even if you wind up putting swap on a -work disk. Typically, each fast disk in your system should have some -swap configured. FreeBSD supports up to 4 interleaved swap devices by -default. When configuring multiple swap partitions you generally -want to make them all about the same size, but people sometimes make -their primary swap parition larger in order to accomodate a kernel -core dump. Your primary swap partition must be at least as large as -main memory in order to be able to accomodate a kernel core. + The best way is to increase the size of your swap partition, + or take advantage of this convenient excuse to add another + disk. The general rule of thumb is to have around 2x the swap + space as you have main memory. However, if you have a very + small amount of main memory you may want to configure swap + beyond that. It is also a good idea to configure sufficient + swap relative to anticipated future memory upgrades so you do + not have to futz with your swap configuration later. -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 -your swap on a separate drive however. The drives are so cheap, -it is not worth worrying about. + Adding swap onto a separate disk makes things faster than + simply adding swap onto the same disk. As an example, if you + are compiling source located on one disk, and the swap is on + another disk, this is much faster than both swap and compile on + the same disk. This is true for SCSI disks specifically. -Swapping over NFS is only recommended if you do not have a local -disk to swap to. Swapping over NFS is slow and inefficient in FreeBSD -releases prior to 4.x, but reasonably fast in releases greater or -equal to 4.0. Even so, it will be limited to the network bandwidth -available and puts an additional burden on the NFS server. + When you have several disks, configuring a swap partition on + each one is usually beneficial, even if you wind up putting + swap on a work disk. Typically, each fast disk in your system + should have some swap configured. FreeBSD supports up to 4 + interleaved swap devices by default. When configuring multiple + swap partitions you generally want to make them all about the + same size, but people sometimes make their primary swap + parition larger in order to accomodate a kernel core dump. Your + primary swap partition must be at least as large as main memory + in order to be able to accomodate a kernel core. -Here is an example for 64Mb vn-swap (/usr/swap0, though -of course you can use any name that you want). + 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 your swap on a separate drive however. + The drives are so cheap, it is not worth worrying about. -Make sure your kernel was built with the line + Swapping over NFS is only recommended if you do not have a + local disk to swap to. Swapping over NFS is slow and + inefficient in FreeBSD releases prior to 4.x, but reasonably + fast in releases greater or equal to 4.0. Even so, it will be + limited to the network bandwidth available and puts an + additional burden on the NFS server. -pseudo-device vn 1 #Vnode driver (turns a file into a device) + Here is an example for 64Mb vn-swap + (/usr/swap0, though of course you can use + any name that you want). -in your config-file. The GENERIC kernel already contains this. + Make sure your kernel was built with the line - - + pseudo-device vn 1 #Vnode driver (turns a file into a device) - -create a vn-device + in your config-file. The GENERIC kernel already contains + this. -&prompt.root; cd /dev + + + + create a vn-device + &prompt.root; cd /dev &prompt.root; sh MAKEDEV vn0 - + - -create a swapfile (/usr/swap0) + + create a swapfile + (/usr/swap0) -&prompt.root; 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) -&prompt.root; 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. - + - -reboot the machine - + + reboot the machine + + - - + To enable the swap file immediately, type -To enable the swap file immediately, type + &prompt.root; vnconfig -ce /dev/vn0c /usr/swap0 swap -&prompt.root; vnconfig -ce /dev/vn0c /usr/swap0 swap + + - + + + I'm having problems setting up my printer. + - -I'm having problems setting up my printer. + -Please have a look at the Handbook entry on printing. It -should cover most of your problem. See the -Handbook entry on printing. + Please have a look at the Handbook entry on printing. It + should cover most of your problem. See the + Handbook entry on printing. - + + - -The keyboard mappings are wrong for my system. + + + The keyboard mappings are wrong for my system. + -The kbdcontrol program has an option to load a keyboard map file. -Under /usr/share/syscons/keymaps are a number of map -files. Choose the one relevant to your system and load it. + + The kbdcontrol program has an option to load a keyboard + map file. Under /usr/share/syscons/keymaps + are a number of map files. Choose the one relevant to your + system and load it. -&prompt.root; kbdcontrol -l uk.iso + &prompt.root; kbdcontrol -l uk.iso -Both the /usr/share/syscons/keymaps and the .kbd -extension are assumed by -kbdcontrol. + Both the /usr/share/syscons/keymaps + and the .kbd extension are assumed by + + kbdcontrol. -This can be configured in /etc/sysconfig (or rc.conf). -See the appropriate comments in this file. + This can be configured in /etc/sysconfig + (or + rc.conf). See the appropriate comments in this + file. -In 2.0.5R and later, everything related to text fonts, keyboard -mapping is in /usr/share/examples/syscons. + In 2.0.5R and later, everything related to text fonts, + keyboard mapping is in + /usr/share/examples/syscons. -The following mappings are currently supported: + The following mappings are currently supported: - - + + + + Belgian ISO-8859-1 + - -Belgian ISO-8859-1 - + + Brazilian 275 keyboard Codepage 850 + - -Brazilian 275 keyboard Codepage 850 - + + Brazilian 275 keyboard ISO-8859-1 + - -Brazilian 275 keyboard ISO-8859-1 - + + Danish Codepage 865 + - -Danish Codepage 865 - + + Danish ISO-8859-1 + - -Danish ISO-8859-1 - + + French ISO-8859-1 + - -French ISO-8859-1 - + + German Codepage 850 + - -German Codepage 850 - + + German ISO-8859-1 + - -German ISO-8859-1 - + + Italian ISO-8859-1 + - -Italian ISO-8859-1 - + + Japanese 106 + - -Japanese 106 - + + Japanese 106x + - -Japanese 106x - + + Latin American + - -Latin American - + + Norwegian ISO-8859-1 + - -Norwegian ISO-8859-1 - + + Polish ISO-8859-2 (programmer's) + - -Polish ISO-8859-2 (programmer's) - + + Russian Codepage 866 (alternative) + - -Russian Codepage 866 (alternative) - + + Russian koi8-r (shift) + - -Russian koi8-r (shift) - + + Russian koi8-r + - -Russian koi8-r - + + Spanish ISO-8859-1 + - -Spanish ISO-8859-1 - + + Swedish Codepage 850 + - -Swedish Codepage 850 - + + Swedish ISO-8859-1 + - -Swedish ISO-8859-1 - + + Swiss-German ISO-8859-1 + - -Swiss-German ISO-8859-1 - + + United Kingdom Codepage 850 + - -United Kingdom Codepage 850 - + + United Kingdom ISO-8859-1 + - -United Kingdom ISO-8859-1 - + + United States of America ISO-8859-1 + - -United States of America ISO-8859-1 - + + United States of America dvorak + - -United States of America dvorak - + + United States of America dvorakx + + - -United States of America dvorakx - + + - - + + + I can't get user quotas to work properly. + - + - -I can't get user quotas to work properly. + + + + Don't turn on quotas on /, + - - + + Put the quota file on the file system that the quotas + are to be enforced on. ie: - -Don't turn on quotas on /, - - - - -Put the quota file on the file system that the quotas are -to be enforced on. ie: - -FS QUOTA FILE + FS QUOTA FILE /usr /usr/admin/quotas /home /home/admin/quotas -... - - +... - - + + - + + - -What's inappropriate about my ccd? + + + What's inappropriate about my ccd? + -The symptom of this is: + + The symptom of this is: -&prompt.root; ccdconfig -C + &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 -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. + This usually happens when you are trying to concatenate + the 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. - + + - -Why can't I edit the disklabel on my ccd? + + + Why can't I edit the disklabel on my ccd? + -The symptom of this is: + + The symptom of this is: -&prompt.root; disklabel ccd0 + &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 -this problem by writing it back explicitly, as in: + This is because the disklabel returned by ccd is actually + a fake one that is not really on the disk. + You can solve this problem by writing it back explicitly, + as in: -&prompt.root; disklabel ccd0 > /tmp/disklabel.tmp + &prompt.root; disklabel ccd0 > /tmp/disklabel.tmp &prompt.root; disklabel -Rr ccd0 /tmp/disklabel.tmp &prompt.root; disklabel -e ccd0 (this will work now) - + + - -Does FreeBSD support System V IPC primitives? + + + Does FreeBSD support System V IPC primitives? + -Yes, FreeBSD supports System V-style IPC. This includes shared -memory, messages and semaphores. You need to add the following -lines to your kernel config to enable them. + + Yes, FreeBSD supports System V-style IPC. This includes + shared memory, messages and semaphores. You need to add the + following lines to your kernel config to enable them. -options SYSVSHM + 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. + + + In FreeBSD 3.2 and later, these options are already + part of the GENERIC kernel, which + meansthey should already be compiled into your + system. + -Recompile and install your kernel. + Recompile and install your kernel. - + + - - How do I use sendmail for mail delivery with UUCP? - + + + How do I use sendmail for mail delivery with UUCP? + -The sendmail configuration that ships with FreeBSD is -suited for sites that connect directly to the Internet. -Sites that wish to exchange their mail via UUCP must install -another sendmail configuration file. + -Tweaking /etc/sendmail.cf manually is considered -something for purists. Sendmail version 8 comes with a -new approach of generating config files via some -m4 preprocessing, where the actual hand-crafted configuration -is on a higher abstraction level. You should use the -configuration files under + The sendmail configuration that ships with FreeBSD is + suited for sites that connect directly to the Internet. + Sites that wish to exchange their mail via UUCP must install + another sendmail configuration file. -/usr/src/usr.sbin/sendmail/cf - + Tweaking /etc/sendmail.cf manually is + considered something for purists. Sendmail version 8 comes with + a new approach of generating config files via some m4 + preprocessing, where the actual hand-crafted configuration is + on a higher abstraction level. You should use the configuration + files under + /usr/src/usr.sbin/sendmail/cf -If you didn't install your system with full sources, the sendmail -config stuff has been broken out into a separate source distribution -tarball just for you. Assuming you've got your CD-ROM mounted, do: + If you didn't install your system with full sources, + the sendmail config stuff has been broken out into a separate + source distribution tarball just for you. Assuming you've got + your CD-ROM mounted, do: - &prompt.root; cd /cdrom/src + &prompt.root; cd /cdrom/src &prompt.root; cat scontrib.?? | tar xzf - -C /usr/src contrib/sendmail -Don't panic, this is only a few hundred kilobytes in size. -The file README in the cf directory can -serve as a basic introduction to m4 configuration. + Don't panic, this is only a few hundred kilobytes in size. + The file README in the + cf directory can serve as a basic + introduction to m4 configuration. -For UUCP delivery, you are best advised to use the -mailertable feature. This constitutes a database -that sendmail can use to base its routing decision upon. + For UUCP delivery, you are best advised to use the + mailertable feature. This constitutes a + database that sendmail can use to base its routing decision + upon. -First, you have to create your .mc file. The -directory /usr/src/usr.sbin/sendmail/cf/cf is the -home of these files. Look around, there are already a few -examples. Assuming you have named your file foo.mc, -all you need to do in order to convert it into a valid -sendmail.cf is: + First, you have to create your .mc + file. The directory + /usr/src/usr.sbin/sendmail/cf/cf is the + home of these files. Look around, there are already a few + examples. Assuming you have named your file + foo.mc, all you need to do in order to + convert it into a valid sendmail.cf + is: - + &prompt.root; cd /usr/src/usr.sbin/sendmail/cf/cf &prompt.root; make foo.cf -&prompt.root; cp foo.cf /etc/sendmail.cf - +&prompt.root; cp foo.cf /etc/sendmail.cf -A typical .mc file might look like: + A typical .mc file might look + like: -include(`../m4/cf.m4') + include(`../m4/cf.m4') VERSIONID(`Your version number') OSTYPE(bsd4.4) @@ -5737,18 +5875,19 @@ MAILER(uucp) Cw your.alias.host.name 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, -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. + The nodns and + nocanonify features will prevent any usage + of the DNS during mail delivery. The + 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. -Once you've got this, you need this file called -/etc/mailertable. A typical example of this -gender again: + Once you've got this, you need this file called + /etc/mailertable. A typical example of + this gender again: -# + # # makemap hash /etc/mailertable.db < /etc/mailertable # horus.interface-business.de uucp-dom:horus @@ -5760,39 +5899,40 @@ if-bus.UUCP uucp-dom:if-bus . uucp-dom: -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 -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 -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 -the node names behind the uucp-dom: keyword must -be valid UUCP neighbors, as you can verify using the -command uuname. + 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 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 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 the node names behind the + uucp-dom: keyword must be valid UUCP + neighbors, as you can verify using the command + uuname. -As a reminder that this file needs to be converted into a -DBM database file before being usable, the command line to -accomplish this is best placed as a comment at the top of -the mailertable. You always have to execute this command -each time you change your mailertable. + As a reminder that this file needs to be converted into a + DBM database file before being usable, the command line to + accomplish this is best placed as a comment at the top of + the mailertable. You always have to execute this command + 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 -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 -this mode by typing Control-D. + 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 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 this mode by typing + Control-D. - &prompt.user; sendmail -bt + &prompt.user; sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > 0 foo@interface-business.de @@ -5803,60 +5943,78 @@ rewrite: ruleset 0 returns: $# uucp-dom $@ if-bus $: foo \ > ^D - + + - - How do I set up mail with a dialup connection to the 'net? + + + How do I set up mail with a dialup connection to the + 'net? + - + + If you've got a statically assigned IP number, you should + not need to adjust anything from the default. Set your host + name up as your assigned internet name and sendmail will do + the rest. -If you've got a statically assigned IP number, you should not -need to adjust anything from the default. Set your host name up -as your assigned internet name and sendmail will do the rest. + If you've got a dynamically assigned IP number and use a + dialup ppp connection to the + internet, you will probably be given a mailbox on your ISPs + mail server. Lets assume your ISPs domain is + myISP.com, and that your user name is + user. Lets also assume you've + called your machine bsd.home and that your + ISP has told you that you may use + relay.myISP.com as a mail relay. -If you've got a dynamically assigned IP number and use a dialup -ppp connection to the internet, you will probably be given a -mailbox on your ISPs mail server. Lets assume your ISPs domain is -myISP.com, and that your user name is user. Lets also -assume you've called your machine bsd.home and that your ISP -has told you that you may use relay.myISP.com as a mail relay. + In order to retrieve mail from your mailbox, you'll need + to install a retrieval agent. Fetchmail is a good choice as it supports + many different protocols. Usually, POP3 will be provided 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: -In order to retrieve mail from your mailbox, you'll need to -install a retrieval agent. Fetchmail is a good choice as it -supports many different protocols. Usually, POP3 will be provided -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: + MYADDR: !bg su user -c fetchmail -If you are using sendmail (as shown below) to deliver mail to -non-local accounts, put the command + 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. + after the above shown entry. This forces sendmail to + process your mailqueue as soon as the connection to the 'net + is established. -I'm assuming that you have an account for user on bsd.home. -In the home directory of user on bsd.home, create a -.fetchmailrc file: + I'm assuming that you have an account for + user on + bsd.home. 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. + Needless to say, this file should not be readable by + anyone except user as it contains + the password MySecret. -In order to send mail with the correct from: header, you must -tell sendmail to use user@myISP.com rather than -user@bsd.home. You may also wish to tell sendmail to send all -mail via relay.myISP.com, allowing quicker mail transmission. + In order to send mail with the correct + from: header, you must tell + sendmail to use user@myISP.com rather than + user@bsd.home. You may also wish to tell + sendmail to send all mail via + relay.myISP.com, allowing quicker mail + transmission. -The following .mc file should suffice: + The following .mc file should + suffice: -VERSIONID(`bsd.home.mc version 1.0') + VERSIONID(`bsd.home.mc version 1.0') OSTYPE(bsd4.4)dnl FEATURE(nouucp)dnl MAILER(local)dnl @@ -5873,617 +6031,690 @@ 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 -restart sendmail after updating sendmail.cf. + Refer to the previous section for details of how to turn + this .mc file into a + sendmail.cf file. Also, don't forget to + restart sendmail after updating sendmail.cf. - + + - -Eek! I forgot the root password! + + + Eek! I forgot the root password! + -Don't Panic! Simply restart the system, type boot -s -at the Boot: prompt (just -s for FreeBSD releases before 3.2) -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 -to continue booting. + Don't Panic! Simply restart the system, type + boot -s at the Boot: prompt (just + -s for FreeBSD releases before 3.2) 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 to continue + booting. - + + - -How do I keep Control-Alt-Delete from rebooting the system? - + + + How do I keep Control-Alt-Delete from rebooting the + system? + -If you are using syscons (the default console driver) -in FreeBSD 2.2.7-RELEASE or later, -build and install a new kernel with the line + -options SC_DISABLE_REBOOT + If you are using syscons (the default console driver) + in FreeBSD 2.2.7-RELEASE or later, + build and install a new kernel with the line -in the configuration file. -If you use the PCVT console driver -in FreeBSD 2.2.5-RELEASE or later, -use the following kernel configuration line instead: + options SC_DISABLE_REBOOT -options PCVT_CTRL_ALT_DEL + in the configuration file. If you use the PCVT console + driver in FreeBSD 2.2.5-RELEASE or later, use the following + kernel configuration line instead: -For older versions of FreeBSD, -edit the keymap you are using for the console and replace the -boot keywords with nop. The default keymap is -/usr/share/syscons/keymaps/us.iso.kbd. You may have to instruct -/etc/rc.conf to load this keymap explicitly for the change to -take effect. Of course if you are using an alternate keymap for your -country, you should edit that one instead. + options PCVT_CTRL_ALT_DEL - + For older versions of FreeBSD, edit the keymap you are + using for the console and replace the boot + keywords with nop. The default keymap is + /usr/share/syscons/keymaps/us.iso.kbd. You + may have to instruct /etc/rc.conf to load + this keymap explicitly for the change to take effect. Of course + if you are using an alternate keymap for your country, you + should edit that one instead. - -How do I reformat DOS text files to UNIX ones? + + -Simply use this perl command: + + + How do I reformat DOS text files to UNIX ones? + -&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. + Simply use this perl command: -Alternatively you can use the tr command: + &prompt.user; perl -i.bak -npe 's/\r\n/\n/g' file ... -&prompt.user; tr -d '\r' < dos-text-file > unix-file + file is the file(s) to process. The modification is done + in-place, with the original file stored with a .bak + extension. -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. + Alternatively you can use the tr + command: - + &prompt.user; tr -d '\r' < dos-text-file > unix-file - -How do I kill processes by name? + 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. -Use killall. + + - + + + How do I kill processes by name? + - -Why is su bugging me about not being in root's ACL? - + Use + killall. -The error comes from the Kerberos distributed authentication system. -The problem isn't fatal but annoying. You can either run su with the -K -option, or uninstall Kerberos as described in the next question. + + - + + + Why is su bugging me about not being in root's ACL? + - -How do I uninstall Kerberos? + -To remove Kerberos from the system, reinstall the bin distribution -for the release you are running. If you have the CDROM, you can -mount the cd (we'll assume on /cdrom) and run + The error comes from the Kerberos distributed + authentication system. The problem isn't fatal but annoying. + You can either run su with the -K option, or uninstall + Kerberos as described in the next question. -&prompt.root; cd /cdrom/bin + + + + + + How do I uninstall Kerberos? + + + + + To remove Kerberos from the system, reinstall the bin + distribution for the release you are running. If you have + the CDROM, you can mount the cd (we'll assume on /cdrom) + and run + + &prompt.root; cd /cdrom/bin &prompt.root; ./install.sh - + + - -How do I add pseudoterminals to the system? + + + How do I add pseudoterminals to the system? + -If you have lots of telnet, ssh, X, or screen users, you'll probably run -out of pseudoterminals. Here's how to add more: + - - + If you have lots of telnet, ssh, X, or screen users, + you'll probably run 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. + in the configuration file. + - + + Run the commands - -Run the commands - -&prompt.root; cd /dev + &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. + 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 + + 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 -ttyqc none network + ttyqc none network -The order of the letter designations is tty[pqrsPQRS][0-9a-v], -using a regular expression. + The order of the letter designations is + tty[pqrsPQRS][0-9a-v], using a + regular expression. + - + + Reboot the system with the new kernel and you're + ready to go. + + - -Reboot the system with the new kernel and you're ready to go. - + + - - + + + I can't create the snd0 device! + - + + There is no snd device. The name + is used as a shorthand for the various devices that make up the + FreeBSD sound driver, such as mixer, + sequencer, and + dsp. - -I can't create the snd0 device! + To create these devices you should - There is no snd device. The name is - used as a shorthand for the various devices that make up the - FreeBSD sound driver, such as mixer, - sequencer, and - dsp. - - To create these devices you should - - &prompt.root; cd /dev + &prompt.root; cd /dev &prompt.root; sh MAKEDEV snd0 - - -How do I re-read /etc/rc.conf and re-start /etc/rc without - a reboot? + + -Go into single user mode and than back to multi user mode. + + + How do I re-read /etc/rc.conf and re-start /etc/rc without + a reboot? + -On the console do: + -&prompt.root; shutdown now + Go into single user mode and than back to multi user + mode. + + On the console do: + + &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: - - - - - - -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 -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 -/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 -who has successfully hacked into the system via ntalk from -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 -someone who is able to break into the process may believe -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 -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 -filesystem. The process may believe it is able to write -to those files, but only the process sees the effects -- other processes in the system do not, necessarily. - -An attempt is made to make this sort of sandbox so -transparent that the user (or hacker) does not realize -that he is sitting in it. - - - - - -UNIX implements two core sanboxes. One is at the process -level, and one is at the userid level. - -Every UNIX process is completely firewalled off from every -other UNIX process. One process can not modify the address space -of another. This is unlike Windows where a process can easily -overwrite the address space of any other, leading to a crash. - -A UNIX process is owned by a patricular userid. If the -userid is not the root user, it serves to firewall the process -off from processes owned by other users. The userid is also -used to firewall off on-disk data. - - - - - - How do I let ordinary users mount floppies and other removable - media? - - - - Ordinary users can be permitted to mount devices. Here is - how: - - - - As root assign the appropriate - permissions to the block device associated with the removable - media. - - For example, to allow users to mount the first floppy - drive, use: - - &prompt.root; chmod 777 /dev/fd0 - - - - As root set the sysctl variable - vfs.usermount to - 1. - - &prompt.root; sysctl -w vfs.usermount=1 - - - - Users can now mount /dev/fd0 onto a - directory that they own: - - &prompt.user; mkdir ~/my-mount-point -&prompt.user; mount -t msdos /dev/fd0 ~/my-mount-point - - Unmounting the device is simple: - - &prompt.user; umount ~/my-mount-point - - Enabling vfs.usermount, however, has - negative security implications. A better way to access MSDOS - formatted media is to use the - mtools package in the ports collection. - + - - How do I move my system over to my huge new disk? - + + What is a sandbox? + - - The best way is to reinstall the OS on the new - disk, then move the user data over. This is highly - recommended if you've been tracking -stable for more - than one release, or have updated a release instead of - installing a new one. You can install booteasy on both - disks with &man.boot0cfg.8;, and dual boot them until - you are happy with the new configuration. Skip the - next paragraph to find out how to move the data after - doing this. + Sandbox is a security term. It can mean + two things: - Should you decide not to do a fresh install, you - need to partition and label the new disk with either - /stand/sysinstall, or &man.fdisk.8; - and &man.disklabel.8;. You should also install booteasy - on both disks with &man.boot0cfg.8;, so that you can - dual boot to the old or new system after the copying - is done. See the formatting-media - tutorial for details on this process. + + + - Now you've got the new disk set up, and are ready - to move the data. Unfortunately, you can't just blindly - copy the data. Things like device files (in - /dev) and symbolic links tend to - screw that up. You need to use tools that understand - these things, which means &man.dump.8; and &man.tar.1;. - I recommend doing the data moves in single user mode, - but it's not required. + 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. - You should never use anything but &man.dump.8; and - &man.restore.8; to move the root file system. The - &man.tar.1; command may work - then again, it may not. - You should also use &man.dump.8; and &man.restore.8; - if you are moving a single partition to another empty - partition. The sequence of steps to use dump to move - a partitions data to a new partition is: + 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. - - - newfs the new partition. - + The walls might be a userid, for example. This is + the definition used in the security and named man + pages. - - mount it on a temporary mount point. - + 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 who has successfully hacked into the system via + ntalk from being able to hack beyond that user id. + - - cd to that directory. - + - - dump the old partition, piping output to the - new one. - - + A process which is placed inside a simulation of the + machine. This is more hard-core. Basically it means that + someone who is able to break into the process may believe + 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. - For example, if you are going to move root to - /dev/ad1s1a, with - /mnt as the temporary mount point, - it's: + 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 + system). - &prompt.root; newfs /dev/ad1s1a + 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 filesystem. The process may believe it is + able to write to those files, but only the process sees + the effects - other processes in the system do not, + necessarily. + + An attempt is made to make this sort of sandbox so + transparent that the user (or hacker) does not realize + that he is sitting in it. + + + + UNIX implements two core sanboxes. One is at the + process level, and one is at the userid level. + + Every UNIX process is completely firewalled off from every + other UNIX process. One process can not modify the address + space of another. This is unlike Windows where a process + can easily overwrite the address space of any other, leading + to a crash. + + A UNIX process is owned by a patricular userid. If the + userid is not the root user, it serves to firewall the process + off from processes owned by other users. The userid is also + used to firewall off on-disk data. + + + + + + + How do I let ordinary users mount floppies and other removable + media? + + + + Ordinary users can be permitted to mount devices. Here is + how: + + + + As root assign the appropriate + permissions to the block device associated with the + removable media. + + For example, to allow users to mount the first floppy + drive, use: + + &prompt.root; chmod 777 /dev/fd0 + + + + As root set the sysctl variable + vfs.usermount to + 1. + + &prompt.root; sysctl -w vfs.usermount=1 + + + + Users can now mount /dev/fd0 onto a + directory that they own: + + &prompt.user; mkdir ~/my-mount-point +&prompt.user; mount -t msdos /dev/fd0 ~/my-mount-point + + Unmounting the device is simple: + + &prompt.user; umount ~/my-mount-point + + Enabling vfs.usermount, however, has + negative security implications. A better way to access MSDOS + formatted media is to use the mtools + package in the ports collection. + + + + + + How do I move my system over to my huge new disk? + + + + The best way is to reinstall the OS on the new + disk, then move the user data over. This is highly + recommended if you've been tracking -stable for more + than one release, or have updated a release instead of + installing a new one. You can install booteasy on both + disks with &man.boot0cfg.8;, and dual boot them until + you are happy with the new configuration. Skip the + next paragraph to find out how to move the data after + doing this. + + Should you decide not to do a fresh install, you + need to partition and label the new disk with either + /stand/sysinstall, or &man.fdisk.8; + and &man.disklabel.8;. You should also install booteasy + on both disks with &man.boot0cfg.8;, so that you can + dual boot to the old or new system after the copying + is done. See the + formatting-media tutorial for details on this + process. + + Now you've got the new disk set up, and are ready + to move the data. Unfortunately, you can't just blindly + copy the data. Things like device files (in + /dev) and symbolic links tend to + screw that up. You need to use tools that understand + these things, which means &man.dump.8; and &man.tar.1;. + I recommend doing the data moves in single user mode, + but it's not required. + + You should never use anything but &man.dump.8; and + &man.restore.8; to move the root file system. The + &man.tar.1; command may work - then again, it may not. + You should also use &man.dump.8; and &man.restore.8; + if you are moving a single partition to another empty + partition. The sequence of steps to use dump to move + a partitions data to a new partition is: + + + + newfs the new partition. + + + + mount it on a temporary mount point. + + + + cd to that directory. + + + + dump the old partition, piping output to the + new one. + + + + For example, if you are going to move root to + /dev/ad1s1a, with + /mnt as the temporary mount point, + it's: + + &prompt.root; newfs /dev/ad1s1a &prompt.root; mount /dev/ad1s1a &prompt.root; cd /mnt &prompt.root; dump 0uaf - / | restore xf - - If you are going to rearrange your partitions - - say, splitting one into two, or combing two into one, - you may find yourself needing to move everything under - a subdirectory to a new location. Since &man.dump.8; - works with file systems, it can't do this. So you use - &man.tar.1;. The general command to move - /old to /new - for &man.tar.1; is: + If you are going to rearrange your partitions - + say, splitting one into two, or combing two into one, + you may find yourself needing to move everything under + a subdirectory to a new location. Since &man.dump.8; + works with file systems, it can't do this. So you use + &man.tar.1;. The general command to move + /old to /new + for &man.tar.1; is: - &prompt.root; (cd /old; tar cf - .) | (cd /new; tar xpf -) + &prompt.root; (cd /old; tar cf - .) | (cd /new; tar xpf -) - If /old has file systems - mounted on that, and you - don't want to move that data or unmount them, you just - add the 'l' flag to the first &man.tar.1;: + If /old has file systems + mounted on that, and you + don't want to move that data or unmount them, you just + add the 'l' flag to the first &man.tar.1;: - &prompt.root; (cd /old; tar clf - .) | (cd /new; tar xpf -). + &prompt.root; (cd /old; tar clf - .) | (cd /new; tar xpf -). - You might prefer cpio(1), pax(1) or cpdup - (in ports/sysutils/cpdup) to tar. + You might prefer cpio(1), pax(1) or cpdup + (in ports/sysutils/cpdup) to tar. - + + + + + + + The X Window System and Virtual Consoles + + + + + I want to run X, how do I go about it? + + + + + The easiest way is to simply specify that you want to + run X during the installation process. + + Then read and follow the documentation on the + xf86config tool, which assists you in configuring + XFree86(tm) for your particular graphics card/mouse/etc. + + You may also wish to investigate the Xaccel server. + See the section on Xi Graphics or + Metro Link for more details. + + - - + + + Why doesn't my mouse work with X? + - -The X Window System and Virtual Consoles + + 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 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, see + and set up + moused. - -I want to run X, how do I go about it? + Then edit /etc/XF86Config and make + sure you have the following lines. -The easiest way is to simply specify that you want to run X -during the installation process. - -Then read and follow the documentation on the xf86config tool, which assists you in configuring XFree86(tm) -for your particular graphics card/mouse/etc. - -You may also wish to investigate the Xaccel server. -See the section on Xi Graphics or -Metro Link for more details. - - - - -Why doesn't my mouse work with X? - -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 -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, -see and set up moused. - - Then edit /etc/XF86Config and make sure you - have the following lines. - - -Section Pointer -Protocol "SysMouse" -Device "/dev/sysmouse" + +Section Pointer +Protocol "SysMouse" +Device "/dev/sysmouse" ..... -The above example is for XFree86 3.3.2 or later. For earlier -versions, the Protocol should be -MouseSystems. + The above example is for XFree86 3.3.2 or later. For + earlier 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 -/dev/sysmouse: + Some people prefer to use /dev/mouse + under X. To make this work, /dev/mouse + should be linked to + /dev/sysmouse: -&prompt.root; cd /dev + &prompt.root; cd /dev &prompt.root; rm -f mouse &prompt.root; ln -s sysmouse mouse - + + - - - My mouse has a fancy wheel. Can I use it in X? - + + + My mouse has a fancy wheel. Can I use it in X? + - - Yes. But you need to customize X client programs. See Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/). + + Yes. But you need to customize X client programs. See + Colas Nahaboo's web page + (http://www.inria.fr/koala/colas/mouse-wheel-scroll/) + . - If you want to use the - imwheel program, just follow - these simple steps. + If you want to use the imwheel + program, just follow these simple steps. - - - Translate the Wheel Events + + + Translate the Wheel Events - The imwheel program - works by translating mouse button 4 and mouse button 5 - events into key events. Thus, you have to get the - mouse driver to translate mouse wheel events to button - 4 and 5 events. There are two ways of doing this, the - first way is to have &man.moused.8; do the - translation. The second way is for the X server - itself to do the event translation. + The imwheel program + works by translating mouse button 4 and mouse button 5 + events into key events. Thus, you have to get the + mouse driver to translate mouse wheel events to button + 4 and 5 events. There are two ways of doing this, the + first way is to have &man.moused.8; do the + translation. The second way is for the X server + itself to do the event translation. - - - Using &man.moused.8; to Translate Wheel - Events + + + Using &man.moused.8; to Translate Wheel + Events - To have &man.moused.8; perform the event - translations, simply add to - the command line used to start &man.moused.8;. - For example, if you normally start &man.moused.8; - via moused -p /dev/psm0 you - would start it by entering moused -p - /dev/psm0 -z 4 instead. If you start - &man.moused.8; automatically during bootup via - /etc/rc.conf, you can simply - add to the - moused_flags variable in - /etc/rc.conf. + To have &man.moused.8; perform the event + translations, simply add to + the command line used to start &man.moused.8;. + For example, if you normally start &man.moused.8; + via moused -p /dev/psm0 you + would start it by entering moused -p + /dev/psm0 -z 4 instead. If you start + &man.moused.8; automatically during bootup via + /etc/rc.conf, you can simply + add to the + moused_flags variable in + /etc/rc.conf. - You now need to tell X that you have a 5 - button mouse. To do this, simply add the line - Buttons 5 to the - Pointer section of - /etc/XF86Config. For - example, you might have the following - Pointer section in - /etc/XF86Config. + You now need to tell X that you have a 5 + button mouse. To do this, simply add the line + Buttons 5 to the + Pointer section of + /etc/XF86Config. For + example, you might have the following + Pointer section in + /etc/XF86Config. - - <quote>Pointer</quote> Section for Wheeled - Mouse in XF86Config with moused - Translation + + <quote>Pointer</quote> Section for Wheeled + Mouse in XF86Config with moused Translation - Section "Pointer" + Section "Pointer" Protocol "SysMouse" Device "/dev/sysmouse" Buttons 5 EndSection - - - + + + - - Using Your X Server to Translate the Wheel - Events + + Using Your X Server to Translate the Wheel + Events - If you aren't running &man.moused.8;, or if - you don't want &man.moused.8; to translate your - wheel events, you can have the X server do the - event translation instead. This requires a couple - of modifications to your - /etc/XF86Config file. First, - you need to choose the proper protocol for your - mouse. Most wheeled mice use the - IntelliMouse protocol. However, - XFree86 does support other protocols, such as - MouseManPlusPS/2 for the Logitech - MouseMan+ mice. Once you have chosen the protocol - you will use, you need to add a - Protocol line to the - Pointer section. + If you aren't running &man.moused.8;, or if + you don't want &man.moused.8; to translate your + wheel events, you can have the X server do the + event translation instead. This requires a couple + of modifications to your + /etc/XF86Config file. First, + you need to choose the proper protocol for your + mouse. Most wheeled mice use the + IntelliMouse protocol. However, + XFree86 does support other protocols, such as + MouseManPlusPS/2 for the Logitech + MouseMan+ mice. Once you have chosen the protocol + you will use, you need to add a + Protocol line to the + Pointer section. - Secondly, you need to tell the X server to - remap wheel scroll events to mouse buttons 4 and - 5. This is done with the - ZAxisMapping option. + Secondly, you need to tell the X server to + remap wheel scroll events to mouse buttons 4 and + 5. This is done with the + ZAxisMapping option. - For example, if you aren't using - &man.moused.8;, and you have an IntelliMouse - attached to the PS/2 mouse port you would use - the following in - /etc/XF86Config. + For example, if you aren't using + &man.moused.8;, and you have an IntelliMouse + attached to the PS/2 mouse port you would use + the following in + /etc/XF86Config. - - <quote>Pointer</quote> Section for Wheeled - Mouse in <filename>XF86Config</filename> with X - Server Translation + + <quote>Pointer</quote> Section for Wheeled + Mouse in <filename>XF86Config</filename> with X + Server Translation - Section "Pointer" + Section "Pointer" Protocol "IntelliMouse" Device "/dev/psm0" ZAxisMapping 4 5 EndSection - - - - - + + + + + - - Install imwheel + + Install imwheel - Next, install imwheel - from the Ports collection. It can be found in the - x11 category. This program will - map the wheel events from your mouse into keyboard - events. For example, it might send Page - Up to a program when you scroll the wheel - forwards. Imwheel uses a - configuration file to map the wheel events to - keypresses so that it can send different keys to - different applications. The default - imwheel configuration file - is installed in - /usr/X11R6/etc/imwheelrc. You - can copy it to ~/.imwheelrc and - then edit it if you wish to customize - imwheel's configuration. - The format of the configuration file is documented in - &man.imwheel.1;. - + Next, install imwheel + from the Ports collection. It can be found in the + x11 category. This program will + map the wheel events from your mouse into keyboard + events. For example, it might send Page + Up to a program when you scroll the wheel + forwards. Imwheel uses a + configuration file to map the wheel events to + keypresses so that it can send different keys to + different applications. The default + imwheel configuration file + is installed in + /usr/X11R6/etc/imwheelrc. You + can copy it to ~/.imwheelrc and + then edit it if you wish to customize + imwheel's configuration. + The format of the configuration file is documented in + &man.imwheel.1;. + - - Configure Emacs to Work - with Imwheel - (optional) + + Configure Emacs to Work + with Imwheel + (optional) - If you use emacs or - Xemacs, then you need to - add a small section to your - ~/.emacs file. For - emacs, add the - following: + If you use emacs or + Xemacs, then you need to + add a small section to your + ~/.emacs file. For + emacs, add the + following: - - <application>Emacs</application> Configuration - for <application>Imwheel</application> + + <application>Emacs</application> Configuration + for <application>Imwheel</application> - ;;; For imwheel + ;;; For imwheel (setq imwheel-scroll-interval 3) (defun imwheel-scroll-down-some-lines () (interactive) @@ -6494,18 +6725,18 @@ EndSection (global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines) (global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines) ;;; end imwheel section - - + + - For Xemacs, add the - following to your ~/.emacs file - instead: + For Xemacs, add the + following to your ~/.emacs file + instead: - - <application>Xemacs</application> Configuration - for <application>Imwheel</application> + + <application>Xemacs</application> Configuration + for <application>Imwheel</application> - ;;; For imwheel + ;;; For imwheel (setq imwheel-scroll-interval 3) (defun imwheel-scroll-down-some-lines () (interactive) @@ -6516,73 +6747,83 @@ EndSection (define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines) (define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines) ;;; end imwheel section - - - + + + - - Run Imwheel + + Run Imwheel - You can just type imwheel - in an xterm to start it up once it is installed. It - will background itself and take effect immediately. - If you want to always use - imwheel, simply add it to - your .xinitrc or - .xsession file. You can safely - ignore any warnings imwheel - displays about PID files. Those warnings only apply - to the Linux version of - imwheel. - - - - + You can just type imwheel + in an xterm to start it up once it is installed. It + will background itself and take effect immediately. + If you want to always use + imwheel, simply add it to + your .xinitrc or + .xsession file. You can safely + ignore any warnings imwheel + displays about PID files. Those warnings only apply + to the Linux version of + imwheel. + + + + - -X Window menus and dialog boxes don't work right! + + + X Window menus and dialog boxes don't work right! + -Try turning off the Num Lock key. + + 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. + 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. -# Let the server do the NumLock processing. This should only be + # Let the server do the NumLock processing. This should only be # required when using pre-R6 clients ServerNumLock - + + - -What is a virtual console and how do I make more? + + + What is a virtual console and how do I make more? + -Virtual consoles, put simply, enable you to have several -simultaneous sessions on the same machine without doing anything -complicated like setting up a network or running X. + + Virtual consoles, put simply, enable you to have several + simultaneous sessions on the same machine without doing anything + complicated like setting up a network or running X. -When the system starts, it will display a login prompt on -the monitor after displaying all the boot messages. You can -then type in your login name and password and start working (or -playing!) on the first virtual console. + When the system starts, it will display a login prompt on + the monitor after displaying all the boot messages. You can + then type in your login name and password and start working (or + playing!) on the first virtual console. -At some point, you will probably wish to start another -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 -want to go back to the original session, do Alt-F1. + At some point, you will probably wish to start another + 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 want to go back to the original session, do + Alt-F1. -The default FreeBSD installation has three virtual consoles -enabled (8 starting with 3.3-RELEASE), and Alt-F1, Alt-F2, and -Alt-F3 will switch between these virtual consoles. + The default FreeBSD installation has three virtual consoles + 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: + To enable more of them, edit /etc/ttys + and add entries for ttyv4 + to ttyvc after the comment on + Virtual terminals: -# Edit the existing entry for ttyv3 in /etc/ttys and change + # 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 @@ -6594,411 +6835,486 @@ 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. + 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. -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 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. + -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: + 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: + 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: + 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 -(You could also just delete these lines.) + (You could also just delete these lines.) -Once you have edited /etc/ttys, -the next step is to make sure that you have enough virtual terminal -devices. The easiest way to do this is: + Once you have edited + /etc/ttys, the next step is to make sure that you + have enough virtualterminal devices. The easiest way to do + this is: -&prompt.root; cd /dev + &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): + 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): -&prompt.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 -will probably appear to hang/lock up after executing the kill -command. + It's imperative that you completely shut down X Window if + it is running, before running this command. If you don't, + your system will probably appear to hang/lock up after + executing the kill command. - + + - -How do I access the virtual consoles from X? + + + How do I access the virtual consoles from X? + -If the console is currently displaying X Window, you can use -Ctrl-Alt-F1, etc. to switch to a virtual console. Note, however, -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 -mode. Tap the control key to wake it up again. + - + If the console is currently displaying X Window, you can + use Ctrl-Alt-F1, etc. to switch to a virtual console. Note, + however, 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 mode. Tap the + control key to wake it up again. - -How do I start XDM on boot? + + -There are two schools of thought on how to start xdm. One school starts xdm from -/etc/ttys using the supplied example, while the other -simply runs xdm from rc.local or -from a X.sh script in /usr/local/etc/rc.d. -Both are equally valid, and one may work in -situations where the other doesn't. In both cases the result is the -same: X will popup a graphical login: prompt. + + + How do I start XDM on boot? + -The ttys method has the advantage -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. + There are two schools of thought on how to start + xdm. One school starts xdm from /etc/ttys + using the supplied example, while the other simply runs xdm + from rc.local + or from a X.sh script in + /usr/local/etc/rc.d. Both are equally + valid, and one may work in situations where the other doesn't. + In both cases the result is the same: X will popup a graphical + login: prompt. -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 -launch xdm. + The ttys method has the advantage 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 you are to start xdm from - /etc/ttys, there still is a chance of conflict - between xdm and getty. One way to - avoid this is to add the vt number in the - /usr/X11R6/lib/X11/xdm/Xservers file. + 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 launch xdm. -:0 local /usr/X11R6/bin/X vt4 + If you are to start xdm from + /etc/ttys, there still is a chance of + conflict between xdm and + getty. One way to avoid this is to add the + vt number in the + /usr/X11R6/lib/X11/xdm/Xservers + file. -The above example will direct the X server to run in - /dev/ttyv3. Note the number is offset by one. The - X server counts the vty from one, whereas the FreeBSD kernel numbers the - vty from zero. + :0 local /usr/X11R6/bin/X vt4 - + The above example will direct the X server to run in + /dev/ttyv3. Note the number is offset by + one. The X server counts the vty from one, whereas the FreeBSD + kernel numbers the vty from zero. - -When I run xconsole, I get Couldn't open console. + + -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. + + + When I run xconsole, I get + Couldn't open console. + -This is because of the way console permissions are set by default. -On a multi-user system, one doesn't necessarily want just any user -to be able to write on the system console. For users who are logging -directly onto a machine with a VTY, the -fbtab -file exists to solve such problems. + + If you start X + with + startx, the permissions on + /dev/console will + not get changed, resulting in + things like + xterm -C and + xconsolenot working. -In a nutshell, make sure an uncommented line of the form + This is because of the way console permissions are set + by default. On a multi-user system, one doesn't necessarily + want just any user to be able to write on the system console. + For users who are logging directly onto a machine with a VTY, + the fbtab + file exists to solve such problems. -/dev/ttyv0 0600 /dev/console + In a nutshell, make sure an uncommented line of the + form -is in /etc/fbtab and it will ensure that whomever logs in on -/dev/ttyv0 will own the 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. - -My PS/2 mouse doesn't behave properly under X. + + -Your mouse and the mouse driver may have somewhat become out of -synchronization. + + + My PS/2 mouse doesn't behave properly under X. + -In versions 2.2.5 and earlier, switching away from X to a -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. + + Your mouse and the mouse driver may have somewhat become + out of synchronization. -options PSM_CHECKSYNC + In versions 2.2.5 and earlier, switching away from X to a + 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. -See the section on building a kernel -if you've no experience with building kernels. + options PSM_CHECKSYNC -With this option, there should be less chance of synchronization -problem between the mouse and the driver. If, however, you -still see the problem, click any mouse button while holding -the mouse still to re-synchronize the mouse and the driver. + See the section on building + a kernel if you've no experience with building + kernels. -Note that unfortunately this option may not work with all the -systems and voids the tap feature of the ALPS GlidePoint -device attached to the PS/2 mouse port. + With this option, there should be less chance of + synchronization problem between the mouse and the driver. + If, however, you still see the problem, click any mouse + button while holding the mouse still to re-synchronize the + mouse and the driver. -In versions 2.2.6 and later, synchronization check is done -in a slightly better way and is standard in the PS/2 mouse driver. -It should even work with GlidePoint. (As the check code has become -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: + Note that unfortunately this option may not work with all + the systems and voids the tap feature of the + ALPS GlidePoint device attached to the PS/2 mouse port. -psmintr: out of sync (xxxx != yyyy) + In versions 2.2.6 and later, synchronization check is done + in a slightly better way and is standard in the PS/2 mouse + driver. It should even work with GlidePoint. (As the check code + has become 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: -and find your mouse doesn't seem to work properly. + psmintr: out of sync (xxxx != yyyy) -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 -at the boot prompt: + and find your mouse doesn't seem to work properly. -boot: -c + 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 at the boot prompt: -Then, in the UserConfig command line, type: + boot: -c -UserConfig> flags psm0 0x100 + Then, in the UserConfig command + line, type: + + UserConfig> flags psm0 0x100 UserConfig> quit - + + - -My PS/2 mouse from MouseSystems doesn't seem to work. + + + 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 -mode. Otherwise, the mouse cursor may jump to the upper-left -corner of the screen every so often. + + There have been some reports that certain model of PS/2 + mouse 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. -Unfortunately there is no workaround for versions 2.0.X and -2.1.X. In versions 2.2 through 2.2.5, apply the following patch -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. + Unfortunately there is no workaround for versions 2.0.X + and 2.1.X. In versions 2.2 through 2.2.5, apply the following + patch 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. -@@ -766,6 +766,8 @@ + @@ -766,6 +766,8 @@ if (verbose >= 2) - log(LOG_DEBUG, "psm%d: SET_DEFAULTS return code:%04x\n", - unit, i); + log(LOG_DEBUG, "psm%d: SET_DEFAULTS return code:%04x\n", + unit, i); + set_mouse_resolution(sc->kbdc, PSMD_RES_HIGH); + #if 0 - set_mouse_scaling(sc->kbdc); /* 1:1 scaling */ + set_mouse_scaling(sc->kbdc); /* 1:1 scaling */ 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 -at the boot prompt: + 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 at the boot prompt: -boot: -c + boot: -c -Then, in the UserConfig command line, type: + Then, in the UserConfig command line, + type: -UserConfig> flags psm0 0x04 + UserConfig> flags psm0 0x04 UserConfig> quit -See the previous section for another possible cause of mouse -problems. + See the previous section for another possible cause of mouse + 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. -Imake.tmpl, as well as several header files that are required to build X apps, -is contained in the X prog distribution. You can install this from sysinstall or -manually from the X distribution files. + - + Imake.tmpl is part of the Imake package, a standard X + application building tool. Imake.tmpl, as well as several + header files that are required to build X apps, is contained + in the X prog distribution. You can install this from sysinstall + or 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. + + + How do I reverse the mouse buttons? + - + + Run the command + xmodmap -e "pointer = 3 2 1" from your + .xinitrc or .xsession. - -How do I install a splash screen and where do I find them? - + + -Just prior to the release of FreeBSD 3.1, a new feature was -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 -kernel. The actual VESA support can either be compiled directly -into the kernel with the VESA kernel config option -or by loading the VESA kld module during bootup. + + + How do I install a splash screen and where do I find + them? + -To use a splash screen, you need to modify the startup files -that control the boot process for FreeBSD. The files for this -changed prior to the release of FreeBSD 3.2, so there are now -two ways of loading a splash screen: + - - + Just prior to the release of FreeBSD 3.1, a new feature + was 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 kernel. The actual VESA support can either + be compiled directly into the kernel with the + VESA kernel config option or by loading the + VESA kld module during bootup. - -FreeBSD 3.1 + To use a splash screen, you need to modify the startup + files that control the boot process for FreeBSD. The files for + this changed prior to the release of FreeBSD 3.2, so there are + now two ways of loading a splash screen: - + + + + FreeBSD 3.1 -The first step is to find a bitmap version of your splash -screen. Release 3.1 only supports Windows bitmap splash -screens. Once you've found your splash screen of choice -copy it to /boot/splash.bmp. Next, you need to -have a /boot/loader.rc file that contains the -following lines: + The first step is to find a bitmap version of your + splash screen. Release 3.1 only supports Windows bitmap + splash screens. Once you've found your splash screen of + choice copy it to /boot/splash.bmp. + Next, you need to have a + /boot/loader.rc file that contains + the following lines: -load kernel + load kernel load -t splash_image_data /boot/splash.bmp load splash_bmp autoboot - + - -FreeBSD 3.2+ + + FreeBSD 3.2+ - + In addition to adding support for PCX splash screens, + 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, 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: -In addition to adding support for PCX splash screens, -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, -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 + include /boot/loader.4th start -and a /boot/loader.conf that contains the -following: + and a /boot/loader.conf that + contains the following: -splash_bmp_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, -copy it to /boot/splash.pcx, create a -/boot/loader.rc as instructed above, and -create a /boot/loader.conf that contains: + This assumes you are using + /boot/splash.bmp for your splash + screen. If you'd rather use a PCX file, 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" + splash_pcx_load="YES" bitmap_load="YES" bitmap_name="/boot/splash.pcx" - + + - - + Now all you need is a splash screen. For that you can + surf on over to the gallery at + http://www.cslab.vt.edu/~jobaldwi/splash/. -Now all you need is a splash screen. For that you can surf -on over to the gallery at http://www.cslab.vt.edu/~jobaldwi/splash/. - - + + - - Can I use the Windows(tm) keys on my keyboard in X? - + + Can I use the Windows(tm) keys on my keyboard in X? + - - Yes. All you need to do is use &man.xmodmap.1; to define what - function you wish them to perform. + + 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 - then the keycodes for the 3 keys are + Assuming all Windows(tm) keyboards are + standard then the keycodes for the 3 keys are - - - 115 - Windows(tm) key, between the left-hand Ctrl and - Alt keys - + + + 115 - Windows(tm) key, between the left-hand Ctrl and + Alt keys + - - 116 - Windows(tm) key, to the right of the Alt-Gr - key - + + 116 - Windows(tm) key, to the right of the Alt-Gr + key + - - 117 - Menu key, to the left of the right-hand Ctrl - key - - + + 117 - Menu key, to the left of the right-hand Ctrl + key + + - To have the left Windows(tm) key print a comma, try - this. + To have the left Windows(tm) key print a comma, try + this. - &prompt.root; xmodmap -e "keycode 115 = comma" + &prompt.root; xmodmap -e "keycode 115 = comma" - You will probably have to re-start your window manager - to see the result. + You will probably have to re-start your window manager + to see the result. - To have the Windows(tm) key-mappings enabled automatically - everytime you start X either put the xmodmap - commands in your ~/.xinitrc file or, - preferably, create a file ~/.xmodmaprc and - include the xmodmap options, one per line, - then add the line + To have the Windows(tm) key-mappings enabled automatically + everytime you start X either put the xmodmap + commands in your ~/.xinitrc file or, + preferably, create a file ~/.xmodmaprc and + include the xmodmap options, one per line, + then add the line - xmodmap $HOME/.xmodmaprc + xmodmap $HOME/.xmodmaprc - to your ~/.xinitrc. + to your ~/.xinitrc. - For example, I have mapped the 3 keys to be F13, F14, and F15 - respectively. This makes it easy to map them to useful functions - within applications or your window manager. + For example, I have mapped the 3 keys to be F13, F14, and + F15 respectively. This makes it easy to map them to useful + functions within applications or your window manager. - To do this put the following in - ~/.xmodmaprc. + To do this put the following in + ~/.xmodmaprc. - keycode 115 = F13 + keycode 115 = F13 keycode 116 = F14 keycode 117 = F15 - I use fvwm2 and have mapped the keys so - that F13 iconifies (or de-iconifies) the window the cursor is in, - F14 brings the window the cursor is in to the front or, if it is - already at the front, pushes it to the back, and F15 pops up the - main Workplace (application) menu even if the cursor is not on the - desktop, which is useful if you don't have any part of the desktop - visible (and the logo on the key matches its - functionality). + I use fvwm2 and have mapped the keys + so that F13 iconifies (or de-iconifies) the window the cursor + is in, F14 brings the window the cursor is in to the front or, + if it is already at the front, pushes it to the back, and F15 + pops up the main Workplace (application) menu even if the + cursor is not on the desktop, which is useful if you don't have + any part of the desktop visible (and the logo on the key + matches its functionality). - The entries in my ~/.fvwmrc which map the - keys this way are: + The entries in my ~/.fvwmrc which map + the keys this way are: - Key F13 FTIWS A Iconify + Key F13 FTIWS A Iconify Key F14 FTIWS A RaiseLower Key F15 A A Menu Workplace Nop - + - - + diff --git a/en_US.ISO_8859-1/books/faq/book.sgml b/en_US.ISO_8859-1/books/faq/book.sgml index 928d11f8c3..2dd9a30208 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.102 2000/09/26 10:39:48 marko Exp $ + $FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.103 2000/09/26 12:40:11 marko Exp $ This is the FAQ for FreeBSD versions 2.X, 3.X, and 4.X. @@ -4884,139 +4884,173 @@ disk fd1 at fdc0 drive 1 - -System Administration + + System Administration + + + + Where are the system start-up configuration files? + - -Where are the system start-up configuration files? + -From 2.0.5R to 2.2.1R, the primary configuration file is -/etc/sysconfig. All the options are to be specified in -this file and other files such as /etc/rc and -/etc/netstart just include it. + From 2.0.5R to 2.2.1R, the primary configuration file is + /etc/sysconfig. All the options are to be + specified in this file and other files such as /etc/rc + and /etc/netstart just include it. -Look in the /etc/sysconfig file and change the value to -match your system. This file is filled with comments to show what -to put in there. + Look in the /etc/sysconfig file and + change the value to match your system. This file is filled with + comments to show what to put in there. -In post-2.2.1 and 3.0, /etc/sysconfig was renamed -to a more self-describing rc.conf -file and the syntax cleaned up a bit in the process. -/etc/netstart was also renamed to /etc/rc.network -so that all files could be copied with a cp /usr/src/etc/rc* -/etc command. + In post-2.2.1 and 3.0, /etc/sysconfig + was renamed to a more self-describing rc.conf + file and the syntax cleaned up a bit in the process. + /etc/netstart was also renamed to + /etc/rc.network so that all files could be + copied with a cp + /usr/src/etc/rc* /etc command. -And, in 3.1 and later, /etc/rc.conf has -been moved to /etc/defaults/rc.conf. Do not edit -this file! Instead, if there is any entry in -/etc/defaults/rc.conf that you want to change, -you should copy the line into /etc/rc.conf and -change it there. + And, in 3.1 and later, /etc/rc.conf + has been moved to /etc/defaults/rc.conf. + Do not edit this file! Instead, if there + is any entry in /etc/defaults/rc.conf that + you want to change, you should copy the line into + /etc/rc.conf and change it there. -For example, if you wish to start named, the DNS server included -with FreeBSD in FreeBSD 3.1 or later, all you need to do is: -&prompt.root; echo named_enable="YES" >> -/etc/rc.conf + For example, if you wish to start named, the DNS server + included with FreeBSD in FreeBSD 3.1 or later, all you need to + do is: + &prompt.root; echo named_enable="YES" >> /etc/rc.conf -To start up local services in FreeBSD 3.1 or later, place shell -scripts in the /usr/local/etc.rd directory. These -shell scripts should be set executable, and end with a .sh. In FreeBSD -3.0 and earlier releases, you should edit the -/etc/rc.local file. + To start up local services in FreeBSD 3.1 or later, place + shell scripts in the /usr/local/etc.rd + directory. These shell scripts should be set executable, and + end with a .sh. In FreeBSD 3.0 and earlier releases, you should + edit the /etc/rc.local file. -The /etc/rc.serial is for serial port initialization -(e.g. locking the port characteristics, and so on.). + The /etc/rc.serial is for serial port + initialization (e.g. locking the port characteristics, and so + on.). -The /etc/rc.i386 is for Intel-specifics settings, such -as iBCS2 emulation or the PC system console configuration. + The /etc/rc.i386 is for Intel-specifics + settings, such as iBCS2 emulation or the PC system console + configuration. - + + - -How do I add a user easily? + + + How do I add a user easily? + -Use the adduser command. For more complicated usage, the -pw command. + + Use the adduser + command. For more complicated usage, the pw + command. -To remove the user again, use the rmuser -command. Once again, pw will work as well. + To remove the user again, use the rmuser + command. Once again, pw will work as + well. - + + - -How can I add my new hard disk to my FreeBSD system? + + + How can I add my new hard disk to my FreeBSD system? + -See the Disk Formatting Tutorial at -www.FreeBSD.org. + + See the Disk Formatting Tutorial at + www.FreeBSD.org. - + + - -I have a new removable drive, how do I use it? + + + I have a new removable drive, how do I use it? + -Whether it's a removable drive like a ZIP or an EZ drive (or -even a floppy, if you want to use it that way), or a new hard -disk, once it's installed and recognized by the system, and -you have your cartridge/floppy/whatever slotted in, things are -pretty much the same for all devices. + -(this section is based on Mark Mayo's ZIP FAQ) + Whether it's a removable drive like a ZIP or an EZ drive + (or even a floppy, if you want to use it that way), or a new + hard disk, once it's installed and recognized by the system, + and you have your cartridge/floppy/whatever slotted in, things + are 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: + (this section is based on + Mark Mayo's ZIP FAQ) -&prompt.root; mount -t msdos /dev/fd0c /floppy + 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: -if it's a floppy, or this: + &prompt.root; mount -t msdos /dev/fd0c /floppy -&prompt.root; mount -t msdos /dev/da2s4 /zip + if it's a floppy, or this: -for a ZIP disk with the factory configuration. + &prompt.root; mount -t msdos /dev/da2s4 /zip -For other disks, see how they're laid out using fdisk or -/stand/sysinstall. + for a ZIP disk with the factory configuration. -The rest of the examples will be for a ZIP drive on da2, the third -SCSI disk. + For other disks, see how they're laid out using + fdisk or + /stand/sysinstall. -Unless it's a floppy, or a removable you plan on sharing with -other people, it's probably a better idea to stick a BSD file -system on it. You'll get long filename support, at least a 2X -improvement in performance, and a lot more stability. First, you -need to redo the DOS-level partitions/filesystems. You can either -use fdisk or /stand/sysinstall, or for a small -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: + The rest of the examples will be for a ZIP drive on da2, + the third SCSI disk. -&prompt.root; dd if=/dev/zero of=/dev/rda2 count=2 + Unless it's a floppy, or a removable you plan on sharing + with other people, it's probably a better idea to stick a BSD + file system on it. You'll get long filename support, at least a + 2X improvement in performance, and a lot more stability. First, + you need to redo the DOS-level partitions/filesystems. You can + either use fdisk or + /stand/sysinstall, or for a small 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: + + &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 -swap space on a fixed disk, but it's probably irrelevant on a -removable drive like a ZIP. + You can use disklabel or + /stand/sysinstall to create multiple BSD + partitions. You'll certainly want to do this if you're adding + swap space on a fixed disk, but it's probably irrelevant on a + removable drive like a ZIP. -Finally, create a new file system, this one's on our ZIP drive -using the whole disk: + Finally, create a new file system, this one's on our ZIP + drive using the whole disk: -&prompt.root; newfs /dev/rda2c + &prompt.root; newfs /dev/rda2c -and mount it: + and mount it: -&prompt.root; 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 -future: + 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 future: -/dev/da2c /zip ffs rw,noauto 0 0 + /dev/da2c /zip ffs rw,noauto 0 0 - + + @@ -5057,85 +5091,106 @@ future: - - I made a mistake in rc.conf, and - now I can't edit it because the filesystem is read-only. - What should I do? - + + I made a mistake in rc.conf, and + now I can't edit it because the filesystem is read-only. + What should I do? + - - When you get the prompt to enter the shell - pathname, simply press ENTER, and run - mount / to re-mount the root filesystem - in read/write mode. You may also need to run mount - -a -t ufs to mount the filesystem where your - favourite editor is defined. If your favourite editor is on - a network filesystem, you will need to either configure the - network manually before you can mount network filesystems, - or use an editor which resides on a local filesystem, such - as &man.ed.1;. + + When you get the prompt to enter the shell + pathname, simply press ENTER, and run + mount / to re-mount the root filesystem in + read/write mode. You may also need to run mount -a -t + ufs to mount the filesystem where your favourite + editor is defined. If your favourite editor is on a network + filesystem, you will need to either configure the network + manually before you can mount network filesystems, or use an + editor which resides on a local filesystem, such as + &man.ed.1;. - If you intend to use a full screen editor such - as &man.vi.1; or &man.emacs.1;, you may also need to - run export TERM=cons25 so that these - editors can load the correct data from the &man.termcap.5; - database. + If you intend to use a full screen editor such + as &man.vi.1; or &man.emacs.1;, you may also need to + run export TERM=cons25 so that these + editors can load the correct data from the &man.termcap.5; + database. - Once you have performed these steps, you can edit - /etc/rc.conf as you usually would - to fix the syntax error. The error message displayed - immediately after the kernel boot messages should tell you - the number of the line in the file which is at fault. - + Once you have performed these steps, you can edit + /etc/rc.conf as you usually would + to fix the syntax error. The error message displayed + immediately after the kernel boot messages should tell you + the number of the line in the file which is at fault. + - -How do I mount a secondary DOS partition? + + + 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 -second DOS partition on the second SCSI drive, you need to create -the special files for slice 5 in /dev, then mount /dev/da1s5: + -&prompt.root; cd /dev + The secondary DOS partitions are found after ALL the primary + 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: + + &prompt.root; cd /dev &prompt.root; sh MAKEDEV da1s5 &prompt.root; mount -t msdos /dev/da1s5 /dos/e - + + - -Can I mount other foreign filesystems under FreeBSD? + + + Can I mount other foreign filesystems under FreeBSD? + - Digital UNIX UFS CDROMs can be mounted directly on FreeBSD. -Mounting disk partitions from Digital UNIX and other systems -that support UFS may be more complex, depending on the details -of the disk partitioning for the operating system in question. + + Digital UNIX UFS CDROMs can + be mounted directly on FreeBSD. Mounting disk partitions from + Digital UNIX and other systems that support UFS may be more + complex, depending on the details of the disk partitioning for + the operating system in question. - Linux: 2.2 and later have support for ext2fs partitions. -See mount_ext2fs for more information. + Linux: 2.2 and later have + support for ext2fs partitions. + See mount_ext2fs + for more information. - NT: A read-only NTFS driver exists for FreeBSD. For more -information, see this tutorial by Mark Ovens at -http://ukug.uk.freebsd.org/~mark/ntfs_install.html. + NT: A read-only NTFS driver + exists for FreeBSD. For more information, see this tutorial by + Mark Ovens at + + http://ukug.uk.freebsd.org/~mark/ntfs_install.html. -Any other information on this subject would be appreciated. + Any other information on this subject would be + appreciated. - + + - -How can I use the NT loader to boot FreeBSD? + + + How can I use the NT loader to boot FreeBSD? + -This procedure is slightly different for 2.2.x and 3.x (with the -3-stage boot) systems. + + This procedure is slightly different for 2.2.x and 3.x + (with the 3-stage boot) systems. -The general idea is that you copy the first sector of your -native root FreeBSD partition into a file in the DOS/NT -partition. Assuming you name that file something like -c:\bootsect.bsd (inspired by c:\bootsect.dos), -you can then edit the c:\boot.ini file to come up with -something like this: + The general idea is that you copy the first sector of your + native root FreeBSD partition into a file in the DOS/NT + partition. Assuming you name that file something like + c:\bootsect.bsd (inspired by + c:\bootsect.dos), you can then edit the + c:\boot.ini file to come up with something + like this: -[boot loader] + [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] @@ -5143,583 +5198,666 @@ 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 -same disk. In my case DOS & NT are in the first fdisk -partition and FreeBSD is in the second. I also installed FreeBSD -to boot from its native partition, not the disk MBR. + For 2.2.x systems this procedure assumes that DOS, NT, + FreeBSD, or whatever have been installed into their respective + fdisk partitions on the same + disk. In my case DOS & NT are in the first fdisk partition + and FreeBSD is in the second. I also installed FreeBSD to boot + from its native partition, not + the disk MBR. -Mount a DOS-formatted floppy (if you've converted to NTFS) or the -FAT partition, under, say, /mnt. + Mount a DOS-formatted floppy (if you've converted to NTFS) + or the FAT partition, under, say, + /mnt. -&prompt.root; 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 -boot.ini with: + 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 boot.ini with: -C:\> 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: + Edit to add the appropriate entries from the example + boot.ini above, and restore the + attributes: -C:\> 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 -native partitions. + If FreeBSD is booting from the MBR, restore it with the DOS + fdisk command after you reconfigure them to + boot from their native partitions. -For FreeBSD 3.x systems the procedure is somewhat simpler. + For FreeBSD 3.x systems the procedure is somewhat + simpler. -If FreeBSD is installed on the same disk as the NT boot partition -simply copy /boot/boot1 to -C:\BOOTSECT.BSD However, if FreeBSD is installed -on a different disk /boot/boot1 will not work, -/boot/boot0 is needed. + If FreeBSD is installed on the same disk as the NT boot + partition simply copy /boot/boot1 to + C:\BOOTSECT.BSD However, if FreeBSD is + installed on a different disk /boot/boot1 + will not work, /boot/boot0 is needed. - - DO NOT SIMPLY COPY /boot/boot0 INSTEAD OF - /boot/boot1, YOU WILL OVERWRITE YOUR PARTITION - TABLE AND RENDER YOUR COMPUTER UN-BOOTABLE! + + DO NOT SIMPLY COPY /boot/boot0 + INSTEAD OF /boot/boot1, YOU WILL + OVERWRITE YOUR PARTITION TABLE AND RENDER YOUR COMPUTER + UN-BOOTABLE! + -/boot/boot0 needs to be installed using -sysinstall by selecting the FreeBSD boot manager on the screen which -asks if you wish to use a boot manager. This is because -/boot/boot0 has the partition table area filled -with NULL characters but sysinstall copies the partition table before -copying /boot/boot0 to the MBR. + /boot/boot0 needs to be installed using + sysinstall by selecting the FreeBSD boot manager on the + screen which asks if you wish to use a boot manager. This is + because /boot/boot0 has the partition + table area filled with NULL characters but sysinstall copies + the partition table before copying + /boot/boot0 to the MBR. -When the FreeBSD boot manager runs it records the last OS booted -by setting the active flag on the partition table entry for that OS -and then writes the whole 512-bytes of itself back to the MBR so if -you just copy /boot/boot0 to -C:\BOOTSECT.BSD then it writes an empty partition -table, with the active flag set on one entry, to the MBR. + When the FreeBSD boot manager runs it records the last + OS booted by setting the active flag on the partition table + entry for that OS and then writes the whole 512-bytes of itself + back to the MBR so if you just copy + /boot/boot0 to + C:\BOOTSECT.BSD then it writes an empty + partition table, with the active flag set on one entry, to the + MBR. - + + - - How do I boot FreeBSD and Linux from LILO? - + + + How do I boot FreeBSD and Linux from LILO? + -If you have FreeBSD and Linux on the same disk, just follow -LILO's installation instructions for booting a non-Linux operating -system. Very briefly, these are: + + If you have FreeBSD and Linux on the same disk, just follow + LILO's installation instructions for booting a non-Linux + operating system. Very briefly, these are: -Boot Linux, and add the following lines to -/etc/lilo.conf: -other=/dev/hda2 - table=/dev/hda - label=FreeBSD + Boot Linux, and add the following lines to + /etc/lilo.conf: + 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. + (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. -For example: -other=/dev/dab4 - table=/dev/dab - loader=/boot/chain.b - label=FreeBSD - + If FreeBSD resides on another disk, you need to add + loader=/boot/chain.b to the LILO entry. + For example: + 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: + 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 + 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. + On FreeBSD 2.2.5 and later, you can configure boot(8) + to automatically do this for you at boot time. -The Linux+FreeBSD mini-HOWTO is a good reference for -FreeBSD and Linux interoperability issues. + The + Linux+FreeBSD mini-HOWTO is a good reference for + FreeBSD and Linux interoperability issues. - + + - - How do I boot FreeBSD and Linux using BootEasy? - + + + How do I boot FreeBSD and Linux using BootEasy? + -Install LILO at the start of your Linux boot partition instead of -in the Master Boot Record. You can then boot LILO from BootEasy. + + Install LILO at the start of your Linux boot partition + instead of in the Master Boot Record. You can then boot LILO + from BootEasy. -If you're running Windows-95 and Linux this is recommended anyway, -to make it simpler to get Linux booting again if you should need -to reinstall Windows95 (which is a Jealous Operating System, and -will bear no other Operating Systems in the Master Boot Record). + If you're running Windows-95 and Linux this is recommended + anyway, to make it simpler to get Linux booting again if you + should need to reinstall Windows95 (which is a Jealous + Operating System, and 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), -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 -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 -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 -printed by the FreeBSD bootstrap when it can't find itself, -as well as system lockups when booting. + 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), 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. -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 -in a desire to avoid one of the most common problems plaguing -new FreeBSD installers - matching the BIOS geometry numbers -for a disk to the disk itself. + 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 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 printed by the FreeBSD bootstrap when it + can't find itself, as well as system lockups when + booting. -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. + 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 in a desire to avoid one of the most common + problems plaguing new FreeBSD installers - matching the BIOS + geometry numbers for a disk to the disk + itself. -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. + 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. -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 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 -disk units will be in the same order that FreeBSD lists your -disks, first IDE, then SCSI. + 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. -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 -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 -will sort itself out just fine with any other disks you may have. + 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 + 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 + disk units will be in the same order that FreeBSD lists your + disks, first IDE, then SCSI. -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 -when you try to boot, it's time to cross your fingers and -go for it - there's nothing left to lose. + 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 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 will sort + itself out just fine with any other disks you may have. -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 + 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 when you try to boot, it's time to cross + your fingers and go for it - there's nothing left to + lose. -&prompt.root; dd if=/dev/zero of=/dev/rda0 count=15 + 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 -Alternatively, the undocumented DOS feature + &prompt.root; dd if=/dev/zero of=/dev/rda0 count=15 -C:\> fdisk /mbr + Alternatively, the undocumented DOS + feature -will to install a new master boot record as well, thus clobbering the -BSD bootstrap. + C:\> fdisk /mbr - + will to install a new master boot record as well, thus + clobbering the BSD bootstrap. - -How can I add more swap space? + + -The best way is to increase the size of your swap partition, or -take advantage of this convenient excuse to add another disk. The -general rule of thumb is to have around 2x the swap space as you have -main memory. However, if you have a very small amount of main memory -you may want to configure swap beyond that. It is also a good idea -to configure sufficient swap relative to anticipated future memory -upgrades so you do not have to futz with your swap configuration later. + + + How can I add more swap space? + -Adding swap onto a separate disk makes things faster than -simply adding swap onto the same disk. As an example, if you -are compiling source located on one disk, and the swap is on -another disk, this is much faster than both swap and compile -on the same disk. This is true for SCSI disks specifically. + -When you have several disks, configuring a swap partition on -each one is usually beneficial, even if you wind up putting swap on a -work disk. Typically, each fast disk in your system should have some -swap configured. FreeBSD supports up to 4 interleaved swap devices by -default. When configuring multiple swap partitions you generally -want to make them all about the same size, but people sometimes make -their primary swap parition larger in order to accomodate a kernel -core dump. Your primary swap partition must be at least as large as -main memory in order to be able to accomodate a kernel core. + The best way is to increase the size of your swap partition, + or take advantage of this convenient excuse to add another + disk. The general rule of thumb is to have around 2x the swap + space as you have main memory. However, if you have a very + small amount of main memory you may want to configure swap + beyond that. It is also a good idea to configure sufficient + swap relative to anticipated future memory upgrades so you do + not have to futz with your swap configuration later. -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 -your swap on a separate drive however. The drives are so cheap, -it is not worth worrying about. + Adding swap onto a separate disk makes things faster than + simply adding swap onto the same disk. As an example, if you + are compiling source located on one disk, and the swap is on + another disk, this is much faster than both swap and compile on + the same disk. This is true for SCSI disks specifically. -Swapping over NFS is only recommended if you do not have a local -disk to swap to. Swapping over NFS is slow and inefficient in FreeBSD -releases prior to 4.x, but reasonably fast in releases greater or -equal to 4.0. Even so, it will be limited to the network bandwidth -available and puts an additional burden on the NFS server. + When you have several disks, configuring a swap partition on + each one is usually beneficial, even if you wind up putting + swap on a work disk. Typically, each fast disk in your system + should have some swap configured. FreeBSD supports up to 4 + interleaved swap devices by default. When configuring multiple + swap partitions you generally want to make them all about the + same size, but people sometimes make their primary swap + parition larger in order to accomodate a kernel core dump. Your + primary swap partition must be at least as large as main memory + in order to be able to accomodate a kernel core. -Here is an example for 64Mb vn-swap (/usr/swap0, though -of course you can use any name that you want). + 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 your swap on a separate drive however. + The drives are so cheap, it is not worth worrying about. -Make sure your kernel was built with the line + Swapping over NFS is only recommended if you do not have a + local disk to swap to. Swapping over NFS is slow and + inefficient in FreeBSD releases prior to 4.x, but reasonably + fast in releases greater or equal to 4.0. Even so, it will be + limited to the network bandwidth available and puts an + additional burden on the NFS server. -pseudo-device vn 1 #Vnode driver (turns a file into a device) + Here is an example for 64Mb vn-swap + (/usr/swap0, though of course you can use + any name that you want). -in your config-file. The GENERIC kernel already contains this. + Make sure your kernel was built with the line - - + pseudo-device vn 1 #Vnode driver (turns a file into a device) - -create a vn-device + in your config-file. The GENERIC kernel already contains + this. -&prompt.root; cd /dev + + + + create a vn-device + &prompt.root; cd /dev &prompt.root; sh MAKEDEV vn0 - + - -create a swapfile (/usr/swap0) + + create a swapfile + (/usr/swap0) -&prompt.root; 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) -&prompt.root; 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. - + - -reboot the machine - + + reboot the machine + + - - + To enable the swap file immediately, type -To enable the swap file immediately, type + &prompt.root; vnconfig -ce /dev/vn0c /usr/swap0 swap -&prompt.root; vnconfig -ce /dev/vn0c /usr/swap0 swap + + - + + + I'm having problems setting up my printer. + - -I'm having problems setting up my printer. + -Please have a look at the Handbook entry on printing. It -should cover most of your problem. See the -Handbook entry on printing. + Please have a look at the Handbook entry on printing. It + should cover most of your problem. See the + Handbook entry on printing. - + + - -The keyboard mappings are wrong for my system. + + + The keyboard mappings are wrong for my system. + -The kbdcontrol program has an option to load a keyboard map file. -Under /usr/share/syscons/keymaps are a number of map -files. Choose the one relevant to your system and load it. + + The kbdcontrol program has an option to load a keyboard + map file. Under /usr/share/syscons/keymaps + are a number of map files. Choose the one relevant to your + system and load it. -&prompt.root; kbdcontrol -l uk.iso + &prompt.root; kbdcontrol -l uk.iso -Both the /usr/share/syscons/keymaps and the .kbd -extension are assumed by -kbdcontrol. + Both the /usr/share/syscons/keymaps + and the .kbd extension are assumed by + + kbdcontrol. -This can be configured in /etc/sysconfig (or rc.conf). -See the appropriate comments in this file. + This can be configured in /etc/sysconfig + (or + rc.conf). See the appropriate comments in this + file. -In 2.0.5R and later, everything related to text fonts, keyboard -mapping is in /usr/share/examples/syscons. + In 2.0.5R and later, everything related to text fonts, + keyboard mapping is in + /usr/share/examples/syscons. -The following mappings are currently supported: + The following mappings are currently supported: - - + + + + Belgian ISO-8859-1 + - -Belgian ISO-8859-1 - + + Brazilian 275 keyboard Codepage 850 + - -Brazilian 275 keyboard Codepage 850 - + + Brazilian 275 keyboard ISO-8859-1 + - -Brazilian 275 keyboard ISO-8859-1 - + + Danish Codepage 865 + - -Danish Codepage 865 - + + Danish ISO-8859-1 + - -Danish ISO-8859-1 - + + French ISO-8859-1 + - -French ISO-8859-1 - + + German Codepage 850 + - -German Codepage 850 - + + German ISO-8859-1 + - -German ISO-8859-1 - + + Italian ISO-8859-1 + - -Italian ISO-8859-1 - + + Japanese 106 + - -Japanese 106 - + + Japanese 106x + - -Japanese 106x - + + Latin American + - -Latin American - + + Norwegian ISO-8859-1 + - -Norwegian ISO-8859-1 - + + Polish ISO-8859-2 (programmer's) + - -Polish ISO-8859-2 (programmer's) - + + Russian Codepage 866 (alternative) + - -Russian Codepage 866 (alternative) - + + Russian koi8-r (shift) + - -Russian koi8-r (shift) - + + Russian koi8-r + - -Russian koi8-r - + + Spanish ISO-8859-1 + - -Spanish ISO-8859-1 - + + Swedish Codepage 850 + - -Swedish Codepage 850 - + + Swedish ISO-8859-1 + - -Swedish ISO-8859-1 - + + Swiss-German ISO-8859-1 + - -Swiss-German ISO-8859-1 - + + United Kingdom Codepage 850 + - -United Kingdom Codepage 850 - + + United Kingdom ISO-8859-1 + - -United Kingdom ISO-8859-1 - + + United States of America ISO-8859-1 + - -United States of America ISO-8859-1 - + + United States of America dvorak + - -United States of America dvorak - + + United States of America dvorakx + + - -United States of America dvorakx - + + - - + + + I can't get user quotas to work properly. + - + - -I can't get user quotas to work properly. + + + + Don't turn on quotas on /, + - - + + Put the quota file on the file system that the quotas + are to be enforced on. ie: - -Don't turn on quotas on /, - - - - -Put the quota file on the file system that the quotas are -to be enforced on. ie: - -FS QUOTA FILE + FS QUOTA FILE /usr /usr/admin/quotas /home /home/admin/quotas -... - - +... - - + + - + + - -What's inappropriate about my ccd? + + + What's inappropriate about my ccd? + -The symptom of this is: + + The symptom of this is: -&prompt.root; ccdconfig -C + &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 -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. + This usually happens when you are trying to concatenate + the 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. - + + - -Why can't I edit the disklabel on my ccd? + + + Why can't I edit the disklabel on my ccd? + -The symptom of this is: + + The symptom of this is: -&prompt.root; disklabel ccd0 + &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 -this problem by writing it back explicitly, as in: + This is because the disklabel returned by ccd is actually + a fake one that is not really on the disk. + You can solve this problem by writing it back explicitly, + as in: -&prompt.root; disklabel ccd0 > /tmp/disklabel.tmp + &prompt.root; disklabel ccd0 > /tmp/disklabel.tmp &prompt.root; disklabel -Rr ccd0 /tmp/disklabel.tmp &prompt.root; disklabel -e ccd0 (this will work now) - + + - -Does FreeBSD support System V IPC primitives? + + + Does FreeBSD support System V IPC primitives? + -Yes, FreeBSD supports System V-style IPC. This includes shared -memory, messages and semaphores. You need to add the following -lines to your kernel config to enable them. + + Yes, FreeBSD supports System V-style IPC. This includes + shared memory, messages and semaphores. You need to add the + following lines to your kernel config to enable them. -options SYSVSHM + 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. + + + In FreeBSD 3.2 and later, these options are already + part of the GENERIC kernel, which + meansthey should already be compiled into your + system. + -Recompile and install your kernel. + Recompile and install your kernel. - + + - - How do I use sendmail for mail delivery with UUCP? - + + + How do I use sendmail for mail delivery with UUCP? + -The sendmail configuration that ships with FreeBSD is -suited for sites that connect directly to the Internet. -Sites that wish to exchange their mail via UUCP must install -another sendmail configuration file. + -Tweaking /etc/sendmail.cf manually is considered -something for purists. Sendmail version 8 comes with a -new approach of generating config files via some -m4 preprocessing, where the actual hand-crafted configuration -is on a higher abstraction level. You should use the -configuration files under + The sendmail configuration that ships with FreeBSD is + suited for sites that connect directly to the Internet. + Sites that wish to exchange their mail via UUCP must install + another sendmail configuration file. -/usr/src/usr.sbin/sendmail/cf - + Tweaking /etc/sendmail.cf manually is + considered something for purists. Sendmail version 8 comes with + a new approach of generating config files via some m4 + preprocessing, where the actual hand-crafted configuration is + on a higher abstraction level. You should use the configuration + files under + /usr/src/usr.sbin/sendmail/cf -If you didn't install your system with full sources, the sendmail -config stuff has been broken out into a separate source distribution -tarball just for you. Assuming you've got your CD-ROM mounted, do: + If you didn't install your system with full sources, + the sendmail config stuff has been broken out into a separate + source distribution tarball just for you. Assuming you've got + your CD-ROM mounted, do: - &prompt.root; cd /cdrom/src + &prompt.root; cd /cdrom/src &prompt.root; cat scontrib.?? | tar xzf - -C /usr/src contrib/sendmail -Don't panic, this is only a few hundred kilobytes in size. -The file README in the cf directory can -serve as a basic introduction to m4 configuration. + Don't panic, this is only a few hundred kilobytes in size. + The file README in the + cf directory can serve as a basic + introduction to m4 configuration. -For UUCP delivery, you are best advised to use the -mailertable feature. This constitutes a database -that sendmail can use to base its routing decision upon. + For UUCP delivery, you are best advised to use the + mailertable feature. This constitutes a + database that sendmail can use to base its routing decision + upon. -First, you have to create your .mc file. The -directory /usr/src/usr.sbin/sendmail/cf/cf is the -home of these files. Look around, there are already a few -examples. Assuming you have named your file foo.mc, -all you need to do in order to convert it into a valid -sendmail.cf is: + First, you have to create your .mc + file. The directory + /usr/src/usr.sbin/sendmail/cf/cf is the + home of these files. Look around, there are already a few + examples. Assuming you have named your file + foo.mc, all you need to do in order to + convert it into a valid sendmail.cf + is: - + &prompt.root; cd /usr/src/usr.sbin/sendmail/cf/cf &prompt.root; make foo.cf -&prompt.root; cp foo.cf /etc/sendmail.cf - +&prompt.root; cp foo.cf /etc/sendmail.cf -A typical .mc file might look like: + A typical .mc file might look + like: -include(`../m4/cf.m4') + include(`../m4/cf.m4') VERSIONID(`Your version number') OSTYPE(bsd4.4) @@ -5737,18 +5875,19 @@ MAILER(uucp) Cw your.alias.host.name 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, -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. + The nodns and + nocanonify features will prevent any usage + of the DNS during mail delivery. The + 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. -Once you've got this, you need this file called -/etc/mailertable. A typical example of this -gender again: + Once you've got this, you need this file called + /etc/mailertable. A typical example of + this gender again: -# + # # makemap hash /etc/mailertable.db < /etc/mailertable # horus.interface-business.de uucp-dom:horus @@ -5760,39 +5899,40 @@ if-bus.UUCP uucp-dom:if-bus . uucp-dom: -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 -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 -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 -the node names behind the uucp-dom: keyword must -be valid UUCP neighbors, as you can verify using the -command uuname. + 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 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 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 the node names behind the + uucp-dom: keyword must be valid UUCP + neighbors, as you can verify using the command + uuname. -As a reminder that this file needs to be converted into a -DBM database file before being usable, the command line to -accomplish this is best placed as a comment at the top of -the mailertable. You always have to execute this command -each time you change your mailertable. + As a reminder that this file needs to be converted into a + DBM database file before being usable, the command line to + accomplish this is best placed as a comment at the top of + the mailertable. You always have to execute this command + 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 -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 -this mode by typing Control-D. + 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 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 this mode by typing + Control-D. - &prompt.user; sendmail -bt + &prompt.user; sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > 0 foo@interface-business.de @@ -5803,60 +5943,78 @@ rewrite: ruleset 0 returns: $# uucp-dom $@ if-bus $: foo \ > ^D - + + - - How do I set up mail with a dialup connection to the 'net? + + + How do I set up mail with a dialup connection to the + 'net? + - + + If you've got a statically assigned IP number, you should + not need to adjust anything from the default. Set your host + name up as your assigned internet name and sendmail will do + the rest. -If you've got a statically assigned IP number, you should not -need to adjust anything from the default. Set your host name up -as your assigned internet name and sendmail will do the rest. + If you've got a dynamically assigned IP number and use a + dialup ppp connection to the + internet, you will probably be given a mailbox on your ISPs + mail server. Lets assume your ISPs domain is + myISP.com, and that your user name is + user. Lets also assume you've + called your machine bsd.home and that your + ISP has told you that you may use + relay.myISP.com as a mail relay. -If you've got a dynamically assigned IP number and use a dialup -ppp connection to the internet, you will probably be given a -mailbox on your ISPs mail server. Lets assume your ISPs domain is -myISP.com, and that your user name is user. Lets also -assume you've called your machine bsd.home and that your ISP -has told you that you may use relay.myISP.com as a mail relay. + In order to retrieve mail from your mailbox, you'll need + to install a retrieval agent. Fetchmail is a good choice as it supports + many different protocols. Usually, POP3 will be provided 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: -In order to retrieve mail from your mailbox, you'll need to -install a retrieval agent. Fetchmail is a good choice as it -supports many different protocols. Usually, POP3 will be provided -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: + MYADDR: !bg su user -c fetchmail -If you are using sendmail (as shown below) to deliver mail to -non-local accounts, put the command + 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. + after the above shown entry. This forces sendmail to + process your mailqueue as soon as the connection to the 'net + is established. -I'm assuming that you have an account for user on bsd.home. -In the home directory of user on bsd.home, create a -.fetchmailrc file: + I'm assuming that you have an account for + user on + bsd.home. 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. + Needless to say, this file should not be readable by + anyone except user as it contains + the password MySecret. -In order to send mail with the correct from: header, you must -tell sendmail to use user@myISP.com rather than -user@bsd.home. You may also wish to tell sendmail to send all -mail via relay.myISP.com, allowing quicker mail transmission. + In order to send mail with the correct + from: header, you must tell + sendmail to use user@myISP.com rather than + user@bsd.home. You may also wish to tell + sendmail to send all mail via + relay.myISP.com, allowing quicker mail + transmission. -The following .mc file should suffice: + The following .mc file should + suffice: -VERSIONID(`bsd.home.mc version 1.0') + VERSIONID(`bsd.home.mc version 1.0') OSTYPE(bsd4.4)dnl FEATURE(nouucp)dnl MAILER(local)dnl @@ -5873,617 +6031,690 @@ 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 -restart sendmail after updating sendmail.cf. + Refer to the previous section for details of how to turn + this .mc file into a + sendmail.cf file. Also, don't forget to + restart sendmail after updating sendmail.cf. - + + - -Eek! I forgot the root password! + + + Eek! I forgot the root password! + -Don't Panic! Simply restart the system, type boot -s -at the Boot: prompt (just -s for FreeBSD releases before 3.2) -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 -to continue booting. + Don't Panic! Simply restart the system, type + boot -s at the Boot: prompt (just + -s for FreeBSD releases before 3.2) 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 to continue + booting. - + + - -How do I keep Control-Alt-Delete from rebooting the system? - + + + How do I keep Control-Alt-Delete from rebooting the + system? + -If you are using syscons (the default console driver) -in FreeBSD 2.2.7-RELEASE or later, -build and install a new kernel with the line + -options SC_DISABLE_REBOOT + If you are using syscons (the default console driver) + in FreeBSD 2.2.7-RELEASE or later, + build and install a new kernel with the line -in the configuration file. -If you use the PCVT console driver -in FreeBSD 2.2.5-RELEASE or later, -use the following kernel configuration line instead: + options SC_DISABLE_REBOOT -options PCVT_CTRL_ALT_DEL + in the configuration file. If you use the PCVT console + driver in FreeBSD 2.2.5-RELEASE or later, use the following + kernel configuration line instead: -For older versions of FreeBSD, -edit the keymap you are using for the console and replace the -boot keywords with nop. The default keymap is -/usr/share/syscons/keymaps/us.iso.kbd. You may have to instruct -/etc/rc.conf to load this keymap explicitly for the change to -take effect. Of course if you are using an alternate keymap for your -country, you should edit that one instead. + options PCVT_CTRL_ALT_DEL - + For older versions of FreeBSD, edit the keymap you are + using for the console and replace the boot + keywords with nop. The default keymap is + /usr/share/syscons/keymaps/us.iso.kbd. You + may have to instruct /etc/rc.conf to load + this keymap explicitly for the change to take effect. Of course + if you are using an alternate keymap for your country, you + should edit that one instead. - -How do I reformat DOS text files to UNIX ones? + + -Simply use this perl command: + + + How do I reformat DOS text files to UNIX ones? + -&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. + Simply use this perl command: -Alternatively you can use the tr command: + &prompt.user; perl -i.bak -npe 's/\r\n/\n/g' file ... -&prompt.user; tr -d '\r' < dos-text-file > unix-file + file is the file(s) to process. The modification is done + in-place, with the original file stored with a .bak + extension. -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. + Alternatively you can use the tr + command: - + &prompt.user; tr -d '\r' < dos-text-file > unix-file - -How do I kill processes by name? + 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. -Use killall. + + - + + + How do I kill processes by name? + - -Why is su bugging me about not being in root's ACL? - + Use + killall. -The error comes from the Kerberos distributed authentication system. -The problem isn't fatal but annoying. You can either run su with the -K -option, or uninstall Kerberos as described in the next question. + + - + + + Why is su bugging me about not being in root's ACL? + - -How do I uninstall Kerberos? + -To remove Kerberos from the system, reinstall the bin distribution -for the release you are running. If you have the CDROM, you can -mount the cd (we'll assume on /cdrom) and run + The error comes from the Kerberos distributed + authentication system. The problem isn't fatal but annoying. + You can either run su with the -K option, or uninstall + Kerberos as described in the next question. -&prompt.root; cd /cdrom/bin + + + + + + How do I uninstall Kerberos? + + + + + To remove Kerberos from the system, reinstall the bin + distribution for the release you are running. If you have + the CDROM, you can mount the cd (we'll assume on /cdrom) + and run + + &prompt.root; cd /cdrom/bin &prompt.root; ./install.sh - + + - -How do I add pseudoterminals to the system? + + + How do I add pseudoterminals to the system? + -If you have lots of telnet, ssh, X, or screen users, you'll probably run -out of pseudoterminals. Here's how to add more: + - - + If you have lots of telnet, ssh, X, or screen users, + you'll probably run 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. + in the configuration file. + - + + Run the commands - -Run the commands - -&prompt.root; cd /dev + &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. + 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 + + 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 -ttyqc none network + ttyqc none network -The order of the letter designations is tty[pqrsPQRS][0-9a-v], -using a regular expression. + The order of the letter designations is + tty[pqrsPQRS][0-9a-v], using a + regular expression. + - + + Reboot the system with the new kernel and you're + ready to go. + + - -Reboot the system with the new kernel and you're ready to go. - + + - - + + + I can't create the snd0 device! + - + + There is no snd device. The name + is used as a shorthand for the various devices that make up the + FreeBSD sound driver, such as mixer, + sequencer, and + dsp. - -I can't create the snd0 device! + To create these devices you should - There is no snd device. The name is - used as a shorthand for the various devices that make up the - FreeBSD sound driver, such as mixer, - sequencer, and - dsp. - - To create these devices you should - - &prompt.root; cd /dev + &prompt.root; cd /dev &prompt.root; sh MAKEDEV snd0 - - -How do I re-read /etc/rc.conf and re-start /etc/rc without - a reboot? + + -Go into single user mode and than back to multi user mode. + + + How do I re-read /etc/rc.conf and re-start /etc/rc without + a reboot? + -On the console do: + -&prompt.root; shutdown now + Go into single user mode and than back to multi user + mode. + + On the console do: + + &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: - - - - - - -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 -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 -/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 -who has successfully hacked into the system via ntalk from -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 -someone who is able to break into the process may believe -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 -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 -filesystem. The process may believe it is able to write -to those files, but only the process sees the effects -- other processes in the system do not, necessarily. - -An attempt is made to make this sort of sandbox so -transparent that the user (or hacker) does not realize -that he is sitting in it. - - - - - -UNIX implements two core sanboxes. One is at the process -level, and one is at the userid level. - -Every UNIX process is completely firewalled off from every -other UNIX process. One process can not modify the address space -of another. This is unlike Windows where a process can easily -overwrite the address space of any other, leading to a crash. - -A UNIX process is owned by a patricular userid. If the -userid is not the root user, it serves to firewall the process -off from processes owned by other users. The userid is also -used to firewall off on-disk data. - - - - - - How do I let ordinary users mount floppies and other removable - media? - - - - Ordinary users can be permitted to mount devices. Here is - how: - - - - As root assign the appropriate - permissions to the block device associated with the removable - media. - - For example, to allow users to mount the first floppy - drive, use: - - &prompt.root; chmod 777 /dev/fd0 - - - - As root set the sysctl variable - vfs.usermount to - 1. - - &prompt.root; sysctl -w vfs.usermount=1 - - - - Users can now mount /dev/fd0 onto a - directory that they own: - - &prompt.user; mkdir ~/my-mount-point -&prompt.user; mount -t msdos /dev/fd0 ~/my-mount-point - - Unmounting the device is simple: - - &prompt.user; umount ~/my-mount-point - - Enabling vfs.usermount, however, has - negative security implications. A better way to access MSDOS - formatted media is to use the - mtools package in the ports collection. - + - - How do I move my system over to my huge new disk? - + + What is a sandbox? + - - The best way is to reinstall the OS on the new - disk, then move the user data over. This is highly - recommended if you've been tracking -stable for more - than one release, or have updated a release instead of - installing a new one. You can install booteasy on both - disks with &man.boot0cfg.8;, and dual boot them until - you are happy with the new configuration. Skip the - next paragraph to find out how to move the data after - doing this. + Sandbox is a security term. It can mean + two things: - Should you decide not to do a fresh install, you - need to partition and label the new disk with either - /stand/sysinstall, or &man.fdisk.8; - and &man.disklabel.8;. You should also install booteasy - on both disks with &man.boot0cfg.8;, so that you can - dual boot to the old or new system after the copying - is done. See the formatting-media - tutorial for details on this process. + + + - Now you've got the new disk set up, and are ready - to move the data. Unfortunately, you can't just blindly - copy the data. Things like device files (in - /dev) and symbolic links tend to - screw that up. You need to use tools that understand - these things, which means &man.dump.8; and &man.tar.1;. - I recommend doing the data moves in single user mode, - but it's not required. + 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. - You should never use anything but &man.dump.8; and - &man.restore.8; to move the root file system. The - &man.tar.1; command may work - then again, it may not. - You should also use &man.dump.8; and &man.restore.8; - if you are moving a single partition to another empty - partition. The sequence of steps to use dump to move - a partitions data to a new partition is: + 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. - - - newfs the new partition. - + The walls might be a userid, for example. This is + the definition used in the security and named man + pages. - - mount it on a temporary mount point. - + 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 who has successfully hacked into the system via + ntalk from being able to hack beyond that user id. + - - cd to that directory. - + - - dump the old partition, piping output to the - new one. - - + A process which is placed inside a simulation of the + machine. This is more hard-core. Basically it means that + someone who is able to break into the process may believe + 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. - For example, if you are going to move root to - /dev/ad1s1a, with - /mnt as the temporary mount point, - it's: + 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 + system). - &prompt.root; newfs /dev/ad1s1a + 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 filesystem. The process may believe it is + able to write to those files, but only the process sees + the effects - other processes in the system do not, + necessarily. + + An attempt is made to make this sort of sandbox so + transparent that the user (or hacker) does not realize + that he is sitting in it. + + + + UNIX implements two core sanboxes. One is at the + process level, and one is at the userid level. + + Every UNIX process is completely firewalled off from every + other UNIX process. One process can not modify the address + space of another. This is unlike Windows where a process + can easily overwrite the address space of any other, leading + to a crash. + + A UNIX process is owned by a patricular userid. If the + userid is not the root user, it serves to firewall the process + off from processes owned by other users. The userid is also + used to firewall off on-disk data. + + + + + + + How do I let ordinary users mount floppies and other removable + media? + + + + Ordinary users can be permitted to mount devices. Here is + how: + + + + As root assign the appropriate + permissions to the block device associated with the + removable media. + + For example, to allow users to mount the first floppy + drive, use: + + &prompt.root; chmod 777 /dev/fd0 + + + + As root set the sysctl variable + vfs.usermount to + 1. + + &prompt.root; sysctl -w vfs.usermount=1 + + + + Users can now mount /dev/fd0 onto a + directory that they own: + + &prompt.user; mkdir ~/my-mount-point +&prompt.user; mount -t msdos /dev/fd0 ~/my-mount-point + + Unmounting the device is simple: + + &prompt.user; umount ~/my-mount-point + + Enabling vfs.usermount, however, has + negative security implications. A better way to access MSDOS + formatted media is to use the mtools + package in the ports collection. + + + + + + How do I move my system over to my huge new disk? + + + + The best way is to reinstall the OS on the new + disk, then move the user data over. This is highly + recommended if you've been tracking -stable for more + than one release, or have updated a release instead of + installing a new one. You can install booteasy on both + disks with &man.boot0cfg.8;, and dual boot them until + you are happy with the new configuration. Skip the + next paragraph to find out how to move the data after + doing this. + + Should you decide not to do a fresh install, you + need to partition and label the new disk with either + /stand/sysinstall, or &man.fdisk.8; + and &man.disklabel.8;. You should also install booteasy + on both disks with &man.boot0cfg.8;, so that you can + dual boot to the old or new system after the copying + is done. See the + formatting-media tutorial for details on this + process. + + Now you've got the new disk set up, and are ready + to move the data. Unfortunately, you can't just blindly + copy the data. Things like device files (in + /dev) and symbolic links tend to + screw that up. You need to use tools that understand + these things, which means &man.dump.8; and &man.tar.1;. + I recommend doing the data moves in single user mode, + but it's not required. + + You should never use anything but &man.dump.8; and + &man.restore.8; to move the root file system. The + &man.tar.1; command may work - then again, it may not. + You should also use &man.dump.8; and &man.restore.8; + if you are moving a single partition to another empty + partition. The sequence of steps to use dump to move + a partitions data to a new partition is: + + + + newfs the new partition. + + + + mount it on a temporary mount point. + + + + cd to that directory. + + + + dump the old partition, piping output to the + new one. + + + + For example, if you are going to move root to + /dev/ad1s1a, with + /mnt as the temporary mount point, + it's: + + &prompt.root; newfs /dev/ad1s1a &prompt.root; mount /dev/ad1s1a &prompt.root; cd /mnt &prompt.root; dump 0uaf - / | restore xf - - If you are going to rearrange your partitions - - say, splitting one into two, or combing two into one, - you may find yourself needing to move everything under - a subdirectory to a new location. Since &man.dump.8; - works with file systems, it can't do this. So you use - &man.tar.1;. The general command to move - /old to /new - for &man.tar.1; is: + If you are going to rearrange your partitions - + say, splitting one into two, or combing two into one, + you may find yourself needing to move everything under + a subdirectory to a new location. Since &man.dump.8; + works with file systems, it can't do this. So you use + &man.tar.1;. The general command to move + /old to /new + for &man.tar.1; is: - &prompt.root; (cd /old; tar cf - .) | (cd /new; tar xpf -) + &prompt.root; (cd /old; tar cf - .) | (cd /new; tar xpf -) - If /old has file systems - mounted on that, and you - don't want to move that data or unmount them, you just - add the 'l' flag to the first &man.tar.1;: + If /old has file systems + mounted on that, and you + don't want to move that data or unmount them, you just + add the 'l' flag to the first &man.tar.1;: - &prompt.root; (cd /old; tar clf - .) | (cd /new; tar xpf -). + &prompt.root; (cd /old; tar clf - .) | (cd /new; tar xpf -). - You might prefer cpio(1), pax(1) or cpdup - (in ports/sysutils/cpdup) to tar. + You might prefer cpio(1), pax(1) or cpdup + (in ports/sysutils/cpdup) to tar. - + + + + + + + The X Window System and Virtual Consoles + + + + + I want to run X, how do I go about it? + + + + + The easiest way is to simply specify that you want to + run X during the installation process. + + Then read and follow the documentation on the + xf86config tool, which assists you in configuring + XFree86(tm) for your particular graphics card/mouse/etc. + + You may also wish to investigate the Xaccel server. + See the section on Xi Graphics or + Metro Link for more details. + + - - + + + Why doesn't my mouse work with X? + - -The X Window System and Virtual Consoles + + 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 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, see + and set up + moused. - -I want to run X, how do I go about it? + Then edit /etc/XF86Config and make + sure you have the following lines. -The easiest way is to simply specify that you want to run X -during the installation process. - -Then read and follow the documentation on the xf86config tool, which assists you in configuring XFree86(tm) -for your particular graphics card/mouse/etc. - -You may also wish to investigate the Xaccel server. -See the section on Xi Graphics or -Metro Link for more details. - - - - -Why doesn't my mouse work with X? - -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 -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, -see and set up moused. - - Then edit /etc/XF86Config and make sure you - have the following lines. - - -Section Pointer -Protocol "SysMouse" -Device "/dev/sysmouse" + +Section Pointer +Protocol "SysMouse" +Device "/dev/sysmouse" ..... -The above example is for XFree86 3.3.2 or later. For earlier -versions, the Protocol should be -MouseSystems. + The above example is for XFree86 3.3.2 or later. For + earlier 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 -/dev/sysmouse: + Some people prefer to use /dev/mouse + under X. To make this work, /dev/mouse + should be linked to + /dev/sysmouse: -&prompt.root; cd /dev + &prompt.root; cd /dev &prompt.root; rm -f mouse &prompt.root; ln -s sysmouse mouse - + + - - - My mouse has a fancy wheel. Can I use it in X? - + + + My mouse has a fancy wheel. Can I use it in X? + - - Yes. But you need to customize X client programs. See Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/). + + Yes. But you need to customize X client programs. See + Colas Nahaboo's web page + (http://www.inria.fr/koala/colas/mouse-wheel-scroll/) + . - If you want to use the - imwheel program, just follow - these simple steps. + If you want to use the imwheel + program, just follow these simple steps. - - - Translate the Wheel Events + + + Translate the Wheel Events - The imwheel program - works by translating mouse button 4 and mouse button 5 - events into key events. Thus, you have to get the - mouse driver to translate mouse wheel events to button - 4 and 5 events. There are two ways of doing this, the - first way is to have &man.moused.8; do the - translation. The second way is for the X server - itself to do the event translation. + The imwheel program + works by translating mouse button 4 and mouse button 5 + events into key events. Thus, you have to get the + mouse driver to translate mouse wheel events to button + 4 and 5 events. There are two ways of doing this, the + first way is to have &man.moused.8; do the + translation. The second way is for the X server + itself to do the event translation. - - - Using &man.moused.8; to Translate Wheel - Events + + + Using &man.moused.8; to Translate Wheel + Events - To have &man.moused.8; perform the event - translations, simply add to - the command line used to start &man.moused.8;. - For example, if you normally start &man.moused.8; - via moused -p /dev/psm0 you - would start it by entering moused -p - /dev/psm0 -z 4 instead. If you start - &man.moused.8; automatically during bootup via - /etc/rc.conf, you can simply - add to the - moused_flags variable in - /etc/rc.conf. + To have &man.moused.8; perform the event + translations, simply add to + the command line used to start &man.moused.8;. + For example, if you normally start &man.moused.8; + via moused -p /dev/psm0 you + would start it by entering moused -p + /dev/psm0 -z 4 instead. If you start + &man.moused.8; automatically during bootup via + /etc/rc.conf, you can simply + add to the + moused_flags variable in + /etc/rc.conf. - You now need to tell X that you have a 5 - button mouse. To do this, simply add the line - Buttons 5 to the - Pointer section of - /etc/XF86Config. For - example, you might have the following - Pointer section in - /etc/XF86Config. + You now need to tell X that you have a 5 + button mouse. To do this, simply add the line + Buttons 5 to the + Pointer section of + /etc/XF86Config. For + example, you might have the following + Pointer section in + /etc/XF86Config. - - <quote>Pointer</quote> Section for Wheeled - Mouse in XF86Config with moused - Translation + + <quote>Pointer</quote> Section for Wheeled + Mouse in XF86Config with moused Translation - Section "Pointer" + Section "Pointer" Protocol "SysMouse" Device "/dev/sysmouse" Buttons 5 EndSection - - - + + + - - Using Your X Server to Translate the Wheel - Events + + Using Your X Server to Translate the Wheel + Events - If you aren't running &man.moused.8;, or if - you don't want &man.moused.8; to translate your - wheel events, you can have the X server do the - event translation instead. This requires a couple - of modifications to your - /etc/XF86Config file. First, - you need to choose the proper protocol for your - mouse. Most wheeled mice use the - IntelliMouse protocol. However, - XFree86 does support other protocols, such as - MouseManPlusPS/2 for the Logitech - MouseMan+ mice. Once you have chosen the protocol - you will use, you need to add a - Protocol line to the - Pointer section. + If you aren't running &man.moused.8;, or if + you don't want &man.moused.8; to translate your + wheel events, you can have the X server do the + event translation instead. This requires a couple + of modifications to your + /etc/XF86Config file. First, + you need to choose the proper protocol for your + mouse. Most wheeled mice use the + IntelliMouse protocol. However, + XFree86 does support other protocols, such as + MouseManPlusPS/2 for the Logitech + MouseMan+ mice. Once you have chosen the protocol + you will use, you need to add a + Protocol line to the + Pointer section. - Secondly, you need to tell the X server to - remap wheel scroll events to mouse buttons 4 and - 5. This is done with the - ZAxisMapping option. + Secondly, you need to tell the X server to + remap wheel scroll events to mouse buttons 4 and + 5. This is done with the + ZAxisMapping option. - For example, if you aren't using - &man.moused.8;, and you have an IntelliMouse - attached to the PS/2 mouse port you would use - the following in - /etc/XF86Config. + For example, if you aren't using + &man.moused.8;, and you have an IntelliMouse + attached to the PS/2 mouse port you would use + the following in + /etc/XF86Config. - - <quote>Pointer</quote> Section for Wheeled - Mouse in <filename>XF86Config</filename> with X - Server Translation + + <quote>Pointer</quote> Section for Wheeled + Mouse in <filename>XF86Config</filename> with X + Server Translation - Section "Pointer" + Section "Pointer" Protocol "IntelliMouse" Device "/dev/psm0" ZAxisMapping 4 5 EndSection - - - - - + + + + + - - Install imwheel + + Install imwheel - Next, install imwheel - from the Ports collection. It can be found in the - x11 category. This program will - map the wheel events from your mouse into keyboard - events. For example, it might send Page - Up to a program when you scroll the wheel - forwards. Imwheel uses a - configuration file to map the wheel events to - keypresses so that it can send different keys to - different applications. The default - imwheel configuration file - is installed in - /usr/X11R6/etc/imwheelrc. You - can copy it to ~/.imwheelrc and - then edit it if you wish to customize - imwheel's configuration. - The format of the configuration file is documented in - &man.imwheel.1;. - + Next, install imwheel + from the Ports collection. It can be found in the + x11 category. This program will + map the wheel events from your mouse into keyboard + events. For example, it might send Page + Up to a program when you scroll the wheel + forwards. Imwheel uses a + configuration file to map the wheel events to + keypresses so that it can send different keys to + different applications. The default + imwheel configuration file + is installed in + /usr/X11R6/etc/imwheelrc. You + can copy it to ~/.imwheelrc and + then edit it if you wish to customize + imwheel's configuration. + The format of the configuration file is documented in + &man.imwheel.1;. + - - Configure Emacs to Work - with Imwheel - (optional) + + Configure Emacs to Work + with Imwheel + (optional) - If you use emacs or - Xemacs, then you need to - add a small section to your - ~/.emacs file. For - emacs, add the - following: + If you use emacs or + Xemacs, then you need to + add a small section to your + ~/.emacs file. For + emacs, add the + following: - - <application>Emacs</application> Configuration - for <application>Imwheel</application> + + <application>Emacs</application> Configuration + for <application>Imwheel</application> - ;;; For imwheel + ;;; For imwheel (setq imwheel-scroll-interval 3) (defun imwheel-scroll-down-some-lines () (interactive) @@ -6494,18 +6725,18 @@ EndSection (global-set-key [?\M-\C-\)] 'imwheel-scroll-up-some-lines) (global-set-key [?\M-\C-\(] 'imwheel-scroll-down-some-lines) ;;; end imwheel section - - + + - For Xemacs, add the - following to your ~/.emacs file - instead: + For Xemacs, add the + following to your ~/.emacs file + instead: - - <application>Xemacs</application> Configuration - for <application>Imwheel</application> + + <application>Xemacs</application> Configuration + for <application>Imwheel</application> - ;;; For imwheel + ;;; For imwheel (setq imwheel-scroll-interval 3) (defun imwheel-scroll-down-some-lines () (interactive) @@ -6516,73 +6747,83 @@ EndSection (define-key global-map [(control meta \))] 'imwheel-scroll-up-some-lines) (define-key global-map [(control meta \()] 'imwheel-scroll-down-some-lines) ;;; end imwheel section - - - + + + - - Run Imwheel + + Run Imwheel - You can just type imwheel - in an xterm to start it up once it is installed. It - will background itself and take effect immediately. - If you want to always use - imwheel, simply add it to - your .xinitrc or - .xsession file. You can safely - ignore any warnings imwheel - displays about PID files. Those warnings only apply - to the Linux version of - imwheel. - - - - + You can just type imwheel + in an xterm to start it up once it is installed. It + will background itself and take effect immediately. + If you want to always use + imwheel, simply add it to + your .xinitrc or + .xsession file. You can safely + ignore any warnings imwheel + displays about PID files. Those warnings only apply + to the Linux version of + imwheel. + + + + - -X Window menus and dialog boxes don't work right! + + + X Window menus and dialog boxes don't work right! + -Try turning off the Num Lock key. + + 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. + 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. -# Let the server do the NumLock processing. This should only be + # Let the server do the NumLock processing. This should only be # required when using pre-R6 clients ServerNumLock - + + - -What is a virtual console and how do I make more? + + + What is a virtual console and how do I make more? + -Virtual consoles, put simply, enable you to have several -simultaneous sessions on the same machine without doing anything -complicated like setting up a network or running X. + + Virtual consoles, put simply, enable you to have several + simultaneous sessions on the same machine without doing anything + complicated like setting up a network or running X. -When the system starts, it will display a login prompt on -the monitor after displaying all the boot messages. You can -then type in your login name and password and start working (or -playing!) on the first virtual console. + When the system starts, it will display a login prompt on + the monitor after displaying all the boot messages. You can + then type in your login name and password and start working (or + playing!) on the first virtual console. -At some point, you will probably wish to start another -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 -want to go back to the original session, do Alt-F1. + At some point, you will probably wish to start another + 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 want to go back to the original session, do + Alt-F1. -The default FreeBSD installation has three virtual consoles -enabled (8 starting with 3.3-RELEASE), and Alt-F1, Alt-F2, and -Alt-F3 will switch between these virtual consoles. + The default FreeBSD installation has three virtual consoles + 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: + To enable more of them, edit /etc/ttys + and add entries for ttyv4 + to ttyvc after the comment on + Virtual terminals: -# Edit the existing entry for ttyv3 in /etc/ttys and change + # 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 @@ -6594,411 +6835,486 @@ 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. + 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. -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 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. + -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: + 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: + 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: + 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 -(You could also just delete these lines.) + (You could also just delete these lines.) -Once you have edited /etc/ttys, -the next step is to make sure that you have enough virtual terminal -devices. The easiest way to do this is: + Once you have edited + /etc/ttys, the next step is to make sure that you + have enough virtualterminal devices. The easiest way to do + this is: -&prompt.root; cd /dev + &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): + 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): -&prompt.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 -will probably appear to hang/lock up after executing the kill -command. + It's imperative that you completely shut down X Window if + it is running, before running this command. If you don't, + your system will probably appear to hang/lock up after + executing the kill command. - + + - -How do I access the virtual consoles from X? + + + How do I access the virtual consoles from X? + -If the console is currently displaying X Window, you can use -Ctrl-Alt-F1, etc. to switch to a virtual console. Note, however, -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 -mode. Tap the control key to wake it up again. + - + If the console is currently displaying X Window, you can + use Ctrl-Alt-F1, etc. to switch to a virtual console. Note, + however, 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 mode. Tap the + control key to wake it up again. - -How do I start XDM on boot? + + -There are two schools of thought on how to start xdm. One school starts xdm from -/etc/ttys using the supplied example, while the other -simply runs xdm from rc.local or -from a X.sh script in /usr/local/etc/rc.d. -Both are equally valid, and one may work in -situations where the other doesn't. In both cases the result is the -same: X will popup a graphical login: prompt. + + + How do I start XDM on boot? + -The ttys method has the advantage -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. + There are two schools of thought on how to start + xdm. One school starts xdm from /etc/ttys + using the supplied example, while the other simply runs xdm + from rc.local + or from a X.sh script in + /usr/local/etc/rc.d. Both are equally + valid, and one may work in situations where the other doesn't. + In both cases the result is the same: X will popup a graphical + login: prompt. -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 -launch xdm. + The ttys method has the advantage 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 you are to start xdm from - /etc/ttys, there still is a chance of conflict - between xdm and getty. One way to - avoid this is to add the vt number in the - /usr/X11R6/lib/X11/xdm/Xservers file. + 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 launch xdm. -:0 local /usr/X11R6/bin/X vt4 + If you are to start xdm from + /etc/ttys, there still is a chance of + conflict between xdm and + getty. One way to avoid this is to add the + vt number in the + /usr/X11R6/lib/X11/xdm/Xservers + file. -The above example will direct the X server to run in - /dev/ttyv3. Note the number is offset by one. The - X server counts the vty from one, whereas the FreeBSD kernel numbers the - vty from zero. + :0 local /usr/X11R6/bin/X vt4 - + The above example will direct the X server to run in + /dev/ttyv3. Note the number is offset by + one. The X server counts the vty from one, whereas the FreeBSD + kernel numbers the vty from zero. - -When I run xconsole, I get Couldn't open console. + + -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. + + + When I run xconsole, I get + Couldn't open console. + -This is because of the way console permissions are set by default. -On a multi-user system, one doesn't necessarily want just any user -to be able to write on the system console. For users who are logging -directly onto a machine with a VTY, the -fbtab -file exists to solve such problems. + + If you start X + with + startx, the permissions on + /dev/console will + not get changed, resulting in + things like + xterm -C and + xconsolenot working. -In a nutshell, make sure an uncommented line of the form + This is because of the way console permissions are set + by default. On a multi-user system, one doesn't necessarily + want just any user to be able to write on the system console. + For users who are logging directly onto a machine with a VTY, + the fbtab + file exists to solve such problems. -/dev/ttyv0 0600 /dev/console + In a nutshell, make sure an uncommented line of the + form -is in /etc/fbtab and it will ensure that whomever logs in on -/dev/ttyv0 will own the 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. - -My PS/2 mouse doesn't behave properly under X. + + -Your mouse and the mouse driver may have somewhat become out of -synchronization. + + + My PS/2 mouse doesn't behave properly under X. + -In versions 2.2.5 and earlier, switching away from X to a -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. + + Your mouse and the mouse driver may have somewhat become + out of synchronization. -options PSM_CHECKSYNC + In versions 2.2.5 and earlier, switching away from X to a + 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. -See the section on building a kernel -if you've no experience with building kernels. + options PSM_CHECKSYNC -With this option, there should be less chance of synchronization -problem between the mouse and the driver. If, however, you -still see the problem, click any mouse button while holding -the mouse still to re-synchronize the mouse and the driver. + See the section on building + a kernel if you've no experience with building + kernels. -Note that unfortunately this option may not work with all the -systems and voids the tap feature of the ALPS GlidePoint -device attached to the PS/2 mouse port. + With this option, there should be less chance of + synchronization problem between the mouse and the driver. + If, however, you still see the problem, click any mouse + button while holding the mouse still to re-synchronize the + mouse and the driver. -In versions 2.2.6 and later, synchronization check is done -in a slightly better way and is standard in the PS/2 mouse driver. -It should even work with GlidePoint. (As the check code has become -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: + Note that unfortunately this option may not work with all + the systems and voids the tap feature of the + ALPS GlidePoint device attached to the PS/2 mouse port. -psmintr: out of sync (xxxx != yyyy) + In versions 2.2.6 and later, synchronization check is done + in a slightly better way and is standard in the PS/2 mouse + driver. It should even work with GlidePoint. (As the check code + has become 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: -and find your mouse doesn't seem to work properly. + psmintr: out of sync (xxxx != yyyy) -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 -at the boot prompt: + and find your mouse doesn't seem to work properly. -boot: -c + 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 at the boot prompt: -Then, in the UserConfig command line, type: + boot: -c -UserConfig> flags psm0 0x100 + Then, in the UserConfig command + line, type: + + UserConfig> flags psm0 0x100 UserConfig> quit - + + - -My PS/2 mouse from MouseSystems doesn't seem to work. + + + 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 -mode. Otherwise, the mouse cursor may jump to the upper-left -corner of the screen every so often. + + There have been some reports that certain model of PS/2 + mouse 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. -Unfortunately there is no workaround for versions 2.0.X and -2.1.X. In versions 2.2 through 2.2.5, apply the following patch -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. + Unfortunately there is no workaround for versions 2.0.X + and 2.1.X. In versions 2.2 through 2.2.5, apply the following + patch 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. -@@ -766,6 +766,8 @@ + @@ -766,6 +766,8 @@ if (verbose >= 2) - log(LOG_DEBUG, "psm%d: SET_DEFAULTS return code:%04x\n", - unit, i); + log(LOG_DEBUG, "psm%d: SET_DEFAULTS return code:%04x\n", + unit, i); + set_mouse_resolution(sc->kbdc, PSMD_RES_HIGH); + #if 0 - set_mouse_scaling(sc->kbdc); /* 1:1 scaling */ + set_mouse_scaling(sc->kbdc); /* 1:1 scaling */ 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 -at the boot prompt: + 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 at the boot prompt: -boot: -c + boot: -c -Then, in the UserConfig command line, type: + Then, in the UserConfig command line, + type: -UserConfig> flags psm0 0x04 + UserConfig> flags psm0 0x04 UserConfig> quit -See the previous section for another possible cause of mouse -problems. + See the previous section for another possible cause of mouse + 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. -Imake.tmpl, as well as several header files that are required to build X apps, -is contained in the X prog distribution. You can install this from sysinstall or -manually from the X distribution files. + - + Imake.tmpl is part of the Imake package, a standard X + application building tool. Imake.tmpl, as well as several + header files that are required to build X apps, is contained + in the X prog distribution. You can install this from sysinstall + or 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. + + + How do I reverse the mouse buttons? + - + + Run the command + xmodmap -e "pointer = 3 2 1" from your + .xinitrc or .xsession. - -How do I install a splash screen and where do I find them? - + + -Just prior to the release of FreeBSD 3.1, a new feature was -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 -kernel. The actual VESA support can either be compiled directly -into the kernel with the VESA kernel config option -or by loading the VESA kld module during bootup. + + + How do I install a splash screen and where do I find + them? + -To use a splash screen, you need to modify the startup files -that control the boot process for FreeBSD. The files for this -changed prior to the release of FreeBSD 3.2, so there are now -two ways of loading a splash screen: + - - + Just prior to the release of FreeBSD 3.1, a new feature + was 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 kernel. The actual VESA support can either + be compiled directly into the kernel with the + VESA kernel config option or by loading the + VESA kld module during bootup. - -FreeBSD 3.1 + To use a splash screen, you need to modify the startup + files that control the boot process for FreeBSD. The files for + this changed prior to the release of FreeBSD 3.2, so there are + now two ways of loading a splash screen: - + + + + FreeBSD 3.1 -The first step is to find a bitmap version of your splash -screen. Release 3.1 only supports Windows bitmap splash -screens. Once you've found your splash screen of choice -copy it to /boot/splash.bmp. Next, you need to -have a /boot/loader.rc file that contains the -following lines: + The first step is to find a bitmap version of your + splash screen. Release 3.1 only supports Windows bitmap + splash screens. Once you've found your splash screen of + choice copy it to /boot/splash.bmp. + Next, you need to have a + /boot/loader.rc file that contains + the following lines: -load kernel + load kernel load -t splash_image_data /boot/splash.bmp load splash_bmp autoboot - + - -FreeBSD 3.2+ + + FreeBSD 3.2+ - + In addition to adding support for PCX splash screens, + 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, 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: -In addition to adding support for PCX splash screens, -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, -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 + include /boot/loader.4th start -and a /boot/loader.conf that contains the -following: + and a /boot/loader.conf that + contains the following: -splash_bmp_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, -copy it to /boot/splash.pcx, create a -/boot/loader.rc as instructed above, and -create a /boot/loader.conf that contains: + This assumes you are using + /boot/splash.bmp for your splash + screen. If you'd rather use a PCX file, 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" + splash_pcx_load="YES" bitmap_load="YES" bitmap_name="/boot/splash.pcx" - + + - - + Now all you need is a splash screen. For that you can + surf on over to the gallery at + http://www.cslab.vt.edu/~jobaldwi/splash/. -Now all you need is a splash screen. For that you can surf -on over to the gallery at http://www.cslab.vt.edu/~jobaldwi/splash/. - - + + - - Can I use the Windows(tm) keys on my keyboard in X? - + + Can I use the Windows(tm) keys on my keyboard in X? + - - Yes. All you need to do is use &man.xmodmap.1; to define what - function you wish them to perform. + + 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 - then the keycodes for the 3 keys are + Assuming all Windows(tm) keyboards are + standard then the keycodes for the 3 keys are - - - 115 - Windows(tm) key, between the left-hand Ctrl and - Alt keys - + + + 115 - Windows(tm) key, between the left-hand Ctrl and + Alt keys + - - 116 - Windows(tm) key, to the right of the Alt-Gr - key - + + 116 - Windows(tm) key, to the right of the Alt-Gr + key + - - 117 - Menu key, to the left of the right-hand Ctrl - key - - + + 117 - Menu key, to the left of the right-hand Ctrl + key + + - To have the left Windows(tm) key print a comma, try - this. + To have the left Windows(tm) key print a comma, try + this. - &prompt.root; xmodmap -e "keycode 115 = comma" + &prompt.root; xmodmap -e "keycode 115 = comma" - You will probably have to re-start your window manager - to see the result. + You will probably have to re-start your window manager + to see the result. - To have the Windows(tm) key-mappings enabled automatically - everytime you start X either put the xmodmap - commands in your ~/.xinitrc file or, - preferably, create a file ~/.xmodmaprc and - include the xmodmap options, one per line, - then add the line + To have the Windows(tm) key-mappings enabled automatically + everytime you start X either put the xmodmap + commands in your ~/.xinitrc file or, + preferably, create a file ~/.xmodmaprc and + include the xmodmap options, one per line, + then add the line - xmodmap $HOME/.xmodmaprc + xmodmap $HOME/.xmodmaprc - to your ~/.xinitrc. + to your ~/.xinitrc. - For example, I have mapped the 3 keys to be F13, F14, and F15 - respectively. This makes it easy to map them to useful functions - within applications or your window manager. + For example, I have mapped the 3 keys to be F13, F14, and + F15 respectively. This makes it easy to map them to useful + functions within applications or your window manager. - To do this put the following in - ~/.xmodmaprc. + To do this put the following in + ~/.xmodmaprc. - keycode 115 = F13 + keycode 115 = F13 keycode 116 = F14 keycode 117 = F15 - I use fvwm2 and have mapped the keys so - that F13 iconifies (or de-iconifies) the window the cursor is in, - F14 brings the window the cursor is in to the front or, if it is - already at the front, pushes it to the back, and F15 pops up the - main Workplace (application) menu even if the cursor is not on the - desktop, which is useful if you don't have any part of the desktop - visible (and the logo on the key matches its - functionality). + I use fvwm2 and have mapped the keys + so that F13 iconifies (or de-iconifies) the window the cursor + is in, F14 brings the window the cursor is in to the front or, + if it is already at the front, pushes it to the back, and F15 + pops up the main Workplace (application) menu even if the + cursor is not on the desktop, which is useful if you don't have + any part of the desktop visible (and the logo on the key + matches its functionality). - The entries in my ~/.fvwmrc which map the - keys this way are: + The entries in my ~/.fvwmrc which map + the keys this way are: - Key F13 FTIWS A Iconify + Key F13 FTIWS A Iconify Key F14 FTIWS A RaiseLower Key F15 A A Menu Workplace Nop - + - - +