/[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

Annotation of /trunk/doc/guestoses.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 26 - (hide annotations)
Mon Oct 8 16:20:10 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: text/html
File size: 77286 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1264 2006/06/25 11:08:04 debug Exp $
20060624	Replacing the error-prone machine type initialization stuff
		with something more reasonable.
		Finally removing the old "cpu_run" kludge; moving around stuff
		in machine.c and emul.c to better suit the dyntrans system.
		Various minor dyntrans cleanups (renaming translate_address to
		translate_v2p, and experimenting with template physpages).
20060625	Removing the speed hack which separated the vph entries into
		two halves (code vs data); things seem a lot more stable now.
		Minor performance hack: R2000/R3000 cache isolation now only
		clears address translations when going into isolation, not
		when going out of it.
		Fixing the MIPS interrupt problems by letting mtc0 immediately
		cause interrupts.

==============  RELEASE 0.4.0.1  ==============


1 dpavlin 12 <html><head><title>Gavare's eXperimental Emulator:&nbsp;&nbsp;&nbsp;Installing and running "guest OSes"</title>
2     <meta name="robots" content="noarchive,nofollow,noindex"></head>
3 dpavlin 4 <body bgcolor="#f8f8f8" text="#000000" link="#4040f0" vlink="#404040" alink="#ff0000">
4     <table border=0 width=100% bgcolor="#d0d0d0"><tr>
5     <td width=100% align=center valign=center><table border=0 width=100%><tr>
6     <td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6">
7 dpavlin 22 <b>Gavare's eXperimental Emulator:</b></font><br>
8 dpavlin 4 <font color="#000000" size="6"><b>Installing and running "guest OSes"</b>
9     </font></td></tr></table></td></tr></table><p>
10 dpavlin 2
11     <!--
12    
13 dpavlin 26 $Id: guestoses.html,v 1.149 2006/06/25 02:36:46 debug Exp $
14 dpavlin 2
15 dpavlin 22 Copyright (C) 2003-2006 Anders Gavare. All rights reserved.
16 dpavlin 2
17     Redistribution and use in source and binary forms, with or without
18     modification, are permitted provided that the following conditions are met:
19    
20     1. Redistributions of source code must retain the above copyright
21     notice, this list of conditions and the following disclaimer.
22     2. Redistributions in binary form must reproduce the above copyright
23     notice, this list of conditions and the following disclaimer in the
24     documentation and/or other materials provided with the distribution.
25     3. The name of the author may not be used to endorse or promote products
26     derived from this software without specific prior written permission.
27    
28     THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
29     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31     ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34     OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36     LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37     OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38     SUCH DAMAGE.
39    
40     -->
41    
42 dpavlin 12
43 dpavlin 2 <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 dpavlin 24 <li><a href="#netbsdpmaxinstall">NetBSD/pmax 3.0 or 1.6.2</a>
52     <li><a href="#netbsdarcinstall">NetBSD/arc 1.6.2</a>
53     <li><a href="#netbsdhpcmipsinstall">NetBSD/hpcmips 3.0</a>
54     <li><a href="#netbsdcobaltinstall">NetBSD/cobalt 2.1</a>
55     <li><a href="#netbsdevbmipsinstall">NetBSD/evbmips 2.1</a>
56     <li><a href="#netbsdsgimips">NetBSD/sgimips 3.0</a>
57     <li><a href="#netbsdcatsinstall">NetBSD/cats 3.0</a>
58     <li><a href="#netbsdevbarminstall">NetBSD/evbarm 2.1</a>
59     <li><a href="#netbsdprepinstall">NetBSD/prep 2.1</a>
60     <li><a href="#openbsdpmaxinstall">OpenBSD/pmax 2.8-BETA</a>
61     <li><a href="#openbsdcatsinstall">OpenBSD/cats 3.9</a>
62     <li><a href="#ultrixinstall">Ultrix/RISC 4.5</a>
63 dpavlin 10 <li><a href="#sprite">Sprite for DECstation</a>
64     <li><a href="#declinux">Debian GNU/Linux for DECstation</a>
65     <li><a href="#declinuxredhat">Redhat Linux for DECstation</a>
66 dpavlin 2 </ul>
67    
68    
69    
70    
71    
72    
73     <p><br>
74     <a name="generalnotes"></a>
75     <h3>General notes on running "guest OSes":</h3>
76    
77     The emulator works well enough to run complete operating systems. These
78 dpavlin 24 are often refered to as <i>guest</i> operating systems, in contrast to the
79     <i>host</i> operating system which the emulator is running under.
80 dpavlin 2
81 dpavlin 24 <p>Although it is possible to let a guest OS access real hardware, such as
82     harddisks, it is much more flexible and attractive to simulate harddisks
83     using files residing in the host's filesystem. On Unix-like systems, files
84     may contain holes, which makes this really simple. To the guest operating
85 dpavlin 2 system, the harddisk image looks and acts like a real disk.
86    
87 dpavlin 24 <p>The version numbers of the various operating systems were the latest
88     versions that worked satisfactory with GXemul at the time this page was
89     updated; if new versions have been released since then, they might work as
90     well.
91 dpavlin 2
92 dpavlin 24 <p>In addition to the "working" guest operating systems listed above,
93     you might find the following information interesting: (Some of these might
94     not be relevant for this specific release of GXemul.)
95 dpavlin 2
96 dpavlin 24 <ul>
97     <li><a href="#mach">Mach/PMAX</a>
98     <li><a href="#openbsdsgiinstall">OpenBSD/sgi</a>
99     <li><a href="#openbsdarcinstall">OpenBSD/arc 2.3</a>
100     <li><a href="#debiancats">Debian GNU/Linux for CATS</a>
101     <li><a href="#netbsdnetwinderinstall">NetBSD/netwinder 2.1</a>
102     <li><a href="#netbsdmacppcinstall">NetBSD/macppc 3.0</a>
103     </ul>
104 dpavlin 2
105 dpavlin 24 <p>Some operating systems are listed with a version number <i>less</i>
106     than what was available at the time of this GXemul release (e.g.
107     NetBSD/prep). The reasons for this is because of incompleteness in
108     GXemul's machine, device, and/or processor implementations.
109 dpavlin 2
110    
111    
112    
113 dpavlin 24
114    
115    
116 dpavlin 2 <p><br>
117 dpavlin 22 <a name="netbsdpmaxinstall"></a>
118 dpavlin 10 <h3>NetBSD/pmax:</h3>
119 dpavlin 2
120 dpavlin 24 <p><a href="http://www.netbsd.org/Ports/pmax/">NetBSD/pmax</a> was the
121     first guest OS that could be installed onto a disk image in GXemul. The
122     device emulation of the DECstation 5000/200 is reasonably complete; it
123     should be enough to emulate a networked X-windows-capable workstation.
124    
125     <p>NetBSD/pmax 1.6.2 works perfectly with X out-of-the-box. Unfortunately,
126     newer NetBSD releases have changed slightly, and nowadays X does not
127     work straight away. (It seems that this has to do with NetBSD switching
128     console system to "WSCONS" somewhere between 1.6.2 and 2.0. I haven't had
129     time to figure out how to make it work; at worst it might require a kernel
130     recompilation.) What this means is that if you want to use emulated X11,
131     then you need to run NetBSD 1.6.2. If you feel that you only need
132     serial-console emulation, then choose the latest NetBSD version available.
133    
134     <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
135 dpavlin 6 <a href="20050317-example.png"><img src="20050317-example_small.png"></a>
136 dpavlin 4
137 dpavlin 24 <p>To install NetBSD/pmax onto a harddisk image in the emulator,
138     follow these instructions:
139 dpavlin 2
140 dpavlin 10 <p><ol start="1">
141 dpavlin 2 <li>Create an empty harddisk image, which will be the root disk
142     that NetBSD installs itself onto:<pre>
143 dpavlin 24 <b>dd if=/dev/zero of=nbsd_pmax.img bs=1024 count=1 seek=1900000</b>
144 dpavlin 2
145     </pre>
146     </ol>
147 dpavlin 4
148 dpavlin 2 <p>
149     From this point, there are two separate ways to continue the installation.
150     You can either download a CD-ROM iso image (and let the installation
151     program copy files from the CD-ROM image to the harddisk image), or you
152     can install via ftp. For an installation from a CD-ROM image, follow these
153     steps:
154     <p>
155     <ol start="2">
156    
157     <li>Download a NetBSD CD-ROM iso image:<pre>
158 dpavlin 24 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/iso/1.6.2/pmaxcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/iso/1.6.2/pmaxcd.iso</a>
159 dpavlin 2 or
160 dpavlin 22 <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/pmaxcd-3.0.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/pmaxcd-3.0.iso</a>
161 dpavlin 2
162     </pre>
163     <li>Start the emulator like this:<pre>
164 dpavlin 24 <b>gxemul -e 3max -d nbsd_pmax.img -d bc:pmaxcd-3.0.iso</b>
165 dpavlin 22 (or <b>pmaxcd.iso</b>)
166 dpavlin 2 </pre>
167 dpavlin 10 and proceed like you would do if you were installing NetBSD on a real
168 dpavlin 12 DECstation. Remember to choose <tt>vt100</tt> as your terminal
169     type, and not <tt>rcons</tt>.
170 dpavlin 2 </ol>
171     <p>
172     For an ftp install, substitute steps 2 and 3 above with these:
173     <p>
174     <ol start="2">
175    
176 dpavlin 10 <li>Download a NetBSD pmax INSTALL kernel:<pre>
177 dpavlin 24 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-1.6.2/pmax/binary/kernel/netbsd-INSTALL.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-1.6.2/pmax/binary/kernel/netbsd-INSTALL.gz</a>
178 dpavlin 2 or
179 dpavlin 22 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/pmax/binary/kernel/netbsd-INSTALL.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/pmax/binary/kernel/netbsd-INSTALL.gz</a>
180 dpavlin 2
181     </pre>
182     <li>Start the emulator like this:<pre>
183 dpavlin 24 <b>gxemul -e 3max -d nbsd_pmax.img -O netbsd-INSTALL.gz</b>
184 dpavlin 2 </pre>
185 dpavlin 10 and proceed like you would do if you were installing NetBSD on a real
186 dpavlin 12 DECstation. Remember to choose <tt>vt100</tt> as your terminal
187     type, and not <tt>rcons</tt>. Suitable networking parameters are as
188     follows:<pre>
189 dpavlin 2 Which device shall I use? [le0]: <b>le0</b>
190     ..
191     Your DNS domain: <b>mydomain.com</b>
192     Your host name: <b>foo</b>
193     Your IPv4 number: <b>10.0.0.1</b>
194     IPv4 Netmask [0xff000000]: <b>0xff000000</b>
195     IPv4 gateway: <b>10.0.0.254</b>
196     IPv4 name server: <b>10.0.0.254</b>
197     </pre>
198 dpavlin 10 (If using 10.0.0.254 as the nameserver fails, then try entering the
199     IP number of a real-world nameserver instead.)
200     </ol>
201 dpavlin 2
202 dpavlin 12 <p>If you want to use a graphical framebuffer during the install, you can
203     add <b><tt>-X -Y2</tt></b> to the command line, and choose <tt>rcons</tt>
204     instead of <tt>vt100</tt> when prompted with which terminal type to use.
205     (By just using <tt><b>-X</b></tt>, you will get a full-size framebuffer
206     window.)
207 dpavlin 2
208 dpavlin 12 <p>When the installation is finished, the following command should start
209 dpavlin 2 NetBSD from the harddisk image:<pre>
210 dpavlin 12 <b>gxemul -e 3max -d nbsd_pmax.img</b>
211 dpavlin 2 </pre>
212    
213 dpavlin 24 <p>If you installed NetBSD/pmax 1.6.2, then try the following to start
214     with a framebuffer:<pre>
215 dpavlin 12 <b>gxemul -X -e 3max -d nbsd_pmax.img</b>
216 dpavlin 2 </pre>
217 dpavlin 12 and log in as <tt>root</tt> and type <tt>startx</tt> to start X windows.
218 dpavlin 2
219    
220    
221    
222    
223    
224    
225 dpavlin 12
226 dpavlin 2 <p><br>
227     <a name="netbsdarcinstall"></a>
228 dpavlin 10 <h3>NetBSD/arc:</h3>
229 dpavlin 2
230 dpavlin 24 It is possible to install and run an old version of <a
231 dpavlin 10 href="http://www.netbsd.org/Ports/arc/">NetBSD/arc</a>
232     on an emulated Acer PICA-61 in the emulator.
233 dpavlin 2
234     <p>
235 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
236     <a href="20041024-netbsd-arc-installed.gif"><img src="20041024-netbsd-arc-installed_small.gif"></a>
237    
238     <p>
239 dpavlin 24 To install NetBSD/arc 1.6.2 from a CDROM image onto an emulated
240     harddisk image, follow these instructions:
241 dpavlin 2
242     <p>
243     <ol start="1">
244     <li>Create an empty harddisk image, which will be the root disk
245     that NetBSD installs itself onto:<pre>
246 dpavlin 12 <b>dd if=/dev/zero of=nbsd_arc.img bs=1024 count=1 seek=900000</b>
247 dpavlin 2
248     </pre>
249 dpavlin 12 <li>Download a NetBSD/arc 1.6.2 CDROM image, and a generic NetBSD/arc
250     kernel:<pre>
251 dpavlin 24 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/iso/1.6.2/arccd.iso">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/iso/1.6.2/arccd.iso</a>
252     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-1.6.2/arc/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/NetBSD-1.6.2/arc/binary/kernel/netbsd-GENERIC.gz</a>
253 dpavlin 2
254     </pre>
255     <li>Start the emulator using this command line:<pre>
256 dpavlin 12 <b>gxemul -e pica -x -d nbsd_arc.img -d bc:arccd.iso \
257 dpavlin 6 -j arc/binary/kernel/netbsd.RAMDISK.gz</b>
258 dpavlin 2
259     </pre>
260 dpavlin 6 (Try removing <tt>-x</tt> if you have problems with the xterm.)
261     <p>
262 dpavlin 2 <li>From now on, you have to use your imagination, as there is no
263 dpavlin 24 automatic installation program for NetBSD/arc 1.6.2. Here are
264     some tips and hints on how you can proceed with the install:
265 dpavlin 12 <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
266     <b>mount /dev/cd0a /mnt2
267     disklabel -i -I sd0</b> (for example 'a', '4.2BSD', '1c',
268     '700M', 'b', 'swap', '701M', '$', 'P', 'W', 'y', and 'Q')
269     <b>newfs /dev/sd0a
270     mount /dev/sd0a /mnt
271     cd /mnt
272     for a in /mnt2/arc/binary/sets/*.tgz; do echo $a; tar xzpf $a; done
273     cd dev; sh MAKEDEV all
274     cd ../etc; echo "rc_configured=YES" &gt;&gt; rc.conf
275     cat > /mnt/etc/fstab
276     /dev/sd0a / ffs rw 1 1
277     /dev/sd0b none swap sw 0 0
278 dpavlin 24 </b>(press ctrl-d)
279 dpavlin 12 <b>cd /; umount /mnt; umount /mnt2
280     halt</b>
281     </pre></td></tr></table>
282 dpavlin 2 </ol>
283    
284 dpavlin 10 <p>You can now use the generic NetBSD/arc kernel to boot from the harddisk
285     image, using the following command:<pre>
286 dpavlin 12 <b>gxemul -e pica -x -d nbsd_arc.img netbsd-GENERIC.gz</b>
287 dpavlin 2
288     </pre>
289    
290 dpavlin 10 <p>When asked for "<tt>root device: </tt>", enter <b><tt>sd0</tt></b>.
291 dpavlin 2
292    
293    
294    
295    
296    
297    
298     <p><br>
299     <a name="netbsdhpcmipsinstall"></a>
300 dpavlin 10 <h3>NetBSD/hpcmips:</h3>
301 dpavlin 2
302 dpavlin 10 It is possible to install <a
303     href="http://www.netbsd.org/Ports/hpcmips/">NetBSD/hpcmips</a> onto a disk
304     image, on an an emulated MobilePro 770, 780, 800, or 880. The emulator
305     treats the different machine models as being almost identical; the most
306     important difference is regarding the framebuffer.
307 dpavlin 2
308 dpavlin 10 <p><table border="0">
309 dpavlin 2 <tr>
310     <td width="80">&nbsp;</td>
311     <td><u>Model:</u></td>
312     <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
313     <td><u>Framebuffer size/depth:</u></td>
314     <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
315     <td><u>Framebuffer address:</u></td>
316     </tr>
317     <tr>
318     <td></td>
319     <td>MobilePro 770 (<super>*2</super>)</td>
320     <td></td>
321     <td>640 x 240, 16 bits</td>
322     <td></td>
323     <td>0xa000000</td>
324     </tr>
325     <tr>
326     <td></td>
327     <td>MobilePro 780</td>
328     <td></td>
329     <td>640 x 240, 16 bits</td>
330     <td></td>
331     <td>0xa180100 (<super>*</super>)</td>
332     </tr>
333     <tr>
334     <td></td>
335     <td>MobilePro 800</td>
336     <td></td>
337     <td>800 x 600, 16 bits</td>
338     <td></td>
339     <td>0xa000000</td>
340     </tr>
341     <tr>
342     <td></td>
343     <td>MobilePro 880</td>
344     <td></td>
345     <td>800 x 600, 16 bits</td>
346     <td></td>
347     <td>0xa0ea600 (<super>*</super>)</td>
348     </tr>
349     </table>
350    
351     <p>
352 dpavlin 24 (<super>*</super>) = not aligned at a page boundary, so it will not work
353     efficiently with the current dyntrans system. Using this mode will still
354 dpavlin 2 work, but each load and store will be emulated much more slowly than is
355     possible with an aligned framebuffer.
356    
357     <p>
358     (<super>*2</super>) = The MobilePro 770's cursor keys work differently
359     than the other models, for some reason. (This is a known bug.)
360    
361     <p>
362 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
363     <a href="20050427-netbsd-hpcmips-1.png"><img src="20050427-netbsd-hpcmips-1_small.png"></a>
364     &nbsp;&nbsp;&nbsp;
365     <a href="20050427-netbsd-hpcmips-2.png"><img src="20050427-netbsd-hpcmips-2_small.png"></a>
366    
367     <p>
368 dpavlin 2 These instructions show an example of how to install
369 dpavlin 12 NetBSD/hpcmips on an emulated MobilePro 770:
370 dpavlin 2
371     <p>
372     <ol start="1">
373     <li>Create an empty harddisk image, which will be the root disk
374     that you will install NetBSD/hpcmips onto:<pre>
375 dpavlin 12 <b>dd if=/dev/zero of=nbsd_hpcmips.img bs=1024 count=1 seek=1990000</b>
376 dpavlin 2
377     </pre>
378 dpavlin 22 <li>Download the NetBSD/hpcmips 3.0 ISO image, and a generic kernel:<pre>
379     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/">ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0</a>/<a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/hpcmipscd-3.0.iso">hpcmipscd-3.0.iso</a>
380 dpavlin 2
381 dpavlin 22 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/hpcmips/binary/kernel/">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/hpcmips/binary/kernel</a>/<a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/hpcmips/binary/kernel/netbsd-GENERIC.gz">netbsd-GENERIC.gz</a>
382 dpavlin 12
383     </pre>
384 dpavlin 2 <p>
385     <li>Start the installation like this:<pre>
386 dpavlin 24 <b>gxemul -e mobilepro770 -X -d nbsd_hpcmips.img \
387 dpavlin 22 -d b:hpcmipscd-3.0.iso -j hpcmips/installation/netbsd.gz</b>
388 dpavlin 2
389     </pre>
390     and proceed like you would do if you were installing NetBSD on a real
391 dpavlin 12 MobilePro 770. (Install onto wd0, choose "Use entire disk" when
392 dpavlin 20 doing the MBR partitioning, and choose to install from CD-ROM.)
393 dpavlin 2 </ol>
394    
395     <p>
396     If everything worked, NetBSD should now be installed on the disk image.
397 dpavlin 12 Use the following command line to boot the emulated hpcmips machine:<pre>
398     <b>gxemul -e mobilepro770 -X -d nbsd_hpcmips.img netbsd-GENERIC.gz</b>
399 dpavlin 2
400     </pre>
401    
402 dpavlin 12 <p>If you change your mind at this point regarding which machine type to
403     emulate, you might for example prefer a MobilePro 800, then you can change
404     that at any time. NetBSD/hpcmips is designed to be able to boot on many
405     types, without any need to change the kernel.
406 dpavlin 2
407 dpavlin 12 <p>When you have logged in as <tt>root</tt>, you can use <tt>startx</tt> to
408     start X Windows, but there is no mouse support yet so only keyboard input
409     is available. This makes it a bit akward to use X.
410 dpavlin 2
411 dpavlin 10
412 dpavlin 2
413    
414    
415    
416    
417    
418 dpavlin 4 <p><br>
419     <a name="netbsdcobaltinstall"></a>
420 dpavlin 10 <h3>NetBSD/cobalt:</h3>
421 dpavlin 4
422     <a href="http://www.netbsd.org/Ports/cobalt/">NetBSD/cobalt</a> is tricky
423     to install, because the Cobalt machines were designed for Linux, and not
424 dpavlin 24 very flexible. There is no traditional INSTALL kernel for NetBSD/cobalt.
425     One way to install the NetBSD/cobalt distribution onto a disk image is to
426     do it from another (emulated) machine.
427 dpavlin 4
428     <p>
429     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
430     <a href="20050413-netbsd-cobalt.png"><img src="20050413-netbsd-cobalt_small.png"></a>
431    
432     <p>
433     The following instructions will let you install NetBSD/cobalt onto a disk
434     image, from an emulated DECstation 3MAX machine:
435    
436     <p>
437     <ol>
438     <li>Create an empty harddisk image, which will be the disk image
439     that you will install NetBSD/cobalt onto:<pre>
440 dpavlin 12 <b>dd if=/dev/zero of=nbsd_cobalt.img bs=1024 count=1 seek=1999000</b>
441 dpavlin 4
442     </pre>
443 dpavlin 20 <li>Download the generic kernel for Cobalt and the 2.1 ISO image:<pre>
444     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/cobalt/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/cobalt/binary/kernel/netbsd-GENERIC.gz</a>
445     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/cobaltcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/cobaltcd.iso</a>
446 dpavlin 4
447 dpavlin 12 </pre>
448 dpavlin 4 <p>
449 dpavlin 22 <li>Install NetBSD/pmax 3.0 according to instructions
450     <a href="#netbsdpmaxinstall">further up on this page</a>.
451 dpavlin 6 <p>
452 dpavlin 4 <li>Start NetBSD/pmax like this:<pre>
453 dpavlin 24 <b>gxemul -e3max -d nbsd_pmax.img -d cobaltcd.iso -d nbsd_cobalt.img</b>
454 dpavlin 4
455     </pre>
456     <li>Log in as root (on the emulated 3MAX machine), and execute the
457 dpavlin 12 following commands: (adjust according to taste)
458     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
459     <b>newfs /dev/sd1c
460     mount /dev/cd0c /mnt
461     mkdir /mnt2; mount /dev/sd1c /mnt2
462     cd /mnt2; sh
463     for a in /mnt/cobalt/binary/sets/*.tgz; do echo $a; tar zxfp $a; done
464     exit
465     cd dev; sh ./MAKEDEV all; cd ../etc
466     echo rc_configured=YES &gt;&gt; rc.conf
467     echo "/dev/wd0d / ffs rw 1 1" > fstab
468     cd /; umount /mnt; umount /mnt2; halt</b>
469     </pre></td></tr></table>
470 dpavlin 4 </ol>
471    
472     <p>
473     You should now be able to boot NetBSD/cobalt like this:<pre>
474 dpavlin 12 <b>gxemul -M128 -E cobalt -d nbsd_cobalt.img netbsd-GENERIC.gz</b>
475 dpavlin 4 </pre>
476    
477     Note that the installation instructions above create a filesystem
478     <i>without</i> a disklabel, so there is only one ffs partition and no
479     swap. You will need to enter the following things when booting with the
480     generic kernel:<pre>
481     root device (default wd0a): <b>wd0d</b>
482     dump device (default wd0b): <b>none</b>
483     file system (default generic): <b>ffs</b>
484 dpavlin 6 init path (default /sbin/init): <i>(just press enter here)</i>
485 dpavlin 4 </pre>
486    
487    
488    
489    
490    
491    
492    
493 dpavlin 2 <p><br>
494 dpavlin 10 <a name="netbsdevbmipsinstall"></a>
495     <h3>NetBSD/evbmips:</h3>
496 dpavlin 2
497 dpavlin 10 <a href="http://www.netbsd.org/Ports/evbmips/">NetBSD/evbmips</a> can run
498     in GXemul on an emulated Malta evaluation board (with a 5Kc or 4Kc CPU).
499 dpavlin 2
500     <p>
501 dpavlin 10 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
502     <a href="20050622-netbsd-evbmips-malta.png"><img src="20050622-netbsd-evbmips-malta_small.png"></a>
503 dpavlin 2
504 dpavlin 10 <p>It is tricky to install, because there is (as far as I know) no INSTALL
505     kernel. One way to install the NetBSD/evbmips distribution onto a disk
506 dpavlin 14 image is to install the files using another (emulated) machine.
507 dpavlin 10
508 dpavlin 2 <p>
509 dpavlin 10 The following instructions will let you install NetBSD/evbmips onto a disk
510     image, from an emulated DECstation 3MAX machine:
511 dpavlin 2
512     <p>
513 dpavlin 10 <ol>
514 dpavlin 22 <li>Install NetBSD/pmax 3.0 according to instructions
515     <a href="#netbsdpmaxinstall">further up on this page</a>.
516 dpavlin 12 <p>
517 dpavlin 10 <li>Create an empty harddisk image, which will be the disk image
518     that you will install NetBSD onto:<pre>
519 dpavlin 12 <b>dd if=/dev/zero of=nbsd_malta.img bs=1024 count=1 seek=999000</b>
520 dpavlin 2
521 dpavlin 10 </pre>
522 dpavlin 20 <li>Download the generic kernel and the 2.1 ISO image:<pre>
523     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/evbmips-mipsel/binary/kernel/netbsd-MALTA.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/evbmips-mipsel/binary/kernel/netbsd-MALTA.gz</a>
524     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/evbmips-mipselcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/evbmips-mipselcd.iso</a>
525 dpavlin 10
526 dpavlin 12 </pre>
527 dpavlin 10 <p>
528     <li>Start NetBSD/pmax like this:<pre>
529 dpavlin 24 <b>gxemul -e 3max -d nbsd_pmax.img -d nbsd_malta.img -d evbmips-mipselcd.iso</b>
530 dpavlin 10
531 dpavlin 12 </pre>and execute the following commands as <tt>root</tt>:
532     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
533     <b>newfs /dev/sd1c
534     mount /dev/cd0c /mnt
535     mkdir /mnt2; mount /dev/sd1c /mnt2
536     cd /mnt2; sh
537     for a in /mnt/evbmips-mipsel/binary/sets/*.tgz; do echo $a; tar zxfp $a; done
538     exit
539     cd dev; sh ./MAKEDEV all; cd ../etc
540     echo rc_configured=YES >> rc.conf
541     echo "/dev/wd0c / ffs rw 1 1" > fstab
542     cd /; umount /mnt; umount /mnt2; halt</b>
543     </pre></td></tr></table>
544 dpavlin 10 </ol>
545    
546 dpavlin 12 <p>You should now be able to boot NetBSD/evbmips using this command:<pre>
547     <b>gxemul -e malta -d nbsd_malta.img netbsd-MALTA.gz</b>
548 dpavlin 10 </pre>
549    
550 dpavlin 20 <p>NOTE: To select a 4Kc (MIPS32) CPU instead of the default 5Kc
551 dpavlin 10 (MIPS64) CPU, add <tt><b>-C 4Kc</b></tt> to the command line. With NetBSD
552 dpavlin 20 2.1, however, there will be little or no difference in functionality, as
553     NetBSD still runs in 32-bit mode on 64-bit MIPS CPUs. There are two things
554     that differ:<ol>
555 dpavlin 24 <li>The dynamic translation core runs faster when emulating 32-bit
556     processors, so <tt><b>-C 4Kc</b></tt> might make things go faster.
557 dpavlin 20 <li>4Kc only has 16 TLB entries, whereas 5Kc has 48. This makes 4Kc
558 dpavlin 24 emulation slower in general, because there are more TLB misses.
559 dpavlin 20 </ol>
560 dpavlin 10
561 dpavlin 20 <p>The installation instructions above create a filesystem
562 dpavlin 10 <i>without</i> a disklabel, so there is only one ffs partition and no
563     swap. You will need to enter the following things when booting with the
564     generic kernel:<pre>
565     root device (default wd0a): <b>wd0c</b>
566     dump device (default wd0b): <b>none</b>
567     file system (default generic): <b>ffs</b>
568     init path (default /sbin/init): <i>(just press enter here)</i>
569     </pre>
570    
571    
572    
573    
574    
575    
576    
577     <p><br>
578     <a name="netbsdsgimips"></a>
579     <h3>NetBSD/sgimips:</h3>
580    
581     <p>
582     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
583 dpavlin 24 <a href="20060623-netbsd-sgimips-3.0.png"><img src="20060623-netbsd-sgimips-3.0_small.png"></a>
584 dpavlin 10
585     <p><a href="http://www.netbsd.org/Ports/sgimips/">NetBSD/sgimips</a> can run
586     in GXemul on an emulated O2 (SGI-IP32). However, GXemul does not yet
587     emulate the AHC PCI SCSI controller in the O2. (I have mailed Adaptec
588     several times, asking for documentation, but never received any reply.)
589 dpavlin 12 NetBSD can still run in the emulator, as long as it doesn't use SCSI.
590 dpavlin 10
591 dpavlin 24 <p>For a simple test with the ramdisk/install kernel, try
592 dpavlin 10 dowloading<pre>
593 dpavlin 24 <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz</a>
594 dpavlin 10
595 dpavlin 24 </pre>and run&nbsp;&nbsp;<b><tt>gxemul -x -e o2 netbsd-INSTALL32_IP3x.gz</tt></b>.
596 dpavlin 10
597     <p>It is possible to set up an environment for netbooting the emulated SGI
598     machine off of another emulated machine. Performing this setup is quite
599     time consuming, but necessary:
600    
601     <p>
602     <ol>
603     <li>First of all, the "<tt>nfs server</tt>" machine must be set up.
604     This needs to have a 750 MB <tt>/tftpboot</tt> partition.
605 dpavlin 22 <a href="#netbsdpmaxinstall">Install NetBSD/pmax 3.0 from CDROM</a>.
606 dpavlin 12 (Don't forget to add the extra partition!)
607 dpavlin 10 <p>
608     <li>Configure the nfs server machine to act as an nfs server.
609     Start up the emulated DECstation:<pre>
610 dpavlin 24 <b>gxemul -e 3max -d nbsd_pmax.img</b>
611 dpavlin 10 </pre>and enter the following commands as <tt>root</tt>
612     inside the emulator:
613     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
614     <b>echo hostname=server &gt;&gt; /etc/rc.conf
615     echo ifconfig_le0=\"inet 10.0.0.2\" &gt;&gt; /etc/rc.conf
616     echo nameserver 10.0.0.254 &gt;&gt; /etc/resolv.conf
617     echo 10.0.0.254 &gt; /etc/mygate
618     echo /tftpboot -maproot=root 10.0.0.1 &gt; /etc/exports
619     echo rpcbind=YES &gt;&gt; /etc/rc.conf
620     echo nfs_server=YES &gt;&gt; /etc/rc.conf
621     echo mountd=YES &gt;&gt; /etc/rc.conf
622     echo bootparamd=YES &gt;&gt; /etc/rc.conf
623     printf "client root=10.0.0.2:/tftpboot \\\n swap=10.0.0.2:/tftpboot/swap\n" &gt; /etc/bootparams
624     echo "bootps dgram udp wait root /usr/sbin/bootpd bootpd -d 4 -h 10.0.0.2" &gt;&gt; /etc/inetd.conf
625     cat &gt;&gt; /etc/bootptab
626     client:\
627     :ht=ether:\
628     :ha=102030000010:\
629     :sm=255.0.0.0:\
630     :lg=10.0.0.254:\
631     :ip=10.0.0.1:\
632     :rp=/tftpboot:
633     </b>(press CTRL-D)
634     <b>echo "10:20:30:00:00:10 client" &gt; /etc/ethers
635     echo 10.0.0.1 client &gt; /etc/hosts
636     reboot</b>
637     </pre></td></tr></table>
638     <li>Start the DECstation emulation again, and download the
639     NetBSD/sgimips distribution sets:<br>(NOTE: This
640     takes quite some time, even if you have a fast network connection.)
641     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
642 dpavlin 24 <b>cd /tftpboot; ftp -i ftp.se.netbsd.org</b>
643 dpavlin 10 (log in as anonymous...)
644 dpavlin 24 <b>cd /pub/NetBSD/NetBSD-3.0/sgimips/binary/sets
645 dpavlin 10 mget base.tgz comp.tgz etc.tgz games.tgz man.tgz misc.tgz text.tgz
646     quit
647 dpavlin 2 sh
648 dpavlin 12 for a in *.tgz; do echo $a; tar zxfp $a; rm -f $a; done
649 dpavlin 10 echo 10.0.0.2:/tftpboot / nfs rw 0 0 &gt; /tftpboot/etc/fstab
650     echo rc_configured=YES &gt;&gt; /tftpboot/etc/rc.conf
651     dd if=/dev/zero of=swap bs=1024 count=32768
652     halt</b>
653     </pre></td></tr></table>
654     <li>Download the NetBSD/sgimips GENERIC and INSTALL kernels:<pre>
655 dpavlin 24 <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sgimips/binary/kernel/netbsd-GENERIC32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sgimips/binary/kernel/netbsd-GENERIC32_IP3x.gz</a>
656     <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz</a>
657 dpavlin 2
658     </pre>
659 dpavlin 10 <li>Create a configuration file called <tt>config_client</tt>:
660     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
661 dpavlin 24 <font color="#2020cf">! Configuration file for running NetBSD/sgimips diskless with
662 dpavlin 10 ! a NetBSD/pmax machine as the nfs server.</font>
663 dpavlin 2
664 dpavlin 24 <b> net(
665 dpavlin 12 add_remote("localhost:12444") </b>! the server<b>
666 dpavlin 10 local_port(12445) </b>! the client<b>
667     )
668 dpavlin 2
669 dpavlin 10 machine(
670     name("client machine")
671     serial_nr(1)
672 dpavlin 2
673 dpavlin 10 type("sgi")
674     subtype("o2")
675 dpavlin 2
676 dpavlin 10 load("netbsd-INSTALL32_IP3x.gz")</b>
677     ! load("netbsd-GENERIC32_IP3x.gz")<b>
678     )
679 dpavlin 24 </b>
680 dpavlin 10 </pre></td></tr></table>
681     ... and another configuration file for the server,
682     <tt>config_server</tt>:
683     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
684 dpavlin 24 <b> net(
685 dpavlin 10 local_port(12444) </b>! the server<b>
686 dpavlin 12 add_remote("localhost:12445") </b>! the client<b>
687 dpavlin 10 )
688 dpavlin 2
689 dpavlin 10 machine(
690     name("nfs server")
691     serial_nr(2)
692 dpavlin 2
693 dpavlin 10 type("dec")
694     subtype("5000/200")
695 dpavlin 2
696 dpavlin 10 disk("nbsd_pmax.img")
697     )
698 dpavlin 24 </b>
699 dpavlin 10 </pre></td></tr></table>
700     <li>Boot the "<tt>nfs server</tt>" and the NetBSD/sgimips
701     "<tt>client machine</tt>" as two separate emulator instances:<pre>
702     in one xterm:
703 dpavlin 12 <b>gxemul @config_server</b>
704 dpavlin 2
705 dpavlin 10 and then, in another xterm:
706 dpavlin 12 <b>gxemul @config_client</b>
707 dpavlin 10
708     </pre>
709     <li>In the NetBSD/sgimips window, choose "<tt>x: Exit Install System</tt>"
710     in the installer's main menu, and then type:<pre>
711     <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254</b>
712     <b>mount -v 10.0.0.2:/tftpboot /mnt</b>
713     <b>cd /mnt/dev; ./MAKEDEV all; cd /; umount /mnt</b>
714     <b>halt</b>
715 dpavlin 12 </pre>Then, once the client machine has halted, log in as <tt>root</tt>
716     on the server machine and type <tt><b>reboot</b></tt>.
717 dpavlin 10 <p>
718     <li>Once everything has been set up correctly, change
719     <tt>netbsd-INSTALL32_IP3x.gz</tt> in <tt>config_client</tt> to
720     <tt>netbsd-GENERIC32_IP3x.gz</tt> (the GENERIC kernel).
721     </ol>
722    
723     <p>You might want to log in as <tt>root</tt> on the server machine, and
724     run <tt>tcpdump -lnvv</tt> or similar, to see that what the client machine
725     actually does on the network.
726    
727     <p>It should now be possible to boot NetBSD/sgimips using the NetBSD/pmax
728 dpavlin 12 nfs server, using the following commands: (NOTE! Execute these two
729     commands in separate xterms!)<pre>
730     <b>gxemul @config_server</b>
731     <b>gxemul @config_client</b>
732 dpavlin 10 </pre>
733    
734 dpavlin 12 <p>When asked for "<tt>root device:</tt>" etc. on the client machine, enter
735 dpavlin 10 the following values:<pre>
736     root device: <b>mec0</b>
737     dump device: <b>(leave blank)</b>
738     file system (default generic): <b>(leave blank)</b>
739     ..
740     init path (default /sbin/init): <b>(leave blank)</b>
741     Enter pathname of shell or RETURN for /bin/sh: <b>(leave blank)</b>
742     Terminal type? [unknown] <b>xterm</b>
743     ..
744     # <b>exit</b> (to leave the single-user shell)
745     </pre>
746    
747     <p>Note: Netbooting like this is very slow, so you need a lot of patience.
748     For example, when NetBSD says "<tt>nfs_boot: trying DHCP/BOOTP</tt>",
749     there will be a long pause, even on a very fast host machine. The reason
750     for this is mostly because the emulator doesn't deal with timing issues
751     very well, but also because NetBSD tries IPv6 first, before falling back
752     to IPv4.
753    
754    
755    
756    
757    
758    
759 dpavlin 14 <p><br>
760     <a name="netbsdcatsinstall"></a>
761     <h3>NetBSD/cats:</h3>
762 dpavlin 10
763 dpavlin 14 It is possible to install and run
764     <a href="http://www.netbsd.org/Ports/cats/">NetBSD/cats</a> in GXemul.
765    
766 dpavlin 20 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
767 dpavlin 14 <a href="20051007-netbsd-cats-installed.png"><img src="20051007-netbsd-cats-installed_small.png"></a>
768    
769     <p>
770     To install NetBSD/cats onto a disk image, follow these instructions:
771    
772     <p>
773     <ol start="1">
774     <li>Create an empty harddisk image, which will be the root disk
775 dpavlin 18 that you will install NetBSD/cats onto:<pre>
776 dpavlin 20 <b>dd if=/dev/zero of=nbsd_cats.img bs=1024 count=1 seek=2000000</b>
777 dpavlin 14
778     </pre>
779 dpavlin 22 <li>Download the NetBSD/cats 3.0 ISO image and the generic and install kernels:<pre>
780     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/catscd-3.0.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/catscd-3.0.iso</a>
781     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/cats/binary/kernel/netbsd.aout-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/cats/binary/kernel/netbsd.aout-GENERIC.gz</a>
782     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/cats/binary/kernel/netbsd.aout-INSTALL.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/cats/binary/kernel/netbsd.aout-INSTALL.gz</a>
783 dpavlin 14
784     </pre>
785     <p>
786     <li>Start the installation like this:<pre>
787 dpavlin 22 <b>gxemul -XEcats -d nbsd_cats.img -d catscd-3.0.iso netbsd.aout-INSTALL.gz</b>
788 dpavlin 14
789     </pre>
790     and proceed like you would do if you were installing NetBSD on a real
791 dpavlin 20 CATS from CDROM.
792 dpavlin 14 </ol>
793    
794 dpavlin 20 <p>Alternatively, to install from FTP, you can skip downloading the ISO,
795 dpavlin 22 and start the install without <tt>-d catscd-3.0.iso</tt>. Suitable network
796 dpavlin 20 settings are IP 10.0.0.1, gateway/default route 10.0.0.254, netmask
797     255.0.0.0, nameserver 10.0.0.254.
798    
799 dpavlin 16 <p>If everything worked, NetBSD should now be installed on the disk image.
800 dpavlin 14 Use the following command line to boot the emulated CATS machine:<pre>
801 dpavlin 16 <b>gxemul -XEcats -d nbsd_cats.img netbsd.aout-GENERIC.gz</b>
802 dpavlin 14
803     </pre>
804    
805    
806    
807    
808    
809    
810 dpavlin 22
811 dpavlin 20 <p><br>
812 dpavlin 22 <a name="netbsdevbarminstall"></a>
813     <h3>NetBSD/evbarm:</h3>
814    
815     <a href="http://www.netbsd.org/Ports/evbarm/">NetBSD/evbarm</a> can
816     run in GXemul on an emulated IQ80321 evaluation board.
817    
818     <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
819     <a href="20060218-netbsd-evbarm.png"><img src="20060218-netbsd-evbarm_small.png"></a>
820    
821     <p>It is tricky to install, because there is (as far as I know) no INSTALL
822     kernel. One way to install the NetBSD/evbarm distribution onto a disk
823     image is to install the files using another (emulated) machine.
824    
825     <p>The following instructions will let you install NetBSD/evbarm onto a disk
826     image, from an emulated CATS machine:
827    
828     <p>
829     <ol>
830     <li>Install NetBSD/cats 3.0 according to instructions
831     <a href="#netbsdcatsinstall">further up on this page</a>.
832     <p>
833     <li>Create an empty harddisk image, which will be the disk image
834     that you will install NetBSD onto:<pre>
835     <b>dd if=/dev/zero of=nbsd_iq80321.img bs=1024 count=1 seek=999000</b>
836    
837     </pre>
838     <li>Download an IQ80321 kernel with wdc support, and the 2.1 ISO image:<pre>
839     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/evbarm/binary/kernel/">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/evbarm/binary/kernel</a>/<a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/evbarm/binary/kernel/netbsd-wd0-IQ80321.gz">netbsd-wd0-IQ80321.gz</a>
840     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/evbarmcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/evbarmcd.iso</a>
841    
842     </pre>
843     <p>
844     <li>The first step is to copy the .tgz files we want onto the CATS
845     machine's harddisk. Start the CATS machine like this:<pre>
846     <b>gxemul -XEcats -d nbsd_cats.img -d evbarmcd.iso netbsd.aout-GENERIC.gz</b>
847    
848     </pre>and execute the following commands as <tt>root</tt>:
849     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
850     <b>mount /dev/cd0a /mnt; cd /root; cp /mnt/evbarm/binary/sets/[bcegmt]* .
851     sync; halt</b>
852     </pre></td></tr></table>
853     <p>
854     <li>Now let's extract the files onto the IQ80321's disk image. Start the
855     CATS machine again, with the following command line:<pre>
856     <b>gxemul -XEcats -d nbsd_cats.img -d nbsd_iq80321.img netbsd.aout-GENERIC.gz</b>
857    
858     </pre>and execute the following commands as <tt>root</tt>:
859     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
860     <b>disklabel -I -i wd1</b>
861     (enter suitable commands, e.g. <i>a, 4.2BSD, 1c, 750M, b,
862     swap, a, 200M, P, W, y, Q</i>)
863     <b>newfs /dev/wd1a; mount /dev/wd1a /mnt; cd /mnt; sh
864     for a in /root/[bcegmt]*.tgz; do echo $a; tar zxfp $a; done
865     exit
866     cd dev; sh ./MAKEDEV all; cd ../etc
867     echo rc_configured=YES &gt;&gt; rc.conf
868     echo "/dev/wd0a / ffs rw 1 1" &gt; fstab
869     echo "/dev/wd0b none swap sw 0 0" &gt;&gt; fstab
870     cd /; umount /mnt; sync; halt</b>
871     </pre></td></tr></table>
872     </ol>
873    
874     <p>You should now be able to boot NetBSD/evbarm using this command:<pre>
875     <b>gxemul -xEiq80321 -d nbsd_iq80321.img netbsd-wd0-IQ80321.gz</b>
876     </pre>
877    
878    
879    
880    
881    
882    
883     <p><br>
884 dpavlin 20 <a name="netbsdprepinstall"></a>
885     <h3>NetBSD/prep:</h3>
886 dpavlin 14
887 dpavlin 20 It is possible to install and run
888 dpavlin 24 <a href="http://www.netbsd.org/Ports/prep/">NetBSD/prep</a> 2.1 in GXemul
889     on an emulated IBM 6050 (PowerPC) machine. (NetBSD 3.0 uses the wdc
890     controller in a way which isn't implemented in GXemul yet.)
891 dpavlin 20
892     <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
893     <a href="20051123-netbsd-prep.png"><img src="20051123-netbsd-prep_small.png"></a>
894    
895     <p>To install NetBSD/prep onto a disk image, follow these instructions:
896    
897     <p>
898     <ol start="1">
899     <li>Create an empty harddisk image, which will be the root disk
900     that you will install NetBSD/prep onto:<pre>
901     <b>dd if=/dev/zero of=nbsd_prep.img bs=1024 count=1 seek=1000000</b>
902    
903     </pre>
904     <li>Download the NetBSD/prep 2.1 ISO image and the generic kernel:<pre>
905     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/prepcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/prepcd.iso</a>
906     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/prep/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/prep/binary/kernel/netbsd-GENERIC.gz</a>
907    
908     </pre>
909     <p>
910     <li>Start the installation like this:<pre>
911 dpavlin 22 <b>gxemul -x -e ibm6050 -d nbsd_prep.img -d rdb:prepcd.iso -j prep/binary/kernel/netbsd-INSTALL.gz</b>
912 dpavlin 20
913     </pre>
914     <p>
915 dpavlin 22 <li>Installation is a bit unsmooth, possibly due to bugs in GXemul,
916     possibly due to bugs in NetBSD itself; others have been having
917     problems on real hardware: <a href="http://mail-index.NetBSD.org/port-prep/2005/11/25/0004.html">http://mail-index.NetBSD.org/port-prep/2005/11/25/0004.html</a>.
918 dpavlin 20 Creating an MBR slice and a disklabel with sysinst bugs out, so
919 dpavlin 22 some things have to be done manually:<p>
920 dpavlin 20 At "<tt>(I)nstall, (S)hell, or (H)alt</tt>", choose
921     <tt><b><u>s</u></b></tt>.
922     <br><tt># <b><u>fdisk -u wd0</u></b></tt>
923     <br><tt>Do you want to change our idea of what BIOS thinks? [n]</tt>
924     (just press <b>ENTER</b>)
925     <br><tt>Which partition do you want to change?: [none] <b><u>0</u></b></tt>
926     <br><tt>sysid: ... </tt> (just press <B>ENTER</b>)
927     <br><tt>start: ... <b><u>1cyl</u></b></tt>
928     <br><tt>size: ... </tt> (just press <B>ENTER</b>)
929     <br><tt>Which partition do you want to change?: [none]</tt> (press <b>ENTER</b>)
930     <br><tt>Should we write new partition table? [n] <b><u>y</u></b></tt>
931     <br><tt># <b><u>disklabel -I -i wd0</u></b></tt>
932     <br><tt>partition&gt; <b><u>a</u></b></tt>
933     <br><tt>Filesystem type [?] [unused]: <b><u>4.2BSD</u></b></tt>
934     <br><tt>Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: <b><u>1c</u></b></tt>
935     <br><tt>Partition size ('$' for all remaining) [0c, 0s, 0M]: <b><u>900M</u></b></tt>
936     <br><tt>partition&gt; <b><u>b</u></b></tt>
937     <br><tt>Filesystem type [?] [unused]: <b><u>swap</u></b></tt>
938     <br><tt>Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: <b><u>a</u></b></tt>
939     <br><tt>Partition size ('$' for all remaining) [0c, 0s, 0M]: <b><u>$</u></b></tt>
940     <br><tt>partition&gt; <b><u>W</u></b></tt>
941     <br><tt>Label disk [n]? <b><u>y</u></b></tt>
942     <br><tt>partition&gt; <b><u>Q</u></b></tt>
943     <br><tt># <b><u>newfs wd0a</u></b></tt>
944     <br><tt># <b><u>sysinst</u></b></tt>
945     <br>Choose to install onto <b>wd0</b>. Choose
946     "<tt>a: Edit the MBR partition table</tt>"
947     when presented with that option.
948     <br>Choose the 'a' partition/slice,
949     set the 'e' ("active") and 'f' ("install") fields to <b>Yes</b>,
950     and then choose "<tt>x: Partition table OK</tt>".
951     <br>Choose "<tt>b: Use existing partition sizes</tt>" in the next
952     menu.
953     <br>Select partition 'a' and press ENTER. Set field 'k' (mount point)
954     to '<tt><b>/</b></tt>'.
955     <br>Get out of the partitioner by selecting
956     "<tt>x: Partition sizes ok</tt>" twice.
957     <br>At "<tt>Write outside MBR partition? [n]:</tt>", just press
958     <b>ENTER</b>.
959     <br>Install from CD-ROM, device <b>wd1c</b>.
960     </ol>
961    
962     <p>If everything worked, NetBSD should now be installed on the disk image.
963     Use the following command line to boot the emulated machine:<pre>
964 dpavlin 22 <b>gxemul -x -e ibm6050 -d nbsd_prep.img netbsd-GENERIC.gz</b>
965 dpavlin 20
966     </pre>
967    
968     <p>When asked which the root device is, type <tt><b>wd0</b></tt> and
969     just press ENTER to select the default values for dump device, file
970     system type, and init path.
971    
972    
973    
974    
975    
976    
977 dpavlin 2 <p><br>
978 dpavlin 22 <a name="openbsdpmaxinstall"></a>
979 dpavlin 10 <h3>OpenBSD/pmax:</h3>
980 dpavlin 2
981 dpavlin 10 Installing <a href="http://www.openbsd.org/pmax.html">OpenBSD/pmax</a> is
982     a bit harder than installing NetBSD/pmax. You should first read the <a
983 dpavlin 22 href="#netbsdpmaxinstall">section above</a> on how to install NetBSD/pmax,
984 dpavlin 2 before continuing here. If you have never installed OpenBSD on any
985 dpavlin 10 architecture, then you need a great deal of patience to do this. If, on
986     the other hand you are used to installing OpenBSD, then this should be no
987     problem for you.
988 dpavlin 2
989     <p>
990 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
991     <a href="20040710-openbsd-pmax.png"><img src="20040710-openbsd-pmax_small.png"></a>
992     &nbsp;&nbsp;&nbsp;
993     <a href="openbsd-pmax-20040710.png"><img src="openbsd-pmax-20040710_small.png"></a>
994    
995     <p>
996 dpavlin 2 OpenBSD/pmax died at release 2.8 of OpenBSD, so you should be
997     aware of the fact that this will not give you an up-to-date OpenBSD
998     system.
999    
1000     <p>
1001     Following these instructions <i>might</i> work. If not, then use
1002     common sense and imagination to modify them as you see fit.
1003    
1004     <p>
1005     <ol>
1006     <li>Create an empty harddisk image, which will be the root disk
1007     that OpenBSD installs itself onto:<pre>
1008 dpavlin 12 <b>dd if=/dev/zero of=obsd_pmax.img bs=1 count=512 seek=900000000</b>
1009 dpavlin 2
1010     </pre>
1011     <li>Download the entire pmax directory from the ftp server: (approx. 99 MB)<pre>
1012 dpavlin 12 <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>
1013 dpavlin 2
1014     </pre>
1015    
1016 dpavlin 12 <li>Execute the following commands:
1017     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1018     <b>mv ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/simpleroot28.fs.gz .
1019     gunzip simpleroot28.fs.gz
1020     chmod +w simpleroot28.fs</b> &lt;--- make sure
1021     </pre></td></tr></table>
1022 dpavlin 2 <li>You now need to make an ISO image of the entire directory you downloaded.
1023 dpavlin 10 (I recommend using <tt>mkisofs</tt> for that purpose. If you don't
1024 dpavlin 6 already have <tt>mkisofs</tt> installed on your system, you need
1025 dpavlin 10 to install it in order to do this.)<pre>
1026 dpavlin 12 <b>mkisofs -o openbsd_pmax_2.8.iso ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax</b>
1027 dpavlin 24 <b>rm -rf ftp.se.openbsd.org</b> <i>(this directory is not needed anymore)</i>
1028 dpavlin 2
1029     </pre>
1030     <li>Start the emulator with all three (!) disk images:<pre>
1031 dpavlin 24 <b>gxemul -e 3max -d obsd_pmax.img -d b:simpleroot28.fs -j bsd -d c:openbsd_pmax_2.8.iso</b>
1032 dpavlin 2
1033     </pre>
1034 dpavlin 12 (If you add <tt>-X</tt>, you will run with the graphical
1035 dpavlin 6 framebuffer. This is <i>REALLY</i> slow because the console has to
1036     scroll a lot during the install. I don't recommend it.)
1037 dpavlin 2 <p>
1038     <li>Go on with the installation as you would do if you were installing on a real machine.
1039     If you are not used to the OpenBSD installer, then this will most likely
1040     be a very uncomfortable experience. Some important things to keep in mind are:
1041     <ul>
1042     <li>rz0 is the rootdisk you wish to install onto.
1043     <li>rz1 is the simpleroot image.
1044     <li>rz2 is the CDROM containing the "install sets".
1045     <li>When asked for the "<b>root device?</b>", enter <b>rz1</b>.
1046     <li>At "<b>Enter pathname of shell or RETURN for sh:</b>", press enter.
1047     <li>At the # prompt, do the following:<pre>
1048 dpavlin 12 <b>fsck /dev/rz1a</b> (and mark the filesystem as clean)
1049     <b>mount /dev/rz1a /</b>
1050     <b>mount -t kernfs kern kern</b>
1051     <b>./install</b>
1052 dpavlin 2
1053     </pre>
1054     and proceed with the install. Good luck. :-)
1055     <li>Answer "<b>y</b>" when asked if you wish to configure the network.
1056     (See the section about installing NetBSD/pmax for suitable
1057     network settings.)
1058     <li>Install from "<b>c</b>" (cdrom), choose "<b>rz2</b>" as the cdrom device, and "<b>/</b>" as
1059     the directory containing the install sets.
1060     </ul>
1061     <p>
1062 dpavlin 10 <li>For some unknown reason, the install script does not set the root
1063     password! The first time you boot up OpenBSD after the install, you
1064     need to go into single user mode and run <b>passwd root</b> to set
1065     the root password, or you will not be able to log in at all!<pre>
1066 dpavlin 24 <b>gxemul -e 3max -d obsd_pmax.img -d 2c:openbsd_pmax_2.8.iso -j bsd -o '-s'</b>
1067 dpavlin 2 </pre>
1068     While you are at it, you might want to extract the X11 install sets
1069     as well, as the installer seems to ignore them too. (Perhaps due to a bug
1070     in the installer, perhaps because of the way I used mkisofs.)
1071     <p>
1072     Execute the following commands in the emulator:
1073 dpavlin 12 <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1074     <b>fsck /dev/rz0a
1075     mount /
1076     passwd root
1077 dpavlin 2
1078 dpavlin 12 cd /; mount -t cd9660 /dev/rz2c /mnt; sh
1079     for a in /mnt/[xX]*; do tar zxvf $a; done
1080     ln -s /usr/X11R6/bin/Xcfbpmax /usr/X11R6/bin/X
1081     ln -s /dev/fb0 /dev/mouse
1082     echo /usr/X11R6/lib &gt;&gt; /etc/ld.so.conf
1083     ldconfig
1084 dpavlin 2
1085 dpavlin 12 sync
1086     halt</b>
1087     </pre></td></tr></table>
1088 dpavlin 2 </ol>
1089    
1090     <p>
1091     NOTE: It is also possible to install via ftp instead of using a CDROM image.
1092     This is not much less awkward, you still need the simpleroot filesystem
1093     image, and you still have to manually add the X11 install sets and set the
1094     root password, and so on.
1095    
1096     <p>
1097     Once you have completed the installation procedure, the following command
1098     will let you boot from the new rootdisk image:
1099     <pre>
1100 dpavlin 22 <b>gxemul -e 3max -X -o '-aN' -d obsd_pmax.img -j bsd</b>
1101 dpavlin 2 </pre>
1102    
1103     <p>
1104 dpavlin 6 (Normally, you would be asked about which root device to use (<tt>rz0</tt>),
1105     but using <b><tt>-o '-aN'</tt></b> supresses that.)
1106 dpavlin 2
1107     <p>
1108     When asked for which terminal type to use, when logging in as root,
1109 dpavlin 6 enter <b><tt>rcons</tt></b> if you are using the graphical framebuffer,
1110     <b><tt>vt100</tt></b> for text-mode.
1111     <br>Use <b><tt>startx</tt></b> to start X windows.
1112 dpavlin 2
1113    
1114    
1115    
1116    
1117    
1118 dpavlin 10
1119 dpavlin 2
1120    
1121     <p><br>
1122 dpavlin 14 <a name="openbsdcatsinstall"></a>
1123     <h3>OpenBSD/cats:</h3>
1124    
1125     It is possible to install and run
1126     <a href="http://www.openbsd.org/cats.html">OpenBSD/cats</a>
1127     in GXemul.
1128    
1129     <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1130     <a href="20051007-openbsd-cats-installed.png"><img src="20051007-openbsd-cats-installed_small.png"></a>
1131    
1132     <p>To install OpenBSD/cats onto an emulated harddisk image,
1133     follow these instructions:
1134    
1135     <p>
1136     <ol>
1137     <li>Create an empty harddisk image, which will be the root disk
1138     that OpenBSD installs itself onto:<pre>
1139     <b>dd if=/dev/zero of=obsd_cats.img bs=1024 count=1 seek=1900000</b>
1140    
1141     </pre>
1142     <li>Download the entire cats directory from the ftp server:<pre>
1143 dpavlin 24 <b>wget -np -l 0 -r <a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.9/cats/">ftp://ftp.openbsd.org/pub/OpenBSD/3.9/cats/</a></b>
1144     <b>cp ftp.openbsd.org/pub/OpenBSD/3.9/cats/bsd .</b>
1145     <b>cp ftp.openbsd.org/pub/OpenBSD/3.9/cats/bsd.rd .</b>
1146 dpavlin 14
1147     </pre>
1148 dpavlin 24 (Replace ftp.openbsd.org with a server closer to you, for
1149     increased download speed.)
1150     <p>
1151 dpavlin 14 <li>You now need to make an ISO image of the entire directory you downloaded.
1152     (I recommend using <tt>mkisofs</tt> for that purpose. If you don't
1153     already have <tt>mkisofs</tt> installed on your system, you need
1154     to install it in order to do this.)<pre>
1155 dpavlin 24 <b>mkisofs -allow-lowercase -o openbsd_cats_3.9.iso ftp.openbsd.org/pub/OpenBSD/</b>
1156     <b>rm -rf ftp.openbsd.org</b> <i>(this directory is not needed anymore)</i>
1157 dpavlin 14
1158     </pre>
1159     <li>Start the emulator using this command line:<pre>
1160 dpavlin 24 <b>gxemul -XEcats -d obsd_cats.img -d openbsd_cats_3.9.iso bsd.rd</b>
1161 dpavlin 14
1162     </pre>
1163     and proceed like you would do if you were installing OpenBSD
1164 dpavlin 16 on a real CATS. (Install onto <tt>wd0</tt>, don't configure the
1165 dpavlin 20 network, install from CD.)
1166 dpavlin 14 </ol>
1167    
1168 dpavlin 20 <p>(Although it <i>is</i> possible to configure the network, IPv4 address
1169     10.0.0.1, netmask 255.0.0.0, gateway/default route 10.0.0.254, and
1170     nameserver 10.0.0.254, the userland NAT-like networking layer is not
1171     stable enough yet to support a full install via ftp.)
1172    
1173 dpavlin 16 <p><b>NOTE:</b> Make sure that you <tt>sync</tt> and <tt>reboot</tt>
1174     correctly once the installation is finished, or the <tt>/dev</tt> nodes
1175     may not have been written correctly to disk.
1176 dpavlin 14
1177 dpavlin 16 <p>Once the install has finished, the following command should let you
1178 dpavlin 14 boot from the harddisk image:
1179    
1180 dpavlin 16 <p><pre>
1181 dpavlin 22 <b>gxemul -XEcats -d obsd_cats.img bsd</b>
1182 dpavlin 16
1183 dpavlin 14 </pre>
1184    
1185    
1186    
1187    
1188    
1189    
1190    
1191     <p><br>
1192 dpavlin 2 <a name="ultrixinstall"></a>
1193 dpavlin 10 <h3>Ultrix/RISC:</h3>
1194 dpavlin 2
1195 dpavlin 4 Ultrix 4.x can run in GXemul on an emulated DECstation 5000/200.
1196 dpavlin 10 (Ultrix was the native OS for these machines, but NetBSD/pmax is
1197     also usable.)
1198 dpavlin 2
1199 dpavlin 4 <p>
1200     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1201 dpavlin 24 <a href="20040504-ultrix45-boot1.png"><img src="20040504-ultrix45-boot1_small.png"></a>
1202 dpavlin 4 &nbsp;&nbsp;&nbsp;
1203 dpavlin 24 <a href="ultrix4.5-20040706.png"><img src="ultrix4.5-20040706_small.png"></a>
1204 dpavlin 4
1205     <p>
1206     The following instructions should let you install Ultrix onto a disk image:
1207    
1208 dpavlin 2 <ol>
1209     <li>Create an empty harddisk image, which will be the root disk
1210     that Ultrix installs itself onto:<pre>
1211 dpavlin 12 <b>dd if=/dev/zero of=rootdisk.img bs=1024 count=1 seek=800000</b>
1212 dpavlin 2
1213     </pre>
1214 dpavlin 6 <li>Place your Ultrix installation media in your CDROM drive.
1215     (On FreeBSD and similar systems, it is called <tt>/dev/cd0c</tt>.
1216     Replace that with the name of your CDROM drive, or the name of a
1217     .iso image file.) Then, start the emulator like this:<pre>
1218 dpavlin 24 <b>gxemul -X -e 3max -d rootdisk.img -d bc:/dev/cd0c -j vmunix</b>
1219 dpavlin 2
1220     </pre>
1221     <li>Once the first stage of the installation is done (restoring the root
1222     filesystem), you need to restart the emulator, booting from the
1223     new rootdisk, to continue the installation process.
1224 dpavlin 6 This is done by removing the bootflag ('<tt>b</tt>') from the second
1225 dpavlin 2 diskimage argument:<pre>
1226 dpavlin 24 <b>gxemul -X -e 3max -d rootdisk.img -d c:/dev/cd0c -j vmunix</b>
1227 dpavlin 2
1228     </pre>
1229     </ol>
1230    
1231     <p>
1232     When the installation is completed, the following command should start
1233     Ultrix from the harddisk image:<pre>
1234 dpavlin 24 <b>gxemul -X -e 3max -j vmunix -d rootdisk.img</b>
1235 dpavlin 2 </pre>
1236    
1237 dpavlin 24 <p>If you have a very fast host machine, you might experience a weird
1238 dpavlin 10 timer related bug, which makes it impossible to logon to the system. It is
1239     triggered when the emulation goes faster than any real DECstation machine
1240     was capable of running. A temporary workaround is to add
1241     <b><tt>-I33000000</tt></b> to fix the emulated clock speed to 33 million
1242     instructions per emulated second. (When using <tt><b>-CR4400</b></tt>,
1243     <b><tt>-I16000000</tt></b> should be used instead.)
1244 dpavlin 2
1245     <p>
1246 dpavlin 6 You can experiment with adding <b><tt>-Z2</tt></b> (for emulating a
1247     dual-headed workstation) or even <b><tt>-Z3</tt></b> (tripple-headed), and
1248     also the <b><tt>-Y2</tt></b> option for scaling down the framebuffer
1249     windows by a factor 2x2.
1250     There is also a <b><tt>-z</tt></b> option for supplying names of X11
1251     displays to use. The following example starts Ultrix on an emulated
1252     tripple-headed workstation, on three different displays (<tt>remote1:0.0</tt>,
1253     <tt>localhost:0.0</tt>, and <tt>remote2:0.0</tt>), using no scaledown:<pre>
1254 dpavlin 24 <b>gxemul -N -e 3max -jgenvmunix -d rootdisk.img \
1255 dpavlin 6 -XZ3 -z remote1:0.0 -z localhost:0.0 -z remote2:0.0</b>
1256 dpavlin 2 </pre>
1257    
1258     <p>
1259 dpavlin 6 The photo below shows a single Ultrix session running tripple-headed in
1260     GXemul on an Alpha 21164PC, with displays on a Sun Ultra1 (to the left),
1261     on the Alpha itself (in the middle), and on an HP700/RX X-terminal (8-bit
1262     color depth, running off the Alpha) to the right.
1263    
1264     <p>
1265     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1266     <a href="20041209-ultrix-tripplehead.jpg"><img src="20041209-ultrix-tripplehead_small.jpg"></a>
1267    
1268     <p>
1269 dpavlin 2 The X11 displays may differ in bit depth and endianness. Unfortunately,
1270     there is no way yet to set the scaledown factor on a per-window basis, so
1271     the scaledown factor affects all windows.
1272    
1273     <p>
1274 dpavlin 6 (If you didn't use <tt><b>-Z<i>n</i></b></tt> during the installation, and
1275     compiled your own <tt>/vmunix</tt>, then it will not contain support for
1276     multiple graphics cards. To overcome this problem, use the generic kernel,
1277     <tt><b>-j genvmunix</b></tt>, whenever you are running the emulator with a
1278     different setup than the one you used when Ultrix was installed.)
1279 dpavlin 2
1280 dpavlin 4 <p>
1281     A note for the historically interested: OSF/1 for MIPS was quite similar
1282     to Ultrix, so that is possible to run as well. If you are unsuccessful
1283     in installing Ultrix or OSF/1 directly in the emulator, you can always
1284     install it on your real machine onto a real SCSI disk, and then copy the
1285 dpavlin 6 contents of that SCSI disk into a file (using <b><tt>dd(1)</tt></b>), and use
1286 dpavlin 4 that file as a disk image file in the emulator.
1287 dpavlin 2
1288    
1289    
1290    
1291    
1292    
1293     <p><br>
1294     <a name="sprite"></a>
1295 dpavlin 10 <h3>Sprite for DECstation:</h3>
1296 dpavlin 2
1297     Sprite was a research operating system at the University of Berkeley.
1298     The Unix Heritage Society (TUHS, <a href="http://www.tuhs.org">www.tuhs.org</a>)
1299     has made available a copy of a Sprite harddisk image for a DECstation 5000/200.
1300     If you want to find out more about Sprite in general, read
1301     <a href="http://www.cs.berkeley.edu/projects/sprite/retrospective.html">
1302     http://www.cs.berkeley.edu/projects/sprite/retrospective.html</a>.
1303    
1304     <p>
1305 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1306     <a href="20040711-sprite-1.png"><img src="20040711-sprite-1_small.png"></a>
1307     &nbsp;&nbsp;&nbsp;
1308     <a href="sprite-20040711.png"><img src="sprite-20040711_small.png"></a>
1309    
1310     <p>
1311 dpavlin 2 The following instructions should let you run Sprite in the emulator:
1312    
1313     <p>
1314     <ol>
1315 dpavlin 10 <li>Download the Sprite harddisk image:<pre>
1316     <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>
1317 dpavlin 2 83973120 bytes, MD5 = ec84eeeb20fe77b758370d5e312e4a5e
1318    
1319     </pre>
1320     <li>Start the emulator with the following command line:<pre>
1321 dpavlin 12 <b>gxemul -X -e 3max -M128 -d ds5000.bt -j vmsprite -o ''</b>
1322 dpavlin 2
1323     </pre>
1324     </ol>
1325    
1326     <p>
1327     The first time you boot up with the disk image, you will be asked a number
1328     of questions regarding network settings. If you feel like entering correct
1329     values, then you should use the following:
1330     <p>
1331    
1332     <pre>
1333 dpavlin 10 Your machine's Ethernet address: 10:20:30:00:00:10
1334 dpavlin 2 Your machine's IP: 10.0.0.1
1335     Subnet mask: 0xff000000
1336     Gateway's Ethernet address: 60:50:40:30:20:10
1337     Gateway's IP: 10.0.0.254
1338     </pre>
1339    
1340     <p>
1341 dpavlin 10 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>,
1342     the following sad statement can be found:
1343 dpavlin 2 <pre>
1344     The bootable Sprite image is meant to be a demonstration of Sprite, not
1345     a robust Sprite system. There are several missing things, such as
1346     floating point and network support.
1347     </pre>
1348    
1349 dpavlin 10 <p>Once you are logged in as root, running <b><tt>xinit</tt></b> will
1350     start the X11 environment.
1351 dpavlin 2
1352    
1353    
1354    
1355    
1356 dpavlin 10
1357 dpavlin 2 <p><br>
1358     <a name="declinux"></a>
1359 dpavlin 10 <h3>Debian GNU/Linux for DECstation:</h3>
1360 dpavlin 2
1361 dpavlin 22 It is possible to run Debian GNU/Linux for DECstation in the emulator,
1362     on an emulated 5000/200 ("3max"). Although the Debian project has released
1363     install ramdisk kernels for this purpose, these do not always work:
1364     <ul>
1365 dpavlin 24 <li>Serial console output doesn't work too well in GXemul. Linux
1366     oopses randomly, which may be due to bugs in GXemul, but may
1367 dpavlin 22 also be due to bugs in the serial controller code in Linux.
1368     (The speed at which serial interrupts are generated can be
1369     lowered with the <tt>-U</tt> command line option, but it only
1370     reduces the risk, it doesn't take away the oopses completely.)
1371     <li>Old install kernels supported the graphical framebuffer on the
1372     3max, but not the keyboard.
1373     <li>For quite some time, the MIPS linux cvs tree had support for the
1374     keyboard, but it did <i>not</i> include Debian's patches for
1375     networking. (Perhaps this has been fixed now, I don't know.)
1376     </ul>
1377 dpavlin 10
1378 dpavlin 22 <p>David Muse has made available a precompiled install kernel which
1379     has support for framebuffer, keyboard, and networking, which works
1380     pretty well. Thanks David. :-)
1381 dpavlin 2
1382     <p>
1383     The following steps should let you install Debian GNU/Linux for DECstation
1384     onto a harddisk image:
1385    
1386     <p>
1387     <ol>
1388     <li>Create an empty harddisk image, which will be the root disk
1389     that Debian installs itself onto:<pre>
1390 dpavlin 22 <b>dd if=/dev/zero of=debian_pmax.img bs=1024 count=1 seek=3300000</b>
1391 dpavlin 2
1392     </pre>
1393 dpavlin 22 <li>Download David Muse' install kernel, and a Debian Netinstall CD-ROM:<pre>
1394     <a href="http://www.firstworks.com/mips-linux-2.4.31/vmlinux-2.4.31">http://www.firstworks.com/mips-linux-2.4.31/vmlinux-2.4.31</a>
1395     <a href="http://cdimage.debian.org/debian-cd/3.1_r0a/mipsel/iso-cd/debian-31r0a-mipsel-netinst.iso">http://cdimage.debian.org/debian-cd/3.1_r0a/mipsel/iso-cd/debian-31r0a-mipsel-netinst.iso</a>
1396 dpavlin 2
1397     </pre>
1398     <p>
1399 dpavlin 22 <li>Start the installation like this:<pre>
1400 dpavlin 24 <b>gxemul -X -e3max -d debian_pmax.img -d debian-31r0a-mipsel-netinst.iso vmlinux-2.4.31</b>
1401     </pre>
1402 dpavlin 2
1403 dpavlin 24 <p>If everything goes well, you will see Linux' boot messages, and then
1404     arrive at the language chooser.
1405    
1406     <p>
1407     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-1.png"><img src="debian-1-small.png"></a>
1408     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-2.png"><img src="debian-2-small.png"></a>
1409     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-3.png"><img src="debian-3-small.png"></a>
1410     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-4.png"><img src="debian-4-small.png"></a>
1411    
1412     <p>There will be a warning about the keyboard
1413     layout. Don't mind this. Continue, and then select <b>Detect
1414     and mount CD-ROM</b> in the next menu.
1415    
1416     <p>
1417     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-5.png"><img src="debian-5-small.png"></a>
1418     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-6.png"><img src="debian-6-small.png"></a>
1419     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-7.png"><img src="debian-7-small.png"></a>
1420     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-8.png"><img src="debian-8-small.png"></a>
1421    
1422 dpavlin 10 <p>
1423 dpavlin 24 There will also be a warning about lack of loadable modules. Don't
1424     mind this either, continue anyway by choosing <b>Yes</b>.
1425 dpavlin 22 <p>
1426 dpavlin 24 When you reach the network configuration part of the install, choose
1427     <b>Configure network manually</b> and enter the following values:<pre>
1428 dpavlin 10 IP address: <b>10.0.0.1</b>
1429     Netmask: <b>255.0.0.0</b>
1430     Gateway: <b>10.0.0.254</b>
1431     Name server addresses: <b>10.0.0.254</b>
1432 dpavlin 24
1433 dpavlin 2 </pre>
1434 dpavlin 24 <p>Choose <b>Erase entire disk</b> in the partitioner.
1435 dpavlin 2
1436 dpavlin 24 <p>Wait for the base system to be installed. This takes almost forever,
1437     so you can go fetch several <a href="http://en.wikipedia.org/wiki/Jolt_Cola">Jolts</a>
1438     or cups of coffee in the meanwhile.
1439    
1440     <p>
1441     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-9.png"><img src="debian-9-small.png"></a>
1442     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-10.png"><img src="debian-10-small.png"></a>
1443     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-11.png"><img src="debian-11-small.png"></a>
1444     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-12.png"><img src="debian-12-small.png"></a>
1445    
1446     <p>Congratulations! The first phase of the installation is now completed.
1447     Reboot using the following command line:<pre>
1448     <b>gxemul -X -e3max -o 'root=/dev/sda1' -d debian_pmax.img vmlinux-2.4.31</b>
1449    
1450     </pre>
1451     <p>The post-install step takes quite some time as well. A perfect opportunity
1452     for more coffee.
1453    
1454     <p>When asked about "Apt configuration", choose <b>http</b> as the method
1455     to use for accessing the Debian archive.
1456    
1457     <p>
1458     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-13.png"><img src="debian-13-small.png"></a>
1459     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-14.png"><img src="debian-14-small.png"></a>
1460     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="debian-15.png"><img src="debian-15-small.png"></a>
1461    
1462     <p>Downloading the packages takes almost forever. Be patient.
1463    
1464     <p>Congratulations (again)! You are now fully done with the installation.
1465    
1466 dpavlin 2 </ol>
1467    
1468 dpavlin 24 <p><br>Debian GNU/Linux for DECstation is now installed and ready to be used.
1469     Use this command to boot from the installed disk image:<pre>
1470     <b>gxemul -X -e3max -o 'root=/dev/sda1' -d debian_pmax.img vmlinux-2.4.31</b>
1471 dpavlin 2
1472     </pre>
1473    
1474    
1475    
1476    
1477    
1478    
1479    
1480     <p><br>
1481     <a name="declinuxredhat"></a>
1482 dpavlin 10 <h3>Redhat Linux for DECstation:</h3>
1483 dpavlin 2
1484    
1485 dpavlin 4 <p>
1486     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1487     <a href="20041129-redhat_mips.png"><img src="20041129-redhat_mips_small.png"></a>
1488 dpavlin 2
1489     <p>
1490     The following steps should let you run Redhat Linux for DECstation in GXemul:
1491    
1492     <p>
1493     <ol>
1494 dpavlin 24 <li>Download a kernel. David Muse' Debian-install kernel works fine:<pre>
1495 dpavlin 22 <a href="http://www.firstworks.com/mips-linux-2.4.31/vmlinux-2.4.31">http://www.firstworks.com/mips-linux-2.4.31/vmlinux-2.4.31</a>
1496 dpavlin 2
1497     </pre>
1498     <li>Download a root filesystem tree:<pre>
1499     <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>
1500     <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>
1501     19486676 bytes, md5 = 5bcb725c90209479cd7ead8ad0c4a414
1502    
1503     </pre>
1504 dpavlin 22 <li>Create a disk image which will contain the Redhat filesystem:<pre>
1505     <b>dd if=/dev/zero of=redhat_mips.img bs=1024 count=1 seek=2000000</b>
1506    
1507     </pre>
1508     <li>This is the tricky part: on redhat_mips.img, you need to create an MS-DOS
1509     (!) partition table, and then an ext2 partition. This is what Linux
1510     will then see as /dev/sda1.
1511 dpavlin 24 <p>I recommend you run fdisk and mke2fs and untar the archive from within
1512 dpavlin 22 Debian/DECstation or <a href="#debiancats">Debian/CATS</a> running
1513 dpavlin 24 inside the emulator. (Alternatively, if you are on a Linux host,
1514     you could use a loopback mount, or similar. This might require
1515     root access. See e.g.
1516     <a href="http://www.mega-tokyo.com/osfaq2/index.php/Disk%20Images%20Under%20Linux">http://www.mega-tokyo.com/osfaq2/index.php/Disk%20Images%20Under%20Linux</a>.)
1517 dpavlin 22 <p>
1518     In order to actually boot the system you need to modify /etc/fstab.
1519 dpavlin 2 Change<pre>
1520     /dev/root / nfs defaults 1 1
1521     #/dev/sdc1 / ext2 defaults 1 1
1522     none /proc proc defaults 0 0
1523     none /dev/pts devpts mode=0622 0 0
1524    
1525     </pre>to<pre>
1526     #/dev/root / nfs defaults 1 1
1527     /dev/sda1 / ext2 defaults 1 1
1528     none /proc proc defaults 0 0
1529     none /dev/pts devpts mode=0622 0 0
1530    
1531     </pre>(Note sda1 instead of sdc1.)
1532     </ol>
1533    
1534 dpavlin 22 <p>To boot Redhat linux from the disk image, use the following command line:<pre>
1535 dpavlin 24 <b>gxemul -X -e3max -o "root=/dev/sda1 ro" -d redhat_mips.img vmlinux-2.4.31</b>
1536 dpavlin 2
1537     </pre>
1538 dpavlin 22 If you need to boot into single user mode, change options to
1539     <tt><b>-o "root=/dev/sda1 rw init=/bin/sh"</b></tt>.
1540 dpavlin 2
1541    
1542    
1543    
1544    
1545    
1546    
1547     <p><br>
1548 dpavlin 10 <hr>
1549    
1550    
1551    
1552    
1553    
1554    
1555    
1556     <p><br>
1557 dpavlin 2 <a name="mach"></a>
1558 dpavlin 10 <h3>Mach/PMAX:</h3>
1559 dpavlin 2
1560     Read the following link if you want to know more about Mach in general:
1561     <a href="http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html">
1562     http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html</a>
1563    
1564     <p>
1565     <font color="#ff0000">NOTE: Mach for DECstation requires some files
1566     (called 'startup' and 'emulator') which I haven't been able to find
1567     on the web. Without these, Mach will not get very far. These
1568     installation instructions are preliminary.
1569     </font>
1570    
1571     <p>
1572 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1573     <a href="20041018-mach_pmax.png"><img src="20041018-mach_pmax_small.png"></a>
1574    
1575     <p>
1576 dpavlin 2 The following steps should let you experiment with running Mach
1577     for DECstation in the emulator:
1578    
1579     <p>
1580     <ol>
1581     <li>Compile gxemul with cache emulation: (<b>NOTE: --enable-caches</b>)<pre>
1582 dpavlin 12 <b>./configure --enable-caches; make</b>
1583 dpavlin 2
1584     </pre>
1585     <li>Download the pmax binary distribution for Mach 3.0:<pre>
1586 dpavlin 12 <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/</a>
1587     <a href="http://lost-contact.mit.edu/afs/athena/user/d/a/daveg/Info/Links/Mach/src/release/pmax.tar.Z">daveg/Info/Links/Mach/src/release/pmax.tar.Z</a>
1588 dpavlin 2 7263343 bytes, md5 = f9d76c240a6e169921a1df99ad560cc0
1589    
1590     </pre>
1591     <li>Extract the Mach kernel:<pre>
1592 dpavlin 12 <b>tar xfvz pmax.tar.Z pmax_mach/special/mach.boot.MK83.STD+ANY</b>
1593 dpavlin 2
1594     </pre>
1595     <li>Create an empty disk image:<pre>
1596 dpavlin 12 <b>dd if=/dev/zero of=disk.img bs=1 count=512 seek=400000000</b>
1597 dpavlin 2
1598     </pre>
1599     <li>Load the contents of pmax.tar.Z onto the disk image. This is
1600     complicated, and should be described in more detail some time.
1601     For now, use your imagination. (For example using OpenBSD/pmax:
1602     <i>disklabel -E rz1; newfs -O /dev/rz1a;
1603     mount /dev/rz1a /mnt; cd /mnt; download pmax.tar.Z using ftp;
1604     tar xzvf pmax.tar.Z; mv pmax_mach/* .; rmdir pmax_mach;
1605     mkdir mach_servers;
1606     cd mach_servers;
1607     cp ../etc/mach_init .;
1608     cp ../tests/test_service startup;
1609     dd if=/dev/zero of=paging_file bs=65536 count=400;
1610     cd /; sync; umount /mnt</i>)
1611     <p>
1612     <li>Start the emulator with the following command:<pre>
1613 dpavlin 12 <b>gxemul -e 3max -X -d disk.img \
1614 dpavlin 2 pmax_mach/special/mach.boot.MK83.STD+ANY</b>
1615    
1616     </pre>
1617     </ol>
1618    
1619    
1620    
1621    
1622    
1623    
1624    
1625 dpavlin 10 <p><br>
1626     <a name="openbsdsgiinstall"></a>
1627     <h3>OpenBSD/sgi:</h3>
1628 dpavlin 2
1629 dpavlin 10 <a href="http://www.openbsd.org/sgi.html">OpenBSD/sgi</a>
1630     can (almost) run in GXemul on an emulated O2 (SGI-IP32) with root on nfs.
1631    
1632     <p>
1633     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1634     <a href="20050617-openbsd-sgi.png"><img src="20050617-openbsd-sgi_small.png"></a>
1635    
1636     <p><font color="#ff0000">NOTE: I haven't succeeded all the way with
1637     this yet, and this shows/triggers many bugs in the emulator, but some of
1638     it works.</font>
1639    
1640     <p>GXemul does not yet emulate the AHC PCI SCSI controller in the O2. (I have
1641     mailed Adaptec several times, asking for documentation, but never received
1642 dpavlin 12 any reply.) OpenBSD/sgi can still run in the emulator, as long as it doesn't
1643     use SCSI. For a simple test with the ramdisk (install) kernel, try dowloading<pre>
1644 dpavlin 24 <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.9/sgi/">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.9/sgi</a>/<a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.9/sgi/bsd.rd">bsd.rd</a>
1645 dpavlin 10
1646 dpavlin 24 </pre>and run <b><tt>gxemul -xeo2 bsd.rd</tt></b>.
1647 dpavlin 10
1648     <p>It might also be possible to netboot. Another emulated machine must
1649     then be used as the nfs root server, and the emulated O2 machine must boot
1650 dpavlin 12 as a <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=diskless&amp;manpath=OpenBSD+Current&amp;format=html">diskless</a>
1651 dpavlin 10 client. Performing this setup is quite time consuming, but necessary:
1652    
1653     <p>
1654     <ol>
1655     <li>First of all, the "<tt>nfs server</tt>" machine must be set up.
1656     This needs to have a 800 MB <tt>/tftpboot</tt> partition.
1657 dpavlin 22 <a href="#netbsdpmaxinstall">Install NetBSD/pmax 3.0 from CDROM</a>.
1658 dpavlin 12 (Don't forget to add the extra partition!)
1659 dpavlin 10 <p>
1660     <li>Configure the nfs server machine to act as an nfs server.
1661     Start up the emulated DECstation:<pre>
1662 dpavlin 24 <b>gxemul -e 3max -d nbsd_pmax.img</b>
1663 dpavlin 10 </pre>and enter the following commands as <tt>root</tt>
1664     inside the emulator:
1665     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1666     <b>echo hostname=server &gt;&gt; /etc/rc.conf
1667     echo ifconfig_le0=\"inet 10.0.0.2\" &gt;&gt; /etc/rc.conf
1668     echo nameserver 10.0.0.254 &gt;&gt; /etc/resolv.conf
1669     echo 10.0.0.254 &gt; /etc/mygate
1670     echo /tftpboot -maproot=root 10.0.0.1 &gt; /etc/exports
1671     echo rpcbind=YES &gt;&gt; /etc/rc.conf
1672     echo nfs_server=YES &gt;&gt; /etc/rc.conf
1673     echo mountd=YES &gt;&gt; /etc/rc.conf
1674     echo bootparamd=YES &gt;&gt; /etc/rc.conf
1675     printf "client root=10.0.0.2:/tftpboot \\\n swap=10.0.0.2:/tftpboot/swap\n" &gt; /etc/bootparams
1676     echo "10:20:30:00:00:10 client" &gt; /etc/ethers
1677     echo 10.0.0.1 client &gt; /etc/hosts
1678     reboot</b>
1679     </pre></td></tr></table>
1680 dpavlin 12 <li>Start the DECstation emulation again, and enter the following
1681     commands to download the OpenBSD/sgi distribution:<br>(NOTE: This
1682 dpavlin 10 takes quite some time, even if you have a fast network connection.)
1683     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1684     <b>cd /tftpboot; ftp -i ftp.se.openbsd.org</b>
1685     (log in as anonymous...)
1686 dpavlin 24 <b>cd pub/OpenBSD/3.9/sgi
1687     mget b*tgz c*tgz e* g* m*
1688 dpavlin 10 quit
1689     sh
1690     for a in *.tgz; do echo $a; tar zxfp $a; done
1691     echo 10.0.0.2:/tftpboot / nfs rw 0 0 &gt; /tftpboot/etc/fstab
1692 dpavlin 12 rm *.tgz
1693 dpavlin 10 dd if=/dev/zero of=swap bs=1024 count=32768
1694     halt</b>
1695     </pre></td></tr></table>
1696     <li>Download the OpenBSD/sgi GENERIC and RAMDISK kernels:<pre>
1697 dpavlin 24 <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.9/sgi/bsd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.9/sgi/bsd</a>
1698     <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.9/sgi/bsd.rd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.9/sgi/bsd.rd</a>
1699 dpavlin 10
1700     </pre>
1701     <li>Create a configuration file called <tt>config_client</tt>:
1702     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1703 dpavlin 24 <font color="#2020cf">! Configuration file for running OpenBSD/sgi diskless with
1704 dpavlin 10 ! a NetBSD/pmax machine as the nfs server.
1705     !
1706     ! This config file is for the client.</font>
1707    
1708 dpavlin 24 <b> net(
1709 dpavlin 12 add_remote("localhost:12444") </b>! the server<b>
1710 dpavlin 10 local_port(12445) </b>! the client<b>
1711     )
1712    
1713     machine(
1714     name("client machine")
1715     serial_nr(1)
1716    
1717     type("sgi")
1718     subtype("o2")
1719    
1720     </b>! load("bsd")<b>
1721     load("bsd.rd")
1722     )
1723 dpavlin 24 </b>
1724 dpavlin 10 </pre></td></tr></table>
1725     ... and another configuration file for the server,
1726     <tt>config_server</tt>:
1727     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1728 dpavlin 24 <b> net(
1729 dpavlin 10 local_port(12444) </b>! the server<b>
1730 dpavlin 12 add_remote("localhost:12445") </b>! the client<b>
1731 dpavlin 10 )
1732    
1733     machine(
1734     name("nfs server")
1735     serial_nr(2)
1736    
1737     type("dec")
1738     subtype("5000/200")
1739    
1740     disk("nbsd_pmax.img")
1741     )
1742 dpavlin 24 </b>
1743 dpavlin 10 </pre></td></tr></table>
1744     <li>Boot the "<tt>nfs server</tt>" and the OpenBSD/sgi
1745     "<tt>client machine</tt>" as two separate emulator instances:<pre>
1746     in one xterm:
1747 dpavlin 12 <b>gxemul @config_server</b>
1748 dpavlin 10
1749     and then, in another xterm:
1750 dpavlin 12 <b>gxemul @config_client</b>
1751 dpavlin 10
1752     </pre>
1753 dpavlin 12 <li>In the OpenBSD/sgi window, choose "<tt>s</tt>" (for Shell), and type:
1754 dpavlin 10 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1755     <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254
1756     mount -v 10.0.0.2:/tftpboot /mnt
1757     cd /mnt/dev; ./MAKEDEV all; cd /; umount /mnt
1758     halt</b>
1759     </pre></td></tr></table>
1760 dpavlin 12 You might want to log in as <tt>root</tt> on the server machine, and
1761     run <tt>tcpdump -lnvv</tt> or similar, to see that what the client
1762     machine actually does on the network. The <tt>MAKEDEV</tt> script
1763     takes almost forever, so be patient.
1764 dpavlin 10 </ol>
1765    
1766    
1767     <p><font color="#ff0000">NOTE: Everything up to this point should work.
1768     However, the next step (in gray) doesn't actually work:</font>
1769    
1770     <p><font color="#888888">Once everything has been set up correctly, change
1771     <tt>bsd.rd</tt> in <tt>config_client</tt> to just <tt>bsd</tt> (the GENERIC
1772     kernel). It should now be possible to boot OpenBSD/sgi using the NetBSD/pmax
1773     nfs server. (When asked for "<tt>root device :</tt>" on the OpenBSD machine,
1774     enter <tt><b>mec0</b></tt>.)</font>
1775    
1776     <p><font color="#ff0000">But it doesn't work. Probably because GXemul's
1777     implementation of the mec (ethernet card used in the O2) is too much of
1778     a quick hack. For now, use the <tt>bsd.rd</tt> kernel, and (at every
1779     boot) type:</font><pre>
1780     <b>s</b> (for Shell)
1781     <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254</b>
1782     <b>mount -v 10.0.0.2:/tftpboot /mnt</b>
1783     <b>cd /mnt; usr/sbin/chroot .</b>
1784     <b>sh etc/rc</b>
1785     </pre>
1786    
1787     <p><font color="#ff0000">This will not cause OpenBSD to be booted
1788     normally, but at least a few basic things will work.
1789     By the way, the emulator performs so poorly, that you will have time to
1790     fetch several cups of coffee for each of the steps above.</font>
1791    
1792    
1793    
1794    
1795    
1796    
1797    
1798    
1799 dpavlin 22
1800 dpavlin 14 <p><br>
1801 dpavlin 22 <a name="openbsdarcinstall"></a>
1802     <h3>OpenBSD/arc:</h3>
1803    
1804     It is (almost) possible to install and run OpenBSD/arc on an emulated Acer
1805     PICA-61 in the emulator.
1806    
1807     <p><font color="#e00000">Earlier, I had this guest OS listed as
1808     officially working in the emulator, but for several reasons, it has
1809     been moved down here to the "informative-but-not-really-working"
1810     section.</font>
1811    
1812     <p>
1813     <ul>
1814     <li>The last OpenBSD/arc release was 2.3. This means that it is very
1815     old, it would not give a fair picture of what OpenBSD is (if you
1816     are just looking to find out what it is like), and it is not
1817     worth experimenting with it. See
1818     <a href="http://www.openbsd.org/arc.html">http://www.openbsd.org/arc.html</a>
1819     for more information.
1820     <li>OpenBSD/arc was (if I understood things correctly) never really
1821     stable, even on real hardare. Problems with too small an interrupt
1822     stack. Bugs are triggered in the emulator that have to do with
1823     issues such as this.
1824     </ul>
1825    
1826     <p>
1827     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1828     <a href="20041024-openbsd-arc-installed.gif"><img src="20041024-openbsd-arc-installed_small.gif"></a>
1829    
1830     <p>
1831     <font color="#e00000">Currently, I don't test for every release whether
1832     or not OpenBSD/arc can be installed. Releases prior to 0.3.7
1833     (but probably <i>not</i> 0.3.7) should work. Anyway, here are the
1834     old installation instructions:</font>
1835    
1836     <p>To install OpenBSD/arc onto an emulated harddisk image, follow these
1837     instructions:
1838    
1839     <p>
1840     <ol>
1841     <li>Create an empty harddisk image, which will be the root disk
1842     that OpenBSD installs itself onto:<pre>
1843     <b>dd if=/dev/zero of=obsd_arc.img bs=1024 count=1 seek=700000</b>
1844    
1845     </pre>
1846     <li>Download the entire arc directory from the ftp server: (approx. 75 MB)<pre>
1847     <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>
1848    
1849     </pre>
1850    
1851     <li>You now need to make an ISO image of the entire directory you downloaded.
1852     (I recommend using <tt>mkisofs</tt> for that purpose. If you don't
1853     already have <tt>mkisofs</tt> installed on your system, you need
1854     to install it in order to do this.)<pre>
1855     <b>mkisofs -o openbsd_arc_2.3.iso ftp.se.openbsd.org/pub/OpenBSD/</b>
1856    
1857     </pre>
1858     <li>Start the emulator using this command line:<pre>
1859 dpavlin 24 <b>gxemul -e pica -X -d obsd_arc.img -d b:openbsd_arc_2.3.iso -j 2.3/arc/bsd.rd</b>
1860 dpavlin 22
1861     </pre>
1862     and proceed like you would do if you were installing OpenBSD
1863     on a real Acer PICA-61. (Answer 'no' when asked if you want to
1864     configure networking, and then install from CD-ROM.)
1865     </ol>
1866    
1867     <p>
1868     Once the install has finished, the following command should let you
1869     boot from the harddisk image:
1870     <p>
1871     <pre>
1872     <b>gxemul -X -e pica -d obsd_arc.img ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/bsd</b>
1873    
1874     </pre>
1875    
1876     The system is very sensitive to (I think) kernel stack overflow, so it
1877     crashes easily. If I remember correctly from mailing lists, this also
1878     happened on real hardware.
1879    
1880    
1881    
1882    
1883    
1884    
1885    
1886    
1887    
1888    
1889    
1890     <p><br>
1891     <a name="debiancats"></a>
1892     <h3>Debian GNU/Linux for CATS:</h3>
1893    
1894     Debian GNU/Linux for CATS (ARM) could <i>theoretically</i> run in GXemul,
1895     however:
1896    
1897     <ul>
1898     <li>The DEC 21143 NIC is not emulated well enough for Linux to accept it.
1899     <li>Development of Debian for CATS seems to have died? The latest
1900     install kernel is quite old.
1901     </ul>
1902    
1903     <p><font color="#ff0000">IT DOES <b>NOT</b> WORK YET!</font>
1904    
1905     <p>The following installation instructions would theoretically work:
1906    
1907     <p>
1908     <ol>
1909     <li>Create an empty harddisk image, which will be the root disk
1910     that Debian installs itself onto:<pre>
1911     <b>dd if=/dev/zero of=debian_cats.img bs=1024 count=1 seek=3300000</b>
1912    
1913     </pre>
1914     <li>Download the tftpboot install kernel:<pre>
1915     <a href="http://ftp.debian.org/debian/dists/oldstable/main/disks-arm/current/cats/tftpboot.img">http://ftp.debian.org/debian/dists/oldstable/main/disks-arm/current/cats/tftpboot.img</a>
1916    
1917     </pre>
1918     <li>Start the installation using the following command line:<pre>
1919     <b>gxemul -XEcats -d debian_cats.img tftpboot.img</b>
1920    
1921     </pre>
1922     </ol>
1923    
1924     <p>It doesn't work, though, because the NIC isn't working well enough.
1925    
1926     <p>The only use of Debian/CATS in the emulator right now is as a way to
1927     manipulate Linux disk images, if you are on a non-Linux host. By choosing
1928     "Execute a shell" in the installer's menu, you can have access to tools such as
1929     fdisk and mke2fs, which are useful for creating Linux paritions on disk images.
1930    
1931    
1932    
1933    
1934    
1935    
1936    
1937     <p><br>
1938 dpavlin 14 <a name="netbsdnetwinderinstall"></a>
1939     <h3>NetBSD/netwinder:</h3>
1940    
1941     <a href="http://www.netbsd.org/Ports/netwinder/">NetBSD/netwinder</a>
1942 dpavlin 22 could possibly run in GXemul.
1943     <font color="#ff0000">IT DOES <b>NOT</b> WORK YET!</font>
1944 dpavlin 14
1945     <p>It is tricky to install, because there is (as far as I know) no INSTALL
1946     kernel. One way to install the NetBSD/netwinder distribution onto a disk
1947     image is to install the files using another (emulated) machine.
1948    
1949     <p>
1950     The following instructions will let you install the NetBSD/netwinder
1951     distribution onto a disk image, from an emulated DECstation 3MAX machine:
1952    
1953     <p>
1954     <ol>
1955 dpavlin 22 <li>Install NetBSD/pmax 3.0 according to instructions
1956     <a href="#netbsdpmaxinstall">further up on this page</a>.
1957 dpavlin 14 <p>
1958     <li>Create an empty harddisk image, which will be the disk image
1959     that you will install NetBSD onto:<pre>
1960     <b>dd if=/dev/zero of=nbsd_netwinder.img bs=1024 count=1 seek=999000</b>
1961    
1962     </pre>
1963 dpavlin 20 <li>Download the generic kernel and the 2.1 ISO image:<pre>
1964     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/netwinder/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.1/netwinder/binary/kernel/netbsd-GENERIC.gz</a>
1965     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/netwindercd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.1/netwindercd.iso</a>
1966 dpavlin 14
1967     </pre>
1968     <p>
1969     <li>Start NetBSD/pmax like this:<pre>
1970 dpavlin 24 <b>gxemul -e 3max -d nbsd_pmax.img -d nbsd_netwinder.img -d netwinder.iso</b>
1971 dpavlin 14
1972     </pre>and execute the following commands as <tt>root</tt>:
1973     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1974     <b>newfs /dev/sd1c
1975     mount /dev/cd0c /mnt
1976     mkdir /mnt2; mount /dev/sd1c /mnt2
1977     cd /mnt2; sh
1978     for a in /mnt/netwinder/binary/sets/*.tgz; do echo $a; tar zxfp $a; done
1979     exit
1980     cd dev; sh ./MAKEDEV all; cd ../etc
1981     echo rc_configured=YES >> rc.conf
1982     echo "/dev/wd0c / ffs rw 1 1" > fstab
1983     cd /; umount /mnt; umount /mnt2; halt</b>
1984     </pre></td></tr></table>
1985     </ol>
1986    
1987 dpavlin 20 <p>NetBSD/netwinder is now installed on the disk image. But actually
1988     running it does <b>not work yet</b>. Sorry.
1989    
1990     <p>Something like the following command line would be used to start
1991     NetBSD, if it worked:<pre>
1992 dpavlin 14 <b>gxemul -E netwinder -d nbsd_netwinder.img netbsd-GENERIC.gz</b>
1993     </pre>
1994    
1995     <p>Note: The installation instructions above create a filesystem
1996     <i>without</i> a disklabel, so there is only one ffs partition and no
1997     swap. You will need to enter the following things when booting with the
1998     generic kernel:<pre>
1999     root device (default wd0a): <b>wd0c</b>
2000     dump device (default wd0b): <b>none</b>
2001     file system (default generic): <i>(just press enter)</i>
2002     init path (default /sbin/init): <i>(just press enter)</i>
2003     </pre>
2004    
2005    
2006    
2007    
2008    
2009    
2010    
2011    
2012 dpavlin 24 <p><br>
2013     <a name="netbsdmacppcinstall"></a>
2014     <h3>NetBSD/macppc:</h3>
2015    
2016     It is <font color="#ff0000"><b>ALMOST</b></font> possible to install and run
2017     <a href="http://www.netbsd.org/Ports/macppc/">NetBSD/macppc</a> in GXemul
2018     on an emulated generic PowerPC machine. No specific Machintosh model
2019     is emulated, but it is enough to for NetBSD to recognize it.
2020    
2021     <p>To install NetBSD/macppc onto a disk image, follow these instructions:
2022    
2023     <p>
2024     <ol start="1">
2025     <li>Create an empty harddisk image, which will be the root disk
2026     that you will install NetBSD/macppc onto:<pre>
2027     <b>dd if=/dev/zero of=nbsd_macppc.img bs=1024 count=1 seek=2000000</b>
2028    
2029     </pre>
2030     <li>Download the NetBSD/macppc 3.0 ISO image and a generic kernel:<pre>
2031     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/macppccd-3.0.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/3.0/macppccd-3.0.iso</a>
2032     <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/macppc/binary/kernel/">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/macppc/binary/kernel</a>/<a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-3.0/macppc/binary/kernel/netbsd-GENERIC.MP.gz">netbsd-GENERIC.MP.gz</a>
2033    
2034     </pre>
2035     <p>
2036     <li>Start the installation like this:<pre>
2037     <b>gxemul -x -e g4 -d nbsd_macppc.img -d b:macppccd-3.0.iso -j macppc/binary/kernel/netbsd-INSTALL.gz</b>
2038    
2039     </pre>
2040     </ol>
2041    
2042     <p>If everything worked, NetBSD/macppc should now be installed on the disk image.
2043    
2044     <p><font color="#ff0000"><b>2006-02-26:</b></font> That's it. The installation
2045     succeeds, but it is not possible to start from the newly installed disk.
2046     /sbin/init dies, so the following command doesn't really work yet:
2047    
2048     <p>Use the following command line to boot the emulated machine:<pre>
2049     <b>gxemul -x -e g4 -d nbsd_macppc.img netbsd-GENERIC.MP.gz</b>
2050    
2051     </pre>
2052    
2053    
2054    
2055    
2056    
2057 dpavlin 2 </p>
2058    
2059     </body>
2060     </html>

  ViewVC Help
Powered by ViewVC 1.1.26