The translation is temporarily closed for contributions due to maintenance, please come back later.

Source string Read only

(itstool) path: sect2/para
Context English State
When the network interface driver is known, it is more convenient to use <filename>conf/rc.conf</filename> for networking options. The syntax of this file is the same as the one used in the standard <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> file of FreeBSD.
For example, if you know that a <citerefentry><refentrytitle>re</refentrytitle><manvolnum>4</manvolnum></citerefentry> network interface is going to be available, you can set the following options in <filename>conf/rc.conf</filename>:
defaultrouter="192.168.0.1"
ifconfig_re0="inet 192.168.0.2/24"
Building an <application>mfsBSD</application> Image
The process of building an <application>mfsBSD</application> image is pretty straightforward.
The first step is to mount the FreeBSD installation <acronym>CD</acronym>, or the installation <acronym>ISO</acronym> image to <filename>/cdrom</filename>. For the sake of example, in this article we will assume that you have downloaded the FreeBSD 10.1-RELEASE <acronym>ISO</acronym>. Mounting this ISO image to the <filename>/cdrom</filename> directory is easy with the <citerefentry><refentrytitle>mdconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry> utility:
<prompt>#</prompt> <userinput>mdconfig -a -t vnode -u 10 -f <replaceable>FreeBSD-10.1-RELEASE-amd64-disc1.iso</replaceable></userinput>
<prompt>#</prompt> <userinput>mount_cd9660 /dev/md10 /cdrom</userinput>
Since the recent FreeBSD releases do not contain regular distribution sets, it is required to extract the FreeBSD distribution files from the distribution archives located on the <acronym>ISO</acronym> image:
<prompt>#</prompt> <userinput>mkdir <replaceable>DIST</replaceable></userinput>
<prompt>#</prompt> <userinput>tar -xvf /cdrom/usr/freebsd-dist/base.txz -C <replaceable>DIST</replaceable></userinput>
<prompt>#</prompt> <userinput>tar -xvf /cdrom/usr/freebsd-dist/kernel.txz -C <replaceable>DIST</replaceable></userinput>
Next, build the bootable <application>mfsBSD</application> image:
<prompt>#</prompt> <userinput>make BASE=<replaceable>DIST</replaceable></userinput>
The above <command>make</command> has to be run from the top level of the <application>mfsBSD</application> directory tree, for example <filename>~/mfsbsd-2.1/</filename>.
Booting <application>mfsBSD</application>
Now that the <application>mfsBSD</application> image is ready, it must be uploaded to the remote system running a live rescue system or pre-installed <trademark class="registered">Linux</trademark> distribution. The most suitable tool for this task is <application>scp</application>:
<prompt>#</prompt> <userinput>scp disk.img root@192.168.0.2:.</userinput>
To boot <application>mfsBSD</application> image properly, it must be placed on the first (bootable) device of the given machine. This may be accomplished using this example providing that <filename>sda</filename> is the first bootable disk device:
<prompt>#</prompt> <userinput>dd if=/root/disk.img of=/dev/sda bs=1m</userinput>
If all went well, the image should now be in the <acronym>MBR</acronym> of the first device and the machine can be rebooted. Watch for the machine to boot up properly with the <citerefentry><refentrytitle>ping</refentrytitle><manvolnum>8</manvolnum></citerefentry> tool. Once it has came back on-line, it should be possible to access it over <citerefentry><refentrytitle>ssh</refentrytitle><manvolnum>1</manvolnum></citerefentry> as user <systemitem class="username">root</systemitem> with the configured password.
Installation of the FreeBSD Operating System
The <application>mfsBSD</application> has been successfully booted and it should be possible to log in through <citerefentry><refentrytitle>ssh</refentrytitle><manvolnum>1</manvolnum></citerefentry>. This section will describe how to create and label slices, set up <application>gmirror</application> for RAID-1, and how to use <application>sysinstall</application> to install a minimal distribution of the FreeBSD operating system.
Preparation of Hard Drives
The first task is to allocate disk space for FreeBSD, i.e.: to create slices and partitions. Obviously, the currently running system is fully loaded in system memory and therefore there will be no problems with manipulating hard drives. To complete this task, it is possible to use either <application>sysinstall</application> or <citerefentry><refentrytitle>fdisk</refentrytitle><manvolnum>8</manvolnum></citerefentry> in conjunction to <citerefentry><refentrytitle>bsdlabel</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
At the start, mark all system disks as empty. Repeat the following command for each hard drive:
<prompt>#</prompt> <userinput>dd if=/dev/zero of=/dev/<replaceable>ad0</replaceable> count=2</userinput>
Next, create slices and label them with your preferred tool. While it is considered easier to use <application>sysinstall</application>, a powerful and also probably less buggy method will be to use standard text-based <trademark class="registered">UNIX</trademark> tools, such as <citerefentry><refentrytitle>fdisk</refentrytitle><manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>bsdlabel</refentrytitle><manvolnum>8</manvolnum></citerefentry>, which will also be covered in this section. The former option is well documented in the <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/install-steps.html">Installing FreeBSD</link> chapter of the FreeBSD Handbook. As it was mentioned in the introduction, this article will present how to set up a system with RAID-1 and <application>ZFS</application> capabilities. Our set up will consist of a small <citerefentry><refentrytitle>gmirror</refentrytitle><manvolnum>8</manvolnum></citerefentry> mirrored <filename>/</filename> (root), <filename>/usr</filename> and <filename>/var</filename> dataset, and the rest of the disk space will be allocated for a <citerefentry><refentrytitle>zpool</refentrytitle><manvolnum>8</manvolnum></citerefentry> mirrored <application>ZFS</application> file system. Please note, that the <application>ZFS</application> file system will be configured after the FreeBSD operating system is successfully installed and booted.
The following example will describe how to create slices and labels, initialize <citerefentry><refentrytitle>gmirror</refentrytitle><manvolnum>8</manvolnum></citerefentry> on each partition and how to create a <application>UFS2</application> file system in each mirrored partition:
<prompt>#</prompt> <userinput>fdisk -BI /dev/ad0</userinput> <co xml:id="fdisk"/>
<prompt>#</prompt> <userinput>fdisk -BI /dev/ad1</userinput>
<prompt>#</prompt> <userinput>bsdlabel -wB /dev/ad0s1</userinput> <co xml:id="bsdlabel-writing"/>
<prompt>#</prompt> <userinput>bsdlabel -wB /dev/ad1s1</userinput>
<prompt>#</prompt> <userinput>bsdlabel -e /dev/ad0s1</userinput> <co xml:id="bsdlabel-editing"/>
<prompt>#</prompt> <userinput>bsdlabel /dev/ad0s1 &gt; /tmp/bsdlabel.txt &amp;&amp; bsdlabel -R /dev/ad1s1 /tmp/bsdlabel.txt</userinput> <co xml:id="bsdlabel-restore"/>
<prompt>#</prompt> <userinput>gmirror label root /dev/ad[01]s1a</userinput> <co xml:id="gmirror1"/>
<prompt>#</prompt> <userinput>gmirror label var /dev/ad[01]s1d</userinput>
<prompt>#</prompt> <userinput>gmirror label usr /dev/ad[01]s1e</userinput>
<prompt>#</prompt> <userinput>gmirror label -F swap /dev/ad[01]s1b</userinput> <co xml:id="gmirror2"/>
<prompt>#</prompt> <userinput>newfs /dev/mirror/root</userinput> <co xml:id="newfs"/>
<prompt>#</prompt> <userinput>newfs /dev/mirror/var</userinput>
<prompt>#</prompt> <userinput>newfs /dev/mirror/usr</userinput>
Create a slice covering the entire disk and initialize the boot code contained in sector 0 of the given disk. Repeat this command for all hard drives in the system.
Write a standard label for each disk including the bootstrap code.
Now, manually edit the label of the given disk. Refer to the <citerefentry><refentrytitle>bsdlabel</refentrytitle><manvolnum>8</manvolnum></citerefentry> manual page in order to find out how to create partitions. Create partitions <literal>a</literal> for <filename>/</filename> (root) file system, <literal>b</literal> for swap, <literal>d</literal> for <filename>/var</filename>, <literal>e</literal> for <filename>/usr</filename> and finally <literal>f</literal> which will later be used for <application>ZFS</application>.
Import the recently created label for the second hard drive, so both hard drives will be labeled in the same way.

Loading…

No matching activity found.

Browse all component changes

Source information

Source string comment
(itstool) path: sect2/para
Flags
read-only
Source string location
article.translate.xml:282
String age
a year ago
Source string age
a year ago
Translation file
articles/remote-install.pot, string 55