]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml
This commit was generated by cvs2svn to compensate for changes in r165670,
[FreeBSD/FreeBSD.git] / release / doc / en_US.ISO8859-1 / installation / sparc64 / install.sgml
1 <!--
2
3 $FreeBSD$
4
5 This file contains sparc64-specific installation instructions.
6
7 -->
8
9 <sect1 id="install">
10   <title>Installing &os;</title>
11
12   <para>This text describes how to install and boot the &arch; port.
13     Users of this port are encouraged to subscribe to the
14     &a.sparc;.</para>
15
16   <warning>
17     <para>The kernel and userland binaries mentioned below are highly
18       experimental (for example, the kernel contains some ATA changes
19       and EEPROM handling code which could potentially be dangerous).
20       Unless you know what you are doing and are willing to cope with
21       any damage that might arise, you should probably not be trying
22       this.</para>
23   </warning>
24
25   <para>Unlike &os;/i386 or &os;/alpha, there is no version of
26     &man.sysinstall.8; for &os;/&arch;.  The installation procedure
27     consists of loading a kernel (either from CDROM or the network)
28     onto the &arch; machine, with a root filesystem on CDROM or
29     exported via NFS.  The utilities on the root filesystem can then
30     be used to partition the local disk on the &arch; machine and
31     optionally to copy the &os; distribution to the local disk to make
32     a stand-alone machine.</para>
33
34   <para>Currently, there are two ways to install &os;/&arch; on a new
35     machine.  By far the easier of the two is to install from CDROM;
36     this method allows you to install &os; without any dependencies on
37     any other computers.</para>
38
39   <para>If installing from CDROM is impossible or undesirable, the
40     alternative is to install over the network.  This requires another
41     machine, suitably configured, to serve the boot loader, kernel,
42     and root filesystem to the new machine, via a combination of
43     RARP, TFTP, and either BOOTP or DHCP.  This netboot server can be
44     another &os; machine, but is not required to be.</para>
45
46   <para>You will need to decide which of these methods you want to use
47     for installation, as this will determine the set of files you need
48     to download (if any), as well as the steps required to do the
49     installation.</para>
50
51 <!-- this should read "in this document" after the re-structure -->
52
53   <important>
54     <para>The URLs in this section are provisional and subject to
55       change.  Please see the archives of the &a.sparc; for the most
56       recent locations of files.  This notice will be removed when
57       more permanent URLs have been determined.</para>
58   </important>
59
60   <sect2 id="getting-to-prom-prompt">
61     <title>Getting to the PROM Prompt</title>
62
63     <para>Most &arch; systems are set up to boot automatically from
64       disk.  To install &os;, you need to boot over the network or
65       from a CDROM, which requires you to break into the PROM
66       (OpenFirmware).</para>
67
68     <para>To do this, reboot the system, and wait until the boot
69       message appears.  It depends on the model, but should look about
70       like:</para>
71
72     <screen>Sun Blade 100 (UltraSPARC-IIe), Keyboard Present
73 Copyright 1998-2001 Sun Microsystems, Inc.  All rights reserved.
74 OpenBoot 4.2, 128 MB memory installed, Serial #51090132.
75 Ethernet address 0:3:ba:b:92:d4, Host ID: 830b92d4.</screen>
76
77     <para>If your system proceeds to boot from disk at this point, you
78       need to press <keycombo
79       action="simul"><keycap>L1</keycap><keycap>A</keycap></keycombo>
80       or <keycombo
81       action="simul"><keycap>Stop</keycap><keycap>A</keycap></keycombo>
82       on the keyboard, or send a <command>BREAK</command> over the
83       serial console (using for example <command>~#</command> in
84       &man.tip.1; or &man.cu.1;) to get to the PROM prompt.  It looks
85       like this:</para>
86
87     <screenco>
88       <areaspec>
89         <area id="prompt-single" coords="1 5">
90         <area id="prompt-smp" coords="2 5">
91       </areaspec>
92
93       <screen><prompt>ok     </prompt>
94 <prompt>ok {0} </prompt></screen>
95
96       <calloutlist>
97         <callout arearefs="prompt-single">
98           <para>This is the prompt used on systems with just one
99             CPU.</para>
100         </callout>
101
102         <callout arearefs="prompt-smp">
103           <para>This is the prompt used on SMP systems, the digit
104             indicates the number of the active CPU.</para>
105         </callout>
106       </calloutlist>
107     </screenco>
108   </sect2>
109
110   <sect2 id="prepare-cd">
111     <title>Preparing for a CDROM Installation</title>
112
113     <para>If you want to do a CDROM installation, an ISO image with a
114       snapshot of &os;/&arch; can be found at <ulink
115       url="&release.url;"></ulink>.  This file can be used to create a
116       bootable CDROM which contains everything necessary to boot and
117       load at least a minimal &os; installation.</para>
118
119 <!-- XXX ISO location?-->
120     <para>Place the CDROM into your drive, and break into the PROM as
121       described above.  On the PROM prompt, type <command>boot
122       cdrom</command>.  The system should boot into single-user mode
123       now, and you can create the disk label and install the base
124       system archive as described in <xref
125       linkend="creating-disk-label"> and <xref
126       linkend="creating-root-filesystem">.</para>
127   </sect2>
128
129   <sect2 id="prepare-network">
130     <title>Preparing for a Network Installation</title>
131
132     <para>A &os;/&arch; kernel is booted by having the firmware
133       retrieve and execute a <application>loader</application>, which
134       in turn fetches and executes the actual kernel.  For this boot
135       process, you need to set up &man.rarpd.8; and &man.tftpd.8; (for
136       the firmware) and &man.bootpd.8; (for the
137       <application>loader</application>) on another networked system.
138       The loader can fetch a kernel using TFTP or NFS.  All of this is
139       covered in detail below.</para>
140
141     <sect3 id="downloading">
142       <title>Getting the Required Files</title>
143
144       <para>For a network installation, you will need several files.
145         First, you will need to download a &os;/&arch; loader for
146         &man.tftpd.8; to serve to your &arch; client.  The loader will
147         use either TFTP or NFS to retrieve the &os; kernel from the
148         netboot server.  There is a separate loader for each of these
149         methods (i.e. a loader for TFTP and a loader for NFS).  You
150         should download one of the following files, as
151         appropriate:</para>
152
153       <itemizedlist>
154         <listitem>
155           <para><ulink
156             url="&release.url;loader-tftp.gz"></ulink></para>
157         </listitem>
158
159         <listitem>
160           <para><ulink
161             url="&release.url;loader-nfs.gz"></ulink></para>
162         </listitem>
163       </itemizedlist>
164
165       <para>A network installation also requires a kernel to be served
166         to the netboot client.  A suitable kernel can be found at
167         <ulink url="&release.url;"></ulink>.</para>
168 <!-- XXX kernel filename?-->
169
170       <para>Finally, you will need a &man.tar.1; archive which
171         contains the binaries and configuration files from the base
172         system.  This file is available from <ulink
173         url="&release.url;distrib.tar.gz"></ulink>.</para>
174     </sect3>
175
176 <!-- put the words "netboot server" in here -->
177     <sect3>
178       <title>rarpd</title>
179
180       <para>You need to add the Ethernet address of your &os;/&arch;
181         system to <filename>/etc/ethers</filename> on the netboot
182         server.  An entry looks like:</para>
183
184       <programlisting>0:3:ba:b:92:d4 your.host.name</programlisting>
185
186       <para>The Ethernet address is usually displayed in the boot
187         message.</para>
188
189       <para>Make sure <hostid>your.host.name</hostid> is in
190         <filename>/etc/hosts</filename> or has a valid DNS entry (or
191         use an IP address).  Then, start &man.rarpd.8; on a network
192         interface that is on the same subnet as the &os;/&arch;
193         system.</para>
194     </sect3>
195
196 <!-- put the words "netboot server" in here -->
197     <sect3>
198       <title>tftpd</title>
199
200       <para>Activate &man.tftpd.8; in your &man.inetd.8;
201         configuration by uncommenting the following line in
202         <filename>/etc/inetd.conf</filename>:</para>
203
204       <programlisting>tftp dgram udp  wait nobody /usr/libexec/tftpd tftpd /tftpboot</programlisting>
205
206       <para>Copy the unpacked loader to your
207         <filename>/tftpboot</filename> directory, and name it with the
208         &os;/&arch; host's IP address in upper-case hexadecimal
209         notation without dots (or use appropriately-named symbolic
210         links).  For example, your setup may look like this, for an IP
211         address of <hostid>192.168.0.16</hostid>:</para>
212
213       <screen>  lrwx------  1 tmm users       9 Jul 24 17:05 /tftpboot/C0A80010 -> boot/loader
214   -rw-r--r--  1 tmm users 1643021 Oct 20 18:04 /tftpboot/boot/loader</screen>
215
216       <para>If you have trouble booting, it is very helpful to use
217         &man.tcpdump.1; to monitor the TFTP requests.  This will allow
218         you to see the file name you need to use for the loader.
219         Error replies by the TFTP server are most often due to
220         incorrect file permissions.</para>
221     </sect3>
222
223 <!-- put the words "netboot server" in here -->
224     <sect3>
225       <title>Setting up bootpd/dhcpd</title>
226
227       <para>You can use either BOOTP or DHCP (both not both) to
228         provide some parameters to the boot loader, such as a
229         machine's IP address.  If you are using another &os; machine
230         as a netboot server, the BOOTP functionality is provided by
231         &man.bootpd.8;, which is a part of the &os; base system.
232         Several DHCP servers are provided in the &os; Ports
233         Collection.</para>
234
235       <para>If you are going to use &man.bootpd.8;, create entries for
236         your &os;/&arch; system in the server's
237         <filename>/etc/bootptab</filename> (see &man.bootptab.5; for
238         more details):</para>
239
240       <programlisting>.default:\
241   :bf="kernel":dn=local:ds=<replaceable>name-server-ip-address</replaceable>:\
242   :gw=<replaceable>gateway-ip-address</replaceable>:ht=ether:hd="/tftpboot/boot/kernel":hn:\
243   :sa="<replaceable>tftp-server-ip-address</replaceable>":\
244   :rp="<replaceable>tftp-server-ip-address</replaceable>:<replaceable>nfs-root-directory</replaceable>":\
245   :sm=<replaceable>ip-netmask</replaceable>
246
247 <replaceable>name-of-the-entry</replaceable>:\
248   ha=<replaceable>sparc64-ethernet-address</replaceable>:ip=<replaceable>sparc64-ip-address</replaceable>:tc=.default</programlisting>
249
250       <para>The Ethernet address must be the same as the one in the
251         TFTP example above, but it is specified hexadecimal notation
252         without colons (for the example above, this would be
253         <literal>0003ba0b92d4</literal>).  NFS/TFTP specific entries
254         can be omitted if the given method is not used.  The strings
255         given in the <literal>hd</literal> and <literal>bf</literal>
256         properties are concatenated to give the boot file name.  If
257         your kernel is named differently or you use another directory,
258         change these values as required.  If you are booting using
259         NFS, remove the <literal>bf</literal> and
260         <literal>hd</literal> settings (or change them to specify the
261         directory and file inside the NFS root hierarchy in which the
262         kernel will reside).  The name of the host entry is
263         conventionally the host name without the domain
264         appended.</para>
265
266       <para>For a DHCP server, add an entry similar to the following
267         to your <filename>dhcpd.conf</filename> file.  An example
268         entry for <application>ISC DHCP</application> version 2
269         (available in the &os; Ports Collection as <filename
270         role="package">net/isc-dhcp2</filename>) is shown
271         below:</para>
272
273       <programlisting>host <replaceable>name-of-entry</replaceable> {
274   hardware ethernet <replaceable>sparc64-ethernet-address</replaceable>;
275   option host-name "<replaceable>sparc64-fully-qualified-domain-name</replaceable>";
276   fixed-address <replaceable>sparc64-ip-address</replaceable>;
277   always-reply-rfc1048 on;
278   filename "kernel";
279   option root-path "<replaceable>tftp-server-ip-address</replaceable>:<replaceable>nfs-root-directory</replaceable>";
280 }</programlisting>
281
282       <para>The <literal>filename</literal> option corresponds to the
283         concatenation of <literal>hd</literal> and
284         <literal>bf</literal> in <filename>/etc/bootptab</filename>.
285         The Ethernet address is specified in hexadecimal with colons,
286         just like in the &man.rarpd.8; example above.
287         <literal>options root-path</literal> corresponds to
288         <literal>rp</literal> in <filename>/etc/bootptab</filename>.
289         If the name given in <literal>option host-name</literal> is
290         resolvable, i.e. has a DNS entry or is associated with an
291         address in <filename>/etc/hosts</filename>, the
292         <literal>fixed-address</literal> specification can be
293         omitted.</para>
294     </sect3>
295
296     <sect3>
297       <title>Loading the Kernel</title>
298
299       <para>With the daemons on the netboot server configured, the
300         next step is to copy the kernel (obtained during the steps of
301         <xref linkend="downloading">) to an appropriate directory.
302         There are two ways of retrieving a kernel over the network:
303         TFTP and NFS.  (You specified one of these two alternatives by
304         picking a loader.)</para>
305
306       <para>For both TFTP and NFS, the loader will use the parameters
307         that it obtained via BOOTP or DHCP to find the kernel.</para>
308
309       <sect4>
310         <title>Loading the Kernel over TFTP</title>
311
312         <para>Place the kernel in the directory you specified using
313           <literal>bf</literal> and <literal>hd</literal> in the
314           <filename>/etc/bootptab</filename> or the
315           <literal>filename</literal> parameter to
316           <filename>dhcpd.conf</filename>.</para>
317       </sect4>
318
319       <sect4>
320         <title>Loading the Kernel over NFS</title>
321
322         <para>Export the directory that was specified by the
323           <literal>rp</literal> property in
324           <filename>/etc/bootptab</filename> or the
325           <literal>root-path</literal> parameter in
326           <filename>dhcpd.conf</filename> (see &man.exports.5;).  Copy
327           the kernel to the directory you specified using
328           <literal>bf</literal> and <literal>hd</literal> in the
329           <filename>/etc/bootptab</filename> or the
330           <literal>filename</literal> parameter to
331           <filename>dhcpd.conf</filename>.</para>
332       </sect4>
333     </sect3>
334
335     <sect3>
336       <title>Loading the Base System to the Netboot Server</title>
337
338       <para>You must extract the base system distribution image to the
339         NFS root directory specified either by the
340         <literal>rp</literal> option in
341         <filename>/etc/bootptab</filename> or the
342         <literal>root-path</literal> option in
343         <filename>dhcpd.conf</filename>.  This directory tree will
344         become the &arch;'s root filesystem once the kernel is booted.
345         Besides providing a normal userland environment, it also
346         contains all of the necessary utilities for you to install the
347         distribution on the &arch; client's local disk.</para>
348
349       <para>Using whatever editing tools you have on the netboot
350         server, you probably will want to edit the &arch;'s
351         <filename>/etc/fstab</filename> and
352         <filename>/etc/rc.conf</filename> and set a
353         <username>root</username> password.</para>
354     </sect3>
355
356     <sect3>
357       <title>Booting</title>
358
359       <para>If all goes well, you can now boot the &os; on your &arch;
360         machine by dropping into the PROM prompt as described in <xref
361         linkend="getting-to-prom-prompt">.  Now, just type
362         <command>boot net</command> and the system should boot.
363         Specifically, the loader is retrieved via TFTP, it then does a
364         BOOTP request and will proceed to load the kernel (either
365         using TFTP or NFS, depending on your choice of loader).  Then,
366         it should wait 10 seconds for user input and proceed to
367         execute the kernel.</para>
368
369       <para>If something does not work in between, and you suspect
370         TFTP/NFS/BOOTP problems, <application>Ethereal</application>
371         (available in the &os; Ports Collection as <filename
372         role="package"> net/ethereal</filename>) is usually helpful.
373         The most common problems are related to bad file permissions.
374         Also note that &man.rarpd.8; will not answer to packets under
375         some circumstances, refer to the manual page for
376         details.</para>
377     </sect3>
378   </sect2>
379
380   <sect2 id="creating-disk-label">
381     <title>Creating a Disk Label</title>
382
383     <para>The kernel supports the Sun disk label format, so you can
384       label the disks you want to use with &os; from Solaris.</para>
385
386     <para>&os; disk labels must currently be created by hand, as
387       &man.sysinstall.8; is not yet available on &os;/&arch;.  Please
388       refer to the <ulink
389       url="&url.books.handbook;/">&os;
390       Handbook</ulink> for more information about labels and special
391       partitions.</para>
392
393     <para>On &os;/&arch;, a Sun compatibility label is embedded in the
394       &os; label; this is needed for the PROM to boot from disk.  This
395       imposes an additional restriction on the disk label format:
396       partitions are required to start on a cylinder boundary.</para>
397
398     <para>To create a disk label, the following procedure is the
399       easiest:</para>
400
401     <procedure>
402       <step>
403         <para>Run <command>disklabel -w -r
404           <replaceable>device</replaceable> auto</command> to create a
405           basic disk label.  The third argument you need specify here
406           is just the name of the device, not the complete path to the
407           device node (e.g. <devicename>ad0</devicename> for the first
408           ATA disk).</para>
409       </step>
410
411       <step>
412         <para> Use <command>disklabel -e
413           <replaceable>device</replaceable></command> to open an
414           editor in which you can edit the disk label.  The
415           information presented to you should look like:</para>
416
417         <screen># /dev/ad6c:
418 type: unknown
419 disk: amnesiac
420 label:
421 flags:
422 bytes/sector: 512
423 sectors/track: 63
424 tracks/cylinder: 16
425 sectors/cylinder: 1008
426 cylinders: 79780
427 sectors/unit: 80418240
428 rpm: 3600
429 interleave: 1
430 trackskew: 0
431 cylinderskew: 0
432 headswitch: 0           # milliseconds
433 track-to-track seek: 0  # milliseconds
434 drivedata: 0
435
436 8 partitions:
437 #        size   offset    fstype   [fsize bsize bps/cpg]
438   c: 80418240        0    unused        0     0         # (Cyl.    0 - 79779)</screen>
439
440         <para>You can now add new partitions in the same format as the
441           already present line.  Using <literal>*</literal> in the
442           offset field makes the procedure easier; please refer to the
443           &man.disklabel.8; manual page for more information.</para>
444
445         <para>To make sure the restriction mentioned above is met, the
446           size of each partition must be a multiple of the number of
447           sectors per cylinder as shown in the information that is
448           presented in the editor (1008 in the example above).</para>
449
450         <para>When you are done, save your changes and quit the
451           editor.i This will cause the disk label to be
452           written.</para>
453
454         <warning>
455           <para>This procedure will overwrite any disk label that may
456             be already present on the disk.  Any existing filesystems
457             on this disk must have their respective partition entries
458             in the old and new label match
459             <emphasis>exactly</emphasis>, or they will be
460             lost.</para>
461         </warning>
462
463         <para>If you want to double-check that your partitions end on
464           cylinder boundaries, run <command>disklabel -e
465           <replaceable>device</replaceable></command> again.  The
466           editor will display the cylinders used by a particular
467           partition on the right hand side of the output.  If any of
468           the partitions you defined (i.e. anything except partition
469           <literal>c</literal>) shows an <literal>*</literal> next to
470           it, the partition does <emphasis>NOT</emphasis> start or end
471           on a cylinder boundary.  You <emphasis>MUST</emphasis> fix
472           these or your system will not work.</para>
473       </step>
474
475       <step>
476         <para>Use <command>disklabel -B</command> if you want to make
477           the disk bootable for &os;/&arch;.</para>
478
479         <warning>
480           <para>Using <command>disklabel -B</command> on a disk will
481             overwrite any preexisting boot block, so it will likely
482             render any other operating system installed on the same
483             disk unbootable.</para>
484         </warning>
485
486         <para>If you do not want to overwrite the boot block, it is
487           possible to load the <application>loader</application> via
488           TFTP as described above, but have it boot the kernel from
489           disk.  This requires a special loader binary, which is
490           available at <ulink
491           url="ftp://ftp.FreeBSD.org/pub/FreeBSD/development/sparc64/loader-ufs.gz"></ulink></para>
492       </step>
493     </procedure>
494   </sect2>
495
496   <sect2 id="creating-root-filesystem">
497     <title>Creating the Root Fileystem</title>
498
499     <para>If you want to boot from a local disk, you will need to
500       create a root filesystem to hold the base system binaries and
501       configuration files (and optionally other filesystems mounted
502       in places such as <filename>/usr</filename> and
503       <filename>/var</filename>).</para>
504
505     <para>The kernel contains support for Sun disklabels, so you can
506       use Solaris disks, which may even be prepared using
507       <application>newfs</application> under Solaris.  NetBSD disk
508       labels and filesystems are also usable from &os;.</para>
509
510     <warning>
511       <para>Do <emphasis>not</emphasis> run Solaris
512         <application>fsck</application> on filesystems modified by
513         &os;.  Doing so will damage the file permissions.</para>
514     </warning>
515
516     <para>To create filesystems and to install the base system, boot
517       from CDROM or via NFS and create a disk label as described in
518       <xref linkend="creating-disk-label">.</para>
519
520     <para>When booting the first time and you have not entered your
521       root partition into <filename>/etc/fstab</filename> yet, you may
522       need to specify your root partition on the mountroot prompt when
523       booting (use a format like
524       <command>ufs:<replaceable>disk</replaceable><replaceable>partition</replaceable></command>,
525       i.e. leave the slice specification out).  If the kernel does
526       automatically attempt to boot from another filesystem, press a
527       key other than <keycap>Enter</keycap> on the
528       <application>loader</application> prompt:</para>
529
530     <screen>Hit [Enter] to boot immediately, or any other key for command prompt.</screen>
531
532     <para>Then, boot the kernel using <command>boot -a -s</command>,
533       which will cause the kernel to ask you for the root partition
534       and then boot into single-user mode.  Once the root filesystem
535       has been entered into <filename>/etc/fstab</filename>, it should
536       be automatically mounted as <filename>/</filename> on the next
537       boot.</para>
538
539     <para>If you are booting over the network (via NFS), the above
540       BOOTP entries should suffice to have the kernel find and mount
541       the root filesystem via NFS.</para>
542   </sect2>
543
544   <sect2 id="installing-base-system">
545     <title>Installing the Base System</title>
546
547     <para>If you booted the kernel from the network, you downloaded a
548       &man.tar.1; archive with the base system and exported it from
549       the netboot server via NFS.  You can unpack this same archive to
550       your local disk to create a stand-alone system (remember to copy
551       the kernel over as well).</para>
552
553     <para>If you booted from CDROM, the same archive is available in
554       <filename>/root/</filename> on the CDROM.</para>
555
556     <para>Before booting the system stand-alone, you will want to edit
557       <filename>/etc/fstab</filename> and
558       <filename>/etc/rc.conf</filename> and set a
559       <username>root</username> password.</para>
560
561     <para>Note that some programs from the base system may not be
562       present in the archive, or may not work properly yet.</para>
563   </sect2>
564 </sect1>