Changes

FreeBSD Format and Partition

2,444 bytes added, 4 February
The following lines were added (+) and removed (-):
Look at partition table. gpart showcommand gpart recover vtbd(x)command gpart add -t freebsd-ufs -b BEGIN -s SIZE GEOMcommand gpart add -t freebsd-ufs -b 20971682 -s 18874240 vtbd(x)command newfs -U /dev/vtbdXXXXcommand mkdir /transipcommand mount /dev/vtbdXXXX /transipcommand mount /dev/vtbXXXX /transip== FreeBSD Partitions ==Be familiar with the partitions and their purpose* /var - used to hold mailboxes, log files, and printer spools. [no less than 1GB]* /usr - holds many of the files which support the system, including the FreeBSD Ports Collection and system source code. [no less than 2GB]* swap - the swap partition should be about double the size of physical memory (RAM)gpart showWith FreeBSD the partition scheme GPT is usually the most appropriate choice for amd64 computers.  Older computers that are not compatible with GPT should use MBR. The other partition schemes are generally used for uncommon or older computers.gpart recover vtbd0A standard FreeBSD GPT installation uses at least three partitions (and swap for a fourth):gpart add -t freebsd-ufs -b BEGIN -s SIZE GEOM#    freebsd-boot - Holds the FreeBSD boot code.#    freebsd-ufs - A FreeBSD UFS file system.#    freebsd-zfs - A FreeBSD ZFS file system. More information about ZFS is available in Chapter 19, The Z File System (ZFS).#    freebsd-swap - FreeBSD swap space.gpart add -t freebsd-ufs -b 20971682 -s 18874240 vtbd0Although some people prefer a traditional layout with separate partitions for /, /var, /tmp, and /usr it is not required.  The choice is yours.newfs -U /dev/vtbd0p4== Creating Traditional Split File System Partitions ==For a traditional partition layout where the /, /var, /tmp, and /usr directories are separate file systems (this is not necessary but shown here as an example.) Partition Type Size Mountpoint Label freebsd-boot 512K freebsd-ufs 2G / exrootfs freebsd-swap 4G exswap freebsd-ufs 2G /var exvarfs freebsd-ufs 1G /tmp extmpfs freebsd-ufs accept the default (remainder of the disk) /usr exusrfsmkdir /transipmount /dev/vtbd0p4 /transipmount /dev/vtbd0p4 /transipNow to deal with SSD specific things.  /etc/fstab must be changed to refer to the SSD. At the same time, the missing /tmp will be added.Now to deal with SSD specific things.  /etc/fstab must be changed to refer to the SSD. At the same time, the missing /tmp will be added. Edit the /etc/fstab file. vi /etc/fstabModify # Device                Mountpoint      FStype  Options        Dump    Pass# /dev/gpt/ssdrootfs      /              ufs    rw              1      1 /dev/gpt/ssdvarfs      /var            ufs    rw              2      2 tmpfs                  /tmp            tmpfs  rw,mode=01777  0      0 /dev/gpt/ssdusrfs      /usr            ufs    rw              2      2 Swap mkdir /usr/swap dd if=/dev/zero of=/usr/swap/swap bs=128k count=32768Edit /etc/fstab to use the swap file. vi /etc/fstabModify # Device        Mountpoint      FStype  Options                        Dump    Pass# md99            none            swap    sw,file=/usr/swap/swap,late    0      0Make sure the SSD is set as the first boot drive.[[Category:Linux]]
Bureaucrat, administrator
16,192
edits