ETC-FAQ Frequently asked questions about our /etc setup. Please edit as appropriate! QUESTIONS: [System] 0. Why don't the instructions in this FAQ work? 1. Why does my machine reboot overnight? 2. Why do my locally installed packages keep being removed? 3. How can I customize /etc/KERNEL? 4. How do I enable support for multiple locations? 5. I deleted/changed the kernel sources, how do I get them back? 6. How can I update the ports directory? 7. How can I check what the daily/weekly/monthly update did? 8. How can I install KAME on my machine? 9. How do I apply kernel patches to all systems? 10. How do I install software on all machines automatically? 11. How do I create an X config file? 12. What exactly does the local host firewall block? 13. How can I view Microsoft Word documents? 14. How do I set up striped disks? 15. How do I configure a PCEN machine? 16. Where is ISI-specific information kept? 17. How do I turn on X display auto-locking? And display power savings? 18. Why does Netscape Navigator not start RealPlayer? 19. Are wireless cards supported, and how? 20. How do I install FreeBSD on a new machine? 21. How do I use CVS over SSH? 22. How do I enable my WinModem? 23. How do I upgrade to a newer release of FreeBSD? 24. How do I enable PPTP to ISI? 25. How do I enable PPP? 26. How do I update FreeBSD-CURRENT-etc from vendor source? 27. Where do per-machine settings go that aren't per-location? 28. How do I debug a kernel over a nullmodem cable? 29. How do I run FreeBSD inside VMware? 30. Which are the custom (ISI) startup scripts we use in /etc/rc.d? [SSH] 51. How can I setup SSH to work for my ISI account? 52. I already have SSH setup on my Boreas account (SSH.com), can I use the same key pair on the FreeBSD systems (OpenSSH)? 53. How do I SSH from my Windows system into our FreeBSD machines or Boreas? 54. How can I login as root using SSH2 w/o typing a password? [Storage] 71. How do I burn image files (.iso) to CD or DVD media? 72. How do I archive a directory onto CD-R/RW or DVD+R/RW? 73. How do I migrate a working FreeBSD installation to another HD? [MISC: Emails] 81. How do I remove deplicate emails from an existing mailbox? 82. How do I upgrade net/gnomemeeting? ANSWERS: 0. Why don't the instructions in this FAQ work? These are just some possible causes: (1) RTFM! o Read the instructions carefully. Make sure you didn't miss any important notes and warnings. o FreeBSD is an evolving system. Check the relevant man pages or other FreeBSD documentations (docs, handbooks, mailing lists, PRs, etc.) to make sure the instructions given here still apply. o Check your FreeBSD versions! If you are using anything other than FreeBSD, why are you reading this FAQ? (2) While we found some possible solutions and documented them here, that doesn't mean you should just type them without knowing what's going on. Just like any standard open source software disclaimer: (a) your milage may vary, and (b) use it at your own risk. (3) After going through all of the above, (and ONLY after you go through all of the above), ask whoever wrote them POLITELY. (4) Finally, after finding out what went wrong and how it should be done, update this FAQ and commit it! This FAQ does not grow out of nowhere and if you don't update it, it will get out of date very quickly. Another reason is, you WILL forget how something is done if you don't document it somewhere obvious! 1. Why does my machine reboot overnight? Each machine updates its configuration nightly from CVS. If there is any change to /etc or the kernel config file, it will reboot after the update is complete. The automated reboot can be turned off by setting isi_reboot_enable="NO" in /etc/periodic.conf.local. The automated update of /etc can be turned off by setting isi_update_etc_enable="NO" in /etc/periodic.conf.local (NOT RECOMMENDED!) 2. Why do my locally installed packages keep being removed? As part of the nightly update, the locally installed packages are made equal to the contents of /home/xbone/FreeBSD-X.Y-packages - meaning extra packages will be removed locally, and new ones will be added. To preserve locally installed packages, add the package names to /etc/pkg.ignore.local. To completely disable automated package updates, set isi_update_pkgs_enable="NO" in /etc/periodic.conf.local. 3. How can I customize /etc/KERNEL? If your machine requires a custom kernel to work correctly (most laptops do), there are two choices: (1) Add the changes to /etc/KERNEL, and commit. This is preferred for non-machine specific changes that should propagate to all our machines (e.g. to enable IPv6 or similar changes.) (2) Edit /etc/KERNEL, then create a patch file under /etc/KERNEL.patches and symlink it to /etc/KERNEL.patch.local: # cvs diff -u KERNEL > /etc/KERNEL.patches/ # ln -s /etc/KERNEL.patches/ \ /etc/KERNEL.patch.local The patch will always be applied during automated kernel builds on the local machine. This is the preferred way for per-machine changes (e.g. configure sound card). The automated kernel update can be turned off by setting isi_update_kernel_enable="NO" in /etc/periodic.conf.local (NOT RECOMMENDED!) 4. How do I enable support for multiple locations? During boot-up (and after PC cards are changed), the machines will try to auto-detect locations and re-configure. The first one to succeed will be picked. The name of a location directory must be an IP address in AAA.BBB.CCC.DDD notation. Location directories contain configuration files which will be linked into place in /etc under the same name before the startup continues. For example, at ISI, every file in /etc/locations/128.9.160.161 will be linked into /etc. If all probes fail, the special location directory "unknown" will be used to configure the machine. 5. I deleted/changed the kernel sources, how do I get them back? Execute: # cvsup -g /etc/supfiles/src-supfile 6. How can I update the ports directory? As root, execute # /etc/periodic/daily/930.isi-update-ports update You can also automatically have the tree updated nightly. See isi_update_ports_enable in /etc/periodic.conf.local. 7. How can I check what the daily/weekly/monthly update did? Check the log files in /var/log/(daily|weekly|monthly).log - older logs may be gzip'ed in the same location. 8. How can I install KAME on my machine? Moving KAME sources under /usr/kame will *automatically* cause the update mechanism to build and install the KAME binaries and a KAME kernel during the next update run. To disable building and installing KAME, set isi_update_kame_enable="NO" in /etc/periodic.conf.local (NOT RECOMMENDED!) Note that an already installed KAME will not be removed by this setting. 9. How do I apply kernel patch to all systems? *********************************************************** * Warning: the kernel patch mechanism is not bulletproof. * * Read the instructions carefully, and test your * * patches thoroughly before commit. * *********************************************************** 1. Assume the file you want to patch is /usr/src/sys/foo.c. Copy the file to /usr/src/sys/foo.c.new and modify it. 2. Make the patch file: % diff -u /usr/src/sys/foo.c /usr/src/sys/foo.c.new > .patch It's important that the full paths are specified in the "diff" command since we apply patches from /etc/periodic/daily. 3. Move .patch to /etc/patches. Make sure "isi_patch_kernel_enable" is set to "YES" in periodic.conf and/or periodic.conf.local. The patches in /etc/patches will be applied automatically next time the kernel is updated (from /etc/periodic/daily/920* script.) If you want to reverse or apply more patches to a previously applied patch, say bf.patch. Don't modify bf.patch. It is safer to assume bf.patch is already applied, and make another patch against the new file and call it bg.patch so that it will be applied after bf.patch. If you have any doubts, contact Lars or Yushun before you commit. 10. How do I install software on all machines automatically? Build it from ports on one machine, make a package out of it, and copy the package to /home/xbone/FreeBSD-X.Y-packages. Make sure it is world-readable. The package will be automatically installed on all machines during the nightly machine update process. Important! You *must not* add a package that requires user input during the package-add, such as the pine port! Adding such a package will stall this and all future nightly updates! 11. How do I create an X config file? First, execute "XFree86 -configure" as root. This will create a bare X config file and tell you how to test it. Add this line to the "Files" section: FontPath "/usr/X11R6/lib/X11/fonts/TrueType/" Add these two lines to the "Module" section: Load "type1" Load "freetype" Add this line to the "InputDevice" section of your keyboard: Option "XkbModel" "pc104" Comment out the "BusID" line of the "Device" section. Add this line to the "DRI" section: Mode 0666 Optional: To force the screen into a certain bit-depth by default, add this line to the "Screen" section: DefaultDepth where is the bit-depth (e.g. 8/16/24/32). To force the screen into a certain resolution by default, add lines like this to every "Display" sub-section in the "Screen" section: Modes "x" where and are the screen dimensions (e.g. 1600 and 1200). Don't forget to copy your new X config file to /etc/X11-Config, give it an appropriate name, and symlink it to /etc/X11/XF86Config from there. 12. What exactly does the local host firewall block? Every host runs a local firewall. While this protects against some attacks, it is by no means a complete solution! First off, the local firewall is only effective if a secondary firewall protects the local network (such as at ISI), because ALL DIRECTLY ATTACHED NETWORKS ARE TRUSTED. The local firewall rules divide the world up in two areas: directly attached and not directly attached. No packets are blocked from directly attached networks, ever. Selected TCP/UDP ports are blocked for non-local networks, such as telnet, ftp, finger, etc. See /etc/rc.firewall.local for the current rules. HOWEVER! Running more services - even when they're blocked for the outside - will still lower the security of a machine. If any machine inside the local trusted network gets compromised, the local firewall provides no protection. More services = more potential holes, so it's still a good idea to turn everything off that's not essential. 13. How can I view Microsoft Word documents? Use OpenOffice: # /usr/local/OpenOffice.org1.0/program/soffice (Installs files into your home directory on first execution, later executions then start OpenOffice directly.) 14. How do I set up striped disks? You need multiple (preferably identical) disks. On each of those disks, create same-size FreeBSD partitions. Example: da1s1 and da2s1 (first slice on two disks) For each partitions, create a single UFS slice filling the entire partition. You can either use the FreeBSD installer (/stand/sysinstall) for this. INSTALL.sh has details on how to do this with sysinstall. Example: da1s1e and da2s1e Create a device entry for the stripe: *** On FreeBSD-CURRENT, skip these two instructions, ccdconfig will *** automatically make the necessary device(s). # cd /dev # sh MAKEDEV ccd0 Next, configure ccd to create a striped volume, and save the configuration: # ccdconfig ccd0c 127 none /dev/da1s1e /dev/da2s1e # ccdconfig -g > /etc/ccd.conf Finally, create a UFS filesystem on the striped volume: # newfs -U /dev/ccd0c The volume is now ready for mounting. If you mount on top of /usr like we do at ISI, you should move the original contents of /usr to the striped volume: # mount /dev/ccd0c /mnt # cd /usr && pax -v -r -w -pe . /mnt # umount /mnt # rm -rf /usr/* # mount /dev/ccd0c /usr Finally, create an entry in /etc/fstab for the striped volume: /dev/ccd0c /usr ufs rw,noatime 2 2 15. How do I configure a PCEN machine? The only difference for a PCEN machine is that the following line needs to be added to /etc/rc.conf.local: defaultrouter="128.9.112.7" And of course hostname and IP address must be in the postel.org and 128.9.112-net, repectively. 16. Where is ISI-specific information kept? Some ISI-specific scripts, documentation, databases and configurations are under /nfs/public. 17. How do I turn on X display auto-locking? And display power savings? If you use xscreensaver to auto-lock your X display when you're away, and power savings for the display doesn't turn on anymore, run "xscreensaver-command -prefs" to turn it back on. (It was a default in an earlier version, but now isn't.) If you'd like to enable xscreensaver, put this line in your .xsession and/or .xinitrc file: which xscreensaver && xscreensaver -nosplash & 18. Why does Netscape Navigator not start RealPlayer? Your MIME setup may be incomplete. To register RealPlayer as the application handler for its MIME types, and to enable the RealPlayer Netscape plugin, run these two shell scripts: /usr/local/lib/RealPlayer8/mimeinstall.sh /usr/local/lib/RealPlayer8/pluginstall.sh 19. Are wireless cards supported, and how? Wireless cards are supported through start_if.XXX scripts, where XXX is the name of the interface. These scripts should contain the necessary commands to allow a card to associate with a base station (set WEP keys, SSID, etc.) Furthermore, these start_if scripts can be location-dependent, i.e. putting them under /etc/locations/YYY allows automatic reconfiguration of one card for different environments. See the examples for the ISI location in /etc/locations/198.32.16.193 20. How do I install FreeBSD on a new machine? See /etc/INSTALL.sh. At this time, you *MUST* be at ISI for the installation to work. 21. How do I use CVS over SSH? First, set the CVS_RSH environment variable to ssh. # setenv CVS_RSH ssh Second, to specify that the CVS repository should be accessed over SSH, specify it as follows :ext:${USER}@${REMOTEHOST}:/path/to/CVSROOT Example (checking out the X-Bone CVS tree): # cvs -d :ext:larse@dee.isi.edu:/home/xbone/CVSROOT co xbone ${USER} is your _remote_ user name on ${REMOTEHOST}. 22. How do I enable my WinModem? Use comms/ltmdm for Lucent and comms/mwavem for Intel WinModems. 3Com ones are not (yet) supported. Note that some of these ports may already be installed by default (check kldstat). 23. How do I upgrade to a newer release of FreeBSD? We only support a complete-from-scratch reinstall. The following has some stuff that I (Lars) always forget, it's not meant for general consumption. Updating /etc: (1) Duplicate the CVS tree (2) Check out these from cvsup for the new release: src-etc, src-usrbin, src-share, usr-sbin, src-base (3) Move a copy of the CVS etc to new machine as CVSETC (4) Run mergemaster: mergemaster -s -v -w160 -D 24. How do I enable PPTP to ISI? Simple, a working configuration already exists in /etc/mpd. You will need to create a new file called /etc/mpd/mpd.secret, which consists of a single line containing your ISI login, a tab, and your ISI password. Note: The login/password must be you "ISI remote access password", which may or may not be identical to your Unix password. You must also edit /etc/mpd/mpd.conf. Under the section "ISI", find the line "set bundle authname" make sure that your username is at the end of the line (by default, it is "larse"). To enable PPTP to ISI for a specific location, add the following line to that location's rc.conf.local file (under /etc/locations): mpd_enable="YES" PPTP to ISI will start on the next reeboot. 25. How do I enable PPP? This is slightly more complicated than setting up PPTP, but still pretty straightforward. You need to edit /etc/mpd/mpd.conf, and change these lines in the "DIALUP" block at the beginning of the file: set bundle authname set modem var $Telephone "" Replace with your login name at the ISP you're dialing into, and with the ISP's PPP dial-in number. You must almust also create (or edit) /etc/mpd/mpd.secrets as descrined in the previous FAQ item, adding your ISP login and password. Upon reboot, a PPP connection to your ISP will be dialed on-demand whenever there is network activity. Note: Several daemons that are enabled by default cause constant network activoty (e.g., ntpd to sync your clock). You will have to disable them to keep your phone bill low. 26. How do I update FreeBSD-CURRENT-etc from vendor source? First, be sure you will almost never have to do this, the current group of admins should take care of this. Vendor changes (i.e. from the FreeBSD CVS tree) are imported into our local repository as repeated imports onto the vendor branch. Make sure you read the relevant sections in the CVS manual! Messing things up here is hard to recover from without a backup. Here's what I do: setenv DATE `date "+FreeBSD-%Y-%m-%d"` cd /usr/src mkdir -p /tmp/up mergemaster -D /tmp/up -i cd /tmp/up/etc cvs -d /home/xbone/CVSROOT import \ FreeBSD-CURRENT-etc FreeBSD ${DATE} Usually, at this point there will be conflicts, so do "cd .." followed by the cvs commit that the import command printed at the end: cd /tmp cvs -d /home/xbone/CVSROOT checkout -j \ -j${DATE} FreeBSD-CURRENT-etc cd FreeBSD-CURRENT-etc Note: is the previous import. Resolve the conflicts, then: cvs commit -m "Conflict resolution." The update your local /etc: cd /etc cvs update 27. Where do per-machine settings go that aren't per-location? Create /etc/rc.conf.machine and put the custom settings there. Things like moused_flags, saver, pccard_mem, usb_enable and dumpdev are good examples for this file (they are all machine-dependent but not location-dependent). 28. How do I debug a kernel over a nullmodem cable? This is explained in detail in the FreeBSD handbooks at: http://www.freebsd.org/doc/en_US.ISO8859-1/books/\ handbook/serialconsole-setup.html http://www.freebsd.org/doc/en_US.ISO8859-1/books/\ developers-handbook/kerneldebug.html http://www.freebsd.org/doc/en_US.ISO8859-1/books/\ handbook/anoncvs.html In a nutshell: First, enable support for a serial console and gdb debugging by setting the 0x90 flag on the serial port you want to debug the test kernel over (in the test kernel config file.) You also want to set "options CONSPEED=115200" to speed up the serial port. Recompile and install the kernel. Second, add "BOOT_COMCONSOLE_SPEED= 115200" to /etc/make.conf and reinstall the boot loader with support for the faster serial console. You will need to have the libstand sources installed in /usr/src/lib/libstand; you can get them via anonymous CVS. Make sure you are getting the correct revision for your kernel. Then do this: # cd /usr/src/sys/boot # make all install Third, create /boot.config, which holds the default flags to the boot loader. Add "-P", which will use the serial console if no keyboard is detected. Other possible flags are described in boot(8). Connect the two machines with a nullmodem cable, and start monitoring the serial console on your debugging machine: # tip -115200 com1 29. How do I run FreeBSD inside VMware? This should just work (i.e. our kernel config has the devices that VMware will emulate.) However, you MUST boot a non-SMP kernel inside the virtual machine! If your regular kernel has SMP enabled, boot /boot/kernel.unpatched/kernel from the loader. Keep in mind that VMware emulates "lnc" Ethernet cards, so you may have to tweak your rc.conf.local. Also make sure to install the VMware guest OS tools: 1. Choose "Install guest OS tools", should be in one of the VMware menus ("File" menu, usually.) 2. After the virtual machine has booted, log in as root, then: # mount /cdrom # cd /usr/local # tar zxvf /cdrom/vmware-freebsd-tools.tar.gz # umount /cdrom # reboot The guest tools will start automatically (due to /etc/rc.d/vmware) on reboot. 30. Which are the custom (ISI) startup scripts we use in /etc/rc.d? This is from the -CURRENT setup we used as of 1/8/2004: dynip4fw dynip6fw dynipfw etcdb etcln isiconfig links location.sh logs lpc mountpoints mpd namedforwarders sethostname truetype tunefs usermount vmware Description: dynip4fw dynip6fw dynipfw etcdb etcln isiconfig links location.sh logs lpc mountpoints mpd namedforwarders sethostname truetype tunefs usermount vmware ########################################################################## # SSH ########################################################################## 51. How can I setup SSH to work for my ISI account? Action at ISI (i.e., boreas) uses SSH.com's implementation, but FreeBSD and Linux use OpenSSH's implementation. The key file formats are incompatible between the two. The following instructions outline the generic steps of configuring SSH, followed by the platform- and implementation-specific instructions. In short, SSH uses public key cryptography to secure sessions. The client uses the private key of a pair, and the server must be configured to allow the public key of that same pair. The steps to setup SSH between the accounts involve generating a key pair, tell the client account to use the private key, copy the public key to the server account, and configure the server account to accept the public key. These instructions will setup your ISI account to SSH between our FreeBSD systems (OpenSSH), and boreas (SSH.com). Note that these instructions will NOT work for general SSH setup between remote systems because our FreeBSD hosts and boreas all mount to your home directory at ISI, which is not the case if you want to setup SSH between your ISI account and your USC account. ******************************************************************** * Move or backup your ~/.ssh and ~/.ssh2 directory because the * * following instructions assume empty ~/.ssh (for OpenSSH) and * * ~/.ssh2 (SSH.com), and will overwrite your existing files with * * the same names. * ******************************************************************** (1) On OpenSSH/FreeBSD system: % ssh-keygen -t dsa -c "$comment" % mv id_dsa* ~/.ssh % touch ~/.ssh/authorized_keys % more ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys % ssh-keygen -e -f ~/.ssh/id_dsa.pub > ~/.ssh2/id_dsa-SECSH.pub % touch ~/.ssh2/authorization % echo "Key id_dsa-SECSH.pub" >> ~/.ssh2/authorication (2) On SSH.com system (Boreas) % ssh-keygen2 -c "$comment" % touch ~/.ssh2/identification % echo "IdKey id_dsa_1024_a" >> ~/.ssh2/identification (3) Back to OpenSSH/FreeBSD system: % ssh-keygen -i -f ~/.ssh2/id_dsa_1024_a.pub >> \ ~/.ssh/authorized_keys 52. I already have SSH setup on my Boreas account, can I use the same key pair on the FreeBSD systems? Yes, the following steps will convert your SSH.com key pair (~/.ssh2/id_dsa_1024_a & ~/.ssh2/id_dsa_1024_a.pub) into the OpenSSH format (~/.ssh/id_dsa & ~/.ssh/id_dsa.pub). # To be safe, tar up your .ssh and .ssh2 directories in case you make a mistake. a) Convert public key (on an OpenSSH machine): cd .ssh2 ssh-keygen -i -f id_dsa_1024_a.pub > ../.ssh/id_dsa.pub cp id_dsa.pub authorized_keys2 b) Strip password from ssh.com private key (SSH.com machine): cd .ssh2 cp id_dsa_1024_a id_dsa_1024_a.temp ssh-keygen -e id_dsa_1024_a (puts you in interactive mode) - enter passphrase - answer "yes" to edit key - answer "no" to edit key comment - answer "yes" to edit passphrase - hit return to remove passphrase - hit return to "again" - answer "no" to continue editing key - answer "yes" to save key c) Convert unprotected private key (OpenSSH machine) cd .ssh2 ssh-keygen -i -f id_dsa_1024_a.temp > ../.ssh/id_dsa d) Test conversion without password (OpenSSH machine) ssh boreas (should work without password) e) Restore password to private key (OpenSSH machine) cd .ssh ssh-keygen -p -N -f id_dsa f) Test with password (OpenSSH machine) ssh boreas (should work as before) 53. How do I SSH from my Windows system into our FreeBSD machines or Boreas? The following instructions apply to SSH.com's implementation of SSH client (because that's what I use :-). Feel free to add instructions for other Windows SSH client programs. First, go through the steps outlined in FAQ. 51 (or 52). The SSH.com program will ONLY recognize the key files in SSH.com format. (1) Execute "SSH Secure Shell" program on your Windows system. (2) Go to [Edit] => [Setting] menu. (3) Select "Global Settings" => "User Authentication" => "Keys". (4) Click the [Import...] button. (5) Open your home directory under boreas, go to .ssh2, and select id_dsa_1024_a.pub. (Note, id_dsa_1024_a must be in the same directory.) (6) Click OK. Now the key should appear in the Settings window. Save the setting and now you should be able to SSH into Boreas and any of our FreeBSD hosts. 54. How can I login as root on our FreeBSD hosts using SSH w/o typing a password? Make sure you have SSH configured and can ssh into machines as yourself. (See the Action Online Help page at: and FAQ items 51 & 52 above.) Append your public key /etc/root/.ssh/authorized_keys. See if it works: # ssh -l root localhost Then cvs add and commit the changes. ########################################################################## # Storage ########################################################################## 71. How do I burn image files (.iso) to CD-R and DVD+RW media? Note that the provided commands support ONLY the media indicated. For different media (CD-RW, DVD+R, DVD-R/RW, etc.), please refer to burncd(1), sysutils/dvd+rw-tools, sysutils/cdrtools, etc. [CD-R] % burncd -f /dev/acd0 -s max data $filename.iso fixate [CD-RW] Same as CD-R, but might need to format the media first. % burncd -f /dev/acd0 -s max erase [DVD+RW] Need to format the media first. Use -F if already used. % burncd -f /dev/acd0 format dvd+rw % burncd -f /dev/acd0 dvdrw $filename.iso fixate 72. How do I archive a directory onto CD-R/RW or DVD+R/RW? Refer to Chapter 12 of the FreeBSD Handbook, "Storage," espeically 12.5 "Creating and Using Optical Media (CDs & DVDs)." Some simple instructions are listed here for a quickstart. For these instructions, see mkisofs(8) from sysutils/mkisofs port. (1) Create an ISO image file. % mkisofs -U -r -o $archive.iso $archive_dir (2) Burn the ISO image onto a recordable media. See FAQ 71. (3) You could also mount ISO image files as follows: % mdconfig -a -t vnode -f $imagefile.iso -u ${md_no} % mount -t cd9660 /dev/md${md_no} /mnt Earlier FreeBSD 4.x & 5.x use vnconfig instead of mdconfig. 73. How do I migrate a working FreeBSD installation to another HD on the same system? Refer to FreeBSD FAQ Chapter 9, "Disks, Filesystems, and Boot Loaders" for details. The following is an example of how I moved a FreeBSD-CURRENT installation to another HD on the same system. (1) Prepare the target file system. - Option 1: Perform a new installation of FreeBSD with the file system layed out the way you want it. This is preferred when you want to migrate user data and configurations to a new FreeBSD system (drive or partitions) for either upgrade or cleanup purposes. - Option 2: Create new partitions/slices with sysinstall or a combination of fdisk/newfs/disklabel. This is better for moving the whole system because you will have exactly the same files from the original instance of FreeBSD instead of mixing up files from two installation if you install a new FreeBSD before moving over. (2) Boot into the source installation and mount the newly created slices. Assume the target root is mounted as /new-root. (3) Copy the whole system over. - cd into the *target* directory; then do dump/restore % cd /new-root % dump 0af - / | restore xf - * You need to perform this on ALL slices of your original system if you have separate /, /usr, /var, etc. at both the source and target installations. Or you could merge or split them as described in the FreeBSD FAQ. (4) Update the /etc/fstab at the target location. Make sure it has the current /dev entries for all the mount points. This is very important, you should boot into single user mode when booting into the new installation for the first time and do a sanity check before proceeding. If you merge or split the original file system arrangement, the entries in /etc/fstab will be very different from the original one, you should add or remove the mount points accordingly. 81. How do I remove deplicate emails from an existing mailbox? Use mail/procmail. The basic idea is to detect duplicate emails by their message ID field using formail(1). (1) Create a simple procmailrc file: ~/.duprc # simple procmailrc file to eliminate duplicate messages :0 Wh: .msgid.lock | formail -D 65536 .msgid.cache :0: ${newbox} # end of procmailrc ===================================== (2) Run the following command: % formail -z -s < ${OrigBox} procmail -m newbox=${NewBox} \ MAILDIR=${OrigBoxPath} ~/.duprc This would go through the ${OrigBox}, remove the duplicates, and store the remaining emails in ${NewBox} under ${OrigBoxPath}. 82. How do I upgrade net/gnomemeeting? Follow these steps: % pkg_deinstall ffmpeg % cd /usr/ports/devel/pwlib && make clean % cd /usr/ports/net/openh323 && make clean % cd /usr/ports/devel/pwlib && make % cd /usr/ports/net/openh323 && make % portupgrade -w gnomemeeting % portupgrade -N ffmpeg