README.inetboot
1 ===================================
2 Network Booting OpenSolaris/PowerPC
3 Noah Yan <noah.yan (a] gmail.com>
4 ===================================
5
6 Building the NFS Boot
7 ---------------------
8 Setup the build environment, also make sure to
9 export EXTRA_OPTIONS="-D__powerpc -U_BIG_ENDIAN"
10
11 Build the headers in usr/src/head/ (mainly for rpcsvc/*.h)
12 ( cd usr/src/head ; make )
13
14 Build the RPC headers for NFS in usr/src/uts/common/rpc/
15 ( cd usr/src/uts/common/rpc ; make )
16
17 Build the ppc/sys headers, mainly the msr.h file
18 ( cd usr/src/uts/ppc/sysgen ; make all )
19
20 Build and install usr/src/stand/
21 ( cd usr/src/stand ; make ; make install )
22
23 Build the nfsboot (inetboot) bits in usr/src/psm/
24 ( cd usr/src/psm ; make )
25
26 The "inetboot" binary will be in usr/src/psm/stand/boot/ppc/chrp/
27
28 NFS Boot Server Setup
29 ---------------------
30 1) Initial steps
31 Create a /export/home/boot/ directory to store all boot related files
32 and logs. We'll put the initial loader binary, in this case "inetboot",
33 in the /export/home/boot/tftpboot/ directory. The root filesystem will
34 go in /export/home/boot/nfsroot/ (e.g. platform/ppc/kernel/unix, kernel/genunix,
35 and kernel/misc/krtld).
36
37 Please note that the boot client and server MUST be on the same subnet in this setup.
38
39 2) tftpd
40 Enable the tftp service in /etc/inetd.conf
41 tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /export/home/boot/tftpboot
42
43 Start the server with /usr/sbin/inetconv, which will enable the tftpd
44 service, or use
45 svcadm enable svc:/network/tftp/udp6:default
46
47 after the first inetconv.
48
49 3) rarpd
50 Put the mac/hostname mapping for the boot client in /etc/ethers
51 01:23:45:67:89:AB boot-client
52
53 Please note that the hostname should also be set in either /etc/hosts or
54 other naming service. We put a "192.168.1.11 boot-client"
55 entry for the client and "192.168.1.10 boot-server" for the boot server
56 in out /etc/hosts file as an example.
57
58 Start the rarp daemon with a
59 /usr/sbin/in.rarpd -d bge 1
60
61 to listen the bge1 interface that is connected to the same switch as the boot client
62
63 4) bootparamd
64 Add an entry for boot client in /etc/bootparams
65 boot-client root=boot-server:/export/home/boot/nfsroot domain=your.domain.here
66
67 Start the bootparam daemon with
68 /usr/sbin/rpc.bootparamd -d
69
70 5) NFS Server and nfsroot
71 Share the nfsroot directory with an entry in /etc/dfs/dfstab
72 share -F nfs -o root=192.168.1.10 -d "Solaris NFS Root" /export/home/boot/nfsroot
73
74 and start the NFS server with an "exportfs -av", which will start the
75 NFS-related services.
76
77 Note: properly set the domain name in the nfsd config file
78 (/etc/default/nfs, the NFSMAPID_DOMAIN=your.domain.here).
79 Check dmesg(1) output for any NFS errors. Also make sure the
80 routing table is set to route the 192.168.1.0 request to bge1 interface.
81
82 Booting the Client Machine (Serial Console or VGA)
83 ------------------------------------------------------
84 Setup the serial connection:
85 tip -115200 /dev/tty00
86
87 At the OpenFirmware prompt of the boot client, find or create the ethernet device alias.
88 For example, in ODW it is "eth", in PowerMac G4 it is "ethernet", or create one:
89 devalias ethernet /pci@80000000/ethernet@D
90
91 On ODW, make sure the client-ip and server-ip addresses match the configuration
92 on the boot server. Boot the system with
93 boot eth:192.168.1.10,inetboot
94
95 On PowerMac G4 without proper setup of DHCP, boot with
96 boot ethernet:192.168.1.10,inetboot,<client-ip>;<netmask>,;<router-ip>
97
98 When the loader prompt asks for the kernel, respond with the location under
99 the NFS root filesystem you've created:
100 /platform/ppc/kernel/unix
101 README.opensolaris
1 OpenSolaris Buildable Source
2 @(#)README.opensolaris 1.46 2006/02/07 SMI
3
4
5 Note: if this is your first OpenSolaris installation, please see the
6 currently known issues section below to see the minimum build of
7 Solaris Express - Community Release required to build and install
8 OpenSolaris. Either an initial install or an upgrade will work,
9 provided you use the "Entire Distribution" metacluster.
10
11 This delivery of the Buildable Source consists of 6 pieces:
12
13 1. source tarball (on-src-DATE.tar.bz2)
14 2. encumbered binaries tarball (on-closed-bins-DATE.PLATFORM.tar.bz2)
15 3. compiler (Sun Studio 10 is the preferred compiler, and it is free
16 for OpenSolaris community members. You can also use gcc; more on
17 that below.)
18 4. ON build tools package (SUNWonbld-DATE.PLATFORM.tar.bz2)
19 5. Additional build tools, at least for SPARC
20 (opensolaris-build-extras-DATE.PLATFORM.tar.bz2)
21 6. Pre-built BFU archives (on-bfu-DATE.PLATFORM.tar.bz2)
22
23 If you just want to install the pre-built archives, you'll need the ON
24 build tools and the BFU archives. The tar file will unpack the
25 archives into archives-DATE/PLATFORM/ (e.g.,
26 archives-20050612/i386/). You should review Section A
27 (changes since the last delivery) and Section B (known issues) before
28 following the BFU instructions in the Developer's Reference
29 (http://www.opensolaris.org/os/community/onnv/devref_toc/).
30
31 If you want to build from source, you will need the source, compiler,
32 ON tools, and "extras" tools. The encumbered binaries tarball contains
33 complete binaries (libraries, kernel modules, commands) that are
34 compatible with the source. These are binaries that cannot be built
35 using only the source tarball for one reason or another. If you wish
36 to build the kernel (or some portion of it), or if you wish to build a
37 complete set of installable archives, you will want the encumbered
38 binaries.
39
40 The buildable source contains the source for our high key-strength
41 crypto, known as the Encryption Kit (SUNWcry, SUNWcryr, SUNWcryptoint).
42 Please note that certain countries restrict the redistribtuion of
43 high key-strength crypto. If you live in one of these countries,
44 it is your responsibility to ensure that you are complying with your
45 country's laws in this area.
46
47 For general questions on the buildable source, please ask on the
48 OpenSolaris Help discussion list (opensolaris-help <at> opensolaris
49 <dot> org). For detailed comments about the code, please use
50 OpenSolaris Code discussion list. Please note that the mailing lists
51 are configured to only allow posts via the web forum interface or from
52 list subscribers.
53
54
55 Currently Known Issues
56 ----------------------
57 These were some of the major known issues at the time of this
58 delivery. The most recent list is available on the OpenSolaris.org
59 website in the Nevada community at:
60 http://opensolaris.org/os/community/onnv/known_issues/
61
62 The current minimum SXCR build needed to build the OpenSolaris sources
63 is Nevada build 32.
64
65 1. The sources cannot be used to generate Solaris (pkgadd(1m))
66 packages.
67
68 2. The following make(1) targets are known not to work:
69 - make lint
70 - make check
71
72 3. Non-DEBUG kernel builds have not been tested. Systems that require
73 the ata driver are known not to work with non-DEBUG builds.
74
75 4. "Install -i" has not been tested on all platforms. It is known not
76 to work for the lw8 platform.
77
78 5. Cross-compilation between SPARC and x86 is not supported. But
79 builds on x86 systems (amd64 or i386) will build both amd64 and
80 i386 binaries.
81
82 This is unlikely to be fixed any time soon. If you want to build
83 both SPARC and x86, your choices are (a) create two workspaces, or
84 (b) access a single workspace using NFS. If you use a single
85 workspace, you'll want to do a "make clean" or "make clobber"
86 before building the other platform. Note that nightly(1) will do a
87 "make clobber" for you.
88
89 6. You may see console warnings like
90
91 Feb 26 13:55:48 magneto sshd[100804]: libpkcs11: Cannot load PKCS#11
92 library /usr/lib/security/pkcs11_softtoken_extra.so. dlerror:
93 ld.so.1: /usr/lib/ssh/sshd: fatal:
94 /usr/lib/security/pkcs11_softtoken_extra.so: open failed: No
95 such file or directory. See cryptoadm(1M). Skipping this plug-in.
96 Feb 26 13:55:48 magneto sshd[100804]: Kerberos mechanism library
97 initialization error: unknown error.
98
99 These messages can be ignored unless you need working crypto (e.g.,
100 Kerberos). To fix, change pkcs11_softtoken_extra.so to
101 pkcs11_softtoken.so in /etc/crypto/pkcs11.conf and do "svcadm
102 restart cryptosvc".
103
104 7. When BFUing, you may see error messages like
105
106 bfu: could not copy /net/greenline.eng/meta0/smf/post-5090532/kdmconfig.xml
107
108 These messages can be ignored, as long as you're BFUing on top
109 of Build 16 or later, as recommended above.
110
111 8. bfu needs to be cleaned up so that it can easily handle flag days
112 when run externally. This has been coded and mostly tested (CR
113 4865419). This will also fix the "could not copy" error messages.
114
115 9. Zones depends on SVR4 packaging data, which is not available in
116 OpenSolaris itself currently. Therefore Zones will not work unless
117 your distribution vendor provides packages. Note that BFU understands
118 Zones, so that BFUing on top of a distribution, such as Solaris Express,
119 that includes package support will work and will also update any
120 existing Zones you may have configured.
121
122 10. The Sun Java Web Console may not be enabled at first boot, leaving the
123 ZFS Administration application inaccessible. To workaround this,
124 simply start the web server manually (as root):
125
126 # /usr/sbin/smcwebserver start
127
128 If the SUNWzfsg package (the ZFS Administration application) is
129 installed, the ZFS Administration application should then be available
130 from https://<host> as mentioned earlier. The Sun
131 Java Web Console will also start automatically after subsequent
132 reboots.
133
134 Please see the following blog for more information or comments:
135 http://blogs.sun.com/roller/page/talley?entry=running_the_zfs_gui_on
136
137 11. With the integration of PSARC 2003/432 (Coherent Console) in build 33, if
138 you are using an older NVidia driver on x86, you may see the following
139 warning:
140 WARNING: terminal emulator: VIS_CONS_REV 2 (see sys/visual_io.h) of
141 console fb driver not supported
142 WARNING: consconfig: terminal emulator failed to initialize
143 If you see this, please update your NVidia driver to the latest version
144 available at: http://www.nvidia.com/object/solaris_display_1.0-8178.html
145
146 12. With the putback of PSARC 2005/754 FMA SNMP Agent & 6365742 fault
147 management data needs an SNMP interface, you must be using build 32
148 or later of SXCR in order to succesfully build from source. BFU'ing
149 should work fine; FMA will continue to work, but the new SNMP plugin
150 will not load.
151 order to succesfully
152
153 Installing from Source
154 ----------------------
155
156 Once you have downloaded the tarballs that you need, here are the
157 steps to build the sources.
158
159 Suppose you are using /export/testws as your workspace.
160
161 1. cd to /export/testws and unpack the sources and encumbered
162 binaries, e.g.,
163
164 $ bzcat on-src-DATE.tar.bz2 | tar xf -
165 $ bzcat on-closed-bins-DATE.PLATFORM.tar.bz2 | tar xf -
166
167 The sources will unpack into "usr/src" and the binaries will unpack
168 into "closed/root_PLATFORM" (i.e., closed/root_i386 or
169 closed/root_sparc).
170
171 2. Install the compiler according to the instructions at the download
172 site. (Of course, if the compilers have not changed since you last
173 installed them, there is no need to install them again.) The result
174 should have the compilers installed in /opt/SUNWspro.
175
176 If you already have the Studio 10 compiler installed, you can use
177 it, provided you have the following patches installed:
178
179 SPARC:
180 C: 117836-02
181 C++: 117830-02
182 Backend:117832-02
183
184 x86:
185 C: 117837-03
186 C++: 117831-01
187 Backend: 117846-05
188
189 You may find it easier to install the Studio 10 compilers using the
190 tarballs, rather than installing them as packages.
191
192 If you wish to use gcc, please note that the changes needed to build
193 with gcc have not yet been integrated into the OpenSolaris source
194 base. To learn what the issues are, get the necessary sources, and
195 get instructions for building with gcc, please visit the OpenSolaris
196 gcc project page (http://www.opensolaris.org/os/tools/gcc).
197
198 3a. Remove the existing onbld tools, if any.
199
200 - If this is the first time you are installing build tools, skip ahead
201 to step 3b.
202
203 - Otherwise, use pkgrm(1M) to remove the old package.
204
205 3b. Install the current onbld tools.
206
207 - The SUNWonbld package is a pkgadd-format directory that has been
208 archived using tar and bzip2. Unpack it in a temporary directory and
209 use pkgadd(1M) to install it. For example:
210
211 # cd /var/tmp
212 # bzip2 -dc /path/to/SUNWonbld-DATE.PLATFORM.tar.bz2 | tar xf -
213 # pkgadd -d onbld SUNWonbld
214
215 3c. Install the "extras" tools if needed for the platform you're
216 building.
217
218 # cd /opt
219 # bzip2 -dc /path/to/on-build-extras-DATE.PLATFORM.tar.bz2 \
220 | tar xf -
221
222 4. Update your environment and login dot-files if this is the first
223 time you have installed the compiler and/or build tools.
224
225 - Add /opt/SUNWspro/bin and /opt/onbld/bin to your $PATH.
226 - Either remove /usr/ucb from your $PATH, or put it at the end.
227
228 5. Create an environment file to guide tools like nightly(1) and
229 bldenv(1).
230
231 - copy /export/testws/usr/src/tools/env/opensolaris.sh to
232 /export/testws. It doesn't have to go in /export/testws, but
233 that's a convenient place to put it. Nor do you have to keep the
234 name opensolaris.sh, but that's the name we'll use in these notes.
235
236 Then make the following changes in your opensolaris.sh:
237
238 - change GATE to the name of the top-level directory (e.g.,
239 "testws").
240
241 - change CODEMGR_WS to the top-level path (e.g., "/export/testws").
242
243 - change STAFFER to your login.
244
245 - (optional) customize VERSION. This is the string that "uname -v"
246 will print.
247
248 6. To build a complete set of archives, cd to /export/testws, utter
249
250 nightly ./opensolaris.sh &
251
252 and find something else to work on for a few hours. You can
253 monitor the build's progress using ptree(1). nightly(1) will send
254 mail to $MAILTO when it has finished.
255
256 The results mail from nightly(1) will have an overview of the build
257 results. A copy of the mail text and a more detailed log file will
258 be available in the workspace (/export/testws/log/log.<mmdd>).
259 Pieces of the detailed log are also available under usr/src. For
260 example, usr/src/install-i386.out will have the log from the x86
261 "make install" part of the build.
262
263 By default nightly(1) will do a "clobber" build, which includes a
264 "make clobber" and blowing away any files that earlier builds
265 installed into $ROOT (/export/testws/proto/root_PLATFORM). To
266 bypass these steps, do an incremental build with "nightly -i
267 ./opensolaris.sh &".
268
269 7. To build a specific component, first use bldenv(1) to set up
270 various environment variables, then cd to the subtree that you want
271 to build. For example:
272
273 $ cd /export/testws
274 $ bldenv -d ./opensolaris.sh
275 [status information from bldenv]
276 $ cd usr/src/cmd/vi
277 $ dmake all
278
279 To build the kernel, run dmake(1) from usr/src/uts.
280
281 Please see the Developer's Reference for information on how to install
282 kernels (using Install(1)) and archives (using BFU).
283
284 README.polaris