/[gxemul]/trunk/doc/guestoses.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/doc/guestoses.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations)
Mon Oct 8 16:18:27 2007 UTC (13 years, 3 months ago) by dpavlin
File MIME type: text/html
File size: 58173 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.815 2005/06/27 23:04:35 debug Exp $
20050617	Experimenting some more with netbooting OpenBSD/sgi. Adding
		a hack which allows emulated ethernet networks to be
		distributed across multiple emulator processes.
20050618	Minor updates (documentation, dummy YAMON emulation, etc).
20050620	strcpy/strcat -> strlcpy/strlcat updates.
		Some more progress on evbmips (Malta).
20050621	Adding a section to doc/configfiles.html about ethernet
		emulation across multiple hosts.
		Beginning the work on the ARM translation engine (using the
		dynamic-but-not-binary translation method).
		Fixing a bintrans bug: 0x9fc00000 should always be treated as
		PROM area, just as 0xbfc00000 is.
		Minor progress on Malta emulation (the PCI-ISA bus).
20050622	NetBSD/evbmips can now be installed (using another emulated
		machine) and run (including userland and so on). :-)
		Spliting up the bintrans haddr_entry field into two (one for
		read, one for write). Probably not much of a speed increase,
		though.
		Updating some NetBSD 2.0 -> 2.0.2 in the documentation.
20050623	Minor updates (documentation, the TODO file, etc).
		gzipped kernels are now always automagically gunzipped when
		loaded.
20050624	Adding a dummy Playstation Portable (PSP) mode, just barely
		enough to run Hello World (in weird colors :-).
		Removing the -b command line option; old bintrans is enabled
		by default instead. It makes more sense.
		Trying to finally fix the non-working performance measurement
		thing (instr/second etc).
20050625	Continuing on the essential basics for ARM emulation. Two
		instructions seem to work, a branch and a simple "mov". (The
		mov arguments are not correct yet.) Performance is definitely
		reasonable.
		Various other minor updates.
		Adding the ARM "bl" instruction.
		Adding support for combining multiple ARM instructions into one
		function call. ("mov" + "mov" is the only one implemented so
		far, but it seems to work.)
		Cleaning up some IP32 interrupt things (crime/mace); disabling
		the PS/2 keyboard controller on IP32, so that NetBSD/sgimips
		boots into userland again.
20050626	Finally! NetBSD/sgimips netboots. Adding instructions to
		doc/guestoses.html on how to set up an nfs server etc.
		Various other minor fixes.
		Playstation Portable ".pbp" files can now be used directly.
		(The ELF part of the .pbp is extracted transparently.)
		Converting some sprintf -> snprintf.
		Adding some more instructions to the ARM disassembler.
20050627	More ARM updates. Adding some simple ldr(b), str(b),
		cmps, and conditional branch instructions, enough to run
		a simple Hello World program.
		All ARM instructions are now inlined/generated for all possible
		condition codes.
		Adding add and sub, and more load/store instructions.
		Removing dummy files: cpu_alpha.c, cpu_hppa.c, and cpu_sparc.c.
		Some minor documentation updates; preparing for a 0.3.4
		release. Updating some URLs.

==============  RELEASE 0.3.4  ==============


1 <html><head><title>GXemul documentation: Installing and running "guest OSes"</title>
2 <meta name="robots" content="noarchive,nofollow,noindex">
3 </head>
4 <body bgcolor="#f8f8f8" text="#000000" link="#4040f0" vlink="#404040" alink="#ff0000">
5 <table border=0 width=100% bgcolor="#d0d0d0"><tr>
6 <td width=100% align=center valign=center><table border=0 width=100%><tr>
7 <td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6">
8 <b>GXemul documentation:</b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
9 <font color="#000000" size="6"><b>Installing and running "guest OSes"</b>
10 </font></td></tr></table></td></tr></table><p>
11
12 <!--
13
14 $Id: guestoses.html,v 1.72 2005/06/27 23:04:36 debug Exp $
15
16 Copyright (C) 2003-2005 Anders Gavare. All rights reserved.
17
18 Redistribution and use in source and binary forms, with or without
19 modification, are permitted provided that the following conditions are met:
20
21 1. Redistributions of source code must retain the above copyright
22 notice, this list of conditions and the following disclaimer.
23 2. Redistributions in binary form must reproduce the above copyright
24 notice, this list of conditions and the following disclaimer in the
25 documentation and/or other materials provided with the distribution.
26 3. The name of the author may not be used to endorse or promote products
27 derived from this software without specific prior written permission.
28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
30 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
33 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 SUCH DAMAGE.
40
41 -->
42
43 <a href="./">Back to the index</a>
44
45 <p><br>
46 <h2>Installing and running "guest OSes"</h2>
47
48 <p>
49 <ul>
50 <li><a href="#generalnotes">General notes on running "guest OSes"</a>
51 <li><a href="#netbsdinstall">NetBSD/pmax</a>
52 <li><a href="#netbsdarcinstall">NetBSD/arc</a>
53 <li><a href="#netbsdhpcmipsinstall">NetBSD/hpcmips</a>
54 <li><a href="#netbsdcobaltinstall">NetBSD/cobalt</a>
55 <li><a href="#netbsdevbmipsinstall">NetBSD/evbmips</a>
56 <li><a href="#netbsdsgimips">NetBSD/sgimips</a>
57 <li><a href="#openbsdinstall">OpenBSD/pmax</a>
58 <li><a href="#openbsdarcinstall">OpenBSD/arc</a>
59 <li><a href="#ultrixinstall">Ultrix/RISC</a>
60 <li><a href="#sprite">Sprite for DECstation</a>
61 <li><a href="#declinux">Debian GNU/Linux for DECstation</a>
62 <li><a href="#declinuxredhat">Redhat Linux for DECstation</a>
63 </ul>
64
65 <p>In addition to the "working" guest operating systems listed above,
66 you might find the following information interesting:
67 <ul>
68 <li><a href="#mach">Mach/PMAX</a>
69 <li><a href="#openbsdsgiinstall">OpenBSD/sgi</a>
70 </ul>
71
72
73
74
75
76
77 <p><br>
78 <a name="generalnotes"></a>
79 <h3>General notes on running "guest OSes":</h3>
80
81 The emulator works well enough to run complete operating systems. These
82 are often refered to as "guest" operating systems.
83
84 <p>
85 Although it is possible to let a guest OS access real hardware, such as
86 harddisks, it is much more flexible and attractive to simulate harddisks
87 using files residing in the host's filesystem. On Unix-like systems, files
88 may contain holes, which makes this really simple. To the guest operating
89 system, the harddisk image looks and acts like a real disk.
90
91
92
93
94
95
96
97
98 <p><br>
99 <a name="netbsdinstall"></a>
100 <h3>NetBSD/pmax:</h3>
101
102 <p>
103 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
104 <a href="20050317-example.png"><img src="20050317-example_small.png"></a>
105
106 <p>To install <a href="http://www.netbsd.org/Ports/pmax/">NetBSD/pmax</a>
107 onto a harddisk image in the emulator, follow these instructions:
108
109 <p><ol start="1">
110 <li>Create an empty harddisk image, which will be the root disk
111 that NetBSD installs itself onto:<pre>
112 $ <b>dd if=/dev/zero of=nbsd_pmax.img bs=1 count=512 seek=1900000000</b>
113
114 </pre>
115 </ol>
116
117 <p>
118 From this point, there are two separate ways to continue the installation.
119 You can either download a CD-ROM iso image (and let the installation
120 program copy files from the CD-ROM image to the harddisk image), or you
121 can install via ftp. For an installation from a CD-ROM image, follow these
122 steps:
123 <p>
124 <ol start="2">
125
126 <li>Download a NetBSD CD-ROM iso image:<pre>
127 <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/pmaxcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/pmaxcd.iso</a>
128 or
129 <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/pmaxcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/pmaxcd.iso</a>
130
131 </pre>
132 <li>Start the emulator like this:<pre>
133 $ <b>gxemul -X -E dec -e 3max -d nbsd_pmax.img -d bc:pmaxcd.iso</b>
134 </pre>
135 and proceed like you would do if you were installing NetBSD on a real
136 DECstation.
137 </ol>
138 <p>
139 For an ftp install, substitute steps 2 and 3 above with these:
140 <p>
141 <ol start="2">
142
143 <li>Download a NetBSD pmax INSTALL kernel:<pre>
144 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/pmax/binary/kernel/netbsd-INSTALL.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/pmax/binary/kernel/netbsd-INSTALL.gz</a>
145 or
146 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/pmax/binary/kernel/netbsd-INSTALL.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/pmax/binary/kernel/netbsd-INSTALL.gz</a>
147
148 </pre>
149 <li>Start the emulator like this:<pre>
150 $ <b>gxemul -X -E dec -e 3max -d nbsd_pmax.img -O netbsd-INSTALL.gz</b>
151 </pre>
152 and proceed like you would do if you were installing NetBSD on a real
153 DECstation. Suitable networking parameters are as follows:<pre>
154 Which device shall I use? [le0]: <b>le0</b>
155 ..
156 Your DNS domain: <b>mydomain.com</b>
157 Your host name: <b>foo</b>
158 Your IPv4 number: <b>10.0.0.1</b>
159 IPv4 Netmask [0xff000000]: <b>0xff000000</b>
160 IPv4 gateway: <b>10.0.0.254</b>
161 IPv4 name server: <b>10.0.0.254</b>
162 </pre>
163 (If using 10.0.0.254 as the nameserver fails, then try entering the
164 IP number of a real-world nameserver instead.)
165 </ol>
166
167 <p>(If you don't want to use a graphical framebuffer during the install,
168 you can remove <b><tt>-X</tt></b> from the command line, but then make sure you
169 choose "<tt>vt100</tt>" when prompted with which terminal type to use, and not
170 "<tt>rcons</tt>". If you want to use X, but think that the default framebuffer
171 window is too large, try adding <tt><b>-Y2</b></tt> to the command line.)
172
173 <p>When the installation is completed, the following command should start
174 NetBSD from the harddisk image:<pre>
175 $ <b>gxemul -X -M64 -E dec -e 3max -d nbsd_pmax.img</b>
176 </pre>
177
178 <p>
179 Use <b>startx</b> to start X windows.
180
181 <p>
182 <font color="#ff0000">NOTE:</font> For some reason, NetBSD 2.0.2 doesn't
183 work with X out-of-the-box on pmax. It seems that this has to do with a
184 switch to WSCONS. For now, if you want X, then try NetBSD 1.6.2.
185
186 <p>
187 If you want to run without the X framebuffer, use this instead:<pre>
188 $ <b>gxemul -E dec -e 3max -d nbsd_pmax.img</b>
189 </pre>
190
191
192
193
194
195
196
197 <p><br>
198 <a name="netbsdarcinstall"></a>
199 <h3>NetBSD/arc:</h3>
200
201 It is possible to run <a
202 href="http://www.netbsd.org/Ports/arc/">NetBSD/arc</a>
203 on an emulated Acer PICA-61 in the emulator.
204
205 <p>
206 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
207 <a href="20041024-netbsd-arc-installed.gif"><img src="20041024-netbsd-arc-installed_small.gif"></a>
208
209 <p>
210 To install NetBSD/arc from a CDROM image onto an emulated harddisk image,
211 follow these instructions:
212
213 <p>
214 <ol start="1">
215 <li>Create an empty harddisk image, which will be the root disk
216 that NetBSD installs itself onto:<pre>
217 $ <b>dd if=/dev/zero of=nbsd_arc.img bs=1024 count=1 seek=900000</b>
218
219 </pre>
220 <li>Download a NetBSD/arc 1.6.2 CDROM image from ftp:<pre>
221 <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/arccd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/arccd.iso</a>
222
223 </pre>
224 <li>Start the emulator using this command line:<pre>
225 $ <b>gxemul -E arc -e pica -x -d nbsd_arc.img -d bc:arccd.iso \
226 -j arc/binary/kernel/netbsd.RAMDISK.gz</b>
227
228 </pre>
229 (Try removing <tt>-x</tt> if you have problems with the xterm.)
230 <p>
231 <li>From now on, you have to use your imagination, as there is no
232 automatic installation program for NetBSD/arc. Here are some tips
233 and hints on how you can proceed with the install:<pre>
234 $ <b>mount /dev/cd0a /mnt2</b>
235 $ <b>disklabel -i -I sd0</b> (for example 'a', '4.2BSD', '1c',
236 '700M', 'b', 'swap', '701M', '$', 'P', 'W', 'y', and 'Q')
237 $ <b>newfs /dev/sd0a</b>
238 $ <b>mount /dev/sd0a /mnt</b>
239 $ <b>cd /mnt</b>
240 $ <b>for a in /mnt2/arc/binary/sets/*.tgz; do echo $a; tar xzpf $a; done</b>
241 $ <b>cd dev; sh MAKEDEV all</b>
242 $ <b>cd ../etc; echo "rc_configured=YES" &gt;&gt; rc.conf</b>
243 $ <b>cat > /mnt/etc/fstab</b>
244 /dev/sd0a / ffs rw 1 1
245 /dev/sd0b none swap sw 0 0
246 (ctrl-d)
247 $ <b>cd /; umount /mnt; umount /mnt2</b>
248 $ <b>halt</b>
249
250 </pre>
251 <li>Download a generic NetBSD/arc kernel:<pre>
252 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/arc/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/arc/binary/kernel/netbsd-GENERIC.gz</a>
253
254 </pre>
255 </ol>
256
257 <p>You can now use the generic NetBSD/arc kernel to boot from the harddisk
258 image, using the following command:<pre>
259 $ <b>gxemul -E arc -e pica -x -d nbsd_arc.img netbsd-GENERIC.gz</b>
260
261 </pre>
262
263 <p>When asked for "<tt>root device: </tt>", enter <b><tt>sd0</tt></b>.
264
265
266
267
268
269
270
271 <p><br>
272 <a name="netbsdhpcmipsinstall"></a>
273 <h3>NetBSD/hpcmips:</h3>
274
275 It is possible to install <a
276 href="http://www.netbsd.org/Ports/hpcmips/">NetBSD/hpcmips</a> onto a disk
277 image, on an an emulated MobilePro 770, 780, 800, or 880. The emulator
278 treats the different machine models as being almost identical; the most
279 important difference is regarding the framebuffer.
280
281 <p><table border="0">
282 <tr>
283 <td width="80">&nbsp;</td>
284 <td><u>Model:</u></td>
285 <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
286 <td><u>Framebuffer size/depth:</u></td>
287 <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
288 <td><u>Framebuffer address:</u></td>
289 </tr>
290 <tr>
291 <td></td>
292 <td>MobilePro 770 (<super>*2</super>)</td>
293 <td></td>
294 <td>640 x 240, 16 bits</td>
295 <td></td>
296 <td>0xa000000</td>
297 </tr>
298 <tr>
299 <td></td>
300 <td>MobilePro 780</td>
301 <td></td>
302 <td>640 x 240, 16 bits</td>
303 <td></td>
304 <td>0xa180100 (<super>*</super>)</td>
305 </tr>
306 <tr>
307 <td></td>
308 <td>MobilePro 800</td>
309 <td></td>
310 <td>800 x 600, 16 bits</td>
311 <td></td>
312 <td>0xa000000</td>
313 </tr>
314 <tr>
315 <td></td>
316 <td>MobilePro 880</td>
317 <td></td>
318 <td>800 x 600, 16 bits</td>
319 <td></td>
320 <td>0xa0ea600 (<super>*</super>)</td>
321 </tr>
322 </table>
323
324 <p>
325 (<super>*</super>) = not aligned at a 4 KB boundary, so it will not work
326 efficiently with the current bintrans system. Using this mode will still
327 work, but each load and store will be emulated much more slowly than is
328 possible with an aligned framebuffer.
329
330 <p>
331 (<super>*2</super>) = The MobilePro 770's cursor keys work differently
332 than the other models, for some reason. (This is a known bug.)
333
334 <p>
335 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
336 <a href="20050427-netbsd-hpcmips-1.png"><img src="20050427-netbsd-hpcmips-1_small.png"></a>
337 &nbsp;&nbsp;&nbsp;
338 <a href="20050427-netbsd-hpcmips-2.png"><img src="20050427-netbsd-hpcmips-2_small.png"></a>
339
340 <p>
341 These instructions show an example of how to install
342 NetBSD/hpcmips on an emulated MobilePro 800:
343
344 <p>
345 <ol start="1">
346 <li>Create an empty harddisk image, which will be the root disk
347 that you will install NetBSD/hpcmips onto:<pre>
348 $ <b>dd if=/dev/zero of=nbsd_hpcmips.img bs=1024 count=1 seek=1990000</b>
349
350 </pre>
351 <li>Download the NetBSD 2.0.2 for hpcmips ISO image:<pre>
352 <a href="ftp://ftp.se.netbsd.org/pub/NetBSD/iso/2.0.2/">ftp://ftp.se.netbsd.org/pub/NetBSD/iso/2.0.2</a>/<a href="ftp://ftp.se.netbsd.org/pub/NetBSD/iso/2.0.2/hpcmipscd.iso">hpcmipscd.iso</a>
353
354 </pre>(You may want to choose a mirror closer to you, if .se is slow.)
355 <p>
356 <li>Start the installation like this:<pre>
357 $ <b>gxemul -E hpc -e mobilepro800 -X -d nbsd_hpcmips.img \
358 -d b:hpcmipscd.iso -j hpcmips/installation/netbsd.gz</b>
359
360 </pre>
361 and proceed like you would do if you were installing NetBSD on a real
362 MobilePro 800. (Install onto wd0, choose "Use entire disk" when
363 doing the MBR partitioning, and choose wd1d (not cd0c) as the
364 CDROM device to install from.)
365 </ol>
366
367 <p>
368 If everything worked, NetBSD should now be installed on the disk image.
369 GXemul does not (yet) support reading the kernel directly from the
370 disk image, so you need to download a generic kernel separately:<pre>
371 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/hpcmips/binary/kernel/">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/hpcmips/binary/kernel</a>/<a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/hpcmips/binary/kernel/netbsd-GENERIC.gz">netbsd-GENERIC.gz</a>
372
373 </pre>
374
375 <p>The installation is now complete. Use the following command line to
376 boot the emulated hpcmips machine:<pre>
377 $ <b>gxemul -E hpc -e mobilepro800 -X -d nbsd_hpcmips.img netbsd-GENERIC.gz</b>
378
379 </pre>
380
381 <p>If you change your mind at this point regarding which machine type to
382 emulate, you might for example prefer a MobilePro 770, then you can change
383 that at any time. NetBSD is designed to be able to boot on many types,
384 without any need to change the kernel.
385
386 <p>When you have logged in as root, you can use <b><tt>startx</tt></b> to
387 start X Windows. (Note: There is no mouse support yet; you can only use
388 keyboard input.)
389
390
391
392
393
394
395
396
397 <p><br>
398 <a name="netbsdcobaltinstall"></a>
399 <h3>NetBSD/cobalt:</h3>
400
401 <a href="http://www.netbsd.org/Ports/cobalt/">NetBSD/cobalt</a> is tricky
402 to install, because the Cobalt machines were designed for Linux, and not
403 very flexible. There is no INSTALL kernel for NetBSD/cobalt. One way to
404 install the NetBSD/cobalt distribution onto a disk image is to do it from
405 another (emulated) machine.
406
407 <p>
408 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
409 <a href="20050413-netbsd-cobalt.png"><img src="20050413-netbsd-cobalt_small.png"></a>
410
411 <p>
412 The following instructions will let you install NetBSD/cobalt onto a disk
413 image, from an emulated DECstation 3MAX machine:
414
415 <p>
416 <ol>
417 <li>Create an empty harddisk image, which will be the disk image
418 that you will install NetBSD/cobalt onto:<pre>
419 $ <b>dd if=/dev/zero of=nbsd_cobalt.img bs=1024 count=1 seek=1999000</b>
420
421 </pre>
422 <li>Download the generic kernel for Cobalt and the 2.0.2 ISO image:<pre>
423 <a href="ftp://ftp.se.netbsd.org/pub/NetBSD/NetBSD-2.0.2/cobalt/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.se.netbsd.org/pub/NetBSD/NetBSD-2.0.2/cobalt/binary/kernel/netbsd-GENERIC.gz</a>
424 <a href="ftp://ftp.se.netbsd.org/pub/NetBSD/iso/2.0.2/cobaltcd.iso">ftp://ftp.se.netbsd.org/pub/NetBSD/iso/2.0.2/cobaltcd.iso</a>
425
426 </pre>(You may want to choose a mirror closer to you, if .se is slow.)
427 <p>
428 <li>Install NetBSD/pmax 2.0.2 according to instructions
429 <a href="#netbsdinstall">further up on this page</a>.
430 <p>
431 <li>Start NetBSD/pmax like this:<pre>
432 $ <b>gxemul -Edec -e3max -d nbsd_pmax.img -d cobaltcd.iso -d nbsd_cobalt.img</b>
433
434 </pre>
435 <li>Log in as root (on the emulated 3MAX machine), and execute the
436 following commands: (adjust according to taste)<pre>
437 <b>newfs /dev/sd1c</b>
438 <b>mount /dev/cd0c /mnt</b>
439 <b>mkdir /mnt2; mount /dev/sd1c /mnt2</b>
440 <b>cd /mnt2; sh</b>
441 <b>for a in /mnt/cobalt/binary/sets/*.tgz; do echo $a; tar zxfp $a; done</b>
442 <b>exit</b>
443 <b>cd dev; sh ./MAKEDEV all; cd ../etc</b>
444 <b>echo rc_configured=YES >> rc.conf</b>
445 <b>echo "/dev/wd0d / ffs rw 1 1" > fstab</b>
446 <b>cd /; umount /mnt; umount /mnt2; halt</b>
447 </pre>
448 </ol>
449
450 <p>
451 You should now be able to boot NetBSD/cobalt like this:<pre>
452 $ <b>gxemul -M128 -E cobalt -d nbsd_cobalt.img netbsd-GENERIC.gz</b>
453 </pre>
454
455 Note that the installation instructions above create a filesystem
456 <i>without</i> a disklabel, so there is only one ffs partition and no
457 swap. You will need to enter the following things when booting with the
458 generic kernel:<pre>
459 root device (default wd0a): <b>wd0d</b>
460 dump device (default wd0b): <b>none</b>
461 file system (default generic): <b>ffs</b>
462 init path (default /sbin/init): <i>(just press enter here)</i>
463 </pre>
464
465
466
467
468
469
470
471 <p><br>
472 <a name="netbsdevbmipsinstall"></a>
473 <h3>NetBSD/evbmips:</h3>
474
475 <a href="http://www.netbsd.org/Ports/evbmips/">NetBSD/evbmips</a> can run
476 in GXemul on an emulated Malta evaluation board (with a 5Kc or 4Kc CPU).
477
478 <p>
479 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
480 <a href="20050622-netbsd-evbmips-malta.png"><img src="20050622-netbsd-evbmips-malta_small.png"></a>
481
482 <p>It is tricky to install, because there is (as far as I know) no INSTALL
483 kernel. One way to install the NetBSD/evbmips distribution onto a disk
484 image is to install the files is to do it using another (emulated)
485 machine.
486
487 <p>
488 The following instructions will let you install NetBSD/evbmips onto a disk
489 image, from an emulated DECstation 3MAX machine:
490
491 <p>
492 <ol>
493 <li>Create an empty harddisk image, which will be the disk image
494 that you will install NetBSD onto:<pre>
495 $ <b>dd if=/dev/zero of=nbsd_malta.img bs=1024 count=1 seek=999000</b>
496
497 </pre>
498 <li>Download the generic kernel and the 2.0.2 ISO image:<pre>
499 <a href="ftp://ftp.se.netbsd.org/pub/NetBSD/NetBSD-2.0.2/evbmips-mipsel/binary/kernel/netbsd-MALTA.gz">ftp://ftp.se.netbsd.org/pub/NetBSD/NetBSD-2.0.2/evbmips-mipsel/binary/kernel/netbsd-MALTA.gz</a>
500 <a href="ftp://ftp.se.netbsd.org/pub/NetBSD/iso/2.0.2/evbmips-mipselcd.iso">ftp://ftp.se.netbsd.org/pub/NetBSD/iso/2.0.2/evbmips-mipselcd.iso</a>
501
502 </pre>(You may want to choose a mirror closer to you, if .se is slow.)
503 <p>
504 <li>Install NetBSD/pmax 2.0.2 according to instructions
505 <a href="#netbsdinstall">further up on this page</a>.
506 <p>
507 <li>Start NetBSD/pmax like this:<pre>
508 $ <b>gxemul -Edec -e3max -d nbsd_pmax.img -d nbsd_malta.img -d evbmips-mipselcd.iso</b>
509
510 </pre>
511 <li>Log in as root (on the emulated 3MAX machine), and execute the
512 following commands: (adjust according to taste)<pre>
513 <b>newfs /dev/sd1c</b>
514 <b>mount /dev/cd0c /mnt</b>
515 <b>mkdir /mnt2; mount /dev/sd1c /mnt2</b>
516 <b>cd /mnt2; sh</b>
517 <b>for a in /mnt/evbmips-mipsel/binary/sets/*.tgz; do echo $a; tar zxfp $a; done</b>
518 <b>exit</b>
519 <b>cd dev; sh ./MAKEDEV all; cd ../etc</b>
520 <b>echo rc_configured=YES >> rc.conf</b>
521 <b>echo "/dev/wd0c / ffs rw 1 1" > fstab</b>
522 <b>cd /; umount /mnt; umount /mnt2; halt</b>
523 </pre>
524 </ol>
525
526 <p>You should now be able to boot NetBSD/evbmips like this:<pre>
527 $ <b>gxemul -Eevbmips -emalta -d nbsd_malta.img netbsd-MALTA.gz</b>
528 </pre>
529
530 <p>Note 1: NetBSD detects a very fast CPU although the emulation isn't
531 really very fast, so delays take very long. Even on a multi-GHz host, you
532 will need a lot of patience.
533
534 <p>Note 2: To select a 4Kc (MIPS32) CPU instead of the default 5Kc
535 (MIPS64) CPU, add <tt><b>-C 4Kc</b></tt> to the command line. With NetBSD
536 2.0.2, however, there will be little or no difference in functionality.
537 (NetBSD still runs in 32-bit mode on 64-bit MIPS CPUs.)
538
539 <p>Note 3: The installation instructions above create a filesystem
540 <i>without</i> a disklabel, so there is only one ffs partition and no
541 swap. You will need to enter the following things when booting with the
542 generic kernel:<pre>
543 root device (default wd0a): <b>wd0c</b>
544 dump device (default wd0b): <b>none</b>
545 file system (default generic): <b>ffs</b>
546 init path (default /sbin/init): <i>(just press enter here)</i>
547 </pre>
548
549
550
551
552
553
554
555 <p><br>
556 <a name="netbsdsgimips"></a>
557 <h3>NetBSD/sgimips:</h3>
558
559 <p>
560 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
561 <a href="20050626-netbsd-sgimips-netboot.png"><img src="20050626-netbsd-sgimips-netboot_small.png"></a>
562
563 <p><a href="http://www.netbsd.org/Ports/sgimips/">NetBSD/sgimips</a> can run
564 in GXemul on an emulated O2 (SGI-IP32). However, GXemul does not yet
565 emulate the AHC PCI SCSI controller in the O2. (I have mailed Adaptec
566 several times, asking for documentation, but never received any reply.)
567 NetBSD can still run, as long as it doesn't use SCSI.
568
569 <p>For a simple test with the 2.0.2 ramdisk (install) kernel, try
570 dowloading<pre>
571 <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz</a>
572
573 </pre>and run&nbsp;&nbsp;<b><tt>gxemul -E sgi -e o2 netbsd-INSTALL32_IP3x.gz</tt></b>.
574
575 <p>It is possible to set up an environment for netbooting the emulated SGI
576 machine off of another emulated machine. Performing this setup is quite
577 time consuming, but necessary:
578
579 <p>
580 <ol>
581 <li>First of all, the "<tt>nfs server</tt>" machine must be set up.
582 This needs to have a 750 MB <tt>/tftpboot</tt> partition.
583 <a href="#netbsdinstall">Install NetBSD/pmax 2.0.2 from CDROM</a>
584 inside the emulator. (Don't forget to add the extra partition!)
585 <p>
586 <li>Configure the nfs server machine to act as an nfs server.
587 Start up the emulated DECstation:<pre>
588 $ <b>gxemul -M64 -Edec -e3max -d nbsd_pmax.img</b>
589 </pre>and enter the following commands as <tt>root</tt>
590 inside the emulator:
591 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
592 <b>echo hostname=server &gt;&gt; /etc/rc.conf
593 echo ifconfig_le0=\"inet 10.0.0.2\" &gt;&gt; /etc/rc.conf
594 echo nameserver 10.0.0.254 &gt;&gt; /etc/resolv.conf
595 echo 10.0.0.254 &gt; /etc/mygate
596 echo /tftpboot -maproot=root 10.0.0.1 &gt; /etc/exports
597 echo rpcbind=YES &gt;&gt; /etc/rc.conf
598 echo nfs_server=YES &gt;&gt; /etc/rc.conf
599 echo mountd=YES &gt;&gt; /etc/rc.conf
600 echo bootparamd=YES &gt;&gt; /etc/rc.conf
601 printf "client root=10.0.0.2:/tftpboot \\\n swap=10.0.0.2:/tftpboot/swap\n" &gt; /etc/bootparams
602 echo "bootps dgram udp wait root /usr/sbin/bootpd bootpd -d 4 -h 10.0.0.2" &gt;&gt; /etc/inetd.conf
603 cat &gt;&gt; /etc/bootptab
604 client:\
605 :ht=ether:\
606 :ha=102030000010:\
607 :sm=255.0.0.0:\
608 :lg=10.0.0.254:\
609 :ip=10.0.0.1:\
610 :rp=/tftpboot:
611 </b>(press CTRL-D)
612 <b>echo "10:20:30:00:00:10 client" &gt; /etc/ethers
613 echo 10.0.0.1 client &gt; /etc/hosts
614 reboot</b>
615 </pre></td></tr></table>
616 <li>Start the DECstation emulation again, and download the
617 NetBSD/sgimips distribution sets:<br>(NOTE: This
618 takes quite some time, even if you have a fast network connection.)
619 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
620 <b>cd /tftpboot; ftp -i ftp.se.netbsd.org</b>
621 (log in as anonymous...)
622 <b>cd /pub/NetBSD/NetBSD-2.0.2/sgimips/binary/sets
623 mget base.tgz comp.tgz etc.tgz games.tgz man.tgz misc.tgz text.tgz
624 quit
625 sh
626 for a in *.tgz; do echo $a; tar zxfp $a; done
627 echo 10.0.0.2:/tftpboot / nfs rw 0 0 &gt; /tftpboot/etc/fstab
628 echo rc_configured=YES &gt;&gt; /tftpboot/etc/rc.conf
629 dd if=/dev/zero of=swap bs=1024 count=32768
630 halt</b>
631 </pre></td></tr></table>
632 <li>Download the NetBSD/sgimips GENERIC and INSTALL kernels:<pre>
633 <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-GENERIC32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-GENERIC32_IP3x.gz</a>
634 <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz</a>
635
636 </pre>
637 <li>Create a configuration file called <tt>config_client</tt>:
638 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
639 <font color="#2020cf">!!gxemul
640 !
641 ! Configuration file for running NetBSD/sgimips diskless with
642 ! a NetBSD/pmax machine as the nfs server.</font>
643
644 <b>emul(
645 net(
646 add_remote("127.0.0.1:12444") </b>! the server<b>
647 local_port(12445) </b>! the client<b>
648 )
649
650 machine(
651 name("client machine")
652 serial_nr(1)
653
654 type("sgi")
655 subtype("o2")
656
657 load("netbsd-INSTALL32_IP3x.gz")</b>
658 ! load("netbsd-GENERIC32_IP3x.gz")<b>
659 )
660 )</b>
661 </pre></td></tr></table>
662 ... and another configuration file for the server,
663 <tt>config_server</tt>:
664 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
665 <font color="#2020cf">!!gxemul</font>
666 <b>emul(
667 net(
668 local_port(12444) </b>! the server<b>
669 add_remote("127.0.0.1:12445") </b>! the client<b>
670 )
671
672 machine(
673 name("nfs server")
674 serial_nr(2)
675
676 type("dec")
677 subtype("5000/200")
678
679 disk("nbsd_pmax.img")
680 )
681 )</b>
682 </pre></td></tr></table>
683 <li>Boot the "<tt>nfs server</tt>" and the NetBSD/sgimips
684 "<tt>client machine</tt>" as two separate emulator instances:<pre>
685 in one xterm:
686 $ <b>gxemul @config_server</b>
687
688 and then, in another xterm:
689 $ <b>gxemul @config_client</b>
690
691 </pre>
692 <li>In the NetBSD/sgimips window, choose "<tt>x: Exit Install System</tt>"
693 in the installer's main menu, and then type:<pre>
694 <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254</b>
695 <b>mount -v 10.0.0.2:/tftpboot /mnt</b>
696 <b>cd /mnt/dev; ./MAKEDEV all; cd /; umount /mnt</b>
697 <b>halt</b>
698 </pre>Then log in as <tt>root</tt> on the server machine and type
699 <tt><b>reboot</b></tt>.
700 <p>
701 <li>Once everything has been set up correctly, change
702 <tt>netbsd-INSTALL32_IP3x.gz</tt> in <tt>config_client</tt> to
703 <tt>netbsd-GENERIC32_IP3x.gz</tt> (the GENERIC kernel).
704 </ol>
705
706 <p>You might want to log in as <tt>root</tt> on the server machine, and
707 run <tt>tcpdump -lnvv</tt> or similar, to see that what the client machine
708 actually does on the network.
709
710 <p>It should now be possible to boot NetBSD/sgimips using the NetBSD/pmax
711 nfs server, using the following commands: (NOTE! Execute these in two
712 separate xterms!)<pre>
713 $ <b>gxemul @config_server</b>
714 $ <b>gxemul @config_client</b>
715 </pre>
716
717 <p>When asked for "<tt>root device:</tt>" etc. on the clientmachine, enter
718 the following values:<pre>
719 root device: <b>mec0</b>
720 dump device: <b>(leave blank)</b>
721 file system (default generic): <b>(leave blank)</b>
722 ..
723 init path (default /sbin/init): <b>(leave blank)</b>
724 Enter pathname of shell or RETURN for /bin/sh: <b>(leave blank)</b>
725 Terminal type? [unknown] <b>xterm</b>
726 ..
727 # <b>exit</b> (to leave the single-user shell)
728 </pre>
729
730 <p>Note: Netbooting like this is very slow, so you need a lot of patience.
731 For example, when NetBSD says "<tt>nfs_boot: trying DHCP/BOOTP</tt>",
732 there will be a long pause, even on a very fast host machine. The reason
733 for this is mostly because the emulator doesn't deal with timing issues
734 very well, but also because NetBSD tries IPv6 first, before falling back
735 to IPv4.
736
737
738
739
740
741
742
743 <p><br>
744 <a name="openbsdinstall"></a>
745 <h3>OpenBSD/pmax:</h3>
746
747 Installing <a href="http://www.openbsd.org/pmax.html">OpenBSD/pmax</a> is
748 a bit harder than installing NetBSD/pmax. You should first read the <a
749 href="#netbsdinstall">section above</a> on how to install NetBSD/pmax,
750 before continuing here. If you have never installed OpenBSD on any
751 architecture, then you need a great deal of patience to do this. If, on
752 the other hand you are used to installing OpenBSD, then this should be no
753 problem for you.
754
755 <p>
756 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
757 <a href="20040710-openbsd-pmax.png"><img src="20040710-openbsd-pmax_small.png"></a>
758 &nbsp;&nbsp;&nbsp;
759 <a href="openbsd-pmax-20040710.png"><img src="openbsd-pmax-20040710_small.png"></a>
760
761 <p>
762 OpenBSD/pmax died at release 2.8 of OpenBSD, so you should be
763 aware of the fact that this will not give you an up-to-date OpenBSD
764 system.
765
766 <p>
767 Following these instructions <i>might</i> work. If not, then use
768 common sense and imagination to modify them as you see fit.
769
770 <p>
771 <ol>
772 <li>Create an empty harddisk image, which will be the root disk
773 that OpenBSD installs itself onto:<pre>
774 $ <b>dd if=/dev/zero of=obsd_pmax.img bs=1 count=512 seek=900000000</b>
775
776 </pre>
777 <li>Download the entire pmax directory from the ftp server: (approx. 99 MB)<pre>
778 $ <b>wget -r <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/">ftp://ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/</a></b>
779
780 </pre>
781
782 <li>Execute the following commands:<pre>
783 $ <b>mv ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/simpleroot28.fs.gz .</b>
784 $ <b>gunzip simpleroot28.fs.gz</b>
785 $ <b>chmod +w simpleroot28.fs</b> &lt;--- make sure
786
787 </pre>
788 <li>You now need to make an ISO image of the entire directory you downloaded.
789 (I recommend using <tt>mkisofs</tt> for that purpose. If you don't
790 already have <tt>mkisofs</tt> installed on your system, you need
791 to install it in order to do this.)<pre>
792 $ <b>mkisofs -o openbsd_pmax_2.8.iso ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax</b>
793
794 </pre>
795 <li>Start the emulator with all three (!) disk images:<pre>
796 $ <b>gxemul -E dec -e 3max -d obsd_pmax.img -d b:simpleroot28.fs -j bsd -d c:openbsd_pmax_2.8.iso</b>
797
798 </pre>
799 (If you add <tt><b>-X</b></tt>, you will run with the graphical
800 framebuffer. This is <i>REALLY</i> slow because the console has to
801 scroll a lot during the install. I don't recommend it.)
802 <p>
803 <li>Go on with the installation as you would do if you were installing on a real machine.
804 If you are not used to the OpenBSD installer, then this will most likely
805 be a very uncomfortable experience. Some important things to keep in mind are:
806 <ul>
807 <li>rz0 is the rootdisk you wish to install onto.
808 <li>rz1 is the simpleroot image.
809 <li>rz2 is the CDROM containing the "install sets".
810 <li>When asked for the "<b>root device?</b>", enter <b>rz1</b>.
811 <li>At "<b>Enter pathname of shell or RETURN for sh:</b>", press enter.
812 <li>At the # prompt, do the following:<pre>
813 $ <b>fsck /dev/rz1a</b> (and mark the filesystem as clean)
814 $ <b>mount /dev/rz1a /</b>
815 $ <b>mount -t kernfs kern kern</b>
816 $ <b>./install</b>
817
818 </pre>
819 and proceed with the install. Good luck. :-)
820 <li>Answer "<b>y</b>" when asked if you wish to configure the network.
821 (See the section about installing NetBSD/pmax for suitable
822 network settings.)
823 <li>Install from "<b>c</b>" (cdrom), choose "<b>rz2</b>" as the cdrom device, and "<b>/</b>" as
824 the directory containing the install sets.
825 </ul>
826 <p>
827 <li>For some unknown reason, the install script does not set the root
828 password! The first time you boot up OpenBSD after the install, you
829 need to go into single user mode and run <b>passwd root</b> to set
830 the root password, or you will not be able to log in at all!<pre>
831 $ <b>gxemul -E dec -e 3max -d obsd_pmax.img -d 2c:openbsd_pmax_2.8.iso -j bsd -o '-s'</b>
832 </pre>
833 While you are at it, you might want to extract the X11 install sets
834 as well, as the installer seems to ignore them too. (Perhaps due to a bug
835 in the installer, perhaps because of the way I used mkisofs.)
836 <p>
837 Execute the following commands in the emulator:
838 <pre>
839 <b>fsck /dev/rz0a</b>
840 <b>mount /</b>
841 <b>passwd root</b>
842
843 <b>cd /; mount -t cd9660 /dev/rz2c /mnt; sh</b>
844 <b>for a in /mnt/[xX]*; do tar zxvf $a; done</b>
845 <b>ln -s /usr/X11R6/bin/Xcfbpmax /usr/X11R6/bin/X</b>
846 <b>ln -s /dev/fb0 /dev/mouse</b>
847 <b>echo /usr/X11R6/lib >> /etc/ld.so.conf</b>
848 <b>ldconfig</b>
849
850 <b>sync</b>
851 <b>halt</b>
852 </pre>
853 </ol>
854
855 <p>
856 NOTE: It is also possible to install via ftp instead of using a CDROM image.
857 This is not much less awkward, you still need the simpleroot filesystem
858 image, and you still have to manually add the X11 install sets and set the
859 root password, and so on.
860
861 <p>
862 Once you have completed the installation procedure, the following command
863 will let you boot from the new rootdisk image:
864 <pre>
865 $ <b>gxemul -E dec -e 3max -X -M64 -o '-aN' -d obsd_pmax.img -j bsd</b>
866 </pre>
867
868 <p>
869 (Normally, you would be asked about which root device to use (<tt>rz0</tt>),
870 but using <b><tt>-o '-aN'</tt></b> supresses that.)
871
872 <p>
873 When asked for which terminal type to use, when logging in as root,
874 enter <b><tt>rcons</tt></b> if you are using the graphical framebuffer,
875 <b><tt>vt100</tt></b> for text-mode.
876 <br>Use <b><tt>startx</tt></b> to start X windows.
877
878
879
880
881
882
883
884 <p><br>
885 <a name="openbsdarcinstall"></a>
886 <h3>OpenBSD/arc:</h3>
887
888 It is possible to run OpenBSD/arc on an emulated Acer PICA-61 in the
889 emulator.
890
891 <p>
892 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
893 <a href="20041024-openbsd-arc-installed.gif"><img src="20041024-openbsd-arc-installed_small.gif"></a>
894
895 <p>
896 (You should be aware of the fact that OpenBSD for the ARC platform died at
897 release 2.3, so this will not give you an up-to-date OpenBSD system.
898 See
899 <a href="http://www.openbsd.org/arc.html">http://www.openbsd.org/arc.html</a>
900 for more information.)
901
902 <p>
903 To install OpenBSD/arc onto an emulated harddisk image, follow these
904 instructions:
905
906 <p>
907 <ol>
908 <li>Create an empty harddisk image, which will be the root disk
909 that OpenBSD installs itself onto:<pre>
910 $ <b>dd if=/dev/zero of=obsd_arc.img bs=1024 count=1 seek=700000</b>
911
912 </pre>
913 <li>Download the entire arc directory from the ftp server: (approx. 75 MB)<pre>
914 $ <b>wget -np -l 0 -r <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/">ftp://ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/</a></b>
915
916 </pre>
917
918 <li>You now need to make an ISO image of the entire directory you downloaded.
919 (I recommend using <tt>mkisofs</tt> for that purpose. If you don't
920 already have <tt>mkisofs</tt> installed on your system, you need
921 to install it in order to do this.)<pre>
922 $ <b>mkisofs -o openbsd_arc_2.3.iso ftp.se.openbsd.org/pub/OpenBSD/</b>
923
924 </pre>
925 <li>Start the emulator using this command line:<pre>
926 $ <b>gxemul -X -E arc -e pica -d obsd_arc.img -d b:openbsd_arc_2.3.iso -j 2.3/arc/bsd.rd</b>
927
928 </pre>
929 and proceed like you would do if you were installing OpenBSD
930 on a real Acer PICA-61. (Answer 'no' when asked if you want to
931 configure networking, and then install from CD-ROM.)
932 </ol>
933
934 <p>
935 Once the install has finished, the following command should let you
936 boot from the harddisk image:
937 <p>
938 <pre>
939 $ <b>gxemul -X -E arc -e pica -d obsd_arc.img ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/bsd</b>
940
941 </pre>
942
943
944
945
946
947
948
949 <p><br>
950 <a name="ultrixinstall"></a>
951 <h3>Ultrix/RISC:</h3>
952
953 Ultrix 4.x can run in GXemul on an emulated DECstation 5000/200.
954 (Ultrix was the native OS for these machines, but NetBSD/pmax is
955 also usable.)
956
957 <p>
958 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
959 <a href="20040504-ultrix45-boot1.png"><img src="20040504-ultrix45-boot1_small.gif"></a>
960 &nbsp;&nbsp;&nbsp;
961 <a href="ultrix4.5-20040706.png"><img src="ultrix4.5-20040706_small.gif"></a>
962
963 <p>
964 The following instructions should let you install Ultrix onto a disk image:
965
966 <ol>
967 <li>Create an empty harddisk image, which will be the root disk
968 that Ultrix installs itself onto:<pre>
969 $ <b>dd if=/dev/zero of=rootdisk.img bs=1024 count=1 seek=800000</b>
970
971 </pre>
972 <li>Place your Ultrix installation media in your CDROM drive.
973 (On FreeBSD and similar systems, it is called <tt>/dev/cd0c</tt>.
974 Replace that with the name of your CDROM drive, or the name of a
975 .iso image file.) Then, start the emulator like this:<pre>
976 $ <b>gxemul -X -M64 -E dec -e 3max -d rootdisk.img -d bc:/dev/cd0c -j vmunix</b>
977
978 </pre>
979 <li>Once the first stage of the installation is done (restoring the root
980 filesystem), you need to restart the emulator, booting from the
981 new rootdisk, to continue the installation process.
982 This is done by removing the bootflag ('<tt>b</tt>') from the second
983 diskimage argument:<pre>
984 $ <b>gxemul -X -M64 -E dec -e 3max -d rootdisk.img -d c:/dev/cd0c -j vmunix</b>
985
986 </pre>
987 </ol>
988
989 <p>
990 When the installation is completed, the following command should start
991 Ultrix from the harddisk image:<pre>
992 $ <b>gxemul -X -M64 -E dec -e 3max -j vmunix -d rootdisk.img</b>
993 </pre>
994
995 <p>Ultrix mostly seems to work with dynamic binary translation (which can
996 be disabled by the <b><tt>-B</tt></b> command line option). If you have a
997 very fast host machine, and use bintrans, you might experience a weird
998 timer related bug, which makes it impossible to logon to the system. It is
999 triggered when the emulation goes faster than any real DECstation machine
1000 was capable of running. A temporary workaround is to add
1001 <b><tt>-I33000000</tt></b> to fix the emulated clock speed to 33 million
1002 instructions per emulated second. (When using <tt><b>-CR4400</b></tt>,
1003 <b><tt>-I16000000</tt></b> should be used instead.)
1004
1005 <p>
1006 You can experiment with adding <b><tt>-Z2</tt></b> (for emulating a
1007 dual-headed workstation) or even <b><tt>-Z3</tt></b> (tripple-headed), and
1008 also the <b><tt>-Y2</tt></b> option for scaling down the framebuffer
1009 windows by a factor 2x2.
1010 There is also a <b><tt>-z</tt></b> option for supplying names of X11
1011 displays to use. The following example starts Ultrix on an emulated
1012 tripple-headed workstation, on three different displays (<tt>remote1:0.0</tt>,
1013 <tt>localhost:0.0</tt>, and <tt>remote2:0.0</tt>), using no scaledown:<pre>
1014 $ <b>gxemul -M64 -N -E dec -e 3max -jgenvmunix -d rootdisk.img \
1015 -XZ3 -z remote1:0.0 -z localhost:0.0 -z remote2:0.0</b>
1016 </pre>
1017
1018 <p>
1019 The photo below shows a single Ultrix session running tripple-headed in
1020 GXemul on an Alpha 21164PC, with displays on a Sun Ultra1 (to the left),
1021 on the Alpha itself (in the middle), and on an HP700/RX X-terminal (8-bit
1022 color depth, running off the Alpha) to the right.
1023
1024 <p>
1025 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1026 <a href="20041209-ultrix-tripplehead.jpg"><img src="20041209-ultrix-tripplehead_small.jpg"></a>
1027
1028 <p>
1029 The X11 displays may differ in bit depth and endianness. Unfortunately,
1030 there is no way yet to set the scaledown factor on a per-window basis, so
1031 the scaledown factor affects all windows.
1032
1033 <p>
1034 (If you didn't use <tt><b>-Z<i>n</i></b></tt> during the installation, and
1035 compiled your own <tt>/vmunix</tt>, then it will not contain support for
1036 multiple graphics cards. To overcome this problem, use the generic kernel,
1037 <tt><b>-j genvmunix</b></tt>, whenever you are running the emulator with a
1038 different setup than the one you used when Ultrix was installed.)
1039
1040 <p>
1041 A note for the historically interested: OSF/1 for MIPS was quite similar
1042 to Ultrix, so that is possible to run as well. If you are unsuccessful
1043 in installing Ultrix or OSF/1 directly in the emulator, you can always
1044 install it on your real machine onto a real SCSI disk, and then copy the
1045 contents of that SCSI disk into a file (using <b><tt>dd(1)</tt></b>), and use
1046 that file as a disk image file in the emulator.
1047
1048
1049
1050
1051
1052
1053 <p><br>
1054 <a name="sprite"></a>
1055 <h3>Sprite for DECstation:</h3>
1056
1057 Sprite was a research operating system at the University of Berkeley.
1058 The Unix Heritage Society (TUHS, <a href="http://www.tuhs.org">www.tuhs.org</a>)
1059 has made available a copy of a Sprite harddisk image for a DECstation 5000/200.
1060 If you want to find out more about Sprite in general, read
1061 <a href="http://www.cs.berkeley.edu/projects/sprite/retrospective.html">
1062 http://www.cs.berkeley.edu/projects/sprite/retrospective.html</a>.
1063
1064 <p>
1065 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1066 <a href="20040711-sprite-1.png"><img src="20040711-sprite-1_small.png"></a>
1067 &nbsp;&nbsp;&nbsp;
1068 <a href="sprite-20040711.png"><img src="sprite-20040711_small.png"></a>
1069
1070 <p>
1071 The following instructions should let you run Sprite in the emulator:
1072
1073 <p>
1074 <ol>
1075 <li>Download the Sprite harddisk image:<pre>
1076 <a href="ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/ds5000.bt">ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/ds5000.bt</a>
1077 83973120 bytes, MD5 = ec84eeeb20fe77b758370d5e312e4a5e
1078
1079 </pre>
1080 <li>Start the emulator with the following command line:<pre>
1081 $ <b>gxemul -X -E dec -e 3max -M128 -d ds5000.bt -j vmsprite -o ''</b>
1082
1083 </pre>
1084 </ol>
1085
1086 <p>
1087 The first time you boot up with the disk image, you will be asked a number
1088 of questions regarding network settings. If you feel like entering correct
1089 values, then you should use the following:
1090 <p>
1091
1092 <pre>
1093 Your machine's Ethernet address: 10:20:30:00:00:10
1094 Your machine's IP: 10.0.0.1
1095 Subnet mask: 0xff000000
1096 Gateway's Ethernet address: 60:50:40:30:20:10
1097 Gateway's IP: 10.0.0.254
1098 </pre>
1099
1100 <p>
1101 Unfortunately, at the end of <a href="ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/boot.txt">ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/boot.txt</a>,
1102 the following sad statement can be found:
1103 <pre>
1104 The bootable Sprite image is meant to be a demonstration of Sprite, not
1105 a robust Sprite system. There are several missing things, such as
1106 floating point and network support.
1107 </pre>
1108
1109 <p>Once you are logged in as root, running <b><tt>xinit</tt></b> will
1110 start the X11 environment.
1111
1112
1113
1114
1115
1116
1117 <p><br>
1118 <a name="declinux"></a>
1119 <h3>Debian GNU/Linux for DECstation:</h3>
1120
1121 <font color="#ef0000">NOTE: This is experimental, and <i>extremely</i>
1122 unstable. During my tests, even pressing the wrong key during the install
1123 (for example the wrong cursor key) can cause a kernel Oops. My success
1124 rate is probably around 50%.
1125
1126 <p>I <i>think</i> this has to do with interrupts from the serial controller.
1127 Hopefully using the <tt><b>-U</b></tt> command line option will reduce the
1128 risk for such crashes. (I haven't had time to come up with a clean
1129 solution to this yet; it feels like a buffer overflow in Linux' serial
1130 driver for the 5000/200, but it is also likely that it is a bug in GXemul.)
1131
1132 <p>Everything runs extremely slow. Even if you have a very fast host
1133 machine, an install attempt can still take several hours! </font>
1134
1135 <p>
1136 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1137 <a href="20041212-debian_1.png"><img src="20041212-debian_1_small.gif"></a>
1138 &nbsp;&nbsp;&nbsp;
1139 <a href="20041212-debian_2.png"><img src="20041212-debian_2_small.gif"></a>
1140 &nbsp;&nbsp;&nbsp;
1141 <a href="20041213-debian_3.png"><img src="20041213-debian_3_small.gif"></a>
1142 &nbsp;&nbsp;&nbsp;
1143 <a href="20041213-debian_4.png"><img src="20041213-debian_4_small.gif"></a>
1144
1145 <p>
1146 The following steps should let you install Debian GNU/Linux for DECstation
1147 onto a harddisk image:
1148
1149 <p>
1150 <ol>
1151 <li>Create an empty harddisk image, which will be the root disk
1152 that Debian installs itself onto:<pre>
1153 $ <b>dd if=/dev/zero of=debian.img bs=1024 count=1 seek=2000000</b>
1154
1155 </pre>
1156 <li>Download an install kernel:<pre>
1157 <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/r3k-kn02/boot.img">http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/r3k-kn02/boot.img</a>
1158
1159 </pre>
1160 <p>
1161 <li>For a text-mode installation, start the emulator like this:<pre>
1162 $ <b>gxemul -E dec -e 3max -U -M64 -o 'console=ttyS3' -d debian.img -O boot.img</b>
1163
1164 </pre>
1165 (If you want to, you can try <b><tt>-X</tt></b> instead of
1166 <b><tt>-o 'console=ttyS3'</tt></b> on the command line. This will
1167 cause Linux to use the graphical framebuffer. Unfortunately, Linux
1168 does not seem to have a driver for the DZ11 keyboard controller yet,
1169 so you cannot interact with the system. You will see the penguin in
1170 the upper lefthand corner while booting, and nicely rendered Unicode
1171 characters, but that's about it.)
1172 <p>
1173 You need to enter some values during the installation procedure, for
1174 example network settings. The following should work:<pre>
1175 DHCP: No, choose "<b>Configure network manually</b>"
1176 IP address: <b>10.0.0.1</b>
1177 Netmask: <b>255.0.0.0</b>
1178 Gateway: <b>10.0.0.254</b>
1179 Name server addresses: <b>10.0.0.254</b>
1180 </pre>
1181 <li>Once the first phase of the install has finished, the following command
1182 should let you boot into Debian, and perform post-install
1183 configuration:<pre>
1184 $ <b>gxemul -E dec -e 3max -U -M64 -o 'console=ttyS3' -d debian.img</b>
1185
1186 </pre>Note: All these steps take a lot of time, so you will have plenty
1187 of time to drink lots of cups of coffee.
1188 <p>
1189 <li>It seems that there's a problem with getting a login prompt on serial
1190 console (at least when I've done test installs), so when the
1191 installation is finished and you're supposed to get a login prompt,
1192 you need to press CTRL-C and type <b><tt>quit</tt></b>, and then:
1193 download a normal kernel (<i>not</i> a RAMDISK kernel):<pre>
1194 <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02">http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02</a>
1195
1196 </pre>and boot Debian using the following command line:<pre>
1197 $ <b>gxemul -E dec -e 3max -U -M64 -o \
1198 'console=ttyS3 root=/dev/sda1 rw init=/bin/sh' \
1199 -d debian.img vmlinux-2.4.27-r3k-kn02</b>
1200
1201 </pre>
1202 You'll enter single-user mode. You need to add a line to
1203 /etc/inittab, to enable logins via serial console.<pre>
1204 sh-2.05b# <b>echo 'T3:23:respawn:/sbin/getty -L ttyS3 9600 vt100' >> /etc/inittab</b>
1205 sh-2.05b# <b>echo 'ttyS3' >> /etc/securetty</b>
1206 sh-2.05b# <b>sync; umount /</b>
1207 sh-2.05b# <b>halt</b>
1208 </pre>
1209 </ol>
1210
1211 <p>
1212 The system should now be ready for everyday use.
1213
1214 <p>
1215 Use this command to boot from the completely installed disk image:<pre>
1216 $ <b>gxemul -E dec -e 3max -U -M64 -o 'console=ttyS3' -d debian.img</b>
1217
1218 </pre>
1219
1220 <p>
1221 [&nbsp;<font color="#ff0000">UPDATE 2005-01-19:</font>&nbsp;
1222 Kaj-Michael Lang noticed that the current CVS-version of
1223 <a href="http://www.linux-mips.org/">linux-mips</a> has
1224 support for keyboards now, on DECstation 5000/200, so it is
1225 possible to run Debian GNU/Linux with framebuffer/keyboard.
1226 (Add <b><tt>-X</tt></b> (or <b><tt>-XY2</tt></b>) and remove the
1227 <b><tt>console=ttyS3</tt></b> option.) He has made a kernel available here:
1228 <a href="http://home.tal.org/~milang/o2/kernels/vmlinux-2.4.29-rc2-r3k-mipsel-decstation">
1229 http://home.tal.org/~milang/o2/kernels/vmlinux-2.4.29-rc2-r3k-mipsel-decstation</a>
1230 It has other problems (ethernet doesn't seem to work, for
1231 example), but at least it doesn't Oops that often.&nbsp;]
1232
1233
1234
1235
1236
1237
1238 <p><br>
1239 <a name="declinuxredhat"></a>
1240 <h3>Redhat Linux for DECstation:</h3>
1241
1242 <font color="#ff0000">NOTE: This is experimental, and <i>extremely</i>
1243 unstable. Read the note about <b><tt>-U</tt></b> in the section on how to
1244 install Debian.
1245 </font>
1246
1247 <p>
1248 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1249 <a href="20041129-redhat_mips.png"><img src="20041129-redhat_mips_small.png"></a>
1250
1251 <p>
1252 The following steps should let you run Redhat Linux for DECstation in GXemul:
1253
1254 <p>
1255 <ol>
1256 <li>Download a kernel. This is a Debian kernel, but it works fine:<pre>
1257 <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02">http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02</a>
1258
1259 </pre>
1260 <li>Download a root filesystem tree:<pre>
1261 <a href="ftp://ftp.uni-wuppertal.de/pub/linux/mips/mipsel-linux/root/mipsel-root-20011216.tgz">ftp://ftp.uni-wuppertal.de/pub/linux/mips/</a>
1262 <a href="ftp://ftp.uni-wuppertal.de/pub/linux/mips/mipsel-linux/root/mipsel-root-20011216.tgz">mipsel-linux/root/mipsel-root-20011216.tgz</a>
1263 19486676 bytes, md5 = 5bcb725c90209479cd7ead8ad0c4a414
1264
1265 </pre>
1266 <li>This is the tricky part: Create an ext2 filesystem image called redhat.img using
1267 the filesystem tree you just downloaded. The disk image should have a MS-DOS
1268 partition table (!), and then one or more ext2 partitions.
1269 (Use loopback mount, or similar. This is probably easiest to do on a Linux host.)
1270 However, in order to actually boot the system you need to modify /etc/fstab.
1271 Change<pre>
1272 /dev/root / nfs defaults 1 1
1273 #/dev/sdc1 / ext2 defaults 1 1
1274 none /proc proc defaults 0 0
1275 none /dev/pts devpts mode=0622 0 0
1276
1277 </pre>to<pre>
1278 #/dev/root / nfs defaults 1 1
1279 /dev/sda1 / ext2 defaults 1 1
1280 none /proc proc defaults 0 0
1281 none /dev/pts devpts mode=0622 0 0
1282
1283 </pre>(Note sda1 instead of sdc1.)
1284 <p>
1285 <li>To boot Linux, start the emulator like this:<pre>
1286 $ <b>gxemul -E dec -e 3max -U -M128 -o \
1287 "console=ttyS3 root=/dev/sda1 ro" -d redhat.img vmlinux-2.4.27-r3k-kn02</b>
1288
1289 </pre>
1290 </ol>
1291
1292 <p>
1293 If you need to boot into single user mode, try the following:<pre>
1294 $ <b>gxemul -E dec -e 3max -U -o "console=ttyS3 root=/dev/sda1 rw init=/bin/sh" \
1295 -d redhat.img vmlinux-2.4.27-r3k-kn02</b>
1296
1297 </pre>
1298
1299 <p>Redhat Linux on DECstation in R3000 mode should work fine with dynamic
1300 binary translation, but if things are buggy, it can be disabled by
1301 using the <b><tt>-B</tt></b> command line option.
1302
1303 <p>
1304 NOTE: You can add <b>-X</b> and remove <b>console=ttyS3</b> from the command
1305 line, if you want to use a graphical framebuffer. Unfortunately, Linux
1306 doesn't have support for keyboards on DECstation 5000/200 yet, so you cannot
1307 actually interact with the sytem. :-(
1308
1309 <p>
1310 [&nbsp;<font color="#ff0000">UPDATE 2005-01-22:</font>&nbsp;
1311 Read the 2005-01-19 update in the Debian section above, and then, if
1312 you do not need ethernet support, try Kaj-Michael Lang's kernel compiled
1313 from <a href="http://www.linux-mips.org/">linux-mips</a>' CVS.
1314 <a href="http://home.tal.org/~milang/o2/patches/vmlinux-2.4.29-rc2-r3k-mipsel-decstation">
1315 http://home.tal.org/~milang/o2/patches/vmlinux-2.4.29-rc2-r3k-mipsel-decstation</a>
1316 It should work with framebuffer/keyboard.&nbsp;]
1317
1318
1319
1320
1321
1322
1323 <p><br>
1324 <hr>
1325
1326
1327
1328
1329
1330
1331
1332 <p><br>
1333 <a name="mach"></a>
1334 <h3>Mach/PMAX:</h3>
1335
1336 Read the following link if you want to know more about Mach in general:
1337 <a href="http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html">
1338 http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html</a>
1339
1340 <p>
1341 <font color="#ff0000">NOTE: Mach for DECstation requires some files
1342 (called 'startup' and 'emulator') which I haven't been able to find
1343 on the web. Without these, Mach will not get very far. These
1344 installation instructions are preliminary.
1345 </font>
1346
1347 <p>
1348 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1349 <a href="20041018-mach_pmax.png"><img src="20041018-mach_pmax_small.png"></a>
1350
1351 <p>
1352 The following steps should let you experiment with running Mach
1353 for DECstation in the emulator:
1354
1355 <p>
1356 <ol>
1357 <li>Compile gxemul with cache emulation: (<b>NOTE: --enable-caches</b>)<pre>
1358 $ <b>./configure --enable-caches; make</b>
1359
1360 </pre>
1361 <li>Download the pmax binary distribution for Mach 3.0:<pre>
1362 <a href="http://lost-contact.mit.edu/afs/athena/user/d/a/daveg/Info/Links/Mach/src/release/pmax.tar.Z">http://lost-contact.mit.edu/afs/athena/user/d/a/daveg/Info/Links/Mach/src/release/pmax.tar.Z</a>
1363 7263343 bytes, md5 = f9d76c240a6e169921a1df99ad560cc0
1364
1365 </pre>
1366 <li>Extract the Mach kernel:<pre>
1367 $ <b>tar xfvz pmax.tar.Z pmax_mach/special/mach.boot.MK83.STD+ANY</b>
1368
1369 </pre>
1370 <li>Create an empty disk image:<pre>
1371 $ <b>dd if=/dev/zero of=disk.img bs=1 count=512 seek=400000000</b>
1372
1373 </pre>
1374 <li>Load the contents of pmax.tar.Z onto the disk image. This is
1375 complicated, and should be described in more detail some time.
1376 For now, use your imagination. (For example using OpenBSD/pmax:
1377 <i>disklabel -E rz1; newfs -O /dev/rz1a;
1378 mount /dev/rz1a /mnt; cd /mnt; download pmax.tar.Z using ftp;
1379 tar xzvf pmax.tar.Z; mv pmax_mach/* .; rmdir pmax_mach;
1380 mkdir mach_servers;
1381 cd mach_servers;
1382 cp ../etc/mach_init .;
1383 cp ../tests/test_service startup;
1384 dd if=/dev/zero of=paging_file bs=65536 count=400;
1385 cd /; sync; umount /mnt</i>)
1386 <p>
1387 <li>Start the emulator with the following command:<pre>
1388 $ <b>gxemul -E dec -e 3max -X -d disk.img \
1389 pmax_mach/special/mach.boot.MK83.STD+ANY</b>
1390
1391 </pre>
1392 </ol>
1393
1394
1395
1396
1397
1398
1399
1400 <p><br>
1401 <a name="openbsdsgiinstall"></a>
1402 <h3>OpenBSD/sgi:</h3>
1403
1404 <a href="http://www.openbsd.org/sgi.html">OpenBSD/sgi</a>
1405 can (almost) run in GXemul on an emulated O2 (SGI-IP32) with root on nfs.
1406
1407 <p>
1408 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1409 <a href="20050617-openbsd-sgi.png"><img src="20050617-openbsd-sgi_small.png"></a>
1410
1411 <p><font color="#ff0000">NOTE: I haven't succeeded all the way with
1412 this yet, and this shows/triggers many bugs in the emulator, but some of
1413 it works.</font>
1414
1415 <p>GXemul does not yet emulate the AHC PCI SCSI controller in the O2. (I have
1416 mailed Adaptec several times, asking for documentation, but never received
1417 any reply.) OpenBSD/sgi can still run, as long as it doesn't use SCSI. For
1418 a simple test with the ramdisk (install) kernel, try dowloading<pre>
1419 <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd</a>
1420
1421 </pre>and run <b><tt>gxemul -E sgi -e o2 bsd.rd</tt></b>.
1422
1423 <p>It might also be possible to netboot. Another emulated machine must
1424 then be used as the nfs root server, and the emulated O2 machine must boot
1425 as a <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=diskless&manpath=OpenBSD+Current&format=html">diskless</a>
1426 client. Performing this setup is quite time consuming, but necessary:
1427
1428 <p>
1429 <ol>
1430 <li>First of all, the "<tt>nfs server</tt>" machine must be set up.
1431 This needs to have a 800 MB <tt>/tftpboot</tt> partition.
1432 <a href="#netbsdinstall">Install NetBSD/pmax 2.0.2 from CDROM</a>
1433 inside the emulator. (Don't forget to add the extra partition!)
1434 <p>
1435 <li>Configure the nfs server machine to act as an nfs server.
1436 Start up the emulated DECstation:<pre>
1437 $ <b>gxemul -M64 -Edec -e3max -d nbsd_pmax.img</b>
1438 </pre>and enter the following commands as <tt>root</tt>
1439 inside the emulator:
1440 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1441 <b>echo hostname=server &gt;&gt; /etc/rc.conf
1442 echo ifconfig_le0=\"inet 10.0.0.2\" &gt;&gt; /etc/rc.conf
1443 echo nameserver 10.0.0.254 &gt;&gt; /etc/resolv.conf
1444 echo 10.0.0.254 &gt; /etc/mygate
1445 echo /tftpboot -maproot=root 10.0.0.1 &gt; /etc/exports
1446 echo rpcbind=YES &gt;&gt; /etc/rc.conf
1447 echo nfs_server=YES &gt;&gt; /etc/rc.conf
1448 echo mountd=YES &gt;&gt; /etc/rc.conf
1449 echo bootparamd=YES &gt;&gt; /etc/rc.conf
1450 printf "client root=10.0.0.2:/tftpboot \\\n swap=10.0.0.2:/tftpboot/swap\n" &gt; /etc/bootparams
1451 echo "10:20:30:00:00:10 client" &gt; /etc/ethers
1452 echo 10.0.0.1 client &gt; /etc/hosts
1453 reboot</b>
1454 </pre></td></tr></table>
1455 <li>Start the DECstation emulation again, and download the
1456 OpenBSD/sgi distribution:<br>(NOTE: This
1457 takes quite some time, even if you have a fast network connection.)
1458 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1459 <b>cd /tftpboot; ftp -i ftp.se.openbsd.org</b>
1460 (log in as anonymous...)
1461 <b>cd pub/OpenBSD/3.7/sgi
1462 mget b* c* e* g* m*
1463 quit
1464 sh
1465 for a in *.tgz; do echo $a; tar zxfp $a; done
1466 echo 10.0.0.2:/tftpboot / nfs rw 0 0 &gt; /tftpboot/etc/fstab
1467 dd if=/dev/zero of=swap bs=1024 count=32768
1468 halt</b>
1469 </pre></td></tr></table>
1470 <li>Download the OpenBSD/sgi GENERIC and RAMDISK kernels:<pre>
1471 <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd</a>
1472 MD5 (bsd) = f16eaf3dcbd51876db7c25f70e6d8a08
1473 <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd</a>
1474 MD5 (bsd.rd) = 4843e6139d8dd04b03d5f0e33e9a4f7b
1475
1476 </pre>
1477 <li>Create a configuration file called <tt>config_client</tt>:
1478 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1479 <font color="#2020cf">!!gxemul
1480 !
1481 ! Configuration file for running OpenBSD/sgi diskless with
1482 ! a NetBSD/pmax machine as the nfs server.
1483 !
1484 ! This config file is for the client.</font>
1485
1486 <b>emul(
1487 net(
1488 add_remote("127.0.0.1:12444") </b>! the server<b>
1489 local_port(12445) </b>! the client<b>
1490 )
1491
1492 machine(
1493 name("client machine")
1494 serial_nr(1)
1495
1496 type("sgi")
1497 subtype("o2")
1498
1499 </b>! load("bsd")<b>
1500 load("bsd.rd")
1501 )
1502 )</b>
1503 </pre></td></tr></table>
1504 ... and another configuration file for the server,
1505 <tt>config_server</tt>:
1506 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1507 <font color="#2020cf">!!gxemul</font>
1508 <b>emul(
1509 net(
1510 local_port(12444) </b>! the server<b>
1511 add_remote("127.0.0.1:12445") </b>! the client<b>
1512 )
1513
1514 machine(
1515 name("nfs server")
1516 serial_nr(2)
1517
1518 type("dec")
1519 subtype("5000/200")
1520
1521 disk("nbsd_pmax.img")
1522 )
1523 )</b>
1524 </pre></td></tr></table>
1525 <li>Boot the "<tt>nfs server</tt>" and the OpenBSD/sgi
1526 "<tt>client machine</tt>" as two separate emulator instances:<pre>
1527 in one xterm:
1528 $ <b>gxemul @config_server</b>
1529
1530 and then, in another xterm:
1531 $ <b>gxemul @config_client</b>
1532
1533 </pre>
1534 <li>In the OpenBSD/sgi window, choose "S" (for Shell), and type:
1535 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1536 <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254
1537 mount -v 10.0.0.2:/tftpboot /mnt
1538 cd /mnt/dev; ./MAKEDEV all; cd /; umount /mnt
1539 halt</b>
1540 </pre></td></tr></table>
1541 </ol>
1542
1543 <p>You might want to log in as <tt>root</tt> on the server machine, and
1544 run <tt>tcpdump -lnvv</tt> or similar, to see that what the client machine
1545 actually does on the network. The <tt>MAKEDEV</tt> script takes almost
1546 forever, so be patient.
1547
1548 <p><font color="#ff0000">NOTE: Everything up to this point should work.
1549 However, the next step (in gray) doesn't actually work:</font>
1550
1551 <p><font color="#888888">Once everything has been set up correctly, change
1552 <tt>bsd.rd</tt> in <tt>config_client</tt> to just <tt>bsd</tt> (the GENERIC
1553 kernel). It should now be possible to boot OpenBSD/sgi using the NetBSD/pmax
1554 nfs server. (When asked for "<tt>root device :</tt>" on the OpenBSD machine,
1555 enter <tt><b>mec0</b></tt>.)</font>
1556
1557 <p><font color="#ff0000">But it doesn't work. Probably because GXemul's
1558 implementation of the mec (ethernet card used in the O2) is too much of
1559 a quick hack. For now, use the <tt>bsd.rd</tt> kernel, and (at every
1560 boot) type:</font><pre>
1561 <b>s</b> (for Shell)
1562 <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254</b>
1563 <b>mount -v 10.0.0.2:/tftpboot /mnt</b>
1564 <b>cd /mnt; usr/sbin/chroot .</b>
1565 <b>sh etc/rc</b>
1566 </pre>
1567
1568 <p><font color="#ff0000">This will not cause OpenBSD to be booted
1569 normally, but at least a few basic things will work.
1570 By the way, the emulator performs so poorly, that you will have time to
1571 fetch several cups of coffee for each of the steps above.</font>
1572
1573
1574
1575
1576
1577
1578
1579
1580 </p>
1581
1582 </body>
1583 </html>

  ViewVC Help
Powered by ViewVC 1.1.26