1169695SkanThis is the FreeBSD DiskLabel Editor.
2169695Skan
3169695SkanNOTE: If you're entering this editor from the update procedure then
4169695Skanyou probably shouldn't (C)reate anything at all but rather use only
5169695Skanthe (M)ount command to check and mount existing partitions for
6169695Skanupgrading.
7169695Skan
8169695SkanIf you would like the label editor to do most of the following for
9169695Skanyou, simply type `A' for automatic partitioning of the disk.
10169695Skan
11169695SkanIf you wish to create partitions manually you may do so by moving the
12169695Skanhighlighted selection bar with the arrow keys over the FreeBSD
13169695Skanpartition(s) displayed at the top of the screen.  Typing (C)reate
14169695Skanwhile a partition with available free space is selected will allow you
15169695Skanto create a BSD partition inside of it using some or all of its
16169695Skanavailable space.
17169695Skan
18169695SkanTyping (M)ount over an existing partition entry (displayed in the
19169695Skanmiddle of the screen) will allow you to set a mount point for it
20169695Skanwithout initializing it.  If you want it initialized, use the (T)oggle
21169695Skancommand to flip the Newfs flag.  When Newfs is set to "Y", the
22169695Skanfilesystem in question will be ERASED and rebuilt from scratch!
23169695Skan
24169695Skan
25169695SkanYou should use this editor to create at least the following
26169695Skanfilesystems:
27169695Skan
28169695Skan        Name    Purpose                 Min Size?       Optional?
29169695Skan        ----    -------                 ---------       ---------
30169695Skan        /       Root filesystem         118MB           No
31169695Skan        swap    Swap space              2 * MEM         No
32169695Skan        /usr    System & user files     128MB or more   Yes
33169695Skan
34169695SkanNote: If you do not create a /usr filesystem then your / filesystem
35169695Skanwill need to be bigger - at least 240MB.  This is not recommended as
36169695Skanany media errors that may occur during disk I/O to user files will
37169695Skancorrupt the filesystem containing vital system files as well.  It is
38169695Skanfor this reason that / is generally kept on its own filesystem, where
39169695Skanit should be considered essentially "read only" in your administration
40169695Skanof it.
41169695Skan
42169695SkanSwap space is a little tricker, and the rule of "2 * MEM" is simply a
43169695Skanbest-guess approximation and not necessarily accurate for your
44169695Skanintended usage of the system.  If you intend to use the system heavily
45169695Skanin a server or multi-user application, you may be well advised to
46169695Skanincrease this size.  You may also create swap space on multiple drives
47169695Skanfor a larger "total" swap and this is, in fact, recommended if you
48169695Skanhave multiple, fast drives for which such load-balancing can only help
49169695Skanoverall I/O performance.
50169695Skan
51169695SkanThe /usr filesystem should be sized according to what kind of
52169695Skandistributions you're trying to load and how many packages you intend
53169695Skanto install in locations like /usr/local.  You can also make /usr/local
54169695Skana separate filesystem if you don't want to risk filling up your /usr
55169695Skanby mistake.
56
57Another useful filesystem to create is /var, which contains mail, news
58printer spool files and other temporary items.  It is a popular
59candidate for a separate partition and should be sized according to
60your estimates of the amount of mail, news or spooled print jobs that
61may be stored there.
62
63WARNING: If you do not create a separate filesystem for /var, space
64for such files will be allocated out of the root (/) filesystem
65instead.  You may therefore wish to make the / partition bigger if you
66expect a lot of mail or news and do not want to make /var its own
67partition.
68
69If you're new to this installation, you might also want to read the
70following explanation of how FreeBSD's new "slice" paradigm for
71looking at disk storage works:
72
73
74In FreeBSD's new system, a device name can be broken up into up to 3
75parts.  Take a typical name like ``/dev/da0s1a'':
76
77      The first three characters represent the drive name.  If we had
78      a system with two SCSI drives on it then we'd see /dev/da0 and
79      /dev/da1 as the device entries representing the entire drives.
80
81      Next you have the "slice" (or "FDISK Partition") number,
82      as seen in the Partition Editor.  Assuming that our da0
83      contained two slices, a FreeBSD slice and a DOS slice, that
84      would give us /dev/da0s1 and /dev/da0s2 as device entries pointing
85      to the entire slices.
86
87      Next, if a slice is a FreeBSD slice, you can have a number of
88      (confusingly named) "partitions" inside of it.
89
90      These partitions are where various filesystems or swap areas live,
91      and using our hypothetical two-SCSI-disk machine again, we might
92      have something like the following layout on da0:
93
94              Name            Mountpoint
95              ----            ----------
96              da0s1a          /
97              da0s1b          <swap space>
98              da0s1e          /usr
99
100Once you understand all this, then the purpose of the label editor
101becomes fairly clear:  You're carving up the FreeBSD slices displayed
102at the top of the screen into smaller pieces, which are displayed in
103the middle of the screen, and then assigning FreeBSD file system names
104(mount points) to them.
105
106You can also use the label editor to mount existing partitions/slices
107into your filesystem hierarchy, as is frequently done for DOS FAT
108slices.  For FreeBSD partitions, you can also toggle the "newfs" state
109so that the partitions are either (re)created from scratch or simply
110checked and mounted (the contents are preserved).
111
112If you set (S)oftUpdates on a filesystem, it will cause the
113"Soft Updates" policy to be in effect for it.  This basically causes
114both metadata and data blocks to be written asynchronously to disk,
115but with extra state information which causes the metadata and any
116related data blocks to be committed in a single transaction.  This
117results in async metadata update speeds (which are considerably
118faster than the default sync) without the potential for data loss
119which could occur if you simply mounted the filesystem with purely
120"async" update policy and then had a power failure.  If you wish
121to later turn the softupdates policy back off, use the command
122"tunefs -n disable devicename".  NOTE:  It is probably not wise
123to use this on your root filesystem unless you have a large
124(e.g. non-standard size) root.  The reason is that smaller filesystems
125with significant activity can temporarily overflow if the soft updates
126policy results in free'd blocks not being "garbage collected" as fast
127as they're being requested.
128
129The UNIX File System (UFS) on FreeBSD supports two different on-disk
130layouts: UFS1 and UFS2.  UFS1 was the default file system in use
131through FreeBSD 5.0-RELEASE; as of FreeBSD 5.1-RELEASE, the default
132is now UFS2, with the exception of the PC98 platform.  UFS2 provides
133sparse inode allocation (faster fsck), 64-bit storage pointers (larger
134maximum size), and native extended attributes (required for ACLs, MAC,
135and other advanced security and file system services).  The selection
136of UFS1 or UFS2 must be made when the file system is created--later
137conversion is not currently possible.  UFS2 is the recommended file
138system, but if disks are to be used on older FreeBSD systems, UFS1
139improves portability.  When dual-booting between FreeBSD 4.x or
140earlier and FreeBSD 5.x, UFS1 file systems will be accessible from
141both.  To toggle a file system to UFS1, press '1'.  To restore it to
142UFS2, press '2'.
143
144WARNING: FreeBSD on i386 is currently unable to boot from root file
145systems larger than 1.5TB.
146
147To add additional flags to the newfs command line for UFS file
148systems, press 'N'.  These options will be specified before the
149device argument of the command line, but after any other options
150placed there by sysinstall, such as the UFS version and soft
151updates flag; as such, arguments provided may override existing
152settings.  To completely replace the newfs command used by
153sysinstall, press 'Z' to convert a partition to a Custom
154partition type.  Sysinstall will prompt you with the newfs
155command line that it would have used based on existing settings
156prior to the change, but allow you to modify any aspect of the
157command line.  Once a partition has been converted to a custom
158partition in the label editor, you will need to restart the
159labeling process or delete and recreate the partition to restore
160it to a non-custom state.  Custom partitions are represented by
161the letters "CST" instead of "UFS" or "FAT.
162
163When you're done, type `Q' to exit.
164
165No actual changes will be made to the disk until you (C)ommit from the
166Install menu or (W)rite directly from this one.  You're working with
167what is essentially a copy of the disk label(s), both here and in the
168FDISK Partition Editor, and the actual on-disk labels won't be
169affected by any changes you make until you explicitly say so.
170