diff --git a/documentation/content/en/books/handbook/bsdinstall/_index.adoc b/documentation/content/en/books/handbook/bsdinstall/_index.adoc index 79234d2dc6..2712331049 100644 --- a/documentation/content/en/books/handbook/bsdinstall/_index.adoc +++ b/documentation/content/en/books/handbook/bsdinstall/_index.adoc @@ -1,1273 +1,1273 @@ --- title: Chapter 2. Installing FreeBSD part: Part I. Getting Started prev: books/handbook/introduction next: books/handbook/basics description: Guide about how to install FreeBSD, the minimum hardware requirements and supported architectures, how to create the installation media, etc tags: ["bsdinstall", "installing FreeBSD", "requirements", "tutorial", "guide"] showBookMenu: true weight: 4 params: path: "/books/handbook/bsdinstall/" --- [[bsdinstall]] = Installing FreeBSD :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: 2 :partnums: :source-highlighter: rouge :experimental: :images-path: books/handbook/bsdinstall/ ifdef::env-beastie[] ifdef::backend-html5[] :imagesdir: ../../../../images/{images-path} endif::[] ifndef::book[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] toc::[] endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] toc::[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [[bsdinstall-synopsis]] == Synopsis FreeBSD supports different architectures including amd64, ARM(R), RISC-V(R), and PowerPC(R). Depending on the architecture and platform, different images can be link:https://www.freebsd.org/where/[downloaded] to install or directly run FreeBSD. The image types are: * Virtual Machine disk images, such as `qcow2`, `vmdk`, `vhd`, and raw device images. These are not installation images, but images that have FreeBSD preinstalled and ready for post-installation tasks. Virtual machine images are also commonly used in cloud environments. * SD card images, for embedded systems such as Raspberry Pi. These files must be uncompressed and written as a raw image to an SD card, from which the board will boot. * Installation images to boot from an ISO or USB device to install FreeBSD on a drive for the usual desktop, laptop, or server system. The rest of this chapter describes the third case, explaining how to install FreeBSD using the text-based installation program named bsdinstall. There may be minor differences between the installer and what is shown here, so use this chapter as a general guide rather than as a set of literal instructions. Read this chapter to learn: * How to obtain FreeBSD images and create FreeBSD installation media. * How to start bsdinstall. * The questions bsdinstall will ask, what they mean, and how to answer them. * How to troubleshoot a failed installation. * How to access a live version of FreeBSD before committing to an installation. [[bsdinstall-hardware]] == Minimum Hardware Requirements The hardware requirements to install FreeBSD vary by architecture and version. Hardware architectures and devices supported by a FreeBSD release are listed on the link:https://www.FreeBSD.org/releases/[FreeBSD Release Information] page. The link:https://www.FreeBSD.org/where/[FreeBSD download page] also has recommendations for choosing the correct image for different architectures. [[bsdinstall-pre]] == Pre-Installation Tasks Once it has been determined that the system meets the minimum hardware requirements for installing FreeBSD, the installation file should be downloaded and the installation media prepared. [TIP] ==== Consider using crossref:virtualization[virtualization,virtualization] when wanting to use FreeBSD on a system that already has another operating system installed. ==== Before moving on to the installation, check that the system is ready by verifying the items in this checklist: [.procedure] ==== . *Back Up Important Data* + Before installing any operating system, *always* backup all important data first. Do not store the backup on the system being installed. Instead, save the data to a removable disk such as a USB drive, another system on the network, or an online backup service. Test the backup before starting the installation to make sure it contains all of the needed files. Once the installer formats the system's disk, all data stored on that disk will be lost. . *Decide Where to Install FreeBSD* + If FreeBSD will be the only operating system installed, this step can be skipped. But if FreeBSD will share the disk with another operating system, decide which disk or partition will be used for FreeBSD. + In the i386 and amd64 architectures, disks can be divided into multiple partitions using one of two partitioning schemes. A traditional _Master Boot Record_ (MBR) holds a partition table defining up to four _primary partitions_. For historical reasons, FreeBSD calls these primary partition _slices_. One of these primary partitions can be made into an _extended partition_ containing multiple _logical partitions_. The _GUID Partition Table_ (GPT) is a newer and simpler method of partitioning a disk. Common GPT implementations allow up to 128 partitions per disk, eliminating the need for logical partitions. + The FreeBSD boot loader requires either a primary or GPT partition. If all of the primary or GPT partitions are already in use, one must be freed for FreeBSD. To create a partition without deleting existing data, use a partition resizing tool to shrink an existing partition and create a new partition using the freed space. + An alternative to modifying the system's existing disk partitions is to use crossref:virtualization[virtualization,virtualization], which allows multiple operating systems to run at the same time without having to alter partitions. + A variety of free and commercial partition resizing tools are listed at link:https://en.wikipedia.org/wiki/List_of_disk_partitioning_software[List of disk partitioning software wikipedia entry]. link:https://gparted.org/livecd.php[GParted Live] is a free live CD which includes the GParted partition editor. + [WARNING] ====== When used properly, disk shrinking utilities can safely create space for creating a new partition. Since the possibility of selecting the wrong partition exists, always backup any important data and verify the integrity of the backup before modifying disk partitions. ====== + Disk partitions containing different operating systems make it possible to install multiple operating systems on one computer. . *Collect Network Information* + Some FreeBSD installation methods require a network connection in order to download the installation files. After any installation, the installer will offer to setup the system's network interfaces. + If the network has a DHCP server, it can be used to provide automatic network configuration. If DHCP is not available, the following network information for the system must be obtained from the local network administrator or Internet service provider: + [[bsdinstall-collect-network-information]] Required Network Information .. IP address .. Subnet mask .. IP address of default gateway .. Domain name of the network .. IP addresses of the network's DNS servers . *Check for FreeBSD Errata* + Although the FreeBSD Project strives to ensure that each release of FreeBSD is as stable as possible, bugs occasionally creep into the process. On very rare occasions those bugs affect the installation process. As these problems are discovered and fixed, they are noted in the FreeBSD Errata page of each version. Check the errata before installing to make sure that there are no problems that might affect the installation. + Information and errata for all the releases can be found on the link:https://www.FreeBSD.org/releases/[FreeBSD Release Information] page. ==== [[bsdinstall-installation-media]] === Prepare the Installation Media The FreeBSD installer is not an application that can be run from within another operating system. Instead, download a FreeBSD installation file, burn it to the media associated with its file type and size (CD, DVD, or USB), and boot the system to install from the inserted media. FreeBSD installation files are available at the link:https://www.FreeBSD.org/where/[FreeBSD download page]. Each installation file's name includes the release version of FreeBSD, the architecture, and the type of file. Installation files are available in several formats, compressed with man:xz[1] or uncompressed. The formats vary depending on computer architecture and media type. Installation file types: * `*-bootonly.iso*`: This is the smallest installation file as it only contains the installer. A working Internet connection is required during installation as the installer will download the files it needs to complete the FreeBSD installation. This file should be burned to optical media. * `*-disc1.iso*`: This file contains all of the files needed to install FreeBSD, its source, and the Ports Collection. This file should be burned to optical media. * `*-dvd1.iso*`: This file contains all of the files needed to install FreeBSD, its source, and the Ports Collection. It also contains a set of popular binary packages for installing a window manager and some applications so that a complete system can be installed from media without requiring a connection to the Internet. This file should be burned to optical media. * `*-memstick.img*`: This file contains all of the files needed to install FreeBSD, its source, and the Ports Collection. Write this file to a USB stick as shown in crossref:bsdinstall[bsdinstall-usb, Writing an Image File to USB]. * `*-mini-memstick.img*`: Like `*-bootonly.iso*`, does not include installation files, but downloads them as needed. A working internet connection is required during installation. It should be written to a USB stick as shown in crossref:bsdinstall[bsdinstall-usb, Writing an Image File to USB]. After downloading the image file, download at least one _checksum_ file from the same directory. There are two _checksum_ files available, named after the release number and the architecture name. For example: `CHECKSUM.SHA256-FreeBSD-13.1-RELEASE-amd64` and `CHECKSUM.SHA512-FreeBSD-13.1-RELEASE-amd64`. After downloading one of the files (or both), calculate the _checksum_ for the image file and compare it with the one shown in the _checksum_ file. Note that comparing the calculated _checksum_ against the correct file is needed, as they correspond to two different algorithms: SHA256 and SHA512. FreeBSD provides man:sha256[1] and man:sha512[1] that can be used for calculating the _checksum_. Other operating systems have similar programs. Verifying the _checksum_ in FreeBSD can be done automatically using man:sha256sum[1] (and man:sha512sum[1]) by executing: [source,shell] .... -% sha256sum -c CHECKSUM.SHA256-FreeBSD-13.1-RELEASE-amd64 FreeBSD-13.1-RELEASE-amd64-dvd1.iso +% sha256sum -c CHECKSUM.SHA256-FreeBSD-13.1-RELEASE-amd64 --ignore-missing FreeBSD-13.1-RELEASE-amd64-dvd1.iso: OK .... The checksums must match exactly. If the checksums do not match, the image file is corrupt and must be downloaded again. [[bsdinstall-usb]] ==== Writing an Image File to USB The `\*memstick.img` file is an _image_ of the complete contents of a memory stick. It _cannot_ be copied to the target device as a file. Several applications are available for writing the `*.img` to a USB stick. This section describes two of these utilities. [IMPORTANT] ==== Before proceeding, back up any important data on the USB stick. This procedure will erase the existing data on the stick. ==== [[bsdinstall-usb-dd]] [.procedure] ==== *Procedure. Using `dd` to write the image* + [WARNING] ====== This example uses `/dev/da0` as the target device where the image will be written. Be *very careful* that the correct device is used as this command will destroy the existing data on the specified target device. ====== . The command-line utility is available on BSD, Linux(R), and Mac OS(R) systems. To burn the image using `dd`, insert the USB stick and determine its device name. Then, specify the name of the downloaded installation file and the device name for the USB stick. This example burns the amd64 installation image to the first USB device on an existing FreeBSD system. + [source,shell] .... # dd if=FreeBSD-13.1-RELEASE-amd64-memstick.img of=/dev/da0 bs=1M conv=sync .... + If this command fails, verify that the USB stick is not mounted and that the device name is for the disk, not a partition. + Some operating systems might require this command to be run with man:sudo[8]. The man:dd[1] syntax varies slightly across different platforms; for example, Mac OS(R) requires a lower-case `bs=1m`. Systems like Linux(R) might buffer writes. To force all writes to complete, use man:sync[8]. ==== [.procedure] ==== *Procedure. Using Windows(R) to Write the Image* + [WARNING] ====== Be sure to give the correct drive letter as the existing data on the specified drive will be overwritten and destroyed. ====== . *Obtaining Image Writer for Windows(R)* + Image Writer for Windows(R) is a free application that can correctly write an image file to a memory stick. Download it from https://sourceforge.net/projects/win32diskimager/[win32diskimager home page] and extract it into a folder. . *Writing the Image with Image Writer* + Double-click the Win32DiskImager icon to start the program. Verify that the drive letter shown under `Device` is the drive with the memory stick. Click the folder icon and select the image to be written to the memory stick. Click btn:[Save] to accept the image file name. Verify that everything is correct, and that no folders on the memory stick are open in other windows. When everything is ready, click btn:[Write] to write the image file to the memory stick. ==== [[bsdinstall-start]] == Starting the Installation [IMPORTANT] ==== By default, the installation will not make any changes to the disk(s) before the following message: [.programlisting] .... Your changes will now be written to disk. If you have chosen to overwrite existing data, it will be PERMANENTLY ERASED. Are you sure you want to commit your changes? .... The install can be exited at any time prior to this warning. If there is a concern that something is incorrectly configured, just turn the computer off before this point and no changes will be made to the system's disks. ==== This section describes how to boot the system from the installation media which was prepared using the instructions in crossref:bsdinstall[bsdinstall-installation-media, Prepare the Installation Media]. When using a bootable USB stick, plug in the USB stick before turning on the computer. When booting from CD or DVD, turn on the computer and insert the media at the first opportunity. How to configure the system to boot from the inserted media depends upon the architecture. [[bsdinstall-view-probe]] === FreeBSD Boot Loader Menu Once the system boots from the installation media, a menu similar to the following will be displayed: [[bsdinstall-newboot-loader-menu]] .FreeBSD Boot Loader Menu image::bsdinstall-newboot-loader-menu.png[FreeBSD boot loader menu] By default, the menu will wait ten seconds for user input before booting into the FreeBSD installer or, if FreeBSD is already installed, before booting into FreeBSD. To pause the boot timer in order to review the selections, press kbd:[Space]. To select an option, press its highlighted number, character, or key. The following options are available. * `Boot Multi User`: This will continue the FreeBSD boot process. If the boot timer has been paused, press kbd:[1], upper- or lower-case kbd:[B], or kbd:[Enter]. * `Boot Single User`: This mode can be used to fix an existing FreeBSD installation as described in crossref:boot[boot-singleuser,“Single-User Mode”]. Press kbd:[2] or the upper- or lower-case kbd:[S] to enter this mode. * `Escape to loader prompt`: This will boot the system into a repair prompt that contains a limited number of low-level commands. This prompt is described in crossref:boot[boot-loader,“Stage Three”]. Press kbd:[3] or kbd:[Esc] to boot into this prompt. * `Reboot`: Reboots the system. * `Cons`: Allow to continue the installation by `video`, `serial`, `Dual (serial primary)` or `Dual (Video primary)` * `Kernel`: Loads a different kernel. * `Boot Options`: Opens the menu shown in, and described under, crossref:bsdinstall[bsdinstall-boot-options-menu,FreeBSD Boot Options Menu]. [[bsdinstall-boot-options-menu]] .FreeBSD Boot Options Menu image::bsdinstall-boot-options-menu.png[Menu showing the different boot options supported] The boot options menu is divided into two sections. The first section can be used to either return to the main boot menu or to reset any toggled options back to their defaults. The next section is used to toggle the available options to `On` or `Off` by pressing the option's highlighted number or character. The system will always boot using the settings for these options until they are modified. Several options can be toggled using this menu: * `ACPI Support`: If the system hangs during boot, try toggling this option to `Off`. This option is only present when ACPI support is available but not required. * `Safe Mode`: If the system still hangs during boot even with `ACPI Support` set to `Off`, try setting this option to `On`. * `Single User`: Toggle this option to `On` to fix an existing FreeBSD installation as described in crossref:boot[boot-singleuser,“Single-User Mode”]. Once the problem is fixed, set it back to `Off`. * `Verbose`: Toggle this option to `On` to see more detailed messages during the boot process. This can be useful when troubleshooting a piece of hardware. After making the needed selections, press kbd:[1] or kbd:[Backspace] to return to the main boot menu, then press kbd:[Enter] to continue booting into FreeBSD. A series of boot messages will appear as FreeBSD carries out its hardware device probes and loads the installation program. Once the boot is complete, the welcome menu shown in crossref:bsdinstall[bsdinstall-choose-mode,Welcome Menu] will be displayed. [[bsdinstall-choose-mode]] .Welcome Menu image::bsdinstall-choose-mode.png[FreeBSD installation welcome menu] Press kbd:[Enter] to select the default of btn:[Install] to enter the installer. The rest of this chapter describes how to use this installer. Otherwise, use the right or left arrows or the colorized letter to select the desired menu item. The btn:[Shell] can be used to access a FreeBSD shell in order to use command line utilities to prepare the disks before installation. The btn:[Live CD] option can be used to try out FreeBSD before installing it. The live version is described in crossref:bsdinstall[using-live-cd, Using the Live CD]. [TIP] ==== To review the boot messages, including the hardware device probe, press the upper- or lower-case kbd:[S] and then kbd:[Enter] to access a shell. At the shell prompt, type `more /var/run/dmesg.boot` and use the space bar to scroll through the messages. When finished, type `exit` to return to the welcome menu. ==== [[using-bsdinstall]] == Using bsdinstall This section shows the order of the bsdinstall menus and the type of information that will be asked before the system is installed. Use the arrow keys to highlight a menu option, then kbd:[Space] to select or deselect that menu item. When finished, press kbd:[Enter] to save the selection and move onto the next screen. [[bsdinstall-keymap]] === Selecting the Keymap Menu Before starting the process, bsdinstall will load the keymap files as shown in crossref:bsdinstall[bsdinstall-keymap-loading,Keymap Loading]. [[bsdinstall-keymap-loading]] .Keymap Loading image::bsdinstall-keymap-loading.png[Keymap loading] After the keymaps have been loaded, bsdinstall displays the menu shown in crossref:bsdinstall[bsdinstall-keymap-10,Keymap Selection Menu]. Use the up and down arrows to select the keymap that most closely represents the mapping of the keyboard attached to the system. Press kbd:[Enter] to save the selection. [[bsdinstall-keymap-10]] .Keymap Selection Menu image::bsdinstall-keymap-10.png[Keymap selection menu showing all supported keyboards] [NOTE] ==== Pressing kbd:[Esc] will exit this menu and use the default keymap. If the choice of keymap is not clear, [.guimenuitem]#United States of America ISO-8859-1# is also a safe option. ==== In addition, when selecting a different keymap, the user can try the keymap and ensure it is correct before proceeding, as shown in crossref:bsdinstall[bsdinstall-keymap-testing,Keymap Testing Menu]. [[bsdinstall-keymap-testing]] .Keymap Testing Menu image::bsdinstall-keymap-testing.png[Keymap testing menu] [[bsdinstall-hostname]] === Setting the Hostname The next bsdinstall menu is used to set the hostname for the newly installed system. [[bsdinstall-config-hostname]] .Setting the Hostname image::bsdinstall-config-hostname.png[Setting the hostname] Type in a hostname that is unique for the network. It should be a fully-qualified hostname, such as `machine3.example.com`. [[bsdinstall-components]] === Selecting Components to Install Next, bsdinstall will prompt to select optional components to install. [[bsdinstall-config-components]] .Selecting Components to Install image::bsdinstall-config-components.png[Different components that can be installed. Example: base-dbg, lib32, ports, etc.] Deciding which components to install will depend largely on the intended use of the system and the amount of disk space available. The FreeBSD kernel and userland, collectively known as the _base system_, are always installed. Depending on the architecture, some of these components may not appear: * `base-dbg` - Base tools like cat and ls, among many others, with debug symbols activated. * `kernel-dbg` - Kernel and modules with debug symbols activated. * `lib32-dbg` - Compatibility libraries for running 32-bit applications on a 64-bit version of FreeBSD with debug symbols activated. * `lib32` - Compatibility libraries for running 32-bit applications on a 64-bit version of FreeBSD. * `ports` - The FreeBSD Ports Collection is a collection of files which automates the downloading, compiling and installation of third-party software packages. crossref:ports[ports,Installing Applications: Packages and Ports] discusses how to use the Ports Collection. + [WARNING] ==== The installation program does not check for adequate disk space. Select this option only if sufficient hard disk space is available. The FreeBSD Ports Collection takes up about {ports-size} of disk space. ==== * `src` - The complete FreeBSD source code for both the kernel and the userland. Although not required for the majority of applications, it may be required to build device drivers, kernel modules, or some applications from the Ports Collection. It is also used for developing FreeBSD itself. The full source tree requires 1 GB of disk space and recompiling the entire FreeBSD system requires an additional 5 GB of space. * `tests` - FreeBSD Test Suite. [[bsdinstall-netinstall]] === Installing from the Network The menu shown in crossref:bsdinstall[bsdinstall-netinstall-notify,Installing from the Network] only appears when installing from a `-bootonly.iso` or `-mini-memstick.img`, as this installation media does not hold copies of the installation files. Since the installation files must be retrieved over a network connection, this menu indicates that the network interface must be configured first. If this menu is shown in any step of the process, remember to follow the instructions in crossref:bsdinstall[bsdinstall-config-network-dev, Configuring Network Interfaces]. [[bsdinstall-netinstall-notify]] .Installing from the Network image::bsdinstall-netinstall-files.png[Indicates that certain components have not been found and will be downloaded using the network.] [[bsdinstall-partitioning]] == Allocating Disk Space The next menu is used to determine the method for allocating disk space. [[bsdinstall-zfs-partmenu]] .Partitioning Choices image::bsdinstall-zfs-partmenu.png[Shows the different partition options. Example: Manual, Shell, etc.] bsdinstall gives the user four methods for allocating disk space: * `Auto (ZFS)` partitioning creates a root-on-ZFS system with optional GELI encryption support for _boot environments_. * `Auto (UFS)` partitioning automatically sets up the disk partitions using the `UFS` file system. * `Manual` partitioning allows advanced users to create customized partitions from menu options. * `Shell` opens a shell prompt where advanced users can create customized partitions using command-line utilities like man:gpart[8], man:fdisk[8], and man:bsdlabel[8]. This section describes what to consider when laying out the disk partitions. It then demonstrates how to use the different partitioning methods. [[configtuning-initial]] === Designing the Partition Layout The default partition layout for file systems includes one file system for the entire system. When using `UFS` it may be worth considering the use of multiple file systems with sufficient disk space or multiple disks available. When laying out file systems, remember that hard drives transfer data faster from the outer tracks to the inner. Thus, smaller and heavier-accessed file systems should be closer to the outside of the drive, while larger partitions like `/usr` should be placed toward the inner parts of the disk. It is a good idea to create partitions in an order similar to: `/`, swap, `/var`, and `/usr`. The size of the `/var` partition reflects the intended machine's usage. This partition is used to hold mailboxes, log files, and printer spools. Mailboxes and log files can grow to unexpected sizes depending on the number of users and how long log files are kept. On average, most users rarely need more than about a gigabyte of free disk space in `/var`. [NOTE] ==== Sometimes, a lot of disk space is required in `/var/tmp`. When new software is installed, the packaging tools extract a temporary copy of the packages under `/var/tmp`. Large software packages, like Firefox or LibreOffice may be tricky to install if there is not enough disk space under `/var/tmp`. ==== The `/usr` partition holds many of the files which support the system, including the FreeBSD Ports Collection and system source code. At least 2 gigabytes of space is recommended for this partition. Also, note that home directories for users are placed in `/usr/home` by default, but can be placed on another partition. By default, `/home` is a symbolic link to `/usr/home`. When selecting partition sizes, keep the space requirements in mind. Running out of space in one partition while barely using another can be a hassle. As a rule of thumb, the swap partition should be about double the size of physical memory (RAM). Systems with minimal RAM (less for larger-memory configurations) may perform better with more swap. Configuring too little swap can lead to inefficiencies in the VM page scanning code and might create issues later if more memory is added. On larger systems with multiple SCSI disks or multiple IDE disks operating on different controllers, it is recommended that swap be configured on each drive, up to four drives. The swap partitions should be approximately the same size. The kernel can handle arbitrary sizes, but internal data structures scale to 4 times the largest swap partition. Keeping the swap partitions near the same size will allow the kernel to optimally stripe swap space across disks. Large swap sizes may elicit a kernel warning message about the total configured swap. The limit is raised by increasing the amount of memory allowed for keeping track of swap allocations, as instructed by the warning message. It might be easier to recover from a runaway program before being forced to reboot. By properly partitioning a system, fragmentation introduced in the smaller write-heavy partitions will not bleed over into the mostly read partitions. Keeping the write-loaded partitions closer to the disk's edge will increase I/O performance in the partitions where it occurs the most. While I/O performance in the larger partitions may be needed, shifting them more toward the edge of the disk will not lead to a significant performance improvement over moving `/var` to the edge. [[bsdinstall-part-guided]] === Guided Partitioning Using UFS When this method is selected, a menu will display the available disk(s). If multiple disks are connected, choose the one where FreeBSD is to be installed. [[bsdinstall-part-guided-disk]] .Selecting from Multiple Disks image::bsdinstall-part-guided-disk.png[Shows the list of disks on which FreeBSD can be installed] Once the disk is selected, the next menu prompts to install to either the entire disk or to create a partition using free space. If btn:[Entire Disk] is chosen, a general partition layout filling the whole disk is automatically created. Selecting btn:[Partition] creates a partition layout from the unused space on the disk. [[bsdinstall-part-entire-part]] .Selecting Entire Disk or Partition image::bsdinstall-part-entire-part.png[Menu asking the user if he wants to use all the available space on the disk or wants to make a partition] After the btn:[Entire Disk] option is chosen, bsdinstall displays a dialog indicating that the disk will be erased. [[bsdinstall-ufs-warning]] .Confirmation image::bsdinstall-ufs-warning.png[Menu indicating the user that all data on the disk will be deleted and asking for confirmation] The next menu shows a list with the available partition scheme types. 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. More information is available in crossref:bsdinstall[partition-schemes,Partitioning Schemes]. [[bsdinstall-ufs-scheme]] .Select Partition Scheme image::bsdinstall-part-manual-partscheme.png[Menu showing the user the different the different types of partition that exist and requesting one of them] After the partition layout has been created, review it to ensure it meets the needs of the installation. Selecting btn:[Revert] will reset the partitions to their original values. Pressing btn:[Auto] will recreate the automatic FreeBSD partitions. Partitions can also be manually created, modified, or deleted. When the partitioning is correct, select btn:[Finish] to continue with the installation. [[bsdinstall-part-review]] .Review Created Partitions image::bsdinstall-part-review.png[Menu showing created partitions] Once the disks are configured, the next menu provides the last chance to make changes before the selected drives are formatted. If changes need to be made, select btn:[Back] to return to the main partitioning menu. btn:[Revert & Exit] exits the installer without making any changes to the drive. Otherwise, select btn:[Commit] to start the installation process. [[bsdinstall-ufs-final-confirmation]] .Final Confirmation image::bsdinstall-final-confirmation.png[Menu indicating to the user that all changes will be written to disk and informing that if he decides to continue the existing data will be permanently deleted.] To continue with the installation process, go to crossref:bsdinstall[bsdinstall-fetching-distribution, Fetching Distribution Files]. [[bsdinstall-part-manual]] === Manual Partitioning Selecting this method opens the partition editor: [[bsdinstall-part-manual-create]] .Manually Create Partitions image::bsdinstall-part-manual-create.png[Menu showing the Partition Editor.] Highlight the installation drive (`ada0` in this example) and select btn:[Create] to display a menu of available partition schemes: [[bsdinstall-part-manual-partscheme]] .Manually Create Partitions image::bsdinstall-part-manual-partscheme.png[Menu showing the different kind of partition schemes] 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. [[partition-schemes]] .Partitioning Schemes [cols="25h,~", frame="none", options="header"] |=== <| Abbreviation <| Description |APM |Apple Partition Map, used by PowerPC(R). |BSD |BSD label without an MBR, sometimes called _dangerously dedicated mode_ as non-BSD disk utilities may not recognize it. |GPT |link:https://en.wikipedia.org/wiki/GUID_Partition_Table[GUID Partition Table]. |MBR |link:https://en.wikipedia.org/wiki/Master_boot_record[Master Boot Record]. |=== After the partitioning scheme has been selected and created, select btn:[Create] again to create the partitions. The kbd:[Tab] key is used to give focus to the fields (after cycling through btn:[], btn:[], and btn:[]). [[bsdinstall-part-manual-addpart]] .Manually Create Partitions image::bsdinstall-part-manual-addpart.png[Menu requesting type, size, mountpoint and label for the new partition.] A standard FreeBSD GPT installation uses at least three partitions, including either UFS or ZFS: * `freebsd-boot` or `efi` - 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 crossref:zfs[zfs,The Z File System (ZFS)]. * `freebsd-swap` - FreeBSD swap space. Refer to man:gpart[8] for descriptions of the available GPT partition types. Multiple file system partitions can be created. Some people prefer a traditional layout with separate partitions for `/`, `/var`, `/tmp`, and `/usr`. [TIP] ==== Note that `/tmp` can be added later as a memory-based file system (man:tmpfs[5]) on systems with sufficient memory. ==== See crossref:bsdinstall[bsdinstall-part-manual-splitfs,Creating Traditional Split File System Partitions] for an example. The `Size` may be entered with common abbreviations: _K_ for kilobytes, _M_ for megabytes, or _G_ for gigabytes. [TIP] ==== Proper sector alignment provides the best performance, and making partition sizes even multiples of 4K bytes helps to ensure alignment on drives with either 512-byte or 4K-byte sectors. Generally, using partition sizes that are even multiples of 1M or 1G is the easiest way to make sure every partition starts at an even multiple of 4K. There is one exception: a _freebsd-boot_ partition for BIOS booting should be no larger than 512K due to legacy boot code limitations. This limitation does not apply to UEFI booting. ==== A `Mountpoint` is needed if the partition will contain a file system. If only a single UFS partition will be created, the mountpoint should be `/`. The `Label` is a name by which the partition will be known. Drive names or numbers can change if the drive is connected to a different controller or port, but the partition label does not change. Referring to labels instead of drive names and partition numbers in files like `/etc/fstab` makes the system more tolerant to hardware changes. GPT labels appear in `/dev/gpt/` when a disk is attached. Other partitioning schemes have different label capabilities and their labels appear in different directories in `/dev/`. [TIP] ==== Use a unique label on every partition to avoid conflicts from identical labels. A few letters from the computer's name, use, or location can be added to the label. For instance, use `labroot` or `rootfslab` for the UFS root partition on the computer named `lab`. ==== [[bsdinstall-part-manual-splitfs]] .Creating Traditional Split File System Partitions [example] ==== For a traditional partition layout where the `/`, `/var`, `/tmp`, and `/usr` directories are separate file systems on their own partitions, create a GPT partitioning scheme, then create the partitions as shown. Partition sizes shown are typical for a 20G target disk. If more space is available on the target disk, larger swap or `/var` partitions may be useful. Labels shown here are prefixed with `ex` for "example", but readers should use other unique label values as described above. By default, FreeBSD's `gptboot` expects the first UFS partition to be the `/` partition. [.informaltable] [cols="1,1,1,1", frame="none", options="header"] |=== | 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` |`exusrfs` |=== ==== After the custom partitions have been created, select btn:[Finish] to continue with the installation and go to crossref:bsdinstall[bsdinstall-fetching-distribution, Fetching Distribution Files]. [[bsdinstall-part-zfs]] === Guided Partitioning Using Root-on-ZFS This partitioning mode only works with whole disks and will erase the contents of the entire disk. The main ZFS configuration menu offers a number of options to control the creation of the pool. [[bsdinstall-zfs-menu]] .ZFS Partitioning Menu image::bsdinstall-zfs-menu.png[Menu showing the different options to configure the ZFS pool] Here is a summary of the options in this menu: * `Install` - Proceed with the installation with the selected options. * `Pool Type/Disks` - Configure the `Pool Type` and the disk(s) that will constitute the pool. The automatic ZFS installer currently only supports the creation of a single top level vdev, except in stripe mode. To create more complex pools, use the instructions in crossref:bsdinstall[bsdinstall-part-shell, Shell Mode Partitioning] to create the pool. * `Rescan Devices` - Repopulate the list of available disks. * `Disk Info` - This menu can be used to inspect each disk, including its partition table and various other information such as the device model number and serial number, if available. * `Pool Name` - Establish the name of the pool. The default name is _zroot_. * `Force 4K Sectors?` - Force the use of 4K sectors. By default, the installer will automatically create partitions aligned to 4K boundaries and force ZFS to use 4K sectors. This is safe even with 512 byte sector disks, and has the added benefit of ensuring that pools created on 512 byte disks will be able to have 4K sector disks added in the future, either as additional storage space or as replacements for failed disks. Press the kbd:[Enter] key to chose to activate it or not. * `Encrypt Disks?` - Encrypting the disks allows the user to encrypt the disks using GELI. More information about disk encryption is available in crossref:disks[disks-encrypting-geli,“Disk Encryption with geli”]. Press the kbd:[Enter] key to choose whether to activate it or not. * `Partition Scheme` - Choose the partition scheme. GPT is the recommended option in most cases. Press the kbd:[Enter] key to chose between the different options. * `Swap Size` - Establish the amount of swap space. * `Mirror Swap?` - Whether to mirror the swap between the disks. Be aware that enabling mirror swap will break crash dumps. Press the kbd:[Enter] key to activate it or not. * `Encrypt Swap?` - Whether to encrypt the swap. This will encrypt the swap with a temporary key each time the system boots, and discards it on reboot. Press the kbd:[Enter] key to choose to activate it or not. More information about swap encryption in crossref:disks[swap-encrypting,“Encrypting Swap”]. Select kbd:[T] to configure the `Pool Type` and the disk(s) that will constitute the pool. [[bsdinstall-zfs-vdev_type]] .ZFS Pool Type image::bsdinstall-zfs-vdev_type.png[Menu requesting the Virtual Device type. Ex: stripe, mirror, raidz1] Here is a summary of the `Pool Type` that can be selected in this menu: * `stripe` - Striping provides maximum storage of all connected devices, but no redundancy. If just one disk fails the data on the pool is lost irrevocably. * `mirror` - Mirroring stores a complete copy of all data on every disk. Mirroring provides good read performance because data is read from all disks in parallel. Write performance is slower as the data must be written to all disks in the pool. Allows all but one disk to fail. This option requires at least two disks. * `raid10` - Striped mirrors. Provides the best performance, but the least storage. This option needs at least an even number of disks and a minimum of four disks. * `raidz1` - Single Redundant RAID. Allow one disk to fail concurrently. This option needs at least three disks. * `raidz2` - Double Redundant RAID. Allows two disks to fail concurrently. This option needs at least four disks. * `raidz3` - Triple Redundant RAID. Allows three disks to fail concurrently. This option needs at least five disks. Once a `Pool Type` has been selected, a list of available disks is displayed, and the user is prompted to select one or more disks to make up the pool. The configuration is then validated to ensure that enough disks are selected. If validation fails, select btn:[] to return to the list of disks or btn:[] to change the `Pool Type`. [[bsdinstall-zfs-disk_select]] .Disk Selection image::bsdinstall-zfs-disk_select.png[Menu requesting how many disks will be added to the pool] [[bsdinstall-zfs-vdev_invalid]] .Invalid Selection image::bsdinstall-zfs-vdev_invalid.png[Menu indicating that not enough disks have been selected.] If one or more disks are missing from the list, or if disks were attached after the installer was started, select btn:[- Rescan Devices] to repopulate the list of available disks. [[bsdinstall-zfs-rescan-devices]] .Rescan Devices image::bsdinstall-zfs-rescan-devices.png[Device rescan] To avoid accidentally erasing the wrong disk, the btn:[- Disk Info] menu can be used to inspect each disk, including its partition table and various other information such as the device model number and serial number, if available. [[bsdinstall-zfs-disk_info]] .Analyzing a Disk image::bsdinstall-zfs-disk_info.png[Menu showing the information of the partitions.] Select kbd:[N] to configure the `Pool Name`. Enter the desired name, then select btn:[] to establish it or btn:[] to return to the main menu and leave the default name. [[bsdinstall-zfs-pool-name]] .Pool Name image::bsdinstall-zfs-pool-name.png[Menu requesting the name of the pool.] Select kbd:[S] to set the amount of swap. Enter the desired amount of swap, then select btn:[] to establish it or btn:[] to return to the main menu and let the default amount. [[bsdinstall-zfs-swap-amount]] .Swap Amount image::bsdinstall-zfs-swap-amount.png[Menu requesting the amount of swap memory] Once all options have been set to the desired values, select the btn:[>>> Install] option at the top of the menu. The installer then offers a last chance to cancel before the contents of the selected drives are destroyed to create the ZFS pool. [[bsdinstall-zfs-warning]] .Last Chance image::bsdinstall-zfs-warning.png[Menu indicating to the user that the data will be lost] If GELI disk encryption was enabled, the installer will prompt twice for the passphrase to be used to encrypt the disks. Initialization of the encryption then begins. [[bsdinstall-zfs-geli_password]] .Disk Encryption Password image::bsdinstall-zfs-geli_password.png[Menu requesting the password to encrypt the devices.] [[bsdinstall-zfs-init-encription]] .Initializing Encryption image::bsdinstall-zfs-init-encription.png[Menu showing that the encryption is initializing.] The installation then proceeds normally. To continue with the installation, go to crossref:bsdinstall[bsdinstall-fetching-distribution, Fetching Distribution Files]. [[bsdinstall-part-shell]] === Shell Mode Partitioning When creating advanced installations, the bsdinstall partitioning menus may not provide the level of flexibility required. Advanced users can select the btn:[Shell] option from the partitioning menu in order to manually partition the drives, create the file system(s), populate `/tmp/bsdinstall_etc/fstab`, and mount the file systems under `/mnt`. Once this is done, type `exit` to return to bsdinstall and continue the installation. [[bsdinstall-fetching-distribution]] == Fetching Distribution Files Installation time will vary depending on the distributions chosen, installation media, and speed of the computer. A series of messages will indicate the progress. First, the installer formats the selected disk(s) and initializes the partitions. Next, in the case of a `bootonly media` or `mini memstick`, it downloads the selected components: [[bsdinstall-distfile-fetching]] .Fetching Distribution Files image::bsdinstall-distfile-fetching.png[Menu showing the download of the different components.] Next, the integrity of the distribution files is verified to ensure they have not been corrupted during download or misread from the installation media: [[bsdinstall-distfile-verify]] .Verifying Distribution Files image::bsdinstall-distfile-verifying.png[Menu showing the verification of the different components.] Finally, the verified distribution files are extracted to the disk: [[bsdinstall-distfile-extract]] .Extracting Distribution Files image::bsdinstall-distfile-extracting.png[Menu showing the extraction of the different components.] Once all requested distribution files have been extracted, bsdinstall displays the first post-installation configuration screen. The available post-configuration options are described in the next section. [[bsdinstall-post]] == Network Interfaces, Accounts, Time Zone, Services and Hardening [[bsdinstall-post-root]] === Setting the `root` Password First, the `root` password must be set. While entering the password, the characters being typed are not displayed on the screen. The password must be entered twice to prevent typing errors. [[bsdinstall-post-set-root-passwd]] .Setting the `root` Password image::bsdinstall-post-root-passwd.png[Menu showing requesting the password for the root user.] [[bsdinstall-config-network-dev]] === Configuring Network Interfaces Next, a list of the network interfaces found on the computer is shown. Select the interface to configure. [[bsdinstall-configure-net-interface]] .Choose a Network Interface image::bsdinstall-configure-network-interface.png[Menu showing the different network interfaces to configure.] If an Ethernet interface is selected, the installer will skip ahead to the menu shown in crossref:bsdinstall[bsdinstall-configure-net-ipv4,Choose IPv4 Networking]. If a wireless network interface is chosen, the system will instead scan for wireless access points: [[bsdinstall-wireless-scan]] .Scanning for Wireless Access Points image::bsdinstall-configure-wireless-scan.png[Menu showing wireless network scanning.] Wireless networks are identified by a Service Set Identifier (SSID); a short, unique name given to each network. SSIDs found during the scan are listed, followed by a description of the encryption types available for that network. If the desired SSID does not appear in the list, select btn:[Rescan] to scan again. If the desired network still does not appear, check for problems with antenna connections or try moving the computer closer to the access point. Rescan after each change is made. [[bsdinstall-wireless-accesspoints]] .Choosing a Wireless Network image::bsdinstall-configure-wireless-accesspoints.png[Menu showing the different wireless networks to connect to.] Next, enter the encryption information for connecting to the selected wireless network. WPA2 encryption is strongly recommended over older encryption types such as WEP, which offer little security. If the network uses WPA2, input the password, also known as the Pre-Shared Key (PSK). For security reasons, the characters typed into the input box are displayed as asterisks. [[bsdinstall-wireless-wpa2]] .WPA2 Setup image::bsdinstall-configure-wireless-wpa2setup.png[Menu requesting the wireless network password.] Next, choose whether or not an IPv4 address should be configured on the Ethernet or wireless interface: [[bsdinstall-configure-net-ipv4]] .Choose IPv4 Networking image::bsdinstall-configure-network-interface-ipv4.png[Menu indicating if IPv4 wants to be configured for the selected interface.] There are two methods of IPv4 configuration. DHCP will automatically configure the network interface correctly and should be used if the network provides a DHCP server. Otherwise, the addressing information needs to be input manually as a static configuration. [NOTE] ==== Do not enter random network information as it will not work. If a DHCP server is not available, obtain the information listed in crossref:bsdinstall[bsdinstall-collect-network-information, Required Network Information] from the network administrator or Internet service provider. ==== If a DHCP server is available, select btn:[Yes] in the next menu to automatically configure the network interface. The installer will appear to pause for a minute or so as it finds the DHCP server and obtains the addressing information for the system. [[bsdinstall-net-ipv4-dhcp]] .Choose IPv4 DHCP Configuration image::bsdinstall-configure-network-interface-ipv4-dhcp.png[Menu indicating if DHCP wants to be configured for the selected interface.] If a DHCP server is not available, select btn:[No] and input the following addressing information in this menu: [[bsdinstall-net-ipv4-static]] .IPv4 Static Configuration image::bsdinstall-configure-network-interface-ipv4-static.png[Menu requesting data to configure IPv4 network.] * `IP Address` - The IPv4 address assigned to this computer. The address must be unique and not already in use by another device on the local network. * `Subnet Mask` - The subnet mask for the network. * `Default Router` - The IP address of the network's default gateway. The next screen will ask if the interface should be configured for IPv6. If IPv6 is available and desired, choose btn:[Yes] to select it. [[bsdinstall-net-ipv6]] .Choose IPv6 Networking image::bsdinstall-configure-network-interface-ipv6.png[Menu indicating if IPv6 wants to be configured for the selected interface.] IPv6 also has two methods of configuration. StateLess Address AutoConfiguration (SLAAC) will automatically request the correct configuration information from a local router. Refer to http://tools.ietf.org/html/rfc4862[rfc4862] for more information. Static configuration requires manual entry of network information. If an IPv6 router is available, select btn:[Yes] in the next menu to automatically configure the network interface. The installer will appear to pause for a minute or so as it finds the router and obtains the addressing information for the system. [[bsdinstall-net-ipv6-slaac]] .Choose IPv6 SLAAC Configuration image::bsdinstall-configure-network-interface-slaac.png[Menu indicating if SLAAC wants to be configured for the selected interface.] If an IPv6 router is not available, select btn:[No] and input the following addressing information in this menu: [[bsdinstall-net-ipv6-static]] .IPv6 Static Configuration image::bsdinstall-configure-network-interface-ipv6-static.png[Menu requesting data to configure IPv6 network.] * `IPv6 Address` - The IPv6 address assigned to this computer. The address must be unique and not already in use by another device on the local network. * `Default Router` - The IPv6 address of the network's default gateway. The last network configuration menu is used to configure the Domain Name System (DNS) resolver, which converts hostnames to and from network addresses. If DHCP or SLAAC was used to autoconfigure the network interface, the `Resolver Configuration` values may already be filled in. Otherwise, enter the local network's domain name in the `Search` field. `DNS #1` and `DNS #2` are the IPv4 and/or IPv6 addresses of the DNS servers. At least one DNS server is required. [[bsdinstall-net-dns-config]] .DNS Configuration image::bsdinstall-configure-network-ipv4-dns.png[Menu requesting data to configure DNS for the network.] Once the interface is configured, select a mirror site that is located in the same region of the world as the computer on which FreeBSD is being installed. Files can be retrieved more quickly when the mirror is close to the target computer, reducing installation time. [TIP] ==== Selecting `ftp://download.freebsd.org (Main Site)` will automatically route to the nearest mirror. ==== [[bsdinstall-netinstall-mirror]] .Choosing a Mirror image::bsdinstall-netinstall-mirrorselect.png[Menu requesting a network mirror.] [[bsdinstall-timezone]] === Setting the Time Zone The next series of menus are used to determine the correct local time by selecting the geographic region, country, and time zone. Setting the time zone allows the system to automatically correct for regional time changes, such as daylight savings time, and perform other time zone related functions properly. The example shown here is for a machine located in the mainland time zone of Spain, Europe. The selections will vary according to the geographical location. [[bsdinstall-timezone-region]] .Select a Region image::bsdinstall-timezone-region.png[Menu requesting the timezone region.] The appropriate region is selected using the arrow keys and then pressing kbd:[Enter]. [[bsdinstall-timezone-country]] .Select a Country image::bsdinstall-timezone-country.png[Menu requesting the timezone country.] Select the appropriate country using the arrow keys and press kbd:[Enter]. [[bsdinstall-timezone-zone]] .Select a Time Zone image::bsdinstall-timezone-zone.png[Menu requesting the timezone zone.] The appropriate time zone is selected using the arrow keys and pressing kbd:[Enter]. [[bsdinstall-timezone-confirmation]] .Confirm Time Zone image::bsdinstall-timezone-confirm.png[Menu requesting confirmation of the selected timezone.] Confirm the abbreviation for the time zone is correct. [[bsdinstall-timezone-date]] .Select Date image::bsdinstall-timezone-date.png[Menu requesting the system date.] The appropriate date is selected using the arrow keys and then pressing btn:[Set Date]. Otherwise, the date selection can be skipped by pressing btn:[Skip]. [[bsdinstall-timezone-time]] .Select Time image::bsdinstall-timezone-time.png[Menu requesting the system time.] The appropriate time is selected using the arrow keys and then pressing btn:[Set Time]. Otherwise, the time selection can be skipped by pressing btn:[Skip]. [[bsdinstall-sysconf]] === Enabling Services The next menu is used to configure which system services will be started whenever the system boots. All of these services are optional. Only start the services that are needed for the system to function. [[bsdinstall-config-serv]] .Selecting Additional Services to Enable image::bsdinstall-config-services.png[Menu showing the different services available.] Here is a summary of the services that can be enabled in this menu: * `local_unbound` - Enable the DNS local unbound. It is necessary to keep in mind that this is a configuration only meant for use as a local caching forwarding resolver. If the objective is to set up a resolver for the entire network, install package:dns/unbound[]. * `sshd` - The Secure Shell (SSH) daemon is used to remotely access a system over an encrypted connection. Only enable this service if the system should be available for remote logins. * `moused` - Enable this service if the mouse will be used from the command-line system console. * `ntpdate` - Enable automatic clock synchronization at boot time. Note that the functionality of this program is now available in the man:ntpd[8] daemon and the man:ntpdate[8] utility will soon be retired. * `ntpd` - The Network Time Protocol (NTP) daemon for automatic clock synchronization. Enable this service when wanting to synchronise the system clock with a remote time server or pool. * `powerd` - System power control utility for power control and energy saving. * `dumpdev` - Crash dumps are useful when debugging issues with the system, so users are encouraged to enable them. [[bsdinstall-hardening]] === Enabling Hardening Security Options The next menu is used to configure which security options will be enabled. All of these options are optional. But their use is encouraged. [[bsdinstall-hardening-options]] .Selecting Hardening Security Options image::bsdinstall-hardening.png[Menu shoring the different hardening security options.] Here is a summary of the options that can be enabled in this menu: * `hide_uids` - Hide processes running as other users (UID). This prevents unprivileged users from seeing running processes from other users. * `hide_gids` - Hide processes running as other groups (GID). This prevents unprivileged users from seeing running processes from other groups. * `hide_jail` - Hide processes running in jails. This prevents unprivileged users from seeing processes running inside jails. * `read_msgbuf` - Disable reading kernel message buffer for unprivileged users. Prevent unprivileged users from using man:dmesg[8] to view messages from the kernel's log buffer. * `proc_debug` - Disable process debugging facilities for unprivileged users. Disables a variety of unprivileged inter-process debugging services, including some procfs functionality, `ptrace()`, and `ktrace()`. Please note that this will also prevent debugging tools such as man:lldb[1], man:truss[1] and man:procstat[1], as well as some built-in debugging facilities in certain scripting languages like PHP. * `random_pid` - Randomize the PID of processes. * `clear_tmp` - Clean `/tmp` when the system starts up. * `disable_syslogd` - Disable opening the syslogd network socket. By default, FreeBSD runs syslogd in a secure way with `-s`. This prevents the daemon from listening for incoming UDP requests on port 514. With this option enabled, syslogd will instead run with `-ss`, which prevents syslogd from opening any port. For more information, see man:syslogd[8]. * `disable_sendmail` - Disable the sendmail mail transport agent. * `secure_console` - Make the command prompt request the `root` password when entering single-user mode. * `disable_ddtrace` - DTrace can run in a mode that affects the running kernel. Destructive actions may not be used unless explicitly enabled. Use `-w` to enable this option when using DTrace. For more information, see man:dtrace[1]. * `enable_aslr` - Enable address layout randomization. For more information about address layout randomization the link:https://en.wikipedia.org/wiki/Address_space_layout_randomization[Wikipedia article] can be consulted. [[bsdinstall-addusers]] === Add Users The next menu prompts to create at least one user account. It is recommended to log into the system using a user account rather than as `root`. When logged in as `root`, there are essentially no limits or protection on what can be done. Logging in as a normal user is safer and more secure. Select btn:[Yes] to add new users. [[bsdinstall-add-user1]] .Add User Accounts image::bsdinstall-adduser1.png[Menu requesting if a user want to be added to the system.] Follow the prompts and input the requested information for the user account. The example shown in crossref:bsdinstall[bsdinstall-add-user2,Enter User Information] creates the `asample` user account. [[bsdinstall-add-user2]] .Enter User Information image::bsdinstall-adduser2.png[Menu requesting different information for the new user.] Here is a summary of the information to input: * `Username` - The name the user will enter to log in. A common convention is to use the first letter of the first name combined with the last name, as long as each username is unique for the system. The username is case sensitive and should not contain any spaces. * `Full name` - The user's full name. This can contain spaces and is used as a description for the user account. * `Uid` - User ID. This is typically left blank so the system automatically assigns a value. * `Login group` - The user's group. This is typically left blank to accept the default. * `Invite _user_ into other groups?` - Additional groups to which the user will be added as a member. If the user needs administrative access, type `wheel` here. * `Login class` - Typically left blank for the default. * `Shell` - Type in one of the listed values to set the interactive shell for the user. Refer to crossref:basics[shells,Shells] for more information about shells. * `Home directory` - The user's home directory. The default is usually correct. * `Home directory permissions` - Permissions on the user's home directory. The default is usually correct. * `Use password-based authentication?` - Typically `yes` so that the user is prompted to input their password at login. * `Use an empty password?` - Typically `no` as empty or blank passwords are insecure. * `Use a random password?` - Typically `no` so that the user can set their own password in the next prompt. * `Enter password` - The password for this user. Typed-in characters will not be shown on the screen. * `Enter password again` - The password must be typed again for verification. * `Lock out the account after creation?` - Typically `no` so that the user can log in. After entering all the details, a summary is shown for review. If a mistake was made, enter `no` to correct it. Once everything is correct, enter `yes` to create the new user. [[bsdinstall-add-user3]] .Exit User and Group Management image::bsdinstall-adduser3.png[Menu showing the information of the new user and requesting if everything is correct.] If there are more users to add, answer the `Add another user?` question with `yes`. Enter `no` to finish adding users and continue the installation. For more information on adding users and user management, see crossref:basics[users-synopsis,Users and Basic Account Management]. [[bsdinstall-final-conf]] === Final Configuration After everything has been installed and configured, a final chance is provided to modify settings. [[bsdinstall-final-config]] .Final Configuration image::bsdinstall-finalconfiguration.png[Menu showing different options to perform before finishing the installation. Ex: Add user, Time Zone, etc.] Use this menu to make any changes or to do any additional configuration before completing the installation. * `Add User` - Described in crossref:bsdinstall[bsdinstall-addusers, Add Users]. * `Root Password` - Described in crossref:bsdinstall[bsdinstall-post-root, Setting the `root` Password]. * `Hostname` - Described in crossref:bsdinstall[bsdinstall-hostname, Setting the Hostname]. * `Network` - Described in crossref:bsdinstall[bsdinstall-config-network-dev, Configuring Network Interfaces]. * `Services` - Described in crossref:bsdinstall[bsdinstall-sysconf, Enabling Services]. * `System Hardening` - Described in crossref:bsdinstall[bsdinstall-hardening, Enabling Hardening Security Options]. * `Time Zone` - Described in crossref:bsdinstall[bsdinstall-timezone, Setting the Time Zone]. * `Handbook` - Download and install the FreeBSD Handbook. Once configuration is complete, select btn:[Exit]. [[bsdinstall-final-modification-shell]] .Manual Configuration image::bsdinstall-final-modification-shell.png[Menu showing that the installation has finished. And asking if a shell to make manual changes should open.] bsdinstall will prompt for any additional configuration that needs to be done before rebooting into the new system. Select btn:[Yes] to exit to a shell within the new system or btn:[No] to proceed to the last step of the installation. [[bsdinstall-final-main]] .Complete the Installation image::bsdinstall-mainexit.png[Menu showing that the installation has finished and asking whether to reboot the system or access the Live CD.] If further configuration or special setup is needed, select btn:[Live CD] to boot the install media into Live CD mode. If the installation is complete, select btn:[Reboot] to reboot the computer and start the new FreeBSD system. Do not forget to remove the FreeBSD install media or the computer might boot from it again. As FreeBSD boots, informational messages are displayed. After the system finishes booting, a login prompt is displayed. At the `login:` prompt, enter the username added during the installation. Avoid logging in as `root`. Refer to crossref:basics[users-superuser,The Superuser Account] for instructions on how to become the superuser when administrative access is needed. The messages that appear during boot can be reviewed by pressing kbd:[Scroll-Lock] to turn on the scroll-back buffer. The kbd:[PgUp], kbd:[PgDn], and arrow keys can be used to scroll back through the messages. When finished, press kbd:[Scroll-Lock] again to unlock the display and return to the console. To review these messages once the system has been up for some time, type `less /var/run/dmesg.boot` from a command prompt. Press kbd:[q] to return to the command line after viewing. If sshd was enabled in crossref:bsdinstall[bsdinstall-config-serv,Selecting Additional Services to Enable], the first boot might be a bit slower as the system generates SSH host keys. Subsequent boots will be faster. The fingerprints of the keys are then displayed as in the following example: [source,shell] .... Generating public/private rsa1 key pair. Your identification has been saved in /etc/ssh/ssh_host_key. Your public key has been saved in /etc/ssh/ssh_host_key.pub. The key fingerprint is: 10:a0:f5:af:93:ae:a3:1a:b2:bb:3c:35:d9:5a:b3:f3 root@machine3.example.com The key's randomart image is: +--[RSA1 1024]----+ | o.. | | o . . | | . o | | o | | o S | | + + o | |o . + * | |o+ ..+ . | |==o..o+E | +-----------------+ Generating public/private dsa key pair. Your identification has been saved in /etc/ssh/ssh_host_dsa_key. Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub. The key fingerprint is: 7e:1c:ce:dc:8a:3a:18:13:5b:34:b5:cf:d9:d1:47:b2 root@machine3.example.com The key's randomart image is: +--[ DSA 1024]----+ | .. . .| | o . . + | | . .. . E .| | . . o o . . | | + S = . | | + . = o | | + . * . | | . . o . | | .o. . | +-----------------+ Starting sshd. .... Refer to crossref:security[openssh,"OpenSSH"] for more information about fingerprints and SSH. FreeBSD does not install a graphical environment by default. Refer to crossref:x11[x11,The X Window System] for more information about installing and configuring a graphical window manager. Proper shutdown of a FreeBSD computer helps protect data and hardware from damage. _Do not turn off the power before the system has been properly shut down!_ If the user is a member of the `wheel` group, become the superuser by typing `su` at the command line and entering the `root` password. Then, type `shutdown -p now` and the system will shut down cleanly, and, if the hardware supports it, turn itself off. [[bsdinstall-install-trouble]] == Troubleshooting This section covers basic installation troubleshooting, such as common problems people have reported. Check the Hardware Notes listed on the link:https://www.FreeBSD.org/releases/[FreeBSD Release Information] page for the version of FreeBSD to make sure the hardware is supported. [NOTE] ==== Some installation problems can be avoided or alleviated by updating the firmware on various hardware components, most notably the motherboard. Motherboard firmware is usually referred to as the BIOS. Most motherboard and computer manufacturers have a website for upgrades and upgrade information. Manufacturers generally advise against upgrading the motherboard BIOS unless there is a good reason for doing so, like a critical update. The upgrade process _can_ go wrong, leaving the BIOS incomplete and the computer inoperative. ==== If the system hangs while probing hardware during boot or behaves strangely during the installation process, ACPI may be the culprit. FreeBSD makes extensive use of the system ACPI service on the i386 and amd64 platforms to aid in system configuration if it is detected during boot. Unfortunately, some bugs still exist in both the ACPI driver and within system motherboards and BIOS firmware. ACPI can be disabled by setting the `hint.acpi.0.disabled` hint in the third stage boot loader: [source,shell] .... set hint.acpi.0.disabled="1" .... This is reset each time the system is booted, so it is necessary to add `hint.acpi.0.disabled="1"` to the file `/boot/loader.conf`. More information about the boot loader can be found in crossref:boot[boot-synopsis,“Synopsis”]. [[using-live-cd]] == Using the Live CD The welcome menu of bsdinstall, shown in crossref:bsdinstall[bsdinstall-choose-mode,Welcome Menu], provides a btn:[Live CD] option. This is useful for those who are still wondering whether FreeBSD is the right operating system for them and want to test some of the features before installing. The following points should be noted before using the btn:[Live CD]: * To gain access to the system, authentication is required. The username is `root` and the password is blank. * As the system runs directly from the installation media, performance will be significantly slower than that of a system installed on a hard disk. * This option only provides a command prompt and not a graphical interface. diff --git a/documentation/content/ja/books/handbook/bsdinstall/_index.adoc b/documentation/content/ja/books/handbook/bsdinstall/_index.adoc index 50b4a24046..f2201f5957 100644 --- a/documentation/content/ja/books/handbook/bsdinstall/_index.adoc +++ b/documentation/content/ja/books/handbook/bsdinstall/_index.adoc @@ -1,1208 +1,1208 @@ --- title: 第2章 FreeBSD のインストール part: パートI. 導入 prev: books/handbook/introduction next: books/handbook/basics description: FreeBSD のインストール方法、最小ハードウェア要件および対応しているアーキテクチャについて、インストールメディアの作成方法等についてのガイド tags: ["bsdinstall", "FreeBSD のインストール", "必要要件", "チュートリアル", "gガイド"] showBookMenu: true weight: 4 params: path: "/books/handbook/bsdinstall/" --- [[bsdinstall]] = FreeBSD のインストール :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: 2 :partnums: :source-highlighter: rouge :experimental: :images-path: books/handbook/bsdinstall/ ifdef::env-beastie[] ifdef::backend-html5[] :imagesdir: ../../../../images/{images-path} endif::[] ifndef::book[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] toc::[] endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] toc::[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [[bsdinstall-synopsis]] == この章では FreeBSD は、amd64, ARM(R), RISC-V(R), および PowerPC(R) 等のさまざまなアーキテクチャに対応しています。 インストールまたは直接 FreeBSD を実行するためのイメージは、アーキテクチャおよびプラットフォームごとに link:https://www.freebsd.org/ja/where/[ダウンロード] できます。 利用できるイメージのタイプは以下の通りです。 * `qcow2`, `vmdk`, `vhd` および raw デバイスイメージといった仮想マシンのディスクイメージ。これらはインストール用のイメージではなく、FreeBSD がすでにインストールされたインスタンスで、すぐに起動して、インストール後の作業を行うことができます。仮想マシンのイメージは、クラウド環境でも使われます。 * Raspberry Pi のような組み込みシステム用の SD カードイメージ。これらのファイルをダウンロードしたら、展開し、ボードが起動するように raw イメージとして SD カードに書き込んでください。 * ISO または USB デバイスから起動して、FreeBSD を通常のデスクトップ、ラップトップ、サーバシステムのドライブ上にインストールするためのインストールイメージ。 この章では、3 番目のケースについて、bsdinstall と呼ばれるテキストベースのインストールプログラムを用いた FreeBSD のインストール方法について説明します。 この章では、以下について説明します。 * FreeBSD イメージの入手方法および FreeBSD インストールメディアの作り方。 * bsdinstall の起動方法。 * bsdinstall が聞いてくる質問がどのような意味であり、 またどのように答えれば良いか。 * インストールに失敗した時の問題の解決方法。 * インストールを確定する前に、 FreeBSD の live 版へアクセスする方法。 [[bsdinstall-hardware]] == 最小ハードウェア要件 FreeBSD をインストールするために必要なハードウェア要件は、アーキテクチャおよびバージョンごとに異なります。 FreeBSD の各リリースが対応しているハードウェアアーキテクチャおよびデバイスの一覧は、 link:https://www.FreeBSD.org/ja/releases/[FreeBSD リリース情報] のページにまとめられています。 アーキテクチャごとに推奨される適切なイメージの選択に関しては、 link:https://www.FreeBSD.org/ja/where/[FreeBSD ダウンロードページ] でも説明されています。 [[bsdinstall-pre]] == インストール前に行う作業 システムが FreeBSD のインストールのための最小ハードウェア要件を満たしていることを確認したら、インストールファイルをダウンロードして、インストール用のメディアを用意してください。 その前に、以下のチェックリストを確認して、システムをインストールする準備ができていることを確認してください。 [.procedure] ==== . 重要なデータのバックアップ + オペレーティングシステムをインストールする前に、 *常に* 価値のあるすべてのデータを最初にバックアップしてください。 インストールしようとしているシステムにはバックアップを保存しないでください。 そのかわり、USB ドライブ、ネットワーク上の他のシステム、もしくはオンラインのバックアップサービスといったリムーバルディスクにデータを保存してください。 インストールを始める前に、バックアップを調べて、必要なすべてのファイルがバックアップに含まれていることを確認してください。 インストーラがシステムのディスクをフォーマットしてしまうと、ディスクに保存されていたすべてのデータは失われます。 . FreeBSD をインストールする場所の決定 + インストールするオペレーティングシステムが FreeBSD のみであれば、 このステップは飛ばすことができます。 しかし、ディスクに FreeBSD と 他のオペレーティングシステムを共存させる必要がある場合には、FreeBSD が利用するディスクおよびパーティションを決める必要があります。 + i386 および amd64 アーキテクチャでは、 二つのパーティションスキームのどちらかを使って、 ハードディスクを複数の塊に分割することができます。 伝統的な _Master Boot Record_ (MBR) では、ディスク 1 台あたり最大 4 つの _プライマリパーティション_ をパーティションテーブルに持つことができます。 歴史的な理由により、FreeBSD では、これらのパーティションのことを _スライス_ と呼びます。 プライマリパーティションの 1 つに、複数の _論理パーティション_ を含む _拡張パーティション_ を作成できます。 _GUID Partition Table_ (GPT) は、ディスクをパーティションに分ける簡単で新しい方法です。 一般的な GPT の実装では、1 つのディスクに 128 個までのパーティションの作成が可能であり、論理パーティションは必要ありません。 + FreeBSD のブートローダは、プライマリまたは GPT パーティションのどちらかを必要とします。 ディスク上のプライマリ、もしくは GPT パーティションがすべて使われているのであれば、 そのひとつを FreeBSD のために開放してください。 ディスクにあるデータを消去せずにパーティションを作成するには、 パーティションサイズを変更するツールを使って今あるパーティションのサイズを小さくし、 空いたスペースに新しいパーティションを作成してください。 + パーティションサイズを変更するためのフリーまたは商用のツールは、 link:https://en.wikipedia.org/wiki/List_of_disk_partitioning_software[List of disk partitioning software wikipedia entry] にまとめられています。 link:https://gparted.org/livecd.php[GParted Live] は、GParted パーティションエディタを含むフリーのライブ CD です。 + [WARNING] ====== ディスクパーティションを縮小するユーティリティは、 適切に用いるとパーティション用の空き容量を新しく安全に作成できます。 すでにあるパーティションを間違って選択してしまう可能性があるので、 ディスクのパーティションを変更する前に、 必ず重要なデータのバックアップをとり、 バックアップが正しくとれていることを検証してください。 ====== + ディスクパーティションごとに異なるオペレーティングシステムをインストールすることで、 一つのコンピュータに複数のオペレーティングシステムをインストールできます。link:https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization[仮想化技術] を用いると、ディスクパーティションを変更することなく、複数のオペレーティングシステムを同時に起動できます。 . ネットワーク情報の収集 + FreeBSD のインストール方法によっては、ネットワークに接続し、 インストールファイルをダウンロードする必要があります。 インストールする方法に関わらず、インストール後に、 インストーラはシステムのネットワークインタフェースの設定をする機会を提供します。 + ネットワークに DHCP サーバがあると、 自動的にネットワークの設定情報を取得できます。 DHCP を利用できない環境では、 システムの以下のネットワーク情報について、 システム管理者かプロバイダにネットワーク情報を問い合わせる必要があります。 .. IP アドレス .. サブネットマスク .. デフォルトゲートウェイの IP アドレス .. ネットワークのドメイン名 .. ネットワークの DNS サーバの IP アドレス . FreeBSD Errata の確認 + FreeBSD プロジェクトでは FreeBSD の各リリースができる限り安定するよう努力していますが、 時々バグが発生してしまうことがあります。 極まれに、発生したバグがインストールプロセスに影響を与えることがあります。 これらの問題は発見され解決されると、FreeBSD の各バージョンごとに Errata ページに記載されます。 インストールに影響するような既知の問題が無いことを、インストールする前に Errata で確認してください。 + すべてのリリースに関する情報や Errata は、 link:https://www.FreeBSD.org/ja/releases/[リリース情報] のページで確認できます。 ==== [[bsdinstall-installation-media]] === インストールメディアの準備 FreeBSD のインストーラは、 他のオペレーティングシステムで実行できるようなプログラムではありません。 そのかわり、FreeBSD インストールファイルをダウンロードしたら、 ファイルタイプやサイズに合わせてメディア (CD, DVD または USB) に焼いてください。そして、挿入したメディアからインストールするように、 システムを起動してください。 FreeBSD のインストールファイルは link:https://www.FreeBSD.org/ja/where/#download[FreeBSD ダウンロードページ] から入手できます。 各インストールファイルの名前は、FreeBSD のリリースバージョンおよびアーキテクチャ、ファイルタイプから構成されます。 インストールファイルは、さまざまな形式で、man:xz[1] により圧縮されたファイルまたは圧縮されていないファイルが用意されています。 用意されているフォーマットは、 コンピュータのアーキテクチャやメディアのタイプによって異なります。 インストールファイルの形式 * `*-bootonly.iso*`: インストーラのみを含む最小のインストールファイルです。 インストールを行う間、インストーラは FreeBSD をインストールするために必要なファイルをダウンロードするため、ネットワーク接続が必要です。 このファイルは、光学メディアに書き込む必要があります。 * `*-disc1.iso*`: FreeBSD のインストールに必要となる、ソースおよび Ports Collection といったすべてのファイルが含まれています。 このファイルは、光学メディアに書き込む必要があります。 * `*-dvd1.iso*`: FreeBSD のインストールに必要となる、ソースおよび Ports Collection といったすべてのファイルが含まれています。 インターネットに接続することなく、メディアのみでシステムのインストールを完了できるように、良く使われるウィンドウマネージャおよびアプリケーションをインストールするためのバイナリ package も含まれています。 このファイルは、光学メディアに書き込む必要があります。 * `*-memstick.img*`: FreeBSD のインストールに必要となる、ソースおよび Ports Collection といったすべてのファイルが含まれています。 <> で説明されている手順に従って、このファイルを USB スティックに書き込んでください。 * `*-mini-memstick.img*`: `*-bootonly.iso*` と同じく、インストールファイルは含まれていないため、必要に応じてダウンロードする必要があります。 インストールを行う間、ネットワーク接続が必要です。 <> の説明に従って、USB スティックに書き込んでください。 イメージファイルをダウンロードしたら、同じディレクトリから少なくとも一つの _チェックサム_ ファイルをダウンロードしてください。 2 つの _チェックサム_ ファイルが利用可能です。 これのファイル名にはリリース番号とアーキテクチャ名がついています。 たとえば `CHECKSUM.SHA256-FreeBSD-13.1-RELEASE-amd64` および `CHECKSUM.SHA512-FreeBSD-13.1-RELEASE-amd64` という名前がつけられます。 どちらかの (もしくは両方の) ファイルをダウンロードしたら、イメージファイルの _チェックサム_ を計算し、 _チェックサム_ ファイルに示されている値と比較してください。 計算した _チェックサム_ は、2 つの異なるアルゴリズム (SHA256 および SHA512) に対応する適切なファイルと比較してください。 FreeBSD では、_チェックサム_ のために man:sha256[1] および man:sha512[1] を提供しています。 他のオペレーティングシステムでも同じようなプログラムを利用できます。 FreeBSD での _チェックサム_ の検証は、以下のように man:sha256sum[1] (または man:sha512sum[1]) を使用して自動的に行うことができます。 [source,shell] .... -% sha256sum -c CHECKSUM.SHA256-FreeBSD-13.1-RELEASE-amd64 FreeBSD-13.1-RELEASE-amd64-dvd1.iso +% sha256sum -c CHECKSUM.SHA256-FreeBSD-13.1-RELEASE-amd64 --ignore-missing FreeBSD-13.1-RELEASE-amd64-dvd1.iso: OK .... チェックサムは完全に一致している必要があります。 もしチェックサムが一致しなければ、 イメージファイルが壊れている可能性があるので、もう一度ダウンロードしてください。 [[bsdinstall-usb]] ==== イメージファイルを USB に書き込む `\*memstick.img` ファイルは、完全なメモリスティックの内容の _イメージ_ です。 これは、通常のファイルのように対象のデバイスにコピーすることは _できません_。 USB スティックへ `*.img` を書き込むためのアプリケーションは複数あります。 この節ではこのうちの二つのユーティリティについて説明します。 [IMPORTANT] ==== 先に進む前に、USB スティックに存在する重要なデータをバックアップしてください。 以下の手順を実行すると、 スティックに存在するデータは削除されます。 ==== [[bsdinstall-usb-dd]] [.procedure] ==== *Procedure. `dd` を使ってイメージを書き込む* + [WARNING] ====== この例では、イメージの書き込み先のターゲットデバイスとして、`/dev/da0` が使われています。 ここで使われるコマンドは、 指定したターゲットデバイスに存在しているデータを破壊してしまうので、 正しいデバイスが指定されていることに *細心の注意を払ってください*。 ====== . man:dd[1] コマンドユーティリティは、 BSD, Linux(R), および Mac OS(R) システムで利用できます。 `dd` を使ってイメージを焼くには、 USB スティックを挿入して、 デバイス名を確定してください。 その後、ダウンロードしたインストールファイルおよび、 USB スティックのデバイス名を指定してください。 この例では、amd64 インストールイメージを FreeBSD システムの最初の USB デバイスに書き込みます。 + [source,shell] .... # dd if=FreeBSD-13.0-RELEASE-amd64-memstick.img of=/dev/da0 bs=1M conv=sync .... + もし上記のコマンドに失敗するようでしたら、USB スティックがマウントされているかどうか、デバイス名が (パーティションではなく) ディスクに対して指定されていることを確認してください。 + オペレーティングシステムによっては、このコマンドを man:sudo[8] で実行することが求められる場合があります。 man:dd[1] の書式は、プラットフォームによって少し変わります。 たとえば Mac OS(R) では、小文字の `bs=1m` を使う必要があります。 Linux(R) のようなシステムでは、書き込みをバッファします。 すべての書き込みを完了させるには、man:sync[8] を使用してください。 ==== [.procedure] ==== *Procedure. Windows(R) を使ってイメージを書き込む* + [WARNING] ====== 適切なドライブレターを出力先に設定していることを十分に確認してください。 さもなければ、現在あるデータは上書きされ、 破壊されてしまうでしょう。 ====== . *Image Writer for Windows(R) を入手する* + Image Writer for Windows(R) は、 イメージファイルをメモリスティックに正しく書き込むことのできるフリーのアプリケーションです。 link:https://sourceforge.net/projects/win32diskimager/[win32diskimager ホームページ] からダウンロードして、フォルダに展開してください。 . イメージライタを使ってイメージを書き込む + Win32DiskImager アイコンをダブルクリックして、プログラムを起動してください。 `Device` の下に表示されるデバイスレターが、 メモリスティックのドライブであることを確認してください。 フォルダのアイコンをクリックして、 メモリスティックに書き込むイメージファイルを選択します。 btn:[Save] をクリックして、 イメージファイルの名前を確定してください。 すべてが正しく行われたかどうか、また、 他のウィンドウでメモリスティックのフォルダが開かれていないことを確認してください。 準備ができたら、btn:[Write] をクリックして、 メモリスティックにイメージファイルを書き込んでください。 ==== [[bsdinstall-start]] == インストールの開始 [IMPORTANT] ==== デフォルトでは、次のメッセージが表示されるまで インストーラはディスクに何の変更も加えません。 [.programlisting] .... Your changes will now be written to disk. If you have chosen to overwrite existing data, it will be PERMANENTLY ERASED. Are you sure you want to commit your changes? .... この警告の前であれば、いつでもインストールを中断できます。 もし、何かを間違って設定してしまったことが心配ならば、 最後の警告の前に単にコンピュータをオフにしてください。 システムのハードディスクを変更せずに済みます。 ==== この章では、<> で説明されている手順によって準備されたインストールメディアから、システムを起動する方法について説明します。 起動可能な USB スティックを使用する場合には、コンピュータを立ち上げる前に、USB スティックを挿入してください。 CD もしくは DVD から起動する場合には、コンピュータを立ち上げ、すぐにメディアを挿入してください。 挿入したメディアからシステムを起動するように設定する方法は、アーキテクチャ毎に異なります。 [[bsdinstall-view-probe]] === FreeBSD ブートメニュー インストールメディアからシステムが起動すると、 以下のようなメニューが表示されます。 [[bsdinstall-newboot-loader-menu]] .FreeBSD ブートローダメニュー image::bsdinstall-newboot-loader-menu.png[FreeBSD ブートローダメニュー] デフォルトでは、メニューは、FreeBSD インストーラが起動するまで (FreeBSD がインストールされているシステムでは、FreeBSD が起動するまで)、 ユーザからの入力を 10 秒間受け付けます。 タイマーを停止してオプションを確認には、 kbd:[Space] を押してください。オプションを選択するには、 ハイライトされている番号、文字、もしくはキーを押してください。 以下のオプションが利用可能です。 * `Boot Multi User`: FreeBSD の起動プロセスを続けます。 ブートタイマが停止しているのであれば kbd:[1]、 大文字もしくは小文字の kbd:[B] または、 kbd:[Enter] を押してください。 * `Boot Single User`: このモードは、すでにインストールされている FreeBSD を修復するために利用できます。 シングルユーザモードについては、 crossref:boot[boot-singleuser,「シングルユーザモード」] で説明されています。 kbd:[2] もしくは、小文字もしくは、大文字の kbd:[S] を押すとこのモードに入ることができます。 * `Escape to loader prompt`: 制限された低レベルのコマンドのみが利用可能な修復用プロンプトでシステムを起動します。 このプロンプトについては、 crossref:boot[boot-loader,「起動ステージ 3」] で説明されています。 kbd:[3] または kbd:[Esc] を押すとこのプロンプトで起動します。 * `Reboot`: システムを再起動します。 * `Cons`: `video`, `serial`, `Dual (serial primary)` または `Dual (Video primary)` でインストールを続けます。 * `Kernel`: 別のカーネルを読み込みます。 * `Boot Options`: <> で示されるメニューを開きます。 [[bsdinstall-boot-options-menu]] .FreeBSD ブートオプションメニュー image::bsdinstall-boot-options-menu.png[サポートされているブートオプションのメニュー] この起動オプションメニューは、 2 つのセクションから構成されています。 最初のセクションは、メインのブートメニューに戻ったり、 オプションをデフォルト値に戻すために利用できます。 次のセクションでは、変更可能なオプションついて、 選択されている番号や文字を、`On` や `Off` に変更できます。 システムは、これらのオプションが変更されない限り、 常に変更されたオプションで起動します。 このメニューで変更可能なオプションは以下の通りです。 * `ACPI Support`: 起動中にシステムが固まるようでしたら、このオプションを `Off` にしてください。 * `Safe Mode`: 上記のオプションの対応を行ってもシステムが起動時に固まるようでしたら、 `ACPI Support` を `Off` にし、このオプションを `On` に設定してください。 * `Single User`: シングルユーザモードでインストールされている FreeBSD を修復には、 `On` にしてください。 シングルユーザモードについては、 crossref:boot[boot-singleuser,「シングルユーザモード」] で説明されています。 問題が修正された後は、`Off` に戻してください。 * `Verbose`: 起動プロセスの表示をより詳細に表示したい場合には、 このオプションを `On` にしてください。 ハードウェアの問題を解決する際には有効です。 設定が終わったら、 kbd:[1] または kbd:[Backspace] を押してメインブートメニューに戻り、 kbd:[Enter] を押して FreeBSD の起動を続けてください。 FreeBSD がハードウェアの検出を行い、 インストールプログラムをロードしている間、 ブートメッセージが表示されます。 起動後、<> が表示されます。 [[bsdinstall-choose-mode]] .ウェルカムメニュー image::bsdinstall-choose-mode.png[FreeBSD インストーラのウェルカムメニュー] kbd:[Enter] を押して、デフォルトの btn:[Install] を選択すると、インストール作業が始まります。 この章の残りの部分では、このインストーラの使い方について説明します。 メニュー項目を選択するには、左右の矢印キーを使ったり、色付けされた文字を使ってください。 btn:[Shell] を選択すると、インストールの前に、FreeBSD シェルからコマンドラインユーティリティでディスクを準備できます。 btn:[Live CD] オプションを選択すると、 インストール前に FreeBSD を試すことができます。 live 版については、<> で説明されています。 [TIP] ==== ハードウェアの検出などのブートメッセージを見るには 大文字または小文字の kbd:[S] を押してください。 その後、kbd:[Enter] を押して、 シェルにアクセスしてください。 シェルプロンプトから、`more /var/run/dmesg.boot` を入力してください。 メッセージのスクロールには、スペースバーを使ってってください。 終わったら、`exit` を押して、 ウェルカムメニューに戻ってください。 ==== [[using-bsdinstall]] == bsdinstall の使用 この章では、 bsdinstall メニューの順番と、 システムがインストールされる前に、 尋ねられる情報の形式について紹介します。 メニューオプションの選択には、矢印キーを使い、 メニューの項目の選択や解除する場合には、kbd:[Space] キーを使ってください。 設定が終わったら、kbd:[Enter] を押して設定を保存し、次の画面へ移動してください。 [[bsdinstall-keymap]] === キー配列メニューの選択 このプロセスが始まると、 bsdinstall は <> のようにキーマップファイルを読み込みます。 [[bsdinstall-keymap-loading]] .キーマップの読み込み image::bsdinstall-keymap-loading.png[キーマップの読み込み] キーマップが読み込まれると、bsdinstall は <> を表示します。 上下の矢印キーを使って、システムのキーボードに最も近いキーマップを選択してください。 選択を保存するには、kbd:[Enter] キーを押してください。 [[bsdinstall-keymap-10]] .キーマップ選択メニュー image::bsdinstall-keymap-10.png[キーマップ選択メニュー。対応しているすべてのキーボードが表示されます。] [NOTE] ==== kbd:[Esc] を押すと、メニューは終了し、 デフォルトのキーボードマップを使うようになります。 どのキーボードマップを選べばよいかわからない場合は、 [.guimenuitem]#United States of America ISO-8859-1# を選ぶとよいでしょう。 ==== デフォルトとは異なるキーマップを選択した場合には、 <> でキーマップのテストを行い、 インストールを先に進む前に正しく動くかどうかを確認できます。 [[bsdinstall-keymap-testing]] .キーマップテストメニュー image::bsdinstall-keymap-testing.png[キーマップテストメニュー] [[bsdinstall-hostname]] === ホスト名の設定 次の bsdinstall のメニューでは、 新しくインストールするシステムに与えるホスト名を設定します。 [[bsdinstall-config-hostname]] .ホスト名の設定 image::bsdinstall-config-hostname.png[ホスト名の設定] ネットワーク上でユニークなホスト名を入力してください。 入力するホスト名は、`machine3.example.com` のように完全修飾のホスト名で入力してください。 [[bsdinstall-components]] === インストールするコンポーネントの設定 次に、 bsdinstall は、インストールするオプションのコンポーネントの選択に移ります。 [[bsdinstall-config-components]] .インストールするコンポーネントの設定 image::bsdinstall-config-components.png[base-dbg, lib32, ports などのインストールするコンポーネントの設定] どのコンポーネントをインストールするかは、 システムの用途と用意されているディスク容量に依存します。 _base system_ として知られている FreeBSD カーネルとユーザランドは、 常にインストールされます。 アーキテクチャによっては、表示されないコンポーネントもあります。 * `base-dbg` - デバッグシンボルを有効にしたベースツール (cat, ls や他の多くのツール)。 * `kernel-dbg` - デバッグシンボルを有効にしたカーネルおよびモジュール。 * `lib32-dbg` - 32-bit のアプリケーションを 64-bit 版の FreeBSD で実行する際に必要となる互換ライブラリ (デバッグシンボルは有効)。 * `lib32` - 32-bit のアプリケーションを 64-bit 版の FreeBSD で実行する際に必要となる互換ライブラリ。 * `ports` - FreeBSD Ports Collection は、 サードパーティ製ソフトウェアパッケージのダウンロード、 コンパイル、 インストールを自動化するように設計されたファイルの集まりです。 Ports Collection の使い方については、 crossref:ports[ports,アプリケーションのインストール - packages と ports] で説明します。 + [WARNING] ==== インストールプログラムは、システムのディスクに十分な空き容量があるかどうかを確認しないので、ハードディスクに十分な容量があるときだけ、このオプションを選択するしてください。 FreeBSD Ports Collection が必要とする容量は、約 {ports-size} です。 ==== * `src` - FreeBSD のカーネルおよびユーザランド両方の完全なソースコードです。 ほとんどのアプリケーションは必要としませんが、 デバイスドライバやカーネルモジュール、 Ports Collection のアプリケーションによってはコンパイル時に必要となります。 このソースは、FreeBSD そのものの開発に使うこともできます。 すべてのソースツリーをインストールするには 1 GB のディスク容量を必要とします。 また、FreeBSD システム全体のコンパイルには、 さらに 5 GB の容量が必要です。 * `tests` - FreeBSD テストスイート。 [[bsdinstall-netinstall]] === ネットワークからのインストール <> で示されているメニューは、`-bootonly.iso` または `-mini-memstick.img` からインストールする時のみ表示されます。 これらのインストールメディアはインストールファイルを含んでいません。 このメニューは、 ネットワーク経由でインストールファイルをダウンロードする必要があるため、ネットワークインタフェースを最初に設定する必要があることを示しています。 このメニューがインストールのプロセスで表示された場合には、 <> に書かれている手順に従ってください。 [[bsdinstall-netinstall-notify]] .ネットワークからのインストール image::bsdinstall-netinstall-files.png[インストールするコンポーネントが見つからないため、ネットワークからダウンロードを試みることを示しています。] [[bsdinstall-partitioning]] == ディスク領域の割り当て 次のメニューでは、ディスク領域を割り当てる方法を選択します。 [[bsdinstall-zfs-partmenu]] .パーティション分割の選択 image::bsdinstall-zfs-partmenu.png[パーティションのオプションを示しています。例: マニュアル、シェルなど] bsdinstall では、ディスク領域の割り当てのために 4 つの方法が用意されています。 * `Auto (ZFS)` によるパーティションの分割では、root-on-ZFS システムを構築します。GELI 暗号に対応した _ブート環境_ を構築することもできます。 * `Auto (UFS)` によるパーティションの分割では、 `UFS` ファイルシステムを使ってディスクパーティションを自動的に分割します。 * `Manual` によるパーティションの分割は、 高度な知識を持つユーザ向けで、 メニューオプションからカスタマイズしたパーティションを作成できます。 * `Shell` では、シェルプロンプトを起動し、 高度な知識を持つユーザが、 man:gpart[8], man:fdisk[8], man:bsdlabel[8] のようなコマンドラインのプログラムを実行して、 カスタマイズしたパーティションを作成できます。 この章では、 ディスクパーティションをレイアウトする際の検討事項を説明します。 その後、各パーティションの作成方法について説明します。 [[configtuning-initial]] === パーティションレイアウトのデザイン デフォルトのファイルシステムのパーティションレイアウトは、システム全体をひとつのファイルシステムで構成します。 十分なディスク容量または複数のディスクを用いる環境において `UFS` を用いる場合は、複数のファイルシステムを検討する価値があります。 ファイルシステムのレイアウトを行う際には、 ハードディスクの外周部は内周部よりもデータ転送が速いということを思い出してください。 これに従えば、 小さくて激しくアクセスされるファイルシステムを外周付近に、`/usr` のようなより大きなパーティションはディスクの内側に配置すべきでしょう。 そのため、パーティションを作成する際には、`/`、 スワップ、`/var`, `/usr` のような順で作ってゆくのがよいでしょう。 `/var` パーティションのサイズは、あなたが計算機をどのように使おうとしているかを反映します。 このパーティションには主としてメールボックスやログファイル、 プリンタスプールが置かれます。 メールボックスとログファイルは、 システムのユーザ数やログの保持期間に依存して予期し得ぬサイズにまで成長する可能性があります。 概して、ほとんどのユーザは、`/var` にギガバイト以上の空き容量を必要とはしないでしょう。 [NOTE] ==== 時には、たくさんのディスク容量が `/var/tmp` に必要になるときがあります。 新しいソフトウェアをインストールする際、package のツールは、package の一時的なコピーを `/var/tmp` 以下に展開します。 `/var/tmp` 以下に十分なディスク容量が用意されていないと、Firefox や LibreOffice のような、大きなソフトウェア package のインストールが、困難になることがあります。 ==== `/usr` パーティションには、FreeBSD Ports Collection およびシステムのソースコードを含む、システムをサポートするのに必要な多くのファイル群が置かれます。 このパーティションには、少なくとも 2 ギガバイトの容量を用意することをおすすめします。 また、デフォルトではユーザのホームディレクトリは `/usr/home` に置かれますが、他のパーティションに置くこともできます。 デフォルトでは、`/home` は `/usr/home` へのシンボリックリンクです。 パーティションのサイズを考える時、 必要量を念頭に置いてください。 別のパーティションには潤沢にスペースが余っているのに、 あるパーティションでスペースが足らないままというのは、 フラストレーションがたまるものです。 経験からスワップパーティションのサイズは物理メモリ (RAM) の 2 倍というのが一般的です。 RAM の少ないシステムでは、もっとスワップを増した方が性能がよくなります (大きなメモリの設定では少なくて済みます)。 スワップが少なすぎる設定は、あなたが後にメモリを増設したときに問題を起すばかりではなく、VM ページスキャニングコードの能率を落します。 複数の SCSI ディスクや異なるコントローラで操作される複数の IDE ディスクを持つ大規模なシステムでは、それぞれのドライブ (4 台まで) にスワップを設定することを推奨します。 各ドライブのスワップパーティションはほぼ同一サイズであるべきです。 カーネルは任意のサイズを扱うことができますが、内部のデータ構造は最大のスワップパーティションの 4 倍に調節されます。 スワップパーティションをほぼ同一のサイズにしておくことで、カーネルはスワップスペースを最適なかたちでディスクをまたいでストライプさせることができます。 多くのスワップサイズを用意すると、全体のスワップに関するカーネルの警告メッセージがが表示されることがあります。 警告メッセージに示される手順に従って、スワップの割り当てのために許容されるメモリ量を増やすことで、この制限容量を増やすことができます。 あなたが通常スワップをたくさん使わないとしても、 プログラムが暴走しても再起動させられる前に回復することが容易になります。 システムを適切にパーティション化することで、小さいが書き込みの激しいパーティションによって引き起こされるフラグメント化を、読み出し専門のパーティションにまで波及させずにすみます。 また、書き込みの激しいパーティションをディスクの周辺部に配置することで、I/O パフォーマンスを増大させることができます。 大きなパーティション内の I/O パフォーマンスもまた必要とされているでしょうが、ディスク周辺部へ移動させたとしても、`/var` を周辺部に移動させることによって大きな効果が得られたのとは対照的に、意味のあるパフォーマンスの増加は見込めないでしょう。 [[bsdinstall-part-guided]] === UFS を用いた Guided によるパーティションの分割 この方法を選択すると、 メニューには利用可能なディスクが表示されます。 複数のディスクが接続されている場合には、 FreeBSD をインストールするディスクを選択してください。 [[bsdinstall-part-guided-disk]] .複数のディスクから選択する image::bsdinstall-part-guided-disk.png[FreeBSD をインストールすることのできるディスクの一覧が表示されます] ディスクを選択したら、次のメニューでは、 ディスクのすべてにインストールを行うか、 または空き容量にパーティションを作成してインストールを行うかを設定します。 btn:[Entire Disk] を選択すると、 一般的なパーティションレイアウトが自動的に作成されます。 btn:[Partition] を選択すると、 ディスクの使用していない領域にパーティションレイアウトを作成します。 [[bsdinstall-part-entire-part]] .Entire Disk または Partition の選択 image::bsdinstall-part-entire-part.png[使用するディスク上で利用可能な領域をすべて使うか、もしくはパーティションを作成するかを選択するメニュー] btn:[Entire Disk] オプションを選択すると、bsdinstall はディスクの内容が消去されることを確認するダイアログを表示します。 [[bsdinstall-ufs-warning]] .確認 image::bsdinstall-ufs-warning.png[ユーザに対しディスク上のすべてのデータが消去されることの確認メニュー] 次のメニューでは、 利用可能なパーティションスキームタイプの一覧が表示されます。 amd64 コンピュータでは、通常 GPT が最も適切な選択となります。 GPT に対応していないような古いコンピュータでは、MBR を使う必要があります。 他のパーティションスキームは、使うことがまれであったり、古いコンピュータで用いられるものです。 <> に詳細があります。 [[bsdinstall-ufs-scheme]] .パーティションスキームの選択 image::bsdinstall-part-manual-partscheme.png[ユーザに対して選択可能なさまざまなパーティションタイプを示し、そのうちのどれかを選択するためのメニュー] パーティションのレイアウトを作成したら、インストールの条件を満たしているかどうかを深く確認してください。 btn:[Revert] を選択すると、パーティションをオリジナルの値にリセットします。 また、btn:[Auto] を選択すると、FreeBSD パーティションを自動的に作成します。 パーティションを手動で作成、変更、削除することもできます。 正しくパーティションを作成出来たら、 btn:[Finish] を選択し、インストールを進めてください。 [[bsdinstall-part-review]] .作成されたパーティションの確認 image::bsdinstall-part-review.png[作成されたパーティションを表示するメニュー] ディスクを一度設定すると、次のメニューは、選択したハードドライブをフォーマットする前に、設定を変更できる最後のチャンスです。 もし変更が必要であれば、 btn:[Back] を選択してメインのパーティションエディタまで戻ってください。 btn:[Revert & Exit] を選択すると、ハードドライブへの変更なしにインストールを終了します。 インストールプロセスを開始するには、 btn:[Commit] を選択してしてください。 [[bsdinstall-ufs-final-confirmation]] .最後の確認 image::bsdinstall-final-confirmation.png[ユーザに対してインストールを開始すると、すべての変更がディスクに書き込まれ、ディスクに存在するデータは完全に削除されることを確認するメニュー] <> に進んで、インストールプロセスを続けてください。 [[bsdinstall-part-manual]] === Manual によるパーティションの分割 この方法を選択すると、 パーティションエディタが起動します。 [[bsdinstall-part-manual-create]] .Manual によるパーティションの分割 image::bsdinstall-part-manual-create.png[パーティションエディタを表示しているメニュー] インストール先のドライブ (この例では `ada0`) を選び、 btn:[Create] を選択すると、 利用可能なパーティションスキームの一覧が表示されます。 [[bsdinstall-part-manual-partscheme]] .手動でパーティションを作成する image::bsdinstall-part-manual-partscheme.png[選択可能なパーティションスキームを表示しているメニュー] amd64 コンピュータでは、通常 GPT が最も適切な選択となります。 GPT に対応していないような古いコンピュータでは、 MBR を使う必要があります。 他のパーティションスキームは、使うことがまれであったり、 古いコンピュータで用いられるものです。 [[partition-schemes]] .パーティションスキーム [cols="25h,~", frame="none", options="header"] |=== <| 省略形 <| 説明 |APM |PowerPC(R) で使われている Apple Partition Map |BSD |MBR を用いない BSD ラベル。 BSD 以外のディスクユーティリティは認識しないため、しばしば _dangerously dedicated mode_ と呼ばれます。 |GPT |link:https://en.wikipedia.org/wiki/GUID_Partition_Table[GUID Partition Table] |MBR |link:https://en.wikipedia.org/wiki/Master_boot_record[Master Boot Record] |=== パーティションスキームを選択して作成した後で、 もう一度 btn:[Create] を選択すると、 パーティションが作成されます。kbd:[Tab] キーを使ってカーソルをフィールド間で移動できます。 [[bsdinstall-part-manual-addpart]] .手動でパーティションを作成する image::bsdinstall-part-manual-addpart.png[追加するパーティションのタイプ、サイズ、マウントポイントおよびラベル情報を入力するためのメニュー] 標準の FreeBSD GPT のインストールでは、UFS または ZFS を含む少なくとも 3 つのパーティションが使われます。 * `freebsd-boot` または `efi` - FreeBSD ブートコードを含んでいます。 * `freebsd-ufs` - FreeBSD UFS ファイルシステム。 * `freebsd-zfs` - FreeBSD ZFS ファイルシステム。 詳細については、 link:https://docs.freebsd.org/en/books/handbook/zfs/#zfs[The Z File System (ZFS)] をご覧ください。 * `freebsd-swap` - FreeBSD スワップ空間。 利用可能な GPT パーティションタイプについては、man:gpart[8] をご覧ください。 複数のファイルシステムのパーティションを作成できます。 人によっては `/`, `/var`, `/tmp` および `/usr` にパーティションを分割する伝統的なレイアウトが好まれます。 [TIP] ==== 十分なメモリを搭載したシステムでは、メモリベースのファイルシステム (man:tmpfs[5]) を `/tmp` として後で追加できます。 ==== レイアウトの例が <> にあります。 `Size` には、 _K_ (キロバイト)、 _M_ (メガバイト)、 _G_ (ギガバイト) といった通常の省略形を使用出来ます。 [TIP] ==== セクタを適切に配置することで、 最良のパフォーマンスを得ることができます。 また、パーティションサイズを 4K バイトの偶数倍にすると、 512 バイトまたは 4K バイトのセクタでドライブが配置しやすくなります。 一般的に、 4K の偶数倍の場所からパーティションが開始するように設定する簡単な方法は、 1M または 1G の偶数倍のパーティションサイズを用いることです。 ただし、例外があります。 _freebsd-boot_ パーティションは、 ブートコードの制限により 512K 以下である必要があります。 ==== ファイルシステムを持つパーティションでは、`マウントポイント` が必要となります。 1 つの UFS パーティションだけを作成したのであれば、マウントポイントは `/` となります。 `Label` は作成したパーティションを認識するための名前です。 ドライブ名や番号は、ドライブが別のコントローラやポートに接続されると変わることがありますが、パーティションラベルは変わりません。 `/etc/fstab` のようなファイルの中で、ドライブ名やパーティション番号ではなく、ラベルを参照することにより、システムがハードウェアの変更に対して、より寛容になります。 GPT ラベルは、ディスクが接続されると `/dev/gpt/` に現れます。 他のパーティションスキームでは別のラベルとなり、`/dev/` 以下の異なるディレクトリにラベルが現れます。 [TIP] ==== 名前の衝突を避けるため、 各パーティションには、一意的な名前使ってください。 コンピュータ名、使用、位置情報を表す単語をラベルに追加できます。 たとえば、`lab` という名前のコンピュータの UFS の root パーティションには、 `labroot` または `rootfs-lab` といった名前を使ってください。 ==== [[bsdinstall-part-manual-splitfs]] .伝統的なファイルシステムのパーティションの作成 [example] ==== 伝統的なパーティションレイアウト (`/`, `/var`, `/tmp` および `/usr` ディレクトリが各パーティションの別のファイルシステム) を作成するには、GPT パーティションスキームを作成し、その後、示されているようにパーティションを作成してください。 示されているパーティションサイズは 20G のディスク用です。 ディスクにより多くの容量があれば、swap または `/var` パーティションを大きく取ると良いでしょう。 ここで示されているラベルには、`example` を意味する `ex` が付けられていますが、実際には上で説明したように、これとは別のユニークなラベルをつけてください。 FreeBSD の `gptboot` は、 デフォルトでは最初に見つかった UFS パーティションが、 `/` パーティションであることを前提としています。 [.informaltable] [cols="1,1,1,1", frame="none", options="header"] |===== | パーティションタイプ | サイズ | マウントポイント | ラベル |`freebsd-boot` |`512K` | | |`freebsd-ufs` |`2G` |`/` |`exrootfs` |`freebsd-swap` |`4G` | |`exswap` |`freebsd-ufs` |`2G` |`/var` |`exvarfs` |`freebsd-ufs` |`1G` |`/tmp` |`extmpfs` |`freebsd-ufs` |デフォルト (ディスクの残りのすべての容量) |`/usr` |`exusrfs` |===== ==== カスタムパーティションを作成したら、 btn:[Finish] を選択して <> に進み、インストールを先に進めてください。 [[bsdinstall-part-zfs]] === Root-on-ZFS を用いた Guided によるパーティションの作成 このパーティションの分割モードは、 ディスクのすべての領域に対して機能するので、 ディスク上にあるすべての内容が消去されます。 メインの ZFS 設定メニューには、 プールの作成をコントロールする数多くのオプションが用意されています。 [[bsdinstall-zfs-menu]] .ZFS パーティションメニュー image::bsdinstall-zfs-menu.png[ZFS プールを設定するためのオプションを表示しているメニュー] このメニューのオプションは以下の通りです。 * `Install` - 選択したオプションでインストールを進めます。 * `Pool Type/Disks` - プールを構成する `Pool Type` およびディスクについて設定します。 現時点で ZFS の自動インストーラは、ストライプモードを除き、単一のトップレベルの仮想デバイスの作成のみに対応しています。 より複雑なプールを作成するには、 <> で説明されている方法で作成してください。 * `Rescan Devices` - 利用可能なディスクの一覧を再表示します。 * `Disk Info` - このメニューを使って各ディスクを調べることができます。 パーティションテーブルやそれ以外のデバイスモデルナンバーおよびシリアルナンバーといった情報も、可能であれば調べることができます。 * `Pool Name` - pool の名前を設定します。 デフォルトの名前は _zroot_ です。 * `Force 4K Sectors?` - 4K セクタを使用するようにします。 インストーラは、デフォルトで 4K の境界に整列するようにパーティションを自動的に作成し、 ZFS が 4K セクタを使用するようにします。 これは 512 バイトセクタのディスクでも安全で、 512 バイトのディスク上に作成されたプールが将来的に 4K セクタのディスクを追加できるようにしておくことには、 ストレージ容量の追加や壊れたディスクの交換時に恩恵があります。 有効にするか無効にするかを選択して kbd:[Enter] キーを押してください。 * `Encrypt Disks?` - GELI を使ってディスクを暗号化できます。ディスクの暗号化の詳細については、 link:https://docs.freebsd.org/en/books/handbook/disks/#disks-encrypting-geli[geli によるディスクの暗号化] をご覧ください。 kbd:[Enter] キーを押して、暗号化を有効にするか無効にするかを選択してください。 * `Partition Scheme` - パーティションスキームを選択します。 ほとんどの場合において、GPT が推奨されます。 別のスキームを選択する場合には、 kbd:[Enter] キーを押してください。 * `Swap Size` - スワップ容量を設定します。 * `Mirror Swap?` - スワップ領域をディスク間でミラー化するかどうかを設定します。 スワップ領域をミラー化すると、クラッシュダンプを取得できないので注意してください。 kbd:[Enter] キーを押して有効/無効を設定してください。 * `Encrypt Swap?` - スワップ領域の暗号化について設定します。 これはシステムの起動時に一時キーとともにスワップ領域を暗号化し、再起動時にキーは破棄されます。 kbd:[Enter] キーを押して有効/無効を設定してください。 詳細については、 link:https://docs.freebsd.org/en/books/handbook/disks/#swap-encrypting[swap 領域の暗号化] を参照してください。 kbd:[T] を選択して、`Pool Type` およびプールに対応するディスクを選択してください。 [[bsdinstall-zfs-vdev_type]] .ZFS プールタイプ image::bsdinstall-zfs-vdev_type.png[stripe, mirror, raidz1 などの仮想デバイスタイプを選択するメニュー] このメニューで選択可能な `Pool Type` は以下の通りです。 * `stripe` - ストライピングでは、 接続されているすべてのデバイスの最大容量を使用できます。 ただし、冗長性はありません。 一つのディスクが壊れるだけでプールにあるデータは失われてしまい、 取り返しがつきません。 * `mirror` - ミラーリングは各ディスク上にあるすべてのデータの完全なコピーを保存します。 ミラーリングでは、並列にすべてのディスクからデータを読むため、 読み込みのパフォーマンスが向上します。 書き込みのパフォーマンスは、 データが並列にすべてのディスクに書き込まれるため、遅くなります。 1 つを除くすべてのディスクが壊れることを許容します。 このオプションを選択するには、 少なくとも 2 つのディスクを必要とします。 * `raid10` - ストライピングミラー。 最も効率は良いですが、ストレージ容量は少なくなります。 偶数のディスクが必要で、 少なくとも 4 つのディスクが必要です。 * `raidz1` - シングルパリティの RAID。 1 台のディスクの故障に耐えられます。 少なくとも 3 つのディスクが必要です。 * `raidz2` - ダブルパリティの RAID。 同時に 2 台のディスクの故障に耐えられます。 少なくとも 4 つのディスクが必要です。 * `raidz3` - トリプルパリティの RAID。 同時に 3 台のディスクの故障に耐えられます。 少なくとも 5 つのディスクが必要です。 `Pool Type` を選択したら、 利用可能なディスクの一覧が表示されます。 その後、プールを構成するディスクを、1 つまたは複数選択してください。 十分なディスクが選択されているかどうかについて検証が行われます。 検証に失敗するようであれば、btn:[] を選択して、ディスクの一覧に戻ってください。 もしくは、 btn:[] を選択して `Pool Type` に戻ってください。 [[bsdinstall-zfs-disk_select]] .ディスクの選択 image::bsdinstall-zfs-disk_select.png[プールに追加するディスクを選択するメニュー] [[bsdinstall-zfs-vdev_invalid]] .無効な選択 image::bsdinstall-zfs-vdev_invalid.png[十分なディスクが選択されていないことを示しているメニュー] この一覧の中に抜けているディスクがある時や、 インストーラが立ち上がった後にディスクを接続した場合に、 最新の利用可能なディスクの一覧を見るには、 btn:[- Rescan Devices] を選択してください。 [[bsdinstall-zfs-rescan-devices]] .デバイスのリスキャン image::bsdinstall-zfs-rescan-devices.png[デバイスのリスキャン] アクシデントで間違ったディスクを削除してしまわないように、 btn:[- Disk Info] メニュー選択して、 各ディスクのパーティションテーブル、および、 デバイスモデル番号およびシリアル番号などのさまざまな情報を確認してください。 [[bsdinstall-zfs-disk_info]] .ディスクの解析 image::bsdinstall-zfs-disk_info.png[パーティションの情報を表示しているメニュー] kbd:[N] を選択して、 `Pool Name` を設定してください。 希望する名前を入力後、 btn:[] を選択して確定するか、 btn:[] を押して、 デフォルト名のままでメインメニューに戻ってください。 [[bsdinstall-zfs-pool-name]] .Pool Name image::bsdinstall-zfs-pool-name.png[プールの名前を入力するメニュー] kbd:[S] を選択してスワップの容量を設定してください。 必要なスワップ容量を入力し、 btn:[] を押して確定するか、 もしくは btn:[] を押して、 デフォルトの容量のまま、メインメニューに戻ってください。 [[bsdinstall-zfs-swap-amount]] .Swap 容量 image::bsdinstall-zfs-swap-amount.png[スワップメモリの容量を入力するメニュー] すべてのオプションに希望する値を設定したら、メニューの上部にある btn:[>>> Install] オプションを選択してください。 インストーラは、最終確認として ZFS プールを作成するために選択したドライブの内容が削除されることをキャンセルできる最後の機会を提供してくれます。 [[bsdinstall-zfs-warning]] .最終確認 image::bsdinstall-zfs-warning.png[データが削除されることをユーザに確認するメニュー] GELI ディスク暗号化を有効にしていたら、ディスクを暗号化するために用いるパスフレーズを 2 度求められます。 その後、暗号の初期化が開始します。 [[bsdinstall-zfs-geli_password]] .ディスク暗号化パスワード image::bsdinstall-zfs-geli_password.png[デバイスを暗号化するためのパスワードを入力するメニュー] [[bsdinstall-zfs-init-encription]] .暗号の初期化 image::bsdinstall-zfs-init-encription.png[暗号の初期化が行われていることを示すメニュー] その後のインストールの過程は、通常通りに進みます。 インストールを進めるには、 <> に進んでください。 [[bsdinstall-part-shell]] === シェルモードによるパーティションの作成 高度なインストールを行う上で、bsdinstall が提供するパーティション分割のメニューは柔軟性にかけることがあります。 手動でドライブの分割、ファイルシステムの作成、`/tmp/bsdinstall_etc/fstab` の作成、そして `/mnt` 以下へのファイルシステムのマウントを行うには、パーティションメニューで btn:[Shell] オプションを選択してください。 このオプションは高度な技術を持つユーザ向けです。 以上を実行したら、`exit` を実行して bsdinstall に戻り、インストールを続けてください。 [[bsdinstall-fetching-distribution]] == 配布ファイルのダウンロード インストールにかかる時間は、どのディストリビューションを選んだか、 どのインストールメディアを使ったか、 そしてコンピュータの速度にも依存します。 進行状況を表すメッセージが逐次表示されます。 まず最初に、インストーラは選択されているディスクをフォーマットし、 パーティションを初期化します。 `bootonly media` または `mini memstick` メディアを用いたインストールでは、 選択されたコンポーネントがダウンロードされます。 [[bsdinstall-distfile-fetching]] .配布ファイルのダウンロード image::bsdinstall-distfile-fetching.png[各コンポ―テントのダウンロード状況を表示しているメニュー] 次に、ダウンロードの際にエラーが含まれなかったか、 インストールメディアからの読み取り中に読み間違いが起きなかったかどうか等、 配布ファイルの完全性の検証が行われます。 [[bsdinstall-distfile-verify]] .配布ファイルの検証 image::bsdinstall-distfile-verifying.png[各コンポーネントの検証状況を表示しているメニュー] 最後に、検証された配布ファイルがディスクへ展開されます。 [[bsdinstall-distfile-extract]] .配布ファイルの展開 image::bsdinstall-distfile-extracting.png[配布ファイルの展開状況を表示しているメニュー] 必要な配布ファイルがすべて展開されると、 bsdinstall は、 インストール後の設定画面を表示します。 利用可能なインストール後のオプションについては次の章で説明します。 [[bsdinstall-post]] == ネットワークインターフェース、アカウント、タイムゾーン、 サービスおよびセキュリティオプションの設定 [[bsdinstall-post-root]] === `root` パスワードの設定 最初に `root` のパスワードを設定する必要があります。 パスワードを入力している際には、入力している文字は画面に表示されません。 入力ミスを防ぐため、パスワードは 2 回入力する必要があります。 [[bsdinstall-post-set-root-passwd]] .`root` パスワードの設定 image::bsdinstall-post-root-passwd.png[root ユーザのパスワードを入力するメニュー] [[bsdinstall-config-network-dev]] === ネットワークインタフェースの設定 次に、コンピュータが認識したすべてのネットワークインタフェースが表示されます。 設定するネットワークインタフェースを選んでください。 [[bsdinstall-configure-net-interface]] .イーサネットインタフェースの選択 image::bsdinstall-configure-network-interface.png[設定を行うネットワークインタフェースを選択するメニュー] イーサネットインタフェースを選択すると、<> で表示されるメニューが表示されます。 ワイヤレスネットワークを選択すると、システムはワイヤレスアクセスポイントをスキャンします。 [[bsdinstall-wireless-scan]] .ワイヤレスアクセスポイントのスキャン image::bsdinstall-configure-wireless-scan.png[ワイヤレスネットワークのスキャンの進捗を表示しているメニュー] ワイヤレスネットワークは Service Set Identifier (SSID) によって識別されます。 SSID は、それぞれのネットワークに与えられる、短く、一意的な名前です。 スキャンで見つかった SSID は、そのネットワークで利用できる暗号化のタイプの説明とともに一覧で表示されます。 もし、期待した SSID が一覧に表示されていなければ、btn:[Rescan] を選択してもう一度スキャンしてください。 それでもなお期待したネットワークが表示されなければ、接続のためのアンテナに問題がないかを確認したり、コンピュータをアクセスポイントの近くに移動してみてください。 その後もう一度スキャンしてください。 [[bsdinstall-wireless-accesspoints]] .ワイヤレスネットワークの選択 image::bsdinstall-configure-wireless-accesspoints.png[接続できるワイヤレスネットワークが表示されているメニュー] 次に、ワイヤレスネットワークに接続するための暗号情報を入力してください。 WEP のような古い暗号の安全性は低いので、WPA2 暗号が強く推奨されます。 WPA2 を使用してるネットワークでは、Pre-Shared Key (PSK) と呼ばれるパスワードを入力してください。 セキュリティ上の観点から、入力ボックスに入力した文字はアスタリスクで表示されます。 [[bsdinstall-wireless-wpa2]] .WPA2 のセットアップ image::bsdinstall-configure-wireless-wpa2setup.png[ワイヤレスネットワークのパスワードを入力するメニュー] 次に、イーサネットもしくはワイヤレスインタフェースに対して、IPv4 を設定するかどうかを選択します。 [[bsdinstall-configure-net-ipv4]] .IPv4 ネットワークの選択 image::bsdinstall-configure-network-interface-ipv4.png[選択したネットワークインターフェースに対して IPv4 の設定を行うかどうかを確認するメニュー] IPv4 の設定方法は 2 通りあります。 _DHCP_ はネットワークインタフェースを自動的に適切に設定する方法で、DHCP サーバのあるネットワークでは使用すべきです。 DHCP を利用できない環境では、静的な設定として、ネットワークのアドレス情報を手動で入力する必要があります。 [NOTE] ==== 適当なネットワーク情報を入力しても動かないので、DHCP サーバが利用できなのであれば、ネットワーク管理者またはサービスプロバイダから <> に示されている情報を入手してください。 ==== DHCP サーバを利用できるのであれば、次のメニューで btn:[Yes] を選択して、ネットワークインタフェースの設定を自動的に行ってください。 DHCP サーバを検索し、システムに対するアドレス情報を入手する間、インストーラは少しの間停止しているように表示されます。 [[bsdinstall-net-ipv4-dhcp]] .IPv4 DHCP 設定の選択 image::bsdinstall-configure-network-interface-ipv4-dhcp.png[選択したインターフェースに対して DHCP で設定を行うかを選択するメニュー] DHCP サーバを利用できない環境では、btn:[No] を選択し、新しく表示されるメニューにおいて以下のようなアドレス情報を入力してください。 [[bsdinstall-net-ipv4-static]] .静的な IPv4 の設定 image::bsdinstall-configure-network-interface-ipv4-static.png[IPv4 ネットワークを設定するメニュー] [[bsdinstall-collect-network-information]] * `IP Address` - コンピュータに与える IPv4 アドレスです。 このアドレスは一意的である必要があるため、ローカルネットワーク上の他のデバイスですでに使われているアドレスは使えません。 * `Subnet Mask` - ネットワークのサブネットマスクです。 * `Default Router` - このネットワークのデフォルトゲートウェイの IP アドレスです。 次の画面では、インタフェースを IPv6 で設定すべきかを選択します。 IPv6 が利用でき、希望するのであれば、 btn:[Yes] を選択してください。 [[bsdinstall-net-ipv6]] .IPv6 ネットワークの選択 image::bsdinstall-configure-network-interface-ipv6.png[選択したネットワークインターフェースに対して IPv6 の設定を行うかどうかを確認するメニュー] IPv6 の設定に関しても 2 つの方法があります。 StateLess Address AutoConfiguration (SLAAC) は、ローカルルータから適切なネットワーク設定情報を入手するように、自動的にリクエストします。 詳細については http://tools.ietf.org/html/rfc4862[rfc4862] を参照してください。 静的な設定では、ネットワーク情報を手動で入力する必要があります。 IPv6 ルータを利用できるのであれば、次のメニューで btn:[Yes] を選択し、ネットワークインタフェースの設定を自動的に行ってください。 インストーラはルータを見つけ出し、システムに対するアドレス情報を入手するため、 少しの間停止しているように表示されます。 [[bsdinstall-net-ipv6-slaac]] .IPv6 SLAAC 設定の選択 image::bsdinstall-configure-network-interface-slaac.png[選択したネットワークインターフェースに対して SLAAC の設定を行うかどうかを確認するメニュー]] IPv6 ルータが利用できない環境では、btn:[No] を選択して、表示されるメニューで以下のアドレス情報を入力する必要があります。 [[bsdinstall-net-ipv6-static]] .IPv6 の静的な設定 image::bsdinstall-configure-network-interface-ipv6-static.png[IPv6 ネットワークを設定するメニュー] * `IPv6 Address` - このコンピュータに割り当てられた IPv6 アドレスです。このアドレスは一意的である必要があるため、ローカルネットワーク上の他のデバイスですでに使われているアドレスは使えません。 * `Default Router` - このネットワークのデフォルトゲートウェイの IPv6 アドレスです。 最後のネットワークメニューでは、ホスト名とネットワークアドレスを変換する Domain Name System (DNS) リゾルバを設定します。 すでに DHCP または SLAAC を使って自動的にネットワークインタフェースを設定したのであれば、`Resolver Configuration` には値がすでに入っているでしょう。 そうでなければ、`Search` フィールドにローカルネットワークのドメイン名を入力してください。 `DNS` #1 および `DNS` #2 は、ローカル DNS サーバの IPv4 または IPv6 アドレスです。 少なくとも、1 つの DNS サーバは必要です。 [[bsdinstall-net-dns-config]] .DNS の設定 image::bsdinstall-configure-network-ipv4-dns.png[ネットワークの DNS を設定するメニュー] ネットワーク接続の設定が終わったら、FreeBSD をインストールするコンピュータと同じ地域のミラーサイトを選んでください。 ターゲットコンピュータの近くのミラーサイトを選択できれば、ファイルのダウンロードは早く終わるので、インストールの時間は短くなります。 [TIP] ==== ftp://ftp.freebsd.org (Main Site)` を選択すると、最も近いミラーに自動的にルーティングします。 ==== [[bsdinstall-netinstall-mirror]] .ミラーサイトの選択 image::bsdinstall-netinstall-mirrorselect.png[ミラーサイトを選択するメニュー] [[bsdinstall-timezone]] === タイムゾーンの設定 次のメニューでは、地域、国、タイムゾーンを指定します。 使用しているシステムのタイムゾーンを設定することで、 夏時間などの地域による時刻の違いが自動的に調整され、 タイムゾーンに関連した機能が適切に取り扱われます。 ここでの例は、 欧州スペインのメインランドタイムゾーンにあるコンピュータに対するものです。 実際の地理的位置に対応するタイムゾーンを設定してください。 [[bsdinstall-timezone-region]] .地域の選択 image::bsdinstall-timezone-region.png[地域を選択するメニュー] 矢印キーを使って、適切な地域を選択し、 kbd:[Enter] を押してください。 [[bsdinstall-timezone-country]] .国名の選択 image::bsdinstall-timezone-country.png[国名を選択するメニュー] 矢印キーを使って、適切に国名を選び、 kbd:[Enter] を押してください。 [[bsdinstall-timezone-zone]] .タイムゾーンの選択 image::bsdinstall-timezone-zone.png[タイムゾーンを選択するメニュー] 矢印キーを使って適切なタイムゾーンを選択し、 kbd:[Enter] を押してください。 [[bsdinstall-timezone-confirmation]] .タイムゾーンの確定 image::bsdinstall-timezone-confirm.png[タイムゾーンを確定するメニュー] タイムゾーンの省略形が正しいかどうかを確認してください。 [[bsdinstall-timezone-date]] .日付の設定 image::bsdinstall-timezone-date.png[システムの日付を設定するメニュー] 矢印キーを使って適切な日付を選択したら、 btn:[Set Date] を押してください。 btn:[Skip] を押すと日付の設定をスキップできます。 [[bsdinstall-timezone-time]] .時刻の設定 image::bsdinstall-timezone-time.png[システムの時刻を設定するメニュー] 矢印キーを使って適切な時刻に設定したら、 btn:[Set Time] を押してください。 btn:[Skip] を押すと時刻の設定をスキップできます。 [[bsdinstall-sysconf]] === サービスを有効にする 次のメニューでは、システムが起動した時に、 起動するシステムサービスを設定します。 これらのサービスはすべてオプションです。 システムの機能として必要なサービスだけを起動するようにしてください。 [[bsdinstall-config-serv]] .追加で有効にするサービスの選択 image::bsdinstall-config-services.png[利用可能なサービスを表示しているメニュー] このメニューで有効にできるサービスは以下の通りです。 * `local_unbound` - DNS のローカル unbound を有効にします。この設定は、ローカルキャッシュフォワードリゾルバとしての利用のみを想定しています。ネットワーク全体のリゾルバを設定したいのであれば、 package:dns/unbound[] をインストールしてください。 * `sshd` - セキュアシェル (SSH) デーモンは、 暗号化された接続上でリモートアクセスするために使われます。 システムがリモートログインを必要とする場合のみ、 このサービスを有効にしてください。 * `moused` - システムのコンソールで、 マウスを利用する時に、このサービスを有効にしてください。 * `ntpdate` - 起動時の自動時刻同期を有効にします。 この機能は、現在 man:ntpd[8] デーモンでも利用できます。 man:ntpdate[8] ユーティリティは近々その役目を終える予定です。 * `ntpd` - 自動時刻同期のための The Network Time Protocol (NTP) デーモンを有効にします。リモートタイムサーバまたはプールとシステムの時刻を同期する場合は、このサービスを有効にしてください。 * `powerd` - 電源の管理およびエネルギーを節約するための電源コントロールユーティリティ * `dumpdev` - システムのデバッグを行う上で、クラッシュダンプは有用なので、可能であれば有効にすると良いでしょう。 [[bsdinstall-hardening]] === セキュリティを強化するオプションを有効にする 次のメニューでは、 有効にするセキュリティオプションを設定します。 すべてはオプションですが、有効にすることが推奨されます。 [[bsdinstall-hardening-options]] .セキュリティを強化するオプションの設定 image::bsdinstall-hardening.png[セキュリティを強化するオプションを表示しているメニュー] このメニューで有効にできるのは、以下のオプションです。 * `hide_uids` - 他のユーザが実行しているプロセス (UID) を隠します。 特権のないユーザが、他のユーザにより実行されているプロセスを見れないようにします。 * `hide_gids` - 他のグループが実行しているプロセスを隠します。 特権のないユーザが、他のグループ (GID) により実行されているプロセスを見れないようにします。 * `hide_jail` - jail で実行中のプロセスを隠します。 特権のないユーザが、jail の中で実行されているプロセスを見れないようにします。 * `read_msgbuf` - 権限のないユーザが、カーネルメッセージバッファを読めなくします。 権限のないユーザが、man:dmesg[8] を使ってカーネルログバッファのメッセージを見れないようにします。 * `proc_debug` - 権限のないユーザ対するプロセスデバッキング機能を無効にします。 `ptrace()` および `ktrace()` といった procfs 機能を含む、権限のないプロセス間のデバッキングサービスを無効にします。 このオプションによって、PHP などのスクリプト言語に対する組み込みのデバッキング機能と同様に、man:lldb[1], man:truss[1] および man:procstat[1] などの権限のないユーザによるデバッキングツールも無効になります。 * `random_pid` - プロセスの PID をランダム化します。 * `clear_tmp` - システムの起動時に `/tmp` を空にします。 * `disable_syslogd` - syslogd ネットワークソケットを閉じます。 デフォルトでは、FreeBSD は syslogd を `-s` を使った安全な方法で実行します。 これは、外からのポート 514 に対する UDP リクエストを待機しません。 このオプションを有効にすると、syslogd を `-ss` 付きで実行します。 これにより、syslogd は空いているどのポートからも受け付けません。 詳細は、man:syslogd[8] をご覧ください。 * `disable_sendmail` - sendmail MTA を無効にします。 * `secure_console` - シングルユーザモードに入る際に、コマンドプロンプトに対して `root` パスワードが必要となります。 * `disable_ddtrace` - DTrace は、 実行中のカーネルに影響を及ぼすモードで実行できます。 破壊的なアクションは、明示的に有効にしない限りは利用できません。 このオプションを有効にするには、DTrace を実行する際に `-w` を使ってください。 詳細については man:dtrace[1] をご覧ください。 * `enable_aslr` - アドレス空間配置のランダム化を有効にします。アドレス空間配置のランダム化の詳細については link:https://en.wikipedia.org/wiki/Address_space_layout_randomization[Wikipedia article] をご覧ください。 [[bsdinstall-addusers]] === ユーザの追加 次のメニューでは、少なくとも一人のユーザを追加してください。 システムには `root` ではなく、ユーザアカウントでログインすることが推奨されています。 `root` 権限でログインすると、実行に対して制限がなく、また、保護されません。 通常のユーザでログインすることにより、 安全でセキュリティ的に危険が少なくなります。 btn:[Yes] を選択し、 新しいユーザを追加してください。 [[bsdinstall-add-user1]] .新しいユーザのアカウントの作成 image::bsdinstall-adduser1.png[システムにユーザを作成するか選択するメニュー] プロンプトに従い、 ユーザアカウントの作成で必要となる情報を入力してください。 <> で示されている例では、`asample` ユーザアカウントを作成します。 [[bsdinstall-add-user2]] .ユーザ情報の入力 image::bsdinstall-adduser2.png[追加するユーザの情報を入力しているメニュー] 以下は、入力情報のまとめです。 * `Username` - ログイン時のユーザ名を入力します。一般的な慣習では、 ファーストネームの最初の文字とラストネームを、 ユーザ名がシステムで一意的になる長さで組み合わせます。 ユーザ名は、大文字と小文字を区別し、 空白を含んではいけません。 * `Full name` - ユーザのフルネーム。 空白を含むことは可能です。 また、この情報はユーザアカウントの説明の記述に使われます。 * `Uid` - ユーザ ID 番号。 通常は、システムが自動的に割り当てるように、 空欄のままにします。 * `Login group` - 新しいユーザのログイングループ。 空欄のままにすると、デフォルトに割り当てられます * `Invite _user_ into other groups?` - ユーザを別のグループのメンバーとして追加するかどうか。 ユーザが管理者としてのアクセス必要であれば、 ここで `wheel` を入力してください。 * `Login class` - 空欄にするとデフォルトの設定になります。 * `Shell` - 一覧の中から、ユーザのシェルを入力してください。 シェルに関する詳細については crossref:basics[shells, シェル] をご覧ください。 * `Home directory` - ユーザのホームディレクトリ。 通常は、デフォルトの場所が適切です。 * `Home directory permissions` - ユーザのホームディレクトリの権限。 通常は、デフォルトが適切です。 * `Use password-based authentication?` - 通常は、ユーザがログイン時にパスワードの入力が要求されるように `yes` と入力してください。 * `Use an empty password?` - 空のパスワードは安全ではないので、通常は `no` です。 * `Use a random password?` - 通常は、次のプロンプトでユーザ自身のパスワードを入力できるように、 `no` です。 * `Enter password` - ユーザのパスワードです。入力している文字は画面に表示されません。 * `Enter password again` - 確認のため、パスワードをもう一度入力します。 * `Lock out the account after creation?` - 通常は、ユーザがログインできるようにするため、 `no` です。 すべての詳細を入力したら、サマリが表示され、 正しいかどうかの確認を求められます。 入力した情報に間違いがあれば、 `no` を入力して修正してください。 すべてが正しく入力されていれば、 `yes` を入力して新しいユーザを作成してください。 [[bsdinstall-add-user3]] .ユーザおよびグループの管理を終了する image::bsdinstall-adduser3.png[追加するユーザの情報が正しかを確認しているメニュー] さらにユーザを追加するのであれば、 `Add another user?` の質問に対し、 `yes` を入力してください。 `no` を入力すると、ユーザの追加が終わり、次に進みます。 ユーザの追加や、ユーザ管理の詳細については、 crossref:basics[users-synopsis, ユーザと基本的なアカウント管理] を参照してください。 [[bsdinstall-final-conf]] === 最後の設定 すべてをインストールし、設定が終わった後に、 最後に設定を修正する機会が与えられます。 [[bsdinstall-final-config]] image::bsdinstall-finalconfiguration.png[インストールを終わる前に、ユーザを追加したり、タイムゾーンなどを設定するためのメニュー] インストールを完了する前に、このメニューを使って変更、または、追加の設定を行なってください。 .最終の設定オプション * `Add User` - <> で説明しています。 * `Root Password` - <> で説明しています。 * `Hostname` - <> で説明しています。 * `Network` - <> で説明しています。 * `Services` - <> で説明しています。 * `System Hardening` - <> で説明しています。 * `Time Zone` - <> で説明しています。 * `Handbook` - FreeBSD ハンドブックのダウンロードとインストール。 設定が完了したら、btn:[Exit] を選んでください。 [[bsdinstall-final-modification-shell]] .Manual Configuration image::bsdinstall-final-modification-shell.png[インストールが終わり、追加でシェルを開いて手動で変更を行うかどうかを確認しているメニュー] 新しいシステムを再起動する前に、 bsdinstall は追加の設定が必要かどうかを尋ねてきます。 btn:[Yes] を選択して新しいシステムのシェルに入るか、または btn:[No] を選択して、インストールの最後のステップに進んでください。 [[bsdinstall-final-main]] .インストールの終了 image::bsdinstall-mainexit.png[インストールが終了し、システムを再起動するか、Live CD にアクセスするかを選択するメニュー] 追加の設定や、特別なセットアップが必要であれば、 btn:[Live CD] を選んでインストールメディアを Live CD で起動してください。 インストールが終わったら、 btn:[Reboot] を選んで、 コンピュータを再起動し、新しい FreeBSD システムで起動してください。 再起動する前には、忘れずに FreeBSD インストールメディアを外してください。 さもないと、もう一度インストールメディアから起動してしまいます。 FreeBSD の起動時には、多くのメッセージが画面に表示されます。 システムの起動後には、ログインプロンプトが表示されます。 `login:` プロンプトで、インストール時に追加したユーザ名を入力してください。 `root` でのログインは避けてください。 管理者の権限が必要となった時に、スーパユーザになる方法については、crossref:basics[users-superuser, スーパーユーザアカウント] を参照してください。 起動時に表示されていたメッセージは、 kbd:[Scroll-Lock] を押し、scroll-back buffer で見ることができます。 kbd:[PgUp], kbd:[PgDn] そして矢印キーでメッセージをスクロールバックできます。 メッセージの確認が終わったら、kbd:[Scroll-Lock] をもう一度押すと、ディスプレイのロックを外し、 コンソールに戻ることができます。 何度かシステムを起動した後で、これらのメッセージを見るには、コマンドプロンプトから `less /var/run/dmesg.boot` と入力してください。 確認後に kbd:[q] を押すと、 コマンドラインに戻ります。 <> で sshd を有効に設定した場合には、最初の起動時にシステムが SSH ホストキーを生成するため、少々時間がかかるかもしれません。 その後の起動はより速くなるでしょう。 鍵のフィンガープリントは、以下の例のように表示されます。 [source,shell] .... Generating public/private rsa1 key pair. Your identification has been saved in /etc/ssh/ssh_host_key. Your public key has been saved in /etc/ssh/ssh_host_key.pub. The key fingerprint is: 10:a0:f5:af:93:ae:a3:1a:b2:bb:3c:35:d9:5a:b3:f3 root@machine3.example.com The key's randomart image is: +--[RSA1 1024]----+ | o.. | | o . . | | . o | | o | | o S | | + + o | |o . + * | |o+ ..+ . | |==o..o+E | +-----------------+ Generating public/private dsa key pair. Your identification has been saved in /etc/ssh/ssh_host_dsa_key. Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub. The key fingerprint is: 7e:1c:ce:dc:8a:3a:18:13:5b:34:b5:cf:d9:d1:47:b2 root@machine3.example.com The key's randomart image is: +--[ DSA 1024]----+ | .. . .| | o . . + | | . .. . E .| | . . o o . . | | + S = . | | + . = o | | + . * . | | . . o . | | .o. . | +-----------------+ Starting sshd. .... フィンガープリントおよび SSH についての詳細については、crossref:security[openssh,OpenSSH] をご覧ください。 FreeBSD はデフォルトでは、グラフィカルな環境をインストールしません。 グラフィカルなウィンドウマネージャのインストール、 および設定に関するより多くの情報については、 crossref:x11[x11,X Window System] をご覧ください。 適切に FreeBSD をシャットダウンすることは、 ハードウェアをダメージから守ったり、データの保護につながります。 __システムを適切にシャットダウンする前に、 電源を落すということはしないでください!__``wheel`` グループのメンバとなっているユーザは、 コマンドラインから `su` と入力し、 `root` のパスワードを入力してスーパユーザとなってください。 その後、`shutdown -p now` と入力すると、システムは正しくシャットダウンし、 ハードウェアが対応していれば、電源が落ちます。 [[bsdinstall-install-trouble]] == トラブルシューティング この章では、インストールの際の、 これまで報告された共通の問題に対する解決のための情報が書いてあります。 link:https://www.FreeBSD.org/ja/releases/[FreeBSD リリース情報] ページにあるインストールする FreeBSD のバージョンのハードウェアノートを調べて、 使用しているハードウェアに対応しているかどうかを確認してください。 [NOTE] ==== いくつかのインストール上の問題は、さまざまなハードウェア装置、 特にマザーボードのファームウェアのアップデートで回避または緩和することができます。 マザーボードのファームウェアは、通常 BIOS と呼ばれます。 多くのマザーボードまたはコンピュータ製造メーカーは、 アップデートやアップグレード情報を載せているウェブサイトを用意しています。 通常、製造メーカーは、 重要な更新のようなそれなりの理由がない限り、マザーボードの BIOS のアップグレードは行わないよう推奨しています。 アップデートの過程で失敗する__可能性があり__、 その場合 BIOS が不完全な状態になり、 コンピュータが動作しない原因となり得るからです。 ==== システムの起動時に、ハードウェアの検出中にシステムが固まったり、インストールプロセスでおかしな振る舞いをする場合には、ACPI が原因の可能性があります。 i386 および amd64 プラットフォームにおいて、 FreeBSD はシステムの設定を手助けするシステム ACPI サービスを、 起動時に検出された場合に広く使います。 残念ながら、まだいくつかの不具合が、 ACPI ドライバとシステムのマザーボードおよび BIOS ファームウェア両方に存在しています。 起動ステージ 3 において、ヒント情報 `hint.acpi.0.disabled` を以下のように設定すると ACPI を無効にできます。 [source,shell] .... set hint.acpi.0.disabled="1" .... この設定はシステムが起動するたびにリセットされるので、`/boot/loader.conf` ファイルに `hint.acpi.0.disabled="1"` を追加する必要があります。 ブートローダのより詳しい情報については crossref:boot[boot-synopsis,FreeBSD の起動のプロセス] で説明します。 [[using-live-cd]] == Live CD を使う <> で示されている bsdinstall のウェルカムメニューは、 btn:[Live CD] オプションを提供します。 これは、 オペレーティングシステムに FreeBSD を使うべきかどうか迷っていて、 インストール前に機能を試して見たいと思っている方に有用です。 btn:[Live CD] を使う際は、以下のことに気をつけてください。 * システムにアクセスする際には、認証を求められます。 ユーザ名は `root`、 パスワードは空欄としてください。 * システムはインストールメディアから直接起動するので、 ハードディスクにインストールされたシステムに比べ、 パフォーマンスはかなり遅い可能性があります。 * このオプションのユーザインタフェースは、 コマンドプロンプトのみです。 グラフィカルなユーザインタフェースではありません。