http://freebsdwiki.net/api.php?action=feedcontributions&user=Joe&feedformat=atomFreeBSDwiki - User contributions [en]2024-03-28T20:18:55ZUser contributionsMediaWiki 1.18.0http://freebsdwiki.net/index.php/User:JoeUser:Joe2007-07-24T07:59:00Z<p>Joe: The beginning!</p>
<hr />
<div>A regular freebsd user with some experiance with rather large file systems... <br />
<br />
I've decided to use my user page as something of a scratchpad for things I've had to do in configuring my systems... some of them might end up as articles here, or they might not.</div>Joehttp://freebsdwiki.net/index.php/Talk:Script_to_install_common_packagesTalk:Script to install common packages2006-03-13T22:29:32Z<p>Joe: </p>
<hr />
<div><br />
- Why not make a port with all these as dependencies?<br />
<br />
Feel free to do that; I think that's what the instant-workstation port did, but I haven't taken the time to learn how to make ports and probably won't for a while yet.<br />
<br />
yeah... instant-workstation does install alot of these. It's certainly not the exact same setup (vnc and openoffice aren't there, for example). I always thought that instant-workstation is the one port I could really understand a configure screen for... and it doesn't have one.<br />
--[[User:Joe|Joe]] 17:29, 13 March 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:Hard_Disk_Partition_SizesTalk:Hard Disk Partition Sizes2006-03-13T21:47:25Z<p>Joe: </p>
<hr />
<div>excellent article, thanks joe.<br />
<br />
--[[User:Dave|Dave]] 22:41, 24 Dec 2005 (EST)<br />
<br />
Odd... I don't think I've ever had fsck take longer than 30seconds on boot for my system directories/partitions (except the time I had a 300Gig+ root partition)<br />
--[[User:Joe|Joe]] 16:41, 13 March 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:Hard_Disk_Partition_SizesTalk:Hard Disk Partition Sizes2006-03-13T21:41:53Z<p>Joe: </p>
<hr />
<div>excellent article, thanks joe.<br />
<br />
--[[User:Dave|Dave]] 22:41, 24 Dec 2005 (EST)<br />
<br />
Odd... I don't think I've ever had fsck take longer than 30seconds on boot (except the time I had a 300Gig+ root partition)<br />
--[[User:Joe|Joe]] 16:41, 13 March 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Updating_to_FreeBSD_6.0Updating to FreeBSD 6.02006-02-24T15:03:08Z<p>Joe: Fixing busted link</p>
<hr />
<div>This article describes the source upgrade process from 5.X to 6.0 . It is essentially the same as the handbook chapter, modified to highlight a few potential pitfalls in the upgrade process. There are three basic updating options, although the source update can be considered the 'standard' method.<br />
#Source Update (described in this document)<br />
#Reinstall using a new install iso cd (keep good backups... nice to fall back on)<br />
#Binary update using the freebsd-update port as described [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]<br />
<br />
The complete FreeBSD Handbook section can be found here: [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html] This article is an attempt to more clearly layout some of the steps involved for this particular upgrade.<br />
<br />
==Upgrading from older versions of 5.X==<br />
There are potential problems updating a system from 5.1-5.3 to 6.0 directly. Although they do not affect everyone, it is highly recomended to upgrade at least to RELENG_5_4 or RELENG_5 (Read [[FreeBSD_Release_Branches]] for definitions of these tags) before upgrading to 6.0 . You can use the somewhat more general instructions in [[Upgrading_the_base_system]] to do the upgrade from 5.X to RELENG_5.<br />
<br />
==Getting Up To Date Source==<br />
*Use [[FreeBSD_Release_Branches]] to help you decide which release to follow.<br />
*Select a supfile tag.<br />
*Use [[Updating the source tree]] to update your source tree.<br />
<br />
==System Preperation==<br />
There are a few things you need to do before you launch into compiling your new kernel, particularly if you are jumping across major versions.<br />
<br />
===Do your homework===<br />
Google for "FreeBSD ''version'' ''your-particular-hardware''" to see if anyone has had problems... and to check if there were any solutions. You may want to use [http://www.google.com/bsd], and double check with an archive of FreeBSD-Questions or FreeBSD-Stable as well. You also MUST read through /usr/src/UPDATING. For future reference, much of this information was taken from the COMMON ITEMS section of UPDATING, but some of it may change in the future, so it's only smart to double check.<br />
<br />
===Backups===<br />
Everyone says to make backups, what is less obvious is what exactly should be backed up. For example... usually large data directories and home directories that are on their own partitions or drives do not need to be backed up (more than usual). These are simply unmounted and not touched again until the system is up and running. Most of your system can just be dumped to a larger file system and left. But you will want to keep a few files handy (possibly inside of /root/old_system/ or something similer)<br />
*/etc/rc.conf<br />
*/boot/loader.conf<br />
*/etc/sysctl.conf<br />
You may want to check the loader.conf file for particular hardware modules that will need special attention. (nvidia is a common one)<br />
<br />
===Double check your /etc/[[make.conf]] settings===<br />
From the [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html handbook]:<br />
Examine the files /usr/share/examples/etc/make.conf<br />
(called /etc/defaults/make.conf in FreeBSD 4.X) and /etc/make.conf.<br />
The first contains some default defines - most of which are commented out.<br />
To make use of them when you rebuild your system from source, add them<br />
to /etc/make.conf. Keep in mind that anything you add to /etc/make.conf<br />
is also used every time you run make, so it is a good idea to set them<br />
to something sensible for your system.<br />
A typical user will probably want to copy the CFLAGS and NO_PROFILE (or<br />
NOPROFILE on FreeBSD 5.X and older) lines found in<br />
/usr/share/examples/etc/make.conf (or in /etc/defaults/make.conf on<br />
FreeBSD 4.X) to /etc/make.conf and uncomment them. Examine the other<br />
definitions (COPTFLAGS, NOPORTDOCS and so on) and decide if they are<br />
relevant to you.<br />
From a recent /usr/src/UPDATING<br />
If CPUTYPE is defined in your /etc/make.conf, make sure to use the<br />
"?=" instead of the "=" assignment operator, so that buildworld can<br />
override the CPUTYPE if it needs to.<br />
<br />
===Customizing the kernel===<br />
For a major update like this, you may want to simply install the GENERIC kernel, and then customize it and rebuild when you know the major version change hasn't disrupted something on your system. See [[Kernels,_Custom]] for information on customizing a kernel. Note that your old kernel config file from 5.X CANNOT simply be copied and used for 6.X. If you are going to use a custom kernel, just make sure to use '''make kernel KERNFILE=''your kernel config file (full path)'' ''' below.<br />
<br />
===Upgrade your ports...===<br />
by whatever means you use. This is not strictly needed, but may head off problems with the last step in this process. You can refer to [[ports]] for more information about this.<br />
<br />
==Compilation==<br />
Follow these steps in order, as long as they do not produce error messages.<br />
'''su -''' ''#Become root''<br />
Password:<br />
'''cd /usr/src''' ''#or to whichever directory you put src in''<br />
'''make buildworld'''<br />
This will build the system libraries and surrounding programs for the operating system to function<br />
'''make buildkernel'''<br />
'''make installkernel'''<br />
Build and install the [[Kernel]] itself. Note that you will often see documentation that tells you to <br />
*make kernel<br />
This is just an alias that executes both of the above commands in sequence.<br />
'''shutdown -r now''' ''#Reboot the system''<br />
From the boot prompt '''boot -s''' will launch in single user mode. Then do the following:<br />
fsck -p<br />
mount -u /<br />
mount -a<br />
cd src ''#or /usr/src''<br />
adjkerntz -i ''#if the CMOS clock is set to local time''<br />
This should get you ready to install world.<br />
*Local Terminal Access<br />
Note that this assumes you are at a local terminal on the machine. Single user mode makes sure that system binaries are not being replaced while they are being used. If you really cannot have physical access to the machine, you might risk cutting off all other services other than ssh, and killing any unnecessary daemons (to minimize library usage) and attempting the remote upgrade, but this is neither supported nor recomended. If you continue in multiuser mode you should realize there is a significant probability that you will break your system.<br />
'''mergemaster -p'''<br />
This script will bring you through each of your configuration files and ask you if you want to update to the new settings that it has found. This will really depend on the settings files that are being updated. A common tactic here is to record any changes that look like they disappeared from any files that you edited, and accept all changes. Then examining the changes in more detail after the system is up and running.<br />
'''make installworld'''<br />
Install the world libraries and programs.<br />
'''mergemaster -i'''<br />
Run this script again to check for changes from the installed world.<br />
'''shutdown -r now'''<br />
This will reboot the system. Bring it up again in as normal with your new kernel running. Type '''uname -a''' on a prompt to verify the version.<br />
'''portupgrade -af'''<br />
This is not optional or minor. Your ports have linked against system libraries that have been changed, sometimes drastically. If you do not run this command, you will likely have streams of funny-looking error messages from a wide variety of your ports. This will probably take longer than any other part of the install (up to several days for slower systems with GUI's installed, an hour or two for a server without any massive ports installed).<br />
<br />
'''Restore configuration files'''<br />
<br />
Restore from your notes taken during the mergemaster -p phase, and the saved configuration files in the [[#Backups]] step. You may need to also reinstall any binary modules (non-ports) that you may have had previously installed. nvidia video drivers and RAID card drivers are commonly in this category.<br />
<br />
==If there are problems==<br />
First... did you do everything properly and in order?<br />
===If things break in compiling world or kernel===<br />
This is probably the best place for things to break, as they haven't actually changed anything yet. Firstly, check a few of the listed errors in /usr/src/UPDATING, and try a few of the debugging ideas in the handbook. If neither that nor Google works. Keep in mind, if your kernel compile breaks here you haven't actually broken anything, so you've only inconvenienced yourself.<br />
You may want to try ''make clean'' before doing subsequent build attempts.<br />
<br />
===If your system won't boot to the new kernel===<br />
By default, FreeBSD saves a copy of the old kernel as kernel.old . If you can't get it to boot... at the countdown loader, interrupt it and type the following<br />
unload<br />
boot kernel.old<br />
This should boot your old kernel, and you can examine logs to try to determine what happened. One thing to watch out for though, don't just build another kernel without saving your current one, because then the current buggy kernel will overwrite your current failsafe ''kernel.old''.</div>Joehttp://freebsdwiki.net/index.php/Category_talk:InstallationCategory talk:Installation2006-02-24T14:56:00Z<p>Joe: upgrading</p>
<hr />
<div>How do you network up bsd with a windows box?<br />
<br />
see [[Samba]]. --[[User:Jimbo|Jimbo]] 15:36, 17 Dec 2004 (EST)<br />
<br />
== upgrade? ==<br />
<br />
Any possibility of including good upgrade procedure for exisiting users? For example: 5.x to 6? FBSD does a great job of documenting the in-place technique for upgrading within a version (for example: 5.3 to 5.4), but jumping versions is not always as clean-cut.<br />
<br />
== upgrading ==<br />
<br />
To be honest, I've always found it easier to just back up /etc and /usr/local/etc and do a clean install. Takes less time to do it that way then to go through all the crud with mergemaster and whatnot, in my experience.<br />
--[[User:Jimbo|Jimbo]] 20:09, 23 Feb 2006 (EST)<br />
<br />
== upgrading ==<br />
<br />
Erm... I thought I already did that?<br />
Please let me know in the Talk section what you would like to see added: [[Updating_to_FreeBSD_6.0]]</div>Joehttp://freebsdwiki.net/index.php/Talk:Ports_Tree,_UpdatingTalk:Ports Tree, Updating2006-01-17T16:42:41Z<p>Joe: Add mention of indexes</p>
<hr />
<div><br />
This is incomplete. I'm getting this error message:<br />
<br />
Release not specified for collection "default".<br />
<br />
[[User:Simon|relax]]<br />
<br />
== defaults section ==<br />
<br />
should look something like this:<br />
*default host=cvsup000.FreeBSD.org<br />
*default base=/var/db<br />
*default prefix=/home/ncvs<br />
*default release=cvs<br />
*default delete use-rel-suffix<br />
with a proper cvsup# server of course. You may need to mkdir a /home/ncvs if you do not already have one.<br />
<br />
-d.<br />
<br />
== defaults section ==<br />
<br />
Dave's conf above is a bit nonstandard - normally the ports tree lives under /usr in /usr/ports; whereas his will wind up in /home/ncvs/ports, which will confuse the hell out of mose FreeBSD admins (and generate a second unneeded copy of the ports tree if you installed it when you first built the system, in which case you've already got one at /usr/ports). <br />
<br />
This is a working configuration (which is not to say that his isn't, except I don't think there's actually a "cvs000" server):<br />
<br />
# Defaults that apply to all the collections<br />
#<br />
# IMPORTANT: Change the next line to use one of the CVSup mirror sites<br />
# listed at http://www.freebsd.org/doc/handbook/mirrors.html.<br />
*default host=cvsup.FreeBSD.org<br />
*default base=/var/db<br />
*default prefix=/usr<br />
*default release=cvs tag=.<br />
*default delete use-rel-suffix<br />
<br />
# If you seem to be limited by CPU rather than network or disk bandwidth, try<br />
# commenting out the following line. (Normally, today's CPUs are fast enough<br />
# that you want to run compression.)<br />
*default compress<br />
<br />
## Ports Collection.<br />
#<br />
# The easiest way to get the ports tree is to use the "ports-all"<br />
# mega-collection. It includes all of the individual "ports-*"<br />
# collections,<br />
ports-all<br />
<br />
Note that cvsup.freebsd.org IS a valid cvsup server, as are cvsup1 through something like cvsup19 or so (?) - be careful with those, though, as quite a few of them are from ''way'' across the pond and slower than molasses. --[[User:Jimbo|Jimbo]] 01:14, 4 Jan 2005 (EST)<br />
<br />
== news to me ==<br />
<br />
when i first copied over the confs in /usr.../example/cvsup all I changed was the cvsup server and ran cvsup against it, I got errors saying "/home/ncvs doesn't exist, loser" (or something like that,) so I just did a mkdir and it worked.....--[[User:Dave|Dave]] 09:41, 4 Jan 2005 (EST)<br />
<br />
== the /home/ncvs thing ==<br />
<br />
Sure, it'll "work" if you want your ports in /home/ncvs/ports - but it's NOT updating the tree at /usr/ports. That's what the "prefix" section means.<br />
<br />
Was this one of your Solaris boxes? Maybe that platform has an odd file in it. I've never seen the default ports-supfile have a prefix in it other than /usr. --[[User:Jimbo|Jimbo]] 10:11, 4 Jan 2005 (EST)<br />
<br />
== no, not a sparc box ==<br />
<br />
this was a fresh install of 5.3-RELEASE on my POS compaq laptop. Do you build your cvsup files from scratch or do you modify the examples? I just copied the file in ...../examples/cvsup/ and ran [[sed]] to change the CHANGE_THIS parts.<br />
<br />
--[[User:Dave|Dave]] 00:52, 7 Jan 2005 (EST)<br />
<br />
I build the cvsup port, then go in and edit the supfile by hand, usually. Never seen it use a base of ANYTHING but /usr in the example as installed by the cvsup port. --[[User:Jimbo|Jimbo]] 03:10, 7 Jan 2005 (EST)<br />
<br />
== Add mention of indexes ==<br />
<br />
portupgrade users can be constantly confused by cvsup-ing, but not rebuilding or downloading new index files. The result is that they don't see out-of-date ports using portversion. This is mostly a note to myself to add a note in this file when I writeup the portupgrade/portsnap/portmanager/csup/portversion/oodles-of-ports pages.<br />
--[[User:Joe|Joe]] 11:42, 17 Jan 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:Current_eventsTalk:Current events2006-01-04T17:02:52Z<p>Joe: Database Errors</p>
<hr />
<div>Not sure if this is the appropriate place to put this... but it seems logical. I note we have spam problems again. Are there any thoughts given to restricting IP-edits to prevent spam? (and probably adding a "Type the letters in the box" authentication to user-creation)<br />
--[[User:Joe|Joe]] 12:49, 22 Dec 2005 (EST)<br />
<br />
While editing a talk page today... I was getting this:<br />
Database error<br />
A database query syntax error has occurred. This may indicate a bug in<br />
the software. The last attempted database query was: <br />
(SQL query hidden)<br />
from within function "SearchUpdate::doUpdate". MySQL returned error<br />
"1016: Can't open file: 'searchindex.MYI' (errno: 145) (localhost)".<br />
--[[User:Joe|Joe]] 12:02, 4 Jan 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:FreeBSD_Release_BranchesTalk:FreeBSD Release Branches2006-01-04T17:00:53Z<p>Joe: Sorry for the repeat edits... something is broken.</p>
<hr />
<div>I ran across an interesting analogy on Questions today that may work its way into this article:<br />
Jerry McAllister wrote:<br />
Yah, stable is better than alpha or the bleeding edge current<br />
development image, but still in need of significant care.<br />
<br />
Think of how they report someone's health condition after a trauma.<br />
Stable seems to mean they can finally move the patient from the<br />
operating room to a bed with monitors and walk down and get lunch.<br />
But, the patient is still a long way from being able to drive home.<br />
<br />
Just so, a FreeBSD version spends a long time in stable before<br />
making it to RELEASE.<br />
<br />
I'm not sure I like refering to FBSD as a trauma patient... but the analogy certainly makes the "STABLE IS NOT THE MOST STABLE RELEASE" memorable.<br />
<br />
I may also want to explicitly mention that stable as a development release is in contrast to Debian, which is likely one of the mental stumbling blocks for many people with this concept.<br />
--[[User:Joe|Joe]] 12:00, 4 Jan 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:FreeBSD_Release_BranchesTalk:FreeBSD Release Branches2006-01-04T16:58:44Z<p>Joe: Ideas for future changes</p>
<hr />
<div>--[[User:Joe|Joe]] 11:58, 4 Jan 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:FreeBSD_Release_BranchesTalk:FreeBSD Release Branches2006-01-04T16:58:14Z<p>Joe: Ideas for future changes</p>
<hr />
<div>I ran across an interesting analogy on Questions today that may work its way into this article:<br />
Jerry McAllister wrote:<br />
Yah, stable is better than alpha or the bleeding edge current<br />
development image, but still in need of significant care.<br />
<br />
Think of how they report someone's health condition after a trauma.<br />
Stable seems to mean they can finally move the patient from the<br />
operating room to a bed with monitors and walk down and get lunch.<br />
But, the patient is still a long way from being able to drive home.<br />
<br />
Just so, a FreeBSD version spends a long time in stable before<br />
making it to RELEASE.<br />
<br />
I'm not sure I like refering to FBSD as a trauma patient... but the analogy certainly makes the "STABLE IS NOT THE MOST STABLE RELEASE" memorable.<br />
<br />
I may also want to explicitly mention that stable as a development release is in contrast to Debian, which is likely one of the mental stumbling blocks for many people with this concept.<br />
--[[User:Joe|Joe]] 11:58, 4 Jan 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:FreeBSD_Release_BranchesTalk:FreeBSD Release Branches2006-01-04T16:57:39Z<p>Joe: Ideas for future changes</p>
<hr />
<div>I ran across an interesting analogy on Questions today that may work it's way into this article:<br />
Jerry McAllister wrote:<br />
Yah, stable is better than alpha or the bleeding edge 'current'<br />
development image, but still in need of significant care.<br />
<br />
Think of how they report someone's health condition after a trauma.<br />
Stable seems to mean they can finally move the patient from the<br />
operating room to a bed with monitors and walk down and get lunch.<br />
But, the patient is still a long way from being able to drive home.<br />
<br />
Just so, a FreeBSD version spends a long time in stable before<br />
making it to RELEASE.<br />
<br />
I'm not sure I like refering to FBSD as a trauma patient... but the analogy certainly makes the "STABLE IS NOT THE MOST STABLE RELEASE" memorable.<br />
<br />
I may also want to explicitly mention that stable as a development release is in contrast to Debian, which is likely one of the mental stumbling blocks for many people with this concept.<br />
--[[User:Joe|Joe]] 11:57, 4 Jan 2006 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:FreeBSD_Release_BranchesTalk:FreeBSD Release Branches2006-01-04T16:56:42Z<p>Joe: Ideas for future changes</p>
<hr />
<div>I ran across an interesting analogy on Questions today that may work it's way into this article:<br />
Jerry McAllister wrote:<br />
Yah, stable is better than alpha or the bleeding edge 'current'<br />
development image, but still in need of significant care.<br />
<br />
Think of how they report someone's health condition after a trauma.<br />
Stable seems to mean they can finally move the patient from the<br />
operating room to a bed with monitors and walk down and get lunch.<br />
But, the patient is still a long way from being able to drive home.<br />
<br />
Just so, a FreeBSD version spends a long time in stable before<br />
making it to RELEASE.<br />
<br />
I'm not sure I like refering to FBSD as a trauma patient... but the analogy certainly makes the "STABLE IS NOT THE MOST STABLE RELEASE" memorable.<br />
<br />
I may also want to explicitly mention that stable as a development release is in contrast to Debian, which is likely one of the mental stumbling blocks for many people with this concept.</div>Joehttp://freebsdwiki.net/index.php/FreeBSD_Release_BranchesFreeBSD Release Branches2005-12-24T10:08:07Z<p>Joe: /* Which version of FreeBSD is right for me? */ Added an official docs link</p>
<hr />
<div>==Which version of FreeBSD is right for me?==<br />
This is a constant question on the FreeBSD-Questions mailing list. It basically boils down to a stability vs features tradeoff. The decision on which branch to track effects which supfile tag you will choose. A complete list of current supfile tags is available in the handbook [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html appendix].<br />
<br />
The full explanation of the release engineering terms and decision making process can be found [http://www.freebsd.org/doc/en_US.ISO8859-1/articles/releng/article.html here]. Something of the justification for this plan can be found [http://www.freebsd.org/doc/en_US.ISO8859-1/articles/version-guide/index.html here]. On the other hand, the following may give you a clearer idea of how to decide which release is right for your systems.<br />
<br />
You may want to recall that the "features vs security" tradeoff only applies to a system recompile. In other words, you aren't testing the new code in CURRENT unless you are regularly recompiling the system.<br />
<br />
==CURRENT Branch==<br />
Current is exactly what it sounds like. The newest system code for the FreeBSD OS. With that said, however, chasing CURRENT for features is not recomended. [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html The handbook] describes of the reasons for people to follow current. But to summarize, current is mainly for people who have a definite interest in either coding or monitoring the future releases of FreeBSD, and certainly not for production use. <br />
<br />
Current is a bit different as the supfile tag consists of '''.''' (A single period). An alias is provided named '''HEAD''', and sometimes the CURRENT branch is refered to as the "Head Branch".<br />
<br />
==STABLE Branch==<br />
Somewhat counterintuitively, STABLE is not the most stable FreeBSD release. STABLE is named as a "stable development" branch in relation to the more unstable development branch: CURRENT. Stable includes all of those patches that have filtered through current and been deemed "stable" enough to deserve testing for general release.<br />
<br />
Stable tends to be relatively bug free, while keeping up with much of the new features available in new development packages. Typically, home and desktop users can use the STABLE branch if they have an interest in newer features or think they may want to help test FreeBSD. For critical servers, substantial testing before deployment of any release, but particularly a non-Security Release, is highly recomended.<br />
<br />
Stable will involve the newest code for a particular major version. This means that as FreeBSD code develops through 6.1, even if you installed 6.0, it will be updated to match this new code if you are tracking the 6-STABLE code branch. The stable branch cvsup tags (called 'branch tags') take a form such as '''RELENG_5''' or '''RELENG_6'''.<br />
<br />
==Security Branch==<br />
If stability is the most important factor on this system, you may want to track something called the security branch. This branch only updates for security updates and major bug fixes from the code you originally installed.<br />
<br />
These Security branches will not bump version numbers when they come out. In other words, if you install 6.0 security branch, your system source code will not be updated to 6.1 when 6.1 is released as a new security branch. If you want to update to 6.1, you will need to change the supfile tag manually. Supfile tags (called 'release tags') for the Security branch look like '''RELENG_5_3''', '''RELENG_5_4''' or '''RELENG_6_0''' . (note the specifier of both the major and minor version number) If you want to run the security branch, you should probably run the most recent Security Branch listed [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html here] (unless you experiance hardware problems that can be fixed via downgrading).<br />
<br />
Security branches are additionally described (in messages to support mailing lists, for example) by their patch level. If there have been 3 major patches to the RELENG_5_4 security branch, for example, an up-to-date 5.4 user will be running 5.4-p3 .<br />
<br />
==Releases==<br />
Fundamentally, releases are just snapshots of the RELENG_X (X-STABLE) series at a particular moment of time (with some release engineering ensuring that it is a stable/secure release). A "RELEASE" is generally the start of a new Security Branch. Release is basically another way of saying Security Branch Release RELENG_X_0, and they get cvstag's like '''RELENG_6_0_0_RELEASE'''. Install CDs usually install these images.</div>Joehttp://freebsdwiki.net/index.php/Updating_to_FreeBSD_6.0Updating to FreeBSD 6.02005-12-24T05:49:15Z<p>Joe: changed section title to be harder to ignore</p>
<hr />
<div>This article describes the source upgrade process from 5.X to 6.0 . It is essentially the same as the handbook chapter, modified to highlight a few potential pitfalls in the upgrade process. There are three basic updating options, although the source update can be considered the 'standard' method.<br />
#Source Update (described in this document)<br />
#Reinstall using a new install iso cd (keep good backups... nice to fall back on)<br />
#Binary update using the freebsd-update port as described [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/|here]<br />
<br />
The complete FreeBSD Handbook section can be found here: [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html] This article is an attempt to more clearly layout some of the steps involved for this particular upgrade.<br />
<br />
==Upgrading from older versions of 5.X==<br />
There are potential problems updating a system from 5.1-5.3 to 6.0 directly. Although they do not affect everyone, it is highly recomended to upgrade at least to RELENG_5_4 or RELENG_5 (Read [[FreeBSD_Release_Branches]] for definitions of these tags) before upgrading to 6.0 . You can use the somewhat more general instructions in [[Upgrading_the_base_system]] to do the upgrade from 5.X to RELENG_5.<br />
<br />
==Getting Up To Date Source==<br />
*Use [[FreeBSD_Release_Branches]] to help you decide which release to follow.<br />
*Select a supfile tag.<br />
*Use [[Updating the source tree]] to update your source tree.<br />
<br />
==System Preperation==<br />
There are a few things you need to do before you launch into compiling your new kernel, particularly if you are jumping across major versions.<br />
<br />
===Do your homework===<br />
Google for "FreeBSD ''version'' ''your-particular-hardware''" to see if anyone has had problems... and to check if there were any solutions. You may want to use [http://www.google.com/bsd], and double check with an archive of FreeBSD-Questions or FreeBSD-Stable as well. You also MUST read through /usr/src/UPDATING. For future reference, much of this information was taken from the COMMON ITEMS section of UPDATING, but some of it may change in the future, so it's only smart to double check.<br />
<br />
===Backups===<br />
Everyone says to make backups, what is less obvious is what exactly should be backed up. For example... usually large data directories and home directories that are on their own partitions or drives do not need to be backed up (more than usual). These are simply unmounted and not touched again until the system is up and running. Most of your system can just be dumped to a larger file system and left. But you will want to keep a few files handy (possibly inside of /root/old_system/ or something similer)<br />
*/etc/rc.conf<br />
*/boot/loader.conf<br />
*/etc/sysctl.conf<br />
You may want to check the loader.conf file for particular hardware modules that will need special attention. (nvidia is a common one)<br />
<br />
===Double check your /etc/[[make.conf]] settings===<br />
From the [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html handbook]:<br />
Examine the files /usr/share/examples/etc/make.conf<br />
(called /etc/defaults/make.conf in FreeBSD 4.X) and /etc/make.conf.<br />
The first contains some default defines - most of which are commented out.<br />
To make use of them when you rebuild your system from source, add them<br />
to /etc/make.conf. Keep in mind that anything you add to /etc/make.conf<br />
is also used every time you run make, so it is a good idea to set them<br />
to something sensible for your system.<br />
A typical user will probably want to copy the CFLAGS and NO_PROFILE (or<br />
NOPROFILE on FreeBSD 5.X and older) lines found in<br />
/usr/share/examples/etc/make.conf (or in /etc/defaults/make.conf on<br />
FreeBSD 4.X) to /etc/make.conf and uncomment them. Examine the other<br />
definitions (COPTFLAGS, NOPORTDOCS and so on) and decide if they are<br />
relevant to you.<br />
From a recent /usr/src/UPDATING<br />
If CPUTYPE is defined in your /etc/make.conf, make sure to use the<br />
"?=" instead of the "=" assignment operator, so that buildworld can<br />
override the CPUTYPE if it needs to.<br />
<br />
===Customizing the kernal===<br />
For a major update like this, you may want to simply install the GENERIC kernel, and then customize it and rebuild when you know the major version change hasn't disrupted something on your system. See [[Kernels,_Custom]] for information on customizing a kernel. Note that your old kernel config file from 5.X CANNOT simply be copied and used for 6.X. If you are going to use a custom kernel, just make sure to use '''make kernel KERNFILE=''your kernel config file (full path)'' ''' below.<br />
<br />
===Upgrade your ports...===<br />
by whatever means you use. This is not strictly needed, but may head off problems with the last step in this process. You can refer to [[ports]] for more information about this.<br />
<br />
==Compilation==<br />
Follow these steps in order, as long as they do not produce error messages.<br />
'''su -''' ''#Become root''<br />
Password:<br />
'''cd /usr/src''' ''#or to whichever directory you put src in''<br />
'''make buildworld'''<br />
This will build the system libraries and surrounding programs for the operating system to function<br />
'''make buildkernel'''<br />
'''make installkernel'''<br />
Build and install the [[Kernel]] itself. Note that you will often see documentation that tells you to <br />
*make kernel<br />
This is just an alias that executes both of the above commands in sequence.<br />
'''shutdown -r now''' ''#Reboot the system''<br />
From the boot prompt '''boot -s''' will launch in single user mode. Then do the following:<br />
fsck -p<br />
mount -u /<br />
mount -a<br />
cd src ''#or /usr/src''<br />
adjkerntz -i ''#if the CMOS clock is set to local time''<br />
This should get you ready to install world.<br />
*Local Terminal Access<br />
Note that this assumes you are at a local terminal on the machine. Single user mode makes sure that system binaries are not being replaced while they are being used. If you really cannot have physical access to the machine, you might risk cutting off all other services other than ssh, and killing any unnecessary daemons (to minimize library usage) and attempting the remote upgrade, but this is neither supported nor recomended. If you continue in multiuser mode you should realize there is a significant probability that you will break your system.<br />
'''mergemaster -p'''<br />
This script will bring you through each of your configuration files and ask you if you want to update to the new settings that it has found. This will really depend on the settings files that are being updated. A common tactic here is to record any changes that look like they disappeared from any files that you edited, and accept all changes. Then examining the changes in more detail after the system is up and running.<br />
'''make installworld'''<br />
Install the world libraries and programs.<br />
'''mergemaster -i'''<br />
Run this script again to check for changes from the installed world.<br />
'''shutdown -r now'''<br />
This will reboot the system. Bring it up again in as normal with your new kernel running. Type '''uname -a''' on a prompt to verify the version.<br />
'''portupgrade -af'''<br />
This is not optional or minor. Your ports have linked against system libraries that have been changed, sometimes drastically. If you do not run this command, you will likely have streams of funny-looking error messages from a wide variety of your ports. This will probably take longer than any other part of the install (up to several days for slower systems with GUI's installed, an hour or two for a server without any massive ports installed).<br />
<br />
'''Restore configuration files'''<br />
<br />
Restore from your notes taken during the mergemaster -p phase, and the saved configuration files in the [[#Backups]] step. You may need to also reinstall any binary modules (non-ports) that you may have had previously installed. nvidia video drivers and RAID card drivers are commonly in this category.<br />
<br />
==If there are problems==<br />
First... did you do everything properly and in order?<br />
===If things break in compiling world or kernel===<br />
This is probably the best place for things to break, as they haven't actually changed anything yet. Firstly, check a few of the listed errors in /usr/src/UPDATING, and try a few of the debugging ideas in the handbook. If neither that nor Google works. Keep in mind, if your kernel compile breaks here you haven't actually broken anything, so you've only inconvenienced yourself.<br />
You may want to try ''make clean'' before doing subsequent build attempts.<br />
<br />
===If your system won't boot to the new kernel===<br />
By default, FreeBSD saves a copy of the old kernel as kernel.old . If you can't get it to boot... at the countdown loader, interrupt it and type the following<br />
unload<br />
boot kernel.old<br />
This should boot your old kernel, and you can examine logs to try to determine what happened. One thing to watch out for though, don't just build another kernel without saving your current one, because then the current buggy kernel will overwrite your current failsafe ''kernel.old''.</div>Joehttp://freebsdwiki.net/index.php/Updating_the_systemUpdating the system2005-12-24T05:45:37Z<p>Joe: Fixed misleading statement about STABLE, and linked to other articles</p>
<hr />
<div>'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.<br />
<br />
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.<br />
<br />
== Updating the base system ==<br />
<br />
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:<br />
#Do a binary Upgrade to a release version<br />
#Do a binary Upgrade using the method described [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]<br />
#Do a source upgrade as described [[upgrading the base system | here]]<br />
<br />
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.<br />
<br />
== Updating applications ==<br />
<br />
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.<br />
<br />
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]], which is capable of dealing with dependencies.<br />
<br />
== How do I download updates? ==<br />
<br />
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.<br />
<br />
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:<br />
<br />
* secure (uses cryptographic signing)<br />
* very efficient in terms of bandwidth consumption and server load<br />
* uses http only<br />
* easy to use<br />
<br />
[[Category:Common Tasks]]</div>Joehttp://freebsdwiki.net/index.php/Upgrading_the_base_systemUpgrading the base system2005-12-23T14:21:59Z<p>Joe: Adding links to new pages</p>
<hr />
<div>Upgrading a FreeBSD system is relatively painless if the proper steps are followed. The standard way to upgrade a FreeBSD system is to update the source code to the new version then recompile the source and install. There are automatic commands for much of the process. <br />
<br />
In overview the steps are:<br />
*Backup important files<br />
*Update the system source code ([[cvsup]] over the internet or install source from a new CD)<br />
*Read [[UPDATING|/usr/src/UPDATING]] to look for any gotcha's or recent changes<br />
*Compile the source for the system except for the kernel (make buildworld)<br />
*Compile the source for the [[kernel]] ([[make buildkernel]])<br />
*Install any critical config files that have been updated (mergemaster -p)<br />
*Install the new kernel if it has built successfully (make installkernel)<br />
*Reboot to run the new kernel<br />
*Drop to [[single user mode]] (see [[init]])<br />
*Install the rest of the system (make installworld)<br />
*Update the config files ([[mergemaster]])<br />
<br />
For information about the different FreeBSD release branches, look at [[FreeBSD Release Branches]].<br />
For a specialized HOWTO regarding updating from FreeBSD 5.4 to FreeBSD 6.0, see [[Updating to FreeBSD 6.0]]<br />
<br />
[[Category:Common Tasks]]</div>Joehttp://freebsdwiki.net/index.php/Updating_to_FreeBSD_6.0Updating to FreeBSD 6.02005-12-23T14:14:43Z<p>Joe: Walkthrough of updating from 5.4 to 6.0, mostly from /usr/src/UPDATING + HBK</p>
<hr />
<div>This article describes the source upgrade process from 5.X to 6.0 . It is essentially the same as the handbook chapter, modified to highlight a few potential pitfalls in the upgrade process. There are three basic updating options, although the source update can be considered the 'standard' method.<br />
#Source Update (described in this document)<br />
#Reinstall using a new install iso cd (keep good backups... nice to fall back on)<br />
#Binary update using the freebsd-update port as described [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/|here]<br />
<br />
The complete FreeBSD Handbook section can be found here: [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html] This article is an attempt to more clearly layout some of the steps involved for this particular upgrade.<br />
<br />
==Upgrading from older versions of 5.X==<br />
There are potential problems updating a system from 5.1-5.3 to 6.0 directly. Although they do not affect everyone, it is highly recomended to upgrade at least to RELENG_5_4 or RELENG_5 (Read [[FreeBSD_Release_Branches]] for definitions of these tags) before upgrading to 6.0 . You can use the somewhat more general instructions in [[Upgrading_the_base_system]] to do the upgrade from 5.X to RELENG_5.<br />
<br />
==Getting the Source==<br />
*Use [[FreeBSD_Release_Branches]] to help you decide which release to follow.<br />
*Select a supfile tag.<br />
*Use [[Updating the source tree]] to update your source tree.<br />
<br />
==System Preperation==<br />
There are a few things you need to do before you launch into compiling your new kernel, particularly if you are jumping across major versions.<br />
<br />
===Do your homework===<br />
Google for "FreeBSD ''version'' ''your-particular-hardware''" to see if anyone has had problems... and to check if there were any solutions. You may want to use [http://www.google.com/bsd], and double check with an archive of FreeBSD-Questions or FreeBSD-Stable as well. You also MUST read through /usr/src/UPDATING. For future reference, much of this information was taken from the COMMON ITEMS section of UPDATING, but some of it may change in the future, so it's only smart to double check.<br />
<br />
===Backups===<br />
Everyone says to make backups, what is less obvious is what exactly should be backed up. For example... usually large data directories and home directories that are on their own partitions or drives do not need to be backed up (more than usual). These are simply unmounted and not touched again until the system is up and running. Most of your system can just be dumped to a larger file system and left. But you will want to keep a few files handy (possibly inside of /root/old_system/ or something similer)<br />
*/etc/rc.conf<br />
*/boot/loader.conf<br />
*/etc/sysctl.conf<br />
You may want to check the loader.conf file for particular hardware modules that will need special attention. (nvidia is a common one)<br />
<br />
===Double check your /etc/[[make.conf]] settings===<br />
From the [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html handbook]:<br />
Examine the files /usr/share/examples/etc/make.conf<br />
(called /etc/defaults/make.conf in FreeBSD 4.X) and /etc/make.conf.<br />
The first contains some default defines - most of which are commented out.<br />
To make use of them when you rebuild your system from source, add them<br />
to /etc/make.conf. Keep in mind that anything you add to /etc/make.conf<br />
is also used every time you run make, so it is a good idea to set them<br />
to something sensible for your system.<br />
A typical user will probably want to copy the CFLAGS and NO_PROFILE (or<br />
NOPROFILE on FreeBSD 5.X and older) lines found in<br />
/usr/share/examples/etc/make.conf (or in /etc/defaults/make.conf on<br />
FreeBSD 4.X) to /etc/make.conf and uncomment them. Examine the other<br />
definitions (COPTFLAGS, NOPORTDOCS and so on) and decide if they are<br />
relevant to you.<br />
From a recent /usr/src/UPDATING<br />
If CPUTYPE is defined in your /etc/make.conf, make sure to use the<br />
"?=" instead of the "=" assignment operator, so that buildworld can<br />
override the CPUTYPE if it needs to.<br />
<br />
===Customizing the kernal===<br />
For a major update like this, you may want to simply install the GENERIC kernel, and then customize it and rebuild when you know the major version change hasn't disrupted something on your system. See [[Kernels,_Custom]] for information on customizing a kernel. Note that your old kernel config file from 5.X CANNOT simply be copied and used for 6.X. If you are going to use a custom kernel, just make sure to use '''make kernel KERNFILE=''your kernel config file (full path)'' ''' below.<br />
<br />
===Upgrade your ports...===<br />
by whatever means you use. This is not strictly needed, but may head off problems with the last step in this process. You can refer to [[ports]] for more information about this.<br />
<br />
==Compilation==<br />
Follow these steps in order, as long as they do not produce error messages.<br />
'''su -''' ''#Become root''<br />
Password:<br />
'''cd /usr/src''' ''#or to whichever directory you put src in''<br />
'''make buildworld'''<br />
This will build the system libraries and surrounding programs for the operating system to function<br />
'''make buildkernel'''<br />
'''make installkernel'''<br />
Build and install the [[Kernel]] itself. Note that you will often see documentation that tells you to <br />
*make kernel<br />
This is just an alias that executes both of the above commands in sequence.<br />
'''shutdown -r now''' ''#Reboot the system''<br />
From the boot prompt '''boot -s''' will launch in single user mode. Then do the following:<br />
fsck -p<br />
mount -u /<br />
mount -a<br />
cd src ''#or /usr/src''<br />
adjkerntz -i ''#if the CMOS clock is set to local time''<br />
This should get you ready to install world.<br />
*Local Terminal Access<br />
Note that this assumes you are at a local terminal on the machine. Single user mode makes sure that system binaries are not being replaced while they are being used. If you really cannot have physical access to the machine, you might risk cutting off all other services other than ssh, and killing any unnecessary daemons (to minimize library usage) and attempting the remote upgrade, but this is neither supported nor recomended. If you continue in multiuser mode you should realize there is a significant probability that you will break your system.<br />
'''mergemaster -p'''<br />
This script will bring you through each of your configuration files and ask you if you want to update to the new settings that it has found. This will really depend on the settings files that are being updated. A common tactic here is to record any changes that look like they disappeared from any files that you edited, and accept all changes. Then examining the changes in more detail after the system is up and running.<br />
'''make installworld'''<br />
Install the world libraries and programs.<br />
'''mergemaster -i'''<br />
Run this script again to check for changes from the installed world.<br />
'''shutdown -r now'''<br />
This will reboot the system. Bring it up again in as normal with your new kernel running. Type '''uname -a''' on a prompt to verify the version.<br />
'''portupgrade -af'''<br />
This is not optional or minor. Your ports have linked against system libraries that have been changed, sometimes drastically. If you do not run this command, you will likely have streams of funny-looking error messages from a wide variety of your ports. This will probably take longer than any other part of the install (up to several days for slower systems with GUI's installed, an hour or two for a server without any massive ports installed).<br />
<br />
'''Restore configuration files'''<br />
<br />
Restore from your notes taken during the mergemaster -p phase, and the saved configuration files in the [[#Backups]] step. You may need to also reinstall any binary modules (non-ports) that you may have had previously installed. nvidia video drivers and RAID card drivers are commonly in this category.<br />
<br />
==If there are problems==<br />
First... did you do everything properly and in order?<br />
===If things break in compiling world or kernel===<br />
This is probably the best place for things to break, as they haven't actually changed anything yet. Firstly, check a few of the listed errors in /usr/src/UPDATING, and try a few of the debugging ideas in the handbook. If neither that nor Google works. Keep in mind, if your kernel compile breaks here you haven't actually broken anything, so you've only inconvenienced yourself.<br />
You may want to try ''make clean'' before doing subsequent build attempts.<br />
<br />
===If your system won't boot to the new kernel===<br />
By default, FreeBSD saves a copy of the old kernel as kernel.old . If you can't get it to boot... at the countdown loader, interrupt it and type the following<br />
unload<br />
boot kernel.old<br />
This should boot your old kernel, and you can examine logs to try to determine what happened. One thing to watch out for though, don't just build another kernel without saving your current one, because then the current buggy kernel will overwrite your current failsafe ''kernel.old''.</div>Joehttp://freebsdwiki.net/index.php/Updating_the_source_treeUpdating the source tree2005-12-23T11:39:53Z<p>Joe: the source counterpart to the Updating the ports tree file</p>
<hr />
<div>When updating your FreeBSD system, you'll first want to sync your sources to the live sources offered via [[cvs]]. There is a port [[cvsup]] that you can use to update your other ports and source trees if you want. If you hail from a Windows environment, you may think of keeping your sources updated as about the first half of the FreeBSD procedure which corresponds to [[Windows Update]]. There are two major systems that most users will want to keep up to date, the source tree (described here), and the ports tree (described in [[Updating the ports tree]]).<br />
<br />
The source tree is the actual code for the kernel and the fundamental system programs (collectively known as the 'world') for the FreeBSD operating system.<br />
<br />
== Installing cvsup ==<br />
If, as root, '''which cvsup''' does not return the location of your cvsup install, you will need to install [[cvsup]] or [[cvsup-without-gui]] as described in [[Ports,_Installing]]. The cvsup program is the same as cvsup-without-gui if you do not have the X system installed, but many people prefer the non-gui version, as the ''cvsup'' version defaults to working in an X11 window (overridden with the -g flag).<br />
<br />
== Selecting your source tree ==<br />
If you intend to update to a newer version of FreeBSD, you need to select a cvs tag as described in [[FreeBSD Release Branches]].<br />
<br />
== So it's installed already, how do I update the source tree? ==<br />
<br />
===Configuring your supfile===<br />
Assuming you have a copy of cvsup installed, you should have a file named '''standard-supfile''' or something similer in '''/usr/share/examples/cvsup'''. Copy it somewhere else, such as into /root, and open the copy with a text editor. The following is the file that I use:<br />
*default host=cvsup4.jp.FreeBSD.org ''pick a nearby server from [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html#CVSUP-MIRRORS]''<br />
*default base=/var/db<br />
*default prefix=/usr ''source will be placed in /usr/src''<br />
*default release=cvs tag=RELENG_6 ''Replace RELENG_6 with your cvsup tag''<br />
*default delete use-rel-suffix<br />
*default compress<br />
src-all<br />
<br />
This is basically a default supfile, with the host and release cvstag changed.<br />
<br />
Save and close this file<br />
<br />
===Updating your source using the file===<br />
Assuming you have the supfile in your root directory named standard-supfile, run as root:<br />
''cd /root''<br />
''cvsup standard-supfile''<br />
or<br />
''cd /root''<br />
''cvsup -g standard-supfile''<br />
The first time you run this command, it will probably take a significant amount of time. It will go out to the server you picked in the supfile, and attempt to update all of the source code needed to update FreeBSD to whatever version you have picked. Handbook references for gobs of details: [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html Other methods of getting source], [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html Details and optional flags to cvsup].<br />
<br />
In a perfect world, that will always work. The only times when it wont are when you don't have connectivity or the server that you're cvsup-ing against is not allowing connections. The ''-g'' switch just makes sure that the GUI stuff in the regular CVSup program doesn't run, which many users prefer.<br />
<br />
== It's updated. Now what? ==<br />
Well... since you ended up here in the first place... I'm guessing you either came from [[Upgrading_the_base_system]], [[Custom Kernel]] or [[Updating the system]]. Usually you update the source to do one of the first two.<br />
<br />
[[Category:Common Tasks]]</div>Joehttp://freebsdwiki.net/index.php/CvsupCvsup2005-12-23T11:13:10Z<p>Joe: Added Updating the source tree link</p>
<hr />
<div>'''cvsup''' is the command used to synchronize the [[ports tree]] and the system [[source tree]] with the live versions at freebsd.org. '''cvsup''' stands for Concurrent Versioning System ([[cvs|CVS]]) UPdate.<br />
<br />
Under FreeBSD, you will generally be using one of two versions of the '''cvsup''' port itself to do your synchronization; you may install /usr/ports/net/cvsup if you want to get the optional X11 GUI features, or /usr/ports/net/cvsup-without-gui if you don't plan to use X11 or otherwise don't care about the pretty windowed display (such as on a [[headless_server]]). If you choose to use the full version of cvsup, it will function precisely like the cvsup-without-gui version does if you are not running a windowing system. Please note, however, that if you don't have X installed, you do '''not''' generally want to install the full cvsup package with the gui, as it has a LOT of X-related dependencies which you utterly and completely do not need or want if you aren't running the [[X windowing system]].<br />
<br />
For examples of the most common usages of the cvsup command, please see [[Updating the ports tree]] and [[Updating the source tree]].<br />
<br />
[[Category : Ports and Packages]] [[Category : System Commands]]</div>Joehttp://freebsdwiki.net/index.php/User_talk:QuietUser talk:Quiet2005-12-23T11:09:20Z<p>Joe: /* Official commentary */</p>
<hr />
<div>Wonder how this works ....<br />
<br />
== how what works? ==<br />
<br />
talk pages?<br />
--[[User:Dave|Dave]] 13:41, 16 Dec 2005 (EST)<br />
<br />
== How wiki's user talk works ==<br />
<br />
Sorry Mr. Dave, I was just seeing how the wikiing works as I am a wiki newbie, as it were. BTW, love the idea of a freebsd wiki. Any word on if this will become official or officially recognised?<br />
<br />
== Official commentary ==<br />
<br />
There seems to be substantial resistance to an official wiki in the freebsd-doc mailing list. There are others who fully support the idea though. Sadly, the objection seems to be the wiki markup system, so they are unlikely to be convinced easily. For the moment I intend to slowly expand out sections that I see brought up often on Questions, and see how it goes.<br />
Incidently... why are we having this conversation in this user's Talk page?<br />
--[[User:Joe|Joe]] 06:07, 23 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/User_talk:QuietUser talk:Quiet2005-12-23T11:07:58Z<p>Joe: Official commentary</p>
<hr />
<div>Wonder how this works ....<br />
<br />
== how what works? ==<br />
<br />
talk pages?<br />
--[[User:Dave|Dave]] 13:41, 16 Dec 2005 (EST)<br />
<br />
== How wiki's user talk works ==<br />
<br />
Sorry Mr. Dave, I was just seeing how the wikiing works as I am a wiki newbie, as it were. BTW, love the idea of a freebsd wiki. Any word on if this will become official or officially recognised?<br />
<br />
== Official commentary ==<br />
<br />
There seems to be substantial resistance to an official wiki in freebsd-doc@freebsd.org . There are others who fully support the idea though. Sadly, the objection seems to be the wiki markup system, so they are unlikely to be convinced easily. For the moment I intend to slowly expand out sections that I see brought up often on Questions, and see how it goes.<br />
Incidently... why are we having this conversation in this user's Talk page?<br />
--[[User:Joe|Joe]] 06:07, 23 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/FreeBSD_Release_BranchesFreeBSD Release Branches2005-12-23T10:50:28Z<p>Joe: Summary of Branch Differences... needed for another article I'm writing</p>
<hr />
<div>==Which version of FreeBSD is right for me?==<br />
This is a constant question on the FreeBSD-Questions mailing list. It basically boils down to a stability vs features tradeoff. The decision on which branch to track effects which supfile tag you will choose. A complete list of current supfile tags is available in the handbook [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html appendix].<br />
<br />
The full explanation of the release engineering terms and decision making process can be found [http://www.freebsd.org/doc/en_US.ISO8859-1/articles/releng/article.html here]. On the other hand, the following may give you a clearer idea of how to decide which release is right for your systems.<br />
<br />
You may want to recall that the "features vs security" tradeoff only applies to a system recompile. In other words, you aren't testing the new code in CURRENT unless you are regularly recompiling the system.<br />
<br />
==CURRENT Branch==<br />
Current is exactly what it sounds like. The newest system code for the FreeBSD OS. With that said, however, chasing CURRENT for features is not recomended. [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html The handbook] describes of the reasons for people to follow current. But to summarize, current is mainly for people who have a definite interest in either coding or monitoring the future releases of FreeBSD, and certainly not for production use. <br />
<br />
Current is a bit different as the supfile tag consists of '''.''' (A single period). An alias is provided named '''HEAD''', and sometimes the CURRENT branch is refered to as the "Head Branch".<br />
<br />
==STABLE Branch==<br />
Somewhat counterintuitively, STABLE is not the most stable FreeBSD release. STABLE is named as a "stable development" branch in relation to the more unstable development branch: CURRENT. Stable includes all of those patches that have filtered through current and been deemed "stable" enough to deserve testing for general release.<br />
<br />
Stable tends to be relatively bug free, while keeping up with much of the new features available in new development packages. Typically, home and desktop users can use the STABLE branch if they have an interest in newer features or think they may want to help test FreeBSD. For critical servers, substantial testing before deployment of any release, but particularly a non-Security Release, is highly recomended.<br />
<br />
Stable will involve the newest code for a particular major version. This means that as FreeBSD code develops through 6.1, even if you installed 6.0, it will be updated to match this new code if you are tracking the 6-STABLE code branch. The stable branch cvsup tags (called 'branch tags') take a form such as '''RELENG_5''' or '''RELENG_6'''.<br />
<br />
==Security Branch==<br />
If stability is the most important factor on this system, you may want to track something called the security branch. This branch only updates for security updates and major bug fixes from the code you originally installed.<br />
<br />
These Security branches will not bump version numbers when they come out. In other words, if you install 6.0 security branch, your system source code will not be updated to 6.1 when 6.1 is released as a new security branch. If you want to update to 6.1, you will need to change the supfile tag manually. Supfile tags (called 'release tags') for the Security branch look like '''RELENG_5_3''', '''RELENG_5_4''' or '''RELENG_6_0''' . (note the specifier of both the major and minor version number) If you want to run the security branch, you should probably run the most recent Security Branch listed [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html here] (unless you experiance hardware problems that can be fixed via downgrading).<br />
<br />
Security branches are additionally described (in messages to support mailing lists, for example) by their patch level. If there have been 3 major patches to the RELENG_5_4 security branch, for example, an up-to-date 5.4 user will be running 5.4-p3 .<br />
<br />
==Releases==<br />
Fundamentally, releases are just snapshots of the RELENG_X (X-STABLE) series at a particular moment of time (with some release engineering ensuring that it is a stable/secure release). A "RELEASE" is generally the start of a new Security Branch. Release is basically another way of saying Security Branch Release RELENG_X_0, and they get cvstag's like '''RELENG_6_0_0_RELEASE'''. Install CDs usually install these images.</div>Joehttp://freebsdwiki.net/index.php/Installing_FreeBSD_-_Standard_InstallationInstalling FreeBSD - Standard Installation2005-12-23T04:14:37Z<p>Joe: Added link to Hard Disk Partition Sizes</p>
<hr />
<div>'''Installing FreeBSD (article originally based on i386 [[:Category : Architecture-Specific | architecture]] / version 4.7-RELEASE)'''<br />
<br />
First things first, you need to make sure you've got FreeBSD available - preferably (for the purposes of this chapter) a burned CD of Disc 1 of a RELEASE snapshot. If you don't already have one, you can get a RELEASE snapshot from the official FreeBSD ftp site or from a mirror - I would personally recommend that you check out the official mirror list and hit one near you. Once you've got it, burn it, and we'll move on. Note: we're assuming that this is a new FreeBSD install, and that you're installing it on a machine with a CD-ROM and a motherboard with BIOS capable of booting from CD-ROM. We're also going to assume that FreeBSD is going to be the only OS on the machine, that you've got at least a 2 gig hard drive available, and you have 64MB of RAM installed. While you can certainly install FreeBSD without a CD and on a considerably lesser machine than the one described, it will be a bit more difficult - and although I may eventually discuss overcoming those difficulties in another article, they're outside the scope of this one.<br />
<br />
This article was based on the i386 architecture, but is applicable largely to all architectures. Important [[:Category:Architecture-Specific | architecture-specific]] notes are available [[Sparc - Installing FreeBSD | for installing FreeBSD on the Sparc architechture]].<br />
<br />
== Initial Kernel Configuration ==<br />
<br />
'''NOTE: Kernel configuration during installation is no longer necessary applicable as of FreeBSD 5.0 and up. If you are installing 5.x, the first thing you'll see after boot (and the section you should skip ahead to right now) is the sysinstall main interface.'''<br />
<br />
Before we actually install FreeBSD, you can save yourself a bit of time and trouble by cracking the case open and checking a couple of things out: namely, you want to know what kind of network card you're using, and what sorts of IDE or SCSI controllers you've got. (If you're using IDE, don't sweat it - you really don't have but one option.) For example, you might be using an SMC 1211 network card and an Adaptec 152x (or compatible) SCSI controller. Whatever it is, try to figure it out now - it'll make our first real step easier. Finally, make sure you know the TCP/IP settings the machine will need - IP address, subnet mask, nameserver address, and network gateway.<br />
<br />
Okay, so you've got your machine ready, you've set your BIOS to boot from CD-ROM, and you've stuck the CD in the drive and booted. Now what? After a bit, you'll get a prompt "press enter to boot", which you can do, or you can wait a few seconds if you're lazy. The first real chance to make a choice comes up next, and it looks like this: <br />
<br />
[[Image: Installation_kernelconfig.png ]]<br />
<br />
Start kernel configuration in full-screen visual mode, select "Storage", and hit "Enter." This is what you'll see:<br />
<br />
[[Image: Installation_storagedrivers.png]]<br />
<br />
Now you know why we identified our network and storage peripherals earlier: you're going to want to remove unnecessary stuff, while very carefully NOT removing anything you actually use. Most folks will be using the ATA/ATAPI compatible disk controllers (one for each of your motherboard's two on-board IDE controllers), and the Floppy disk controller. I personally also leave the Buslogic SCSI controller, which may or may not be necessary on IDE-only systems - one of these days I'll even get experimental and actually find out.<br />
<br />
Once you're done deleting unused storage drivers, highlight Network and hit enter. You'll see a whole bunch of possible network cards in here - one of which may or may not be your network card type. If you don't see your card in there, DON'T PANIC! It's probably built into the kernel anyway, and just isn't one of your options to remove from this screen. The network card in the machine above is an SiS 900 chipset onboard, which is NOT listed in the Network section - so I deleted EVERYTHING out of the section. Which is fine - just make sure you DON'T get rid of the driver for your own NIC, if it's in there. If in doubt, at least leave the NE2000 compatible - it'll pick up just about anything else not explicitly covered with its own driver.<br />
<br />
Continuing down to Communications, I personally get rid of everything - I personally haven't got the faintest use for TCP/IP over a parallel cable or a serial cable. Most likely, you don't either. You may get rid of these entries, or leave them in, at your own discretion. Once you're done with that, Input, Multimedia and Miscellaneous don't have anything in them really worth getting rid of at this point, so hit "Q" and let's move on!<br />
<br />
After you see a couple messages about starting up holographic shells and such-like, you'll be presented with the sysinstall main interface, which looks like this:<br />
<br />
== Sysinstall main interface ==<br />
<br />
[[Image: Installation_sysinstallmain.png]]<br />
<br />
I don't particularly recommend the Express install unless you really know what you're doing - it'll work, but it'll leave you with some GAPING problems requiring immediate fixing. So let's go with Standard, and get cracking!<br />
<br />
The first thing FreeBSD wants to do is partition (or re-partition) your hard drive. After hitting "enter" to the splash screen that tells you this and gives you a bit of detail about the process, you'll see something like this:<br />
<br />
[[Image: Installation_partitioning.png]]<br />
<br />
Since we're devoting the entire hard drive to FreeBSD (what's the point of a dual-booting SERVER, anyway?), we don't really have to worry about what's on there already - in this case, an old FreeBSD installation, in your case, probably an old Windows installation. All we really need to do here is hit "A" to tell FreeBSD that we want to make one single partition that uses all of the available drive space. Once you've done that, hit "Q" to save your changes and move on.<br />
<br />
[[Image: Installation_bootmanager.png]]<br />
<br />
Keeping this short and sweet, since we're installing FreeBSD as a standalone OS on this system, we DON'T want to futz around with the default choice, BootMgr. Instead, we want Standard - don't bug me when I turn on the system, just boot! Highlight it, and hit "enter". Things are about to get a little more interesting...<br />
<br />
[[Image: Installation_slicesplash.png]]<br />
<br />
Now, while the splash screen for the slice manager tells you that you can safely hit "Auto" if you have a mere 200MB of space available, I'm going to tell you flat out that baby, it just ain't so. If you've got a tiny drive or a really miniscule amount of RAM, the defaults picked by Auto aren't going to work very well, and may in fact cripple your system badly enough to need reinstallation. Once again, while you can certainly install FreeBSD on less, it's a touchier procedure, and beyond the scope of this article. But hey, that's why we made sure we had at least 64MB and 2GB to work with, right? ... Right? OK, moving on:<br />
<br />
[[Image: Installation_slices.png]]<br />
<br />
OK, this is where you make slices in your partition to store various essential bits of the OS and your data. Since this is a simple install and - must I stress it again? - you have at least 64MB and 2GB to work with, we're not going to dabble about in this. Just hit "A" for Auto Defaults, and it will slice up the partition like a sushi chef, leaving you with 128MB for / (the root directory), about double your RAM size for the swap, 256MB apiece for /tmp and /var, and the remainder of the partition allocated to /usr. You may want to consult [[Hard Disk Partition Sizes]] for a review of what might be placed on these different partitions. Dandy! Hit "Q" to save your changes, and we'll keep this thing rolling right along.<br />
<br />
At this point, the system is going to want to configure network interfaces. Depending on how much you did or didn't delete out of the kernel config area, you'll see something similar to this:<br />
<br />
[[Image: Installation_interfaces.png]]<br />
<br />
Generally, the top entry is your network card, which is what we want to configure at this stage. (Modem users may have a different take on things - and we're not going to get into PPP configuration here. For now, we're assuming that you DO want to configure a NIC and DON'T want to configure a modem.) Common network interfaces are sis0, rl0, ed0, xl0, and pn0, among others - the important bit is, they're generally all going to say "ethernet card" on the tag end of the description. If you DON'T have an ethernet card listed here, you're in trouble - most likely, you deleted out the driver for your NIC during kernel configuration. If you continue to have problems at this point, you might want to consider NOT deleting ANY network interfaces out of your kernel config - generally speaking, having support for the extra interfaces built into your kernel won't typically hurt anything.<br />
<br />
The next thing it's going to want to know is if you'd like to configure IPv6. I'll put it to you this way - unless you already know perfectly well that you want and need IPv6 right now, no, you don't want to. And in particular, if you don't know what IPv6 is, select no! The next thing it wants to know is if you'd like to try DHCP configuration of the interface. For the purposes of these articles, you do not want to attempt DHCP - if the machine is going to be a server, it's going to need a static IP address. So no DHCP for you! Next, it will bring up an IPv4 configuration screen for the interface:<br />
<br />
[[Image: Installation_network.png]]<br />
<br />
If you didn't use DHCP - and you didn't, right? - you'll need to fill out all of the information on the screen except "Extra options to ifconfig". "Host" will be the name you want to christen this server with. "Domain" is a little trickier - if you DON'T have a pre-existing domain name server assigning DNS records to point at IP addresses on your local network (and if you don't know the answer to this, you almost certainly don't) then you'll need to make up a local domain. I strongly suggest doing so using .local for the top level domain - ie, my private network is named tehinterweb.local, as you can see above. The advantage to doing this is that you are absolutely guaranteed that you aren't using the same domain name as a real domain somewhere out there on the public internet, and you'll know at a glance whether you're looking at internal or external DNS stuff, potentially saving you a lot of confusion down the road. Once you've got the Domain field filled out, sysinstall will automatically append it to your hostname - so proof became proof.tehinterweb.local in our example above.<br />
<br />
Later on in another article, we'll discuss setting up BIND so that other computers on your network will know where yourhost.yourdomainname.local is, and how to set up DNS records for those other computers and/or network devices too - but for right now, we're done with this screen, and it's time to select OK and move on.<br />
<br />
[[Image: Installation_selectmedia.png]]<br />
<br />
Hopefully, you don't need me to tell you to highlight CD/DVD and hit enter on this media selection screen. It's worth noting that VERY occasionally, you may run into a system in which FreeBSD has trouble identifying the CD-ROM drive at this point, even though it booted off of it - this generally has something to do with the type of emulation the motherboard and/or the CD-ROM itself uses for CD-ROM boots. If you have problems here, you can try swapping the CD-ROM drive to another IDE channel as a standalone master, trying a completely different CD-ROM drive, or - if you've got a broadband connection and an hour or three to kill - installing from FTP. But most likely, as soon as you hit OK, it'll immediately start moving data:<br />
<br />
[[Image: Installation_extracting.png]]<br />
<br />
All we're actually installing right now is the base system, so this shouldn't take but a minute or two. Once it's done, you'll get a congratulatory little message about having installed FreeBSD on your system, and once you've hit enter, things will get interesting again! It will ask you a series of questions about how to configure your machine - if you want to function as a network gateway, if you want to configure inetd, if you want anonymous FTP access, if you want to be an NFS server, if you want to be an NFS client, and if you want to use a default security profile. For right now, the answer to all these questions is "no". Yes, even if you really do want to run NFS later. Trust me on this one - for right now, just get the OS installed; you can get fancy later once you've actually got it working. Once you're done with the "no, no, no, no, no, and no" you'll get a splash screen telling you a bit about the "moderate" security settings that you got by answering "no" to the default security profile and warning you that security breaches are like forest fires; only YOU can stop them. Great. Hit enter, and we're back to telling it no again: we don't want to change the console settings. However, we DO want to set the machine's time zone, so tell it so, tell it the CMOS clock isn't set to UTC, and pick a continent, a region, and a time zone. (Note: the page down and page up keys DO work on these menus, and since they're alphabetized, they'll come in quite handy for those of us from the United States, as well as the Venezuelans in the crowd.)<br />
<br />
Once you've picked a zone and confirmed that it looks reasonable, you'll be asked if you want to enable Linux binary compatibility. For now, the answer is "no" - if you want Linux binaries at a later date, you can always come back and install this module then. These articles are going to focus heavily on using the ports tree to compile all your own applications as native FreeBSD binaries from source code, though, so it's unnecessary for now.<br />
<br />
Next, you'll get asked if you've got a non-USB mouse attached to the system. Answer the nice computer, and move right on along - presuming the answer is "yes", you'll get a chance to test and enable the mouse daemon. Test it, see if the arrow makes nice wigglies when you move the mouse (it won't do anything when you click, so don't worry about that), and click "Enable" if it did or "Cancel" if it didn't. If the mouse didn't work, DON'T sweat it - you're using a command-driven operating system, here, and if you're following along with these articles, you're going to be learning how to live at the command line and like it. So if the mouse doesn't seem to want to work, file it under "stuff to worry about some other day" and move right on along.<br />
<br />
[[Image: Installation_packages.png]]<br />
<br />
This popup gets its own screenshot because you do not, repeat, do NOT want to browse the package collection right now. Once again, we're here to install FreeBSD right now, not put a bunch of apps on it - that comes later. Be warned, if you decide to ignore me and go play through the packages collection right now anyway, you can easily screw up your installation. There are thousands of things in packages ranging from "nifty" to "inadvisable", none of which are described in enough detail in the packages menu to choose if you don't already know what they are before going in there. Finally, this is NOT the only time you'll ever be able to use that menu to install packages - you can return to it at any time once you've finished installing the OS. So please, please, don't make life difficult - select "No" and KEEP MOVING!<br />
<br />
The next thing sysinstall wants to know is if you'd like to add another user account to the system. Yes, you would! Not only is logging in as root extremely insecure, if you do not have another user account on the system, you will not be able to remote control it. So tell it "yes", tell it you want to add another User to the system, and here we are:<br />
<br />
[[Image: Installation_adduser.png ]]<br />
<br />
There are a few things worth noting on this screen. UID is filled out for you (and shouldn't be changed unless you know what you're doing), Full name defaults to "User &" and is utterly unimportant (it's just a "comment" field) and Home directory defaults to /home/[whatever you put for Login ID], but the rest needs to be filled out and/or changed. In particular, make sure that you enter wheel in the Group field so that you will be able to assume root privileges using this account, and that you change your Login shell from /bin/sh to /bin/csh. (Linux expatriates, [[bash]] isn't available right now - you can install it from ports when we're done, but in the meantime, the [[c shell]], /bin/csh is what you want.) The default shell is extremely painful to work with, so don't forget to do this! Once you're done, highlight "OK" and hit enter, highlight "Exit" and hit enter in the next screen, and you'll be prompted to set the root password. Do so, tell it you don't need to visit the general configuration menu to set any last options, and you'll be back at the sysinstall main menu - and when you select "Exit Install", the system will reboot into FreeBSD!<br />
<br />
[[Category : Installation]]</div>Joehttp://freebsdwiki.net/index.php/Hard_Disk_Partition_SizesHard Disk Partition Sizes2005-12-23T03:58:21Z<p>Joe: Minor Edits, folded information in from Partitioning Tips and Tricks + categories</p>
<hr />
<div>==Official Information and Terms==<br />
Before we get started, I am acting under the impression that the reader is a relative newbie to the world of FreeBSD, and is attempting to figure out how to partition their disks for the first time. I also assume that the reader is aware of the official FreeBSD documentation related to installing located here: [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html The FreeBSD Handbook Install Section]. More aware users will have discovered the partitioning information available under [http://www.freebsd.org/cgi/man.cgi?query=tuning&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html man tuning] under FreeBSD 6.0 . By the existence of this page, however, you have also realized that some tweaking to both the default setup and the information in tuning is necessary for many installations.<br />
<br />
It is worth repeating that FreeBSD looks at hard disk partitions in a slightly different way from windows and linux. When I refer to partitions in the following sections, I am refering to FreeBSD style partitions, which are a bit different from what you may be used to under linux or Windows. To make a long story short, FreeBSD can hold many partitions inside of a single slice (a FreeBSD slice = a windows or linux partition). This frees FreeBSD from being limited to a rather inconvenient number of 4 or so partitions. Read the handbook carefully for more details<br />
<br />
==The Default Install==<br />
As of FreeBSD 6.0, sysinstall will create partitions sized approximately as follows by default:<br />
<br />
/ 128MB<br />
SWAP ''two times the system RAM''<br />
/var 256MB<br />
/tmp 256MB<br />
/usr ''remainder of the disk''<br />
<br />
Many of these partitions are entirely too small, and they are not sized with any thought regarding the usage of the machine. There are a few basic reasons to make a seperate partition:<br />
#to nicely size a partition for a wierd backup scheme that cannot handle unusually large backup dumps.<br />
#to protect the space needed by something (particularly the base system) from being stepped on by other programs<br />
#to limit particularly hungry programs from stepping on the space of everything else.<br />
Some thought about what you are trying to protect, and what you are trying to limit is in order for configuring a system.<br />
<br />
==One Big Partition==<br />
The default install contrasts strongly with a fairly popular partitioning scheme for a system for an individual user:<br />
<br />
SWAP ''two times the system RAM''<br />
/ ''remainder of disk''<br />
<br />
Although this can be perfectly appropriate for a personal system with nothing critical on it, this system has two major faults<br />
*In case of a serious system failure (repeated reboots), the entire drive will need to have it's file system checked with [[fsck]] on every reboot. The core systems of FreeBSD do not require very much disk space. Partitions would allow you to only check critical partitions and put off the rest of the checks on the larger partitions until the system is stable.<br />
*One of the primary reasons to seperate things out, is to prevent one partition from filling up all the space and making other things stop working because they run out of space. <br />
<br />
==The SWAP partition==<br />
This one is fairly easy. The ''twice the amount of system RAM'' rule of thumb is a good one. If you have multiple hard disks on the system, [http://www.freebsd.org/cgi/man.cgi?query=tuning&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html man tuning] and [[Partitioning Tips and Tricks#Multiple Disks? Multiple /swap]] have some good suggestions.<br />
<br />
==The /tmp partition==<br />
It is extremely common for this partition to be undersized. This partition is used in building ports, and several programs will keep fairly large temporary files here. You want to make it a seperate partition:<br />
*To protect the system from either a very large port compile (such as the larger windowmanagers or an X graphical interface system)<br />
*To prevent a run-away process that is simply filling the disk with as much data as possible from infringing on your / filespace.<br />
*To minimize the probability that the often-accessed /tmp directory will cause excessive file corruption on your / partition in the event of a crash.<br />
The danger of making this partition too small is that you will cause yourself unnecessary greif when you want to build a large package or when a program you are running needs alot of temporary space (such as a video editor).<br />
<br />
If you are not installing a graphical system and are unlikely to be editing large files, a fairly small tmp should work fine. Even compiling the larger ports should work inside of 128MB-256MB of tmp. If you will be editing either large numbers of image files or video files on the system (or other large files), a large sized tmp partition does seem more reasonable. A bit more than two times the largest file size you are likely to be editing would seem to be a reasonable limit.<br />
<br />
==The /var partition==<br />
var also depends highly on your intended use of the machine. Email, logs, the default [[mysql]] databases, another tmp directory and print spooler information is held subdirectories of this partition. You may want to seperate this off to prevent logs or emails from overrunning the system. You may also want to protect emails or the db from other potential problems. (and thus give them their own partition) If you are not running a server, or it will not be very busy, this can often do without it's own partition.<br />
<br />
===The /var/tmp directory===<br />
The /var/tmp directory can be deleted, and replaced with a [[soft links|soft link]] to the /tmp partition (or vice versa). This can be done with either '''ln -s /tmp /var/tmp''' or '''ln -s /var/tmp /tmp''' as root. This is recomended since there is essentially no difference between /var/tmp and /tmp on modern systems, but some programs use one instead of the other.<br />
<br />
==The /usr partition==<br />
The /usr partition contains contains a few major sections. There are a few approaches to this section. One is to give it it's own largish partition. Second is to lump it into the main / partition (and either move the ports tree or watch it's size carefully). Third is to split off several sections either into their own partitions or to symlink them from the / partition to a larger partition. Tuning recomends up to 3Gigs for /usr if you are going to have X installed with source, but I personally feel this would be a little bit limiting. 5-10 gigs seems more reasonable if you have the room.<br />
===The /usr/src/ directory===<br />
This contains the source code for the operating system, this is needed if you want to do a source update of the operating system via [[cvsup]] at some point. This really shouldn't have it's own partition, seperated from /usr.<br />
===The /usr/ports directory===<br />
By default /usr/ports contains the [[ports]] collection. /usr/ports/distfiles, which contains the packaged ports downloads, can grow quite large on a system that has many ports installed. On the other hand, you can keep it under control manually by deleting things periodically. Most ports do some of their compilation and install work in their own directories, however, and this will require a bit of stretching room.<br />
===The /usr/local directory===<br />
This contains most of the files related to installed ports, in addition to your personal configurations in /usr/local/etc. This will need to be roughly sized with whatever you are installing. It will be very large for an X system, but fairly small for a simple ftp server.<br />
<br />
==The /home or /data partition==<br />
Assuming this is not a firewall or similarly specialized machine. Users (even if it is only yourself) will likely log in and want to use files. This partition, not created by the default install, is often given most of the disk. This is particularly true for personal servers and personal machines, which are likely to keep most of their files in this partition.<br />
<br />
I believe the original partitioning scheme follows the idea of creating a link from /home to /usr/home, and giving /usr most of the disk. The problem with this is that /usr is needed to bring a system up, and in a situation where you may have as much as 250gigs (or more) of space under /usr, it will take quite awhile to file system check before you can bring the system up to check it. (particularly bad if you're having consistent crashes)<br />
<br />
==Other Information==<br />
You may also want to look at [[Partitioning Tips and Tricks#Make yourself a tiny little partition for /mnt]].<br />
<br />
[[Category:New_User_Tips_and_FAQs]] [[Category:Common Tasks]]<br />
[[Category:FreeBSD for Servers]]</div>Joehttp://freebsdwiki.net/index.php/Talk:Partitioning_Tips_and_TricksTalk:Partitioning Tips and Tricks2005-12-23T03:52:53Z<p>Joe: Status Update</p>
<hr />
<div>How can I have FreeBSD tell me what kind of hard drive I have (serial number, manufacturer, etc)?<br />
<br />
to the best of my knowlege, you can't. That info is printed on the hard drive itself. So you'd have to look at it -- open the case and take the disk out and write down all that info. You can get the system to tell you what kind of disk you have (ATA/SCSI, etc) and how it's been configured, but that's as far as that goes.<br />
<br />
--[[User:Dave|Dave]] 11:20, 25 Jul 2005 (EDT)<br />
<br />
==sysutils/smartmontools==<br />
There is the sysutils/smartmontools port for SMART enabled drives. Running "smartctl -i /dev/ad4" on my system gives output like:<br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
<br />
--[[User:Joe|Joe]] 12:13, 22 Dec 2005 (EST)<br />
<br />
Added to main page --[[User:Joe|Joe]] 22:52, 22 Dec 2005 (EST)<br />
<br />
<br />
I have a very large edit to this file, summarizing different uses of the different partitions in the default system install... but it really doesn't fit well with alot of this information or this title. I would like to move some of this info over to this new article named "Hard Disk Partition Sizes" with something like the following TOC:<br />
#Official Information and Terms (Links to manpages and HB)<br />
#The Default Install<br />
#One Big Partition<br />
#The SWAP partition<br />
#The /tmp partition<br />
#The /var partition<br />
##The /var/tmp directory<br />
#The /usr partition<br />
##/usr/src directory<br />
##/usr/ports directory<br />
##/usr/local directory<br />
#The /home partition<br />
The intended audience of this new file would be people new to FreeBSD who are not entirely sure what the different partitions are used for and why they might want to change the default sizes. If no one objects, I'll post the article and rearrange this article to lose duplicated information and probably move the above question into this article as well.<br />
--[[User:Joe|Joe]] 15:42, 22 Dec 2005 (EST)<br />
<br />
== sounds good, go for it ==<br />
<br />
great idea...<br />
<br />
--[[User:Dave|Dave]] 15:47, 22 Dec 2005 (EST)<br />
<br />
What is the policy/style-guide for the Talk-chatting? I was mostly pursuing a plan of 1 section per topic... but I can work with whatever--[[User:Joe|Joe]] 15:54, 22 Dec 2005 (EST)<br />
<br />
I need to get some sleep... but tommorow I'll clean this article and fold some of the comments into the article itself, as well as adding the proper categories to the other article. My previous question has been moved to [[Help_talk:Style Guidelines]]. --[[User:Joe|Joe]] 16:20, 22 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/Partitioning_Tips_and_TricksPartitioning Tips and Tricks2005-12-23T03:51:45Z<p>Joe: updating for the existance of the Hard Disk Partition Sizes article</p>
<hr />
<div>You may find [[Hard Disk Partition Sizes]] useful if you are setting up partitions for the first time.<br />
<br />
==Make yourself a tiny little partition for /mnt==<br />
If you plan to work with removable read-write filesystems - USB drives, IDE or SCSI removables, whatever - make yourself a teeny tiny (like 5 or 10 MB or less) partition for /mnt, and mount the devices to /mnt/removable or /mnt/usbdrive or what have you. That way if a script or a command you run tries to copy a few gigs worth of data and you DON'T have your removable device properly mounted, it will fill your little throwaway /mnt partition that you don't really need (and do it very quickly), instead of you accidentally filling your root partition, which can cause system instabilities.<br />
<br />
==Use soft links to your advantage!==<br />
Don't forget that you can use [[ln]] to do really nifty things with your drives and partitions. For example if you've made a too small /usr partition and a very large /data partition, you might want to move the ports tree - which can occupy several gigs of space if you build lots of ports and aren't meticulous about cleaning out old distfiles and work directories - into the larger /data partition. But instead of trying to laboriously fix the entire system so that it looks in /data/ports instead of /usr/ports, what you can do instead is '''mv /usr/ports /data/''' and then '''ln -s /data/ports /usr/ports''' - now it ''looks'' and ''works'' as though the ports tree is still in the default location, but in fact it's operating from the bigger partition!<br />
<br />
Another common use for this is /var/db on servers with large databases. By default [[mysql]] places databases in /var/db, which is normally a very small partition (256MB or so) - and can be overwritten disturbingly quickly with apache logs and mailserver logs and the like, not to mention the databases themselves. Rather than recompiling or reconfiguring the database server itself to look for its database in a different location, you can simply move the databases to a different partition and soft link to them, just as was described for the ports tree in the paragraph above. Kill the database server, '''mv /var/db /data/db && ln -s /data/db /var/db''' and restart the server with no conf changes necessary, and you're in business!<br />
<br />
==Multiple Disks? Multiple /swap==<br />
If you've got two or more disks, you'll speed up performance on them by creating swap partitions on both of them -- no more moving data through the system bus to page files from disk 1 to your swap partition on disk 0. Some folks recommend that swap always be the first slice on the disk (even before / or any other partitions) because it's supposed to increase read/write times for stuff in swap; I've never noticed any real difference when I've done this, but if you have a lot of read/write-intensive operations (big databases, for e.g.,) you may want to consider this.<br />
<br />
NOTE: as always, the ''best'' way to speed up swap is not to need it in the first place - if you've got heavy swap partition activity, and you can possibly afford to do it, add more RAM. No matter ''what'' you do with your swap partition(s), accessing them is always going to be an order of magnitude or three slower than staying in RAM.<br />
<br />
==Getting Hard Disk Information==<br />
Sometimes you need information about the model or manufacturing numbers of drives that are in a running system. If the hard disk supports SMART (most do), you can use the port sysutils/smartmontools to extract the model numbers. Running '''smartctl -i /dev/ad4''' on my system gives output like:<br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
<br />
[[Category:New_User_Tips_and_FAQs]] [[Category:Common Tasks]]<br />
[[Category:FreeBSD for Servers]]</div>Joehttp://freebsdwiki.net/index.php/Talk:Partitioning_Tips_and_TricksTalk:Partitioning Tips and Tricks2005-12-22T21:20:08Z<p>Joe: Plan for tommorow on this article</p>
<hr />
<div>How can I have FreeBSD tell me what kind of hard drive I have (serial number, manufacturer, etc)?<br />
<br />
to the best of my knowlege, you can't. That info is printed on the hard drive itself. So you'd have to look at it -- open the case and take the disk out and write down all that info. You can get the system to tell you what kind of disk you have (ATA/SCSI, etc) and how it's been configured, but that's as far as that goes.<br />
<br />
--[[User:Dave|Dave]] 11:20, 25 Jul 2005 (EDT)<br />
<br />
==sysutils/smartmontools==<br />
There is the sysutils/smartmontools port for SMART enabled drives. Running "smartctl -i /dev/ad4" on my system gives output like:<br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
<br />
--[[User:Joe|Joe]] 12:13, 22 Dec 2005 (EST)<br />
<br />
<br />
I have a very large edit to this file, summarizing different uses of the different partitions in the default system install... but it really doesn't fit well with alot of this information or this title. I would like to move some of this info over to this new article named "Hard Disk Partition Sizes" with something like the following TOC:<br />
#Official Information and Terms (Links to manpages and HB)<br />
#The Default Install<br />
#One Big Partition<br />
#The SWAP partition<br />
#The /tmp partition<br />
#The /var partition<br />
##The /var/tmp directory<br />
#The /usr partition<br />
##/usr/src directory<br />
##/usr/ports directory<br />
##/usr/local directory<br />
#The /home partition<br />
The intended audience of this new file would be people new to FreeBSD who are not entirely sure what the different partitions are used for and why they might want to change the default sizes. If no one objects, I'll post the article and rearrange this article to lose duplicated information and probably move the above question into this article as well.<br />
--[[User:Joe|Joe]] 15:42, 22 Dec 2005 (EST)<br />
<br />
== sounds good, go for it ==<br />
<br />
great idea...<br />
<br />
--[[User:Dave|Dave]] 15:47, 22 Dec 2005 (EST)<br />
<br />
What is the policy/style-guide for the Talk-chatting? I was mostly pursuing a plan of 1 section per topic... but I can work with whatever--[[User:Joe|Joe]] 15:54, 22 Dec 2005 (EST)<br />
<br />
I need to get some sleep... but tommorow I'll clean this article and fold some of the comments into the article itself, as well as adding the proper categories to the other article. My previous question has been moved to [[Help_talk:Style Guidelines]]. --[[User:Joe|Joe]] 16:20, 22 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/Help_talk:Style_GuidelinesHelp talk:Style Guidelines2005-12-22T21:18:49Z<p>Joe: Talk Page Style Question (in the right place)</p>
<hr />
<div>To continue my question I started on the wrong page [[Talk:Partitioning Tips and Tricks]]. Should there be some consistant style guidelines for talk pages? My main questions are:<br />
#Do we seperate topics by giving them each section headers? Or do we use the horizontal lines?<br />
#When an issue in the talk page is resolved... should the talk conversation be deleted? For a specific example... now that I've created the page I asked about under the above link, should the conversation about creating it be deleted? Any further discussion can be placed on the new article's talk page, and that thread is pretty much useless to future discussions.</div>Joehttp://freebsdwiki.net/index.php/Talk:Partitioning_Tips_and_TricksTalk:Partitioning Tips and Tricks2005-12-22T21:02:41Z<p>Joe: /* sysutils/smarmontools */ typo in section name</p>
<hr />
<div>How can I have FreeBSD tell me what kind of hard drive I have (serial number, manufacturer, etc)?<br />
<br />
to the best of my knowlege, you can't. That info is printed on the hard drive itself. So you'd have to look at it -- open the case and take the disk out and write down all that info. You can get the system to tell you what kind of disk you have (ATA/SCSI, etc) and how it's been configured, but that's as far as that goes.<br />
<br />
--[[User:Dave|Dave]] 11:20, 25 Jul 2005 (EDT)<br />
<br />
==sysutils/smartmontools==<br />
There is the sysutils/smartmontools port for SMART enabled drives. Running "smartctl -i /dev/ad4" on my system gives output like:<br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
<br />
--[[User:Joe|Joe]] 12:13, 22 Dec 2005 (EST)<br />
<br />
<br />
I have a very large edit to this file, summarizing different uses of the different partitions in the default system install... but it really doesn't fit well with alot of this information or this title. I would like to move some of this info over to this new article named "Hard Disk Partition Sizes" with something like the following TOC:<br />
#Official Information and Terms (Links to manpages and HB)<br />
#The Default Install<br />
#One Big Partition<br />
#The SWAP partition<br />
#The /tmp partition<br />
#The /var partition<br />
##The /var/tmp directory<br />
#The /usr partition<br />
##/usr/src directory<br />
##/usr/ports directory<br />
##/usr/local directory<br />
#The /home partition<br />
The intended audience of this new file would be people new to FreeBSD who are not entirely sure what the different partitions are used for and why they might want to change the default sizes. If no one objects, I'll post the article and rearrange this article to lose duplicated information and probably move the above question into this article as well.<br />
--[[User:Joe|Joe]] 15:42, 22 Dec 2005 (EST)<br />
<br />
== sounds good, go for it ==<br />
<br />
great idea...<br />
<br />
--[[User:Dave|Dave]] 15:47, 22 Dec 2005 (EST)<br />
<br />
What is the policy/style-guide for the Talk-chatting? I was mostly pursuing a plan of 1 section per topic... but I can work with whatever--[[User:Joe|Joe]] 15:54, 22 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/Hard_Disk_Partition_SizesHard Disk Partition Sizes2005-12-22T20:59:12Z<p>Joe: Edited first section language to be less caustic (I was tired when I wrote it)</p>
<hr />
<div>==Official Information and Terms==<br />
Before we get started, I am acting under the impression that the reader is a relative newbie to the world of FreeBSD, and is attempting to figure out how to partition their disks for the first time. I also assume that the reader is aware of the official FreeBSD documentation related to installing located here: [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html The FreeBSD Handbook Install Section]. More aware users will have discovered the partitioning information available under [http://www.freebsd.org/cgi/man.cgi?query=tuning&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html man tuning] under FreeBSD 6.0 . By the existence of this page, however, you have also realized that some tweaking to both the default setup and the information in tuning is necessary for many installations.<br />
<br />
It is worth repeating that FreeBSD looks at hard disk partitions in a slightly different way from windows and linux. When I refer to partitions in the following sections, I am refering to FreeBSD style partitions, which are a bit different from what you may be used to under linux or Windows. To make a long story short, FreeBSD can hold many partitions inside of a single slice (a FreeBSD slice = a windows or linux partition). This frees FreeBSD from being limited to a rather inconvenient number of 4 or so partitions. Read the handbook carefully for more details<br />
<br />
==The Default Install==<br />
As of FreeBSD 6.0, sysinstall will create partitions sized approximately as follows by default:<br />
<br />
/ 128MB<br />
SWAP ''two times the system RAM''<br />
/var 256MB<br />
/tmp 256MB<br />
/usr ''remainder of the disk''<br />
<br />
Many of these partitions are entirely too small, and they are not sized with any thought regarding the usage of the machine. There are two reasons to partition: to protect the space needed by something (particularly the base system) from being stepped on by other programs, and to limit particularly hungry programs from stepping on the space of everything else. Some thought about what you are trying to protect, and what you are trying to limit is in order for configuring a system.<br />
<br />
==One Big Partition==<br />
The default install contrasts strongly with a fairly popular partitioning scheme for a system for an individual user:<br />
<br />
SWAP ''two times the system RAM''<br />
/ ''remainder of disk''<br />
<br />
This system has two major faults<br />
*In case of a serious system failure (repeated reboots), the entire drive will need to have it's file system checked on every reboot. The core systems of FreeBSD do not require very much disk space. Partitions would allow you to only check critical partitions and put off the rest of the checks on the larger partitions until the system is stable.<br />
*One of the primary reasons to seperate things out, is to prevent one partition from filling up all the space and making other things stop working because they run out of space. <br />
<br />
==The SWAP partition==<br />
This one is fairly easy. The ''twice the amount of system RAM'' rule of thumb is a good one. If you have multiple hard disks on the system, [http://www.freebsd.org/cgi/man.cgi?query=tuning&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html man tuning] has some good suggestions, but they are by no means requirements.<br />
<br />
==The /tmp partition==<br />
It is extremely common for this partition to be undersized. This partition is used in building ports, and several programs will keep fairly large temporary files here. You want to make it a seperate partition:<br />
*To protect the system from either a very large port compile (such as the larger windowmanagers or an X graphical interface system)<br />
*To prevent a run-away process that is simply filling the disk with as much data as possible from infringing on your / filespace.<br />
*To minimize the probability that the often-accessed /tmp directory will cause excessive file corruption on your / partition in the event of a crash.<br />
The danger of making this partition too small is that you will cause yourself unnecessary greif when you want to build a large package or when a program you are running needs alot of temporary space (such as a video editor).<br />
<br />
If you are not installing a graphical system and are unlikely to be editing large files, a fairly small tmp should work fine. Even compiling the larger ports should work inside of 128MB-256MB of tmp. If you will be editing either large numbers of image files or video files on the system (or other large files), a large sized tmp partition does seem more reasonable. A bit more than two times the largest file size you are likely to be editing would seem to be a reasonable limit.<br />
<br />
==The /var partition==<br />
var also depends highly on your intended use of the machine. Email, logs, another tmp directory and print spooler information is held subdirectories of this partition. You may want to seperate this off to prevent logs or emails from overrunning the system. You may also want to protect emails from other potential problems. (and thus give them their own partition) If you are not running a server, or it will not be very busy, this can often do without it's own partition.<br />
<br />
===The /var/tmp directory===<br />
The /var/tmp directory can be deleted, and replaced with a [[soft links|soft link]] to the /tmp partition (or vice versa). This can be done with 'ln -s /tmp /var/tmp' as root. This is recomended since there is essentially no difference between /var/tmp and /tmp on modern systems, but some programs use one instead of the other.<br />
<br />
==The /usr partition==<br />
The /usr partition contains contains a few major sections. There are a few approaches to this section. One is to give it it's own largish partition. Second is to lump it into the main / partition (and either move the ports tree or watch it's size carefully). Third is to split off several sections either into their own partitions or to symlink them from the / partition to a larger partition. Tuning recomends up to 3Gigs for /usr if you are going to have X installed with source, but I personally feel this would be a little bit limiting. 5-10 gigs seems more reasonable if you have the room.<br />
===The /usr/src/ directory===<br />
This contains the source code for the operating system, this is needed if you want to do a source update of the operating system via [[cvsup]] at some point. This really shouldn't have it's own partition.<br />
===The /usr/ports directory===<br />
By default /usr/ports contains the [[ports]] collection. /usr/ports/distfiles, which contains the packaged ports downloads, can grow quite large on a system that has many ports installed. On the other hand, you can keep it under control manually by deleting things periodically. Most ports do some of their compilation and install work in their own directories, however, and this will require a bit of stretching room.<br />
===The /usr/local directory===<br />
This contains most of the files related to installed ports, in addition to your personal configurations in /usr/local/etc. This will need to be roughly sized with whatever you are installing. It will be very large for an X system, but fairly small for a simple ftp server.<br />
<br />
==The /home partition==<br />
Assuming this is not a firewall or similarly specialized machine. Users (even if it is only yourself) will likely log in and want to use files. This partition, not created by the default install, is often given most of the disk. This is particularly true for personal servers and personal machine, which are likely to keep most of their files in this partition.<br />
<br />
I believe the original partitioning scheme follows the idea of creating a link from /home to /usr/home, and giving /usr most of the disk. The problem with this is that /usr is needed to bring a system up, and in a situation where you may have as much as 250gigs (or more) of space under /usr, it will take quite awhile to file system check before you can bring the system up to check it. (particularly bad if you're having consistent crashes)<br />
<br />
==Other Information==<br />
You may also want to look at [[Partitioning Tips and Tricks]].</div>Joehttp://freebsdwiki.net/index.php/Talk:Partitioning_Tips_and_TricksTalk:Partitioning Tips and Tricks2005-12-22T20:54:51Z<p>Joe: Talk Page Style Question</p>
<hr />
<div>How can I have FreeBSD tell me what kind of hard drive I have (serial number, manufacturer, etc)?<br />
<br />
to the best of my knowlege, you can't. That info is printed on the hard drive itself. So you'd have to look at it -- open the case and take the disk out and write down all that info. You can get the system to tell you what kind of disk you have (ATA/SCSI, etc) and how it's been configured, but that's as far as that goes.<br />
<br />
--[[User:Dave|Dave]] 11:20, 25 Jul 2005 (EDT)<br />
<br />
==sysutils/smarmontools==<br />
There is the sysutils/smartmontools port for SMART enabled drives. Running "smartctl -i /dev/ad4" on my system gives output like:<br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
<br />
--[[User:Joe|Joe]] 12:13, 22 Dec 2005 (EST)<br />
<br />
<br />
I have a very large edit to this file, summarizing different uses of the different partitions in the default system install... but it really doesn't fit well with alot of this information or this title. I would like to move some of this info over to this new article named "Hard Disk Partition Sizes" with something like the following TOC:<br />
#Official Information and Terms (Links to manpages and HB)<br />
#The Default Install<br />
#One Big Partition<br />
#The SWAP partition<br />
#The /tmp partition<br />
#The /var partition<br />
##The /var/tmp directory<br />
#The /usr partition<br />
##/usr/src directory<br />
##/usr/ports directory<br />
##/usr/local directory<br />
#The /home partition<br />
The intended audience of this new file would be people new to FreeBSD who are not entirely sure what the different partitions are used for and why they might want to change the default sizes. If no one objects, I'll post the article and rearrange this article to lose duplicated information and probably move the above question into this article as well.<br />
--[[User:Joe|Joe]] 15:42, 22 Dec 2005 (EST)<br />
<br />
== sounds good, go for it ==<br />
<br />
great idea...<br />
<br />
--[[User:Dave|Dave]] 15:47, 22 Dec 2005 (EST)<br />
<br />
What is the policy/style-guide for the Talk-chatting? I was mostly pursuing a plan of 1 section per topic... but I can work with whatever--[[User:Joe|Joe]] 15:54, 22 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/Partitioning_Tips_and_TricksPartitioning Tips and Tricks2005-12-22T20:53:06Z<p>Joe: Quick Edit to link to new page</p>
<hr />
<div>==Don't dump everything in /usr !==<br />
You may find [[Hard Disk Partition Sizes]] useful if you are setting up partitions for the first time.<br />
<br />
By default, FreeBSD will partition your drive so that the /usr partition takes up all the space except for a few hundred megs apiece for swap, root, /var, and /tmp. This is fine unless and until you wind up with a cranky machine that needs some TLC and keeps rebooting or panicking, thereby needing tremendous amounts of time to [[fsck]] a gigantic /usr partition before it can be booted!<br />
<br />
You'll make your life LOTS easier in the event of problems if instead you set /usr to be no bigger than about 10GB or so, and put the remainder of the drive as a new and unrelated partition - I tend to call mine /data. That way if you're having problems that keep causing the machine to panic or hard boot without stabilising the filesystem first, you can get up and running FAST by just [[fsck]]'ing your nice small /, /var, /tmp, and /usr partitions without having to sit through a 15 or 20 minute [[fsck]] of the rest of the 100GB or so of user data that isn't needed for the system to actually operate.<br />
<br />
Of course, you WILL need to [[fsck]] that big /data partition once you've gotten the system stable again - but at least you'll only have to do it ''once'' after the problem's ''been'' fixed, instead of sitting through a 10-30 minute [[fsck]] every time the machine panics or hard-reboots while you're tracking down that pesky hardware problem.<br />
<br />
==Make yourself a tiny little partition for /mnt==<br />
If you plan to work with removable read-write filesystems - USB drives, IDE or SCSI removables, whatever - make yourself a teeny tiny (like 5 or 10 MB) partition for /mnt, and mount the devices to /mnt/removable or /mnt/usbdrive or what have you. That way if a script or a command you run tries to copy a few gigs worth of data and you DON'T have your removable device properly mounted, it will fill your little throwaway /mnt partition that you don't really need (and do it very quickly), instead of you accidentally filling your root partition, which can cause system instabilities.<br />
<br />
==Use soft links to your advantage!==<br />
Don't forget that you can use [[ln]] to do really nifty things with your drives and partitions. For example if you've taken the first tip's advice and made a relatively small /usr partition and a very large /data partition, you might want to move the ports tree - which can occupy several gigs of space if you build lots of ports and aren't meticulous about cleaning out old distfiles and work directories - into the larger /data partition. But instead of trying to laboriously fix the entire system so that it looks in /data/ports instead of /usr/ports, what you can do instead is '''mv /usr/ports /data/''' and then '''ln -s /data/ports /usr/ports''' - now it ''looks'' and ''works'' as though the ports tree is still in the default location, but in fact it's operating from the bigger partition!<br />
<br />
Another common use for this is /var/db on servers with large databases. By default [[mysql]] places databases in /var/db, which is normally a very small partition (256MB or so) - and can be overwritten disturbingly quickly with apache logs and mailserver logs and the like, not to mention the databases themselves. Rather than recompiling or reconfiguring the database server itself to look for its database in a different location, you can simply move the databases to a different partition and soft link to them, just as was described for the ports tree in the paragraph above. Kill the database server, '''mv /var/db /data/db && ln -s /data/db /var/db''' and restart the server with no conf changes necessary, and you're in business!<br />
<br />
==Multiple Disks? Multiple /swap==<br />
If you've got two or more disks, you'll speed up performance on them by creating swap partitions on both of them -- no more moving data through the system bus to page files from disk 1 to your swap partition on disk 0. Some folks recommend that swap always be the first slice on the disk (even before / or any other partitions) because it's supposed to increase read/write times for stuff in swap; I've never noticed any real difference when I've done this, but if you have a lot of read/write-intensive operations (big databases, for e.g.,) you may want to consider this.<br />
<br />
NOTE: as always, the ''best'' way to speed up swap is not to need it in the first place - if you've got heavy swap partition activity, and you can possibly afford to do it, add more RAM. No matter ''what'' you do with your swap partition(s), accessing them is always going to be an order of magnitude or three slower than staying in RAM.<br />
<br />
[[Category:New_User_Tips_and_FAQs]] [[Category:Common Tasks]]<br />
[[Category:FreeBSD for Servers]]</div>Joehttp://freebsdwiki.net/index.php/Hard_Disk_Partition_SizesHard Disk Partition Sizes2005-12-22T20:51:26Z<p>Joe: "What's in partition X" information for someone working on an install</p>
<hr />
<div>==Official Information and Terms==<br />
Before we get started, I am acting under the impression that the reader is a relative newbie to the world of FreeBSD, and is attempting to figure out how to partition their disks for the first time. I also assume that the reader is relatively intelligent, and has not neglected to read the official FreeBSD documentation related to installing located here: [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html The FreeBSD Handbook Install Section]. More aware users will have discovered the partitioning information available under [http://www.freebsd.org/cgi/man.cgi?query=tuning&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html man tuning] under FreeBSD 6.0 . By the existence of this page, however, you have also realized that some tweaking to both the default setup and the information in tuning is necessary for many installations.<br />
<br />
It is worth repeating that FreeBSD looks at hard disk partitions in a slightly different way from windows and linux. When I refer to partitions in the following sections, I am refering to FreeBSD style partitions, which of course you are familiar with from the handbook.<br />
<br />
==The Default Install==<br />
As of FreeBSD 6.0, sysinstall will create partitions sized approximately as follows by default:<br />
<br />
/ 128MB<br />
SWAP ''two times the system RAM''<br />
/var 256MB<br />
/tmp 256MB<br />
/usr ''remainder of the disk''<br />
<br />
Many of these partitions are entirely too small, and they are not sized with any thought regarding the usage of the machine. There are two reasons to partition: to protect the space needed by something (particularly the base system) from being stepped on by other programs, and to limit particularly hungry programs from stepping on the space of everything else. Some thought about what you are trying to protect, and what you are trying to limit is in order for configuring a system.<br />
<br />
==One Big Partition==<br />
The default install contrasts strongly with a fairly popular partitioning scheme for a system for an individual user:<br />
<br />
SWAP ''two times the system RAM''<br />
/ ''remainder of disk''<br />
<br />
This system has two major faults<br />
*In case of a serious system failure (repeated reboots), the entire drive will need to have it's file system checked on every reboot. The core systems of FreeBSD do not require very much disk space. Partitions would allow you to only check critical partitions and put off the rest of the checks on the larger partitions until the system is stable.<br />
*One of the primary reasons to seperate things out, is to prevent one partition from filling up all the space and making other things stop working because they run out of space. <br />
<br />
==The SWAP partition==<br />
This one is fairly easy. The ''twice the amount of system RAM'' rule of thumb is a good one. If you have multiple hard disks on the system, [http://www.freebsd.org/cgi/man.cgi?query=tuning&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html man tuning] has some good suggestions, but they are by no means requirements.<br />
<br />
==The /tmp partition==<br />
It is extremely common for this partition to be undersized. This partition is used in building ports, and several programs will keep fairly large temporary files here. You want to make it a seperate partition:<br />
*To protect the system from either a very large port compile (such as the larger windowmanagers or an X graphical interface system)<br />
*To prevent a run-away process that is simply filling the disk with as much data as possible from infringing on your / filespace.<br />
*To minimize the probability that the often-accessed /tmp directory will cause excessive file corruption on your / partition in the event of a crash.<br />
The danger of making this partition too small is that you will cause yourself unnecessary greif when you want to build a large package or when a program you are running needs alot of temporary space (such as a video editor).<br />
<br />
If you are not installing a graphical system and are unlikely to be editing large files, a fairly small tmp should work fine. Even compiling the larger ports should work inside of 128MB-256MB of tmp. If you will be editing either large numbers of image files or video files on the system (or other large files), a large sized tmp partition does seem more reasonable. A bit more than two times the largest file size you are likely to be editing would seem to be a reasonable limit.<br />
<br />
==The /var partition==<br />
var also depends highly on your intended use of the machine. Email, logs, another tmp directory and print spooler information is held subdirectories of this partition. You may want to seperate this off to prevent logs or emails from overrunning the system. You may also want to protect emails from other potential problems. (and thus give them their own partition) If you are not running a server, or it will not be very busy, this can often do without it's own partition.<br />
<br />
===The /var/tmp directory===<br />
The /var/tmp directory can be deleted, and replaced with a [[soft links|soft link]] to the /tmp partition (or vice versa). This can be done with 'ln -s /tmp /var/tmp' as root. This is recomended since there is essentially no difference between /var/tmp and /tmp on modern systems, but some programs use one instead of the other.<br />
<br />
==The /usr partition==<br />
The /usr partition contains contains a few major sections. There are a few approaches to this section. One is to give it it's own largish partition. Second is to lump it into the main / partition (and either move the ports tree or watch it's size carefully). Third is to split off several sections either into their own partitions or to symlink them from the / partition to a larger partition. Tuning recomends up to 3Gigs for /usr if you are going to have X installed with source, but I personally feel this would be a little bit limiting. 5-10 gigs seems more reasonable if you have the room.<br />
===The /usr/src/ directory===<br />
This contains the source code for the operating system, this is needed if you want to do a source update of the operating system via [[cvsup]] at some point. This really shouldn't have it's own partition.<br />
===The /usr/ports directory===<br />
By default /usr/ports contains the [[ports]] collection. /usr/ports/distfiles, which contains the packaged ports downloads, can grow quite large on a system that has many ports installed. On the other hand, you can keep it under control manually by deleting things periodically. Most ports do some of their compilation and install work in their own directories, however, and this will require a bit of stretching room.<br />
===The /usr/local directory===<br />
This contains most of the files related to installed ports, in addition to your personal configurations in /usr/local/etc. This will need to be roughly sized with whatever you are installing. It will be very large for an X system, but fairly small for a simple ftp server.<br />
<br />
==The /home partition==<br />
Assuming this is not a firewall or similarly specialized machine. Users (even if it is only yourself) will likely log in and want to use files. This partition, not created by the default install, is often given most of the disk. This is particularly true for personal servers and personal machine, which are likely to keep most of their files in this partition.<br />
<br />
I believe the original partitioning scheme follows the idea of creating a link from /home to /usr/home, and giving /usr most of the disk. The problem with this is that /usr is needed to bring a system up, and in a situation where you may have as much as 250gigs (or more) of space under /usr, it will take quite awhile to file system check before you can bring the system up to check it. (particularly bad if you're having consistent crashes)<br />
<br />
==Other Information==<br />
You may also want to look at [[Partitioning Tips and Tricks]].</div>Joehttp://freebsdwiki.net/index.php/Talk:Partitioning_Tips_and_TricksTalk:Partitioning Tips and Tricks2005-12-22T20:42:41Z<p>Joe: Query: Shall I overhaul this file?</p>
<hr />
<div>How can I have FreeBSD tell me what kind of hard drive I have (serial number, manufacturer, etc)?<br />
<br />
to the best of my knowlege, you can't. That info is printed on the hard drive itself. So you'd have to look at it -- open the case and take the disk out and write down all that info. You can get the system to tell you what kind of disk you have (ATA/SCSI, etc) and how it's been configured, but that's as far as that goes.<br />
<br />
--[[User:Dave|Dave]] 11:20, 25 Jul 2005 (EDT)<br />
<br />
There is the sysutils/smartmontools port for SMART enabled drives. Running "smartctl -i /dev/ad4" on my system gives output like:<br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
<br />
--[[User:Joe|Joe]] 12:13, 22 Dec 2005 (EST)<br />
----<br />
<br />
I have a very large edit to this file, summarizing different uses of the different partitions in the default system install... but it really doesn't fit well with alot of this information or this title. I would like to move some of this info over to this new article named "Hard Disk Partition Sizes" with something like the following TOC:<br />
#Official Information and Terms (Links to manpages and HB)<br />
#The Default Install<br />
#One Big Partition<br />
#The SWAP partition<br />
#The /tmp partition<br />
#The /var partition<br />
##The /var/tmp directory<br />
#The /usr partition<br />
##/usr/src directory<br />
##/usr/ports directory<br />
##/usr/local directory<br />
#The /home partition<br />
The intended audience of this new file would be people new to FreeBSD who are not entirely sure what the different partitions are used for and why they might want to change the default sizes. If no one objects, I'll post the article and rearrange this article to lose duplicated information and probably move the above question into this article as well.<br />
--[[User:Joe|Joe]] 15:42, 22 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/Help:EditingHelp:Editing2005-12-22T18:03:55Z<p>Joe: </p>
<hr />
<div>A link to the wikimedia editing help page: [http://meta.wikimedia.org/wiki/Help:Editor]</div>Joehttp://freebsdwiki.net/index.php/Talk:Current_eventsTalk:Current events2005-12-22T17:49:13Z<p>Joe: </p>
<hr />
<div>Not sure if this is the appropriate place to put this... but it seems logical. I note we have spam problems again. Are there any thoughts given to restricting IP-edits to prevent spam? (and probably adding a "Type the letters in the box" authentication to user-creation)<br />
--[[User:Joe|Joe]] 12:49, 22 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:Partitioning_Tips_and_TricksTalk:Partitioning Tips and Tricks2005-12-22T17:41:56Z<p>Joe: fixed my formatting</p>
<hr />
<div>How can I have FreeBSD tell me what kind of hard drive I have (serial number, manufacturer, etc)?<br />
----<br />
to the best of my knowlege, you can't. That info is printed on the hard drive itself. So you'd have to look at it -- open the case and take the disk out and write down all that info. You can get the system to tell you what kind of disk you have (ATA/SCSI, etc) and how it's been configured, but that's as far as that goes.<br />
<br />
--[[User:Dave|Dave]] 11:20, 25 Jul 2005 (EDT)<br />
<br />
There is the sysutils/smartmontools port for SMART enabled drives. Running "smartctl -i /dev/ad4" on my system gives output like:<br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
<br />
--[[User:Joe|Joe]] 12:13, 22 Dec 2005 (EST)</div>Joehttp://freebsdwiki.net/index.php/Talk:Partitioning_Tips_and_TricksTalk:Partitioning Tips and Tricks2005-12-22T17:13:38Z<p>Joe: </p>
<hr />
<div>How can I have FreeBSD tell me what kind of hard drive I have (serial number, manufacturer, etc)?<br />
----<br />
to the best of my knowlege, you can't. That info is printed on the hard drive itself. So you'd have to look at it -- open the case and take the disk out and write down all that info. You can get the system to tell you what kind of disk you have (ATA/SCSI, etc) and how it's been configured, but that's as far as that goes.<br />
<br />
--[[User:Dave|Dave]] 11:20, 25 Jul 2005 (EDT)<br />
<br />
There is the sysutils/smartmontools port for SMART enabled drives. Running "smartctl -i /dev/ad4" on my system gives output like:<br />
<blockquote style="background: white; border: 1px solid black; padding: 1em;"><pre><nowiki><br />
=== START OF INFORMATION SECTION ===<br />
Device Model: WDC WD2500JB-00EVA0<br />
Serial Number: WD-WCAEH1028140<br />
Firmware Version: 15.05R15<br />
Device is: In smartctl database [for details use: -P show]<br />
ATA Version is: 6<br />
ATA Standard is: Exact ATA specification draft version not indicated<br />
Local Time is: Thu Dec 22 10:48:33 2005 CST<br />
SMART support is: Available - device has SMART capability.<br />
SMART support is: Enabled<br />
</nowiki></pre></blockquote><br />
--[[User:Joe|Joe]] 12:13, 22 Dec 2005 (EST)</div>Joe