1This is the FreeBSD DiskLabel Editor. 2 3NOTE: If you're entering this editor from the update procedure then 4you probably shouldn't (C)reate anything at all but rather use only 5the (M)ount command to check and mount existing partitions for 6upgrading. 7 8If you would like the label editor to do most of the following for 9you, simply type `A' for automatic partitioning of the disk. 10 11If you wish to create partitions manually you may do so by moving the 12highlighted selection bar with the arrow keys over the FreeBSD 13partition(s) displayed at the top of the screen. Typing (C)reate 14while a partition with available free space is selected will allow you 15to create a BSD partition inside of it using some or all of its 16available space. 17 18Typing (M)ount over an existing partition entry (displayed in the 19middle of the screen) will allow you to set a mount point for it 20without initializing it. If you want it initialized, use the (T)oggle 21command to flip the Newfs flag. When Newfs is set to "Y", the 22filesystem in question will be ERASED and rebuilt from scratch! 23 24 25You should use this editor to create at least the following 26filesystems: 27 28 Name Purpose Min Size? Optional? 29 ---- ------- --------- --------- 30 / Root filesystem 118MB No 31 swap Swap space 2 * MEM No 32 /usr System & user files 128MB or more Yes 33 34Note: If you do not create a /usr filesystem then your / filesystem 35will need to be bigger - at least 240MB. This is not recommended as 36any media errors that may occur during disk I/O to user files will 37corrupt the filesystem containing vital system files as well. It is 38for this reason that / is generally kept on its own filesystem, where 39it should be considered essentially "read only" in your administration 40of it. 41 42Swap space is a little tricker, and the rule of "2 * MEM" is simply a 43best-guess approximation and not necessarily accurate for your 44intended usage of the system. If you intend to use the system heavily 45in a server or multi-user application, you may be well advised to 46increase this size. You may also create swap space on multiple drives 47for a larger "total" swap and this is, in fact, recommended if you 48have multiple, fast drives for which such load-balancing can only help 49overall I/O performance. 50 51The /usr filesystem should be sized according to what kind of 52distributions you're trying to load and how many packages you intend 53to install in locations like /usr/local. You can also make /usr/local 54a separate filesystem if you don't want to risk filling up your /usr 55by 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