/[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 22 - (hide annotations)
Mon Oct 8 16:19:37 2007 UTC (13 years, 3 months ago) by dpavlin
File MIME type: text/html
File size: 71842 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1121 2006/02/18 21:03:08 debug Exp $
20051126	Cobalt and PReP now work with the 21143 NIC.
		Continuing on Alpha dyntrans things.
		Fixing some more left-shift-by-24 to unsigned.
20051127	Working on OpenFirmware emulation; major cleanup/redesign.
		Progress on MacPPC emulation: NetBSD detects two CPUs (when
		running with -n 2), framebuffer output (for text) works.
		Adding quick-hack Bandit PCI controller and "gc" interrupt
		controller for MacPPC.
20051128	Changing from a Bandit to a Uni-North controller for macppc.
		Continuing on OpenFirmware and MacPPC emulation in general
		(obio controller, and wdc attached to the obio seems to work).
20051129	More work on MacPPC emulation (adding a dummy ADB controller).
		Continuing the PCI bus cleanup (endianness and tag composition)
		and rewriting all PCI controllers' access functions.
20051130	Various minor PPC dyntrans optimizations.
		Manually inlining some parts of the framebuffer redraw routine.
		Slowly beginning the conversion of the old MIPS emulation into
		dyntrans (but this will take quite some time to get right).
		Generalizing quick_pc_to_pointers.
20051201	Documentation update (David Muse has made available a kernel
		which simplifies Debian/DECstation installation).
		Continuing on the ADB bus controller.
20051202	Beginning a rewrite of the Zilog serial controller (dev_zs).
20051203	Continuing on the zs rewrite (now called dev_z8530); conversion
		to devinit style.
		Reworking some of the input-only vs output-only vs input-output
		details of src/console.c, better warning messages, and adding
		a debug dump.
		Removing the concept of "device state"; it wasn't really used.
		Changing some debug output (-vv should now be used to show all
		details about devices and busses; not shown during normal
		startup anymore).
		Beginning on some SPARC instruction disassembly support.
20051204	Minor PPC updates (WALNUT skeleton stuff).
		Continuing on the MIPS dyntrans rewrite.
		More progress on the ADB controller (a keyboard is "detected"
		by NetBSD and OpenBSD).
		Downgrading OpenBSD/arc as a guest OS from "working" to
		"almost working" in the documentation.
		Progress on Algor emulation ("v3" PCI controller).
20051205	Minor updates.
20051207	Sorting devices according to address; this reduces complexity
		of device lookups from O(n) to O(log n) in memory_rw (but no
		real performance increase (yet) in experiments).
20051210	Beginning the work on native dyntrans backends (by making a
		simple skeleton; so far only for Alpha hosts).
20051211	Some very minor SPARC updates.
20051215	Fixing a bug in the MIPS mul (note: not mult) instruction,
		so it also works with non-64-bit emulation. (Thanks to Alec
		Voropay for noticing the problem.)
20051216	More work on the fake/empty/simple/skeleton/whatever backend;
		performance doesn't increase, so this isn't really worth it,
		but it was probably worth it to prepare for a real backend
		later.
20051219	More instr call statistics gathering and analysis stuff.
20051220	Another fix for MIPS 'mul'. Also converting mul and {d,}cl{o,z}
		to dyntrans.
		memory_ppc.c syntax error fix (noticed by Peter Valchev).
		Beginning to move out machines from src/machine.c into
		individual files in src/machines (in a way similar to the
		autodev system for devices).
20051222	Updating the documentation regarding NetBSD/pmax 3.0.
20051223	- " - NetBSD/cats 3.0.
20051225	- " - NetBSD/hpcmips 3.0.
20051226	Continuing on the machine registry redesign.
		Adding support for ARM rrx (33-bit rotate).
		Fixing some signed/unsigned issues (exposed by gcc -W).
20051227	Fixing the bug which prevented a NetBSD/prep 3.0 install kernel
		from starting (triggered when an mtmsr was the last instruction
		on a page). Unfortunately not enough to get the kernel to run
		as well as the 2.1 kernels did.
20051230	Some dyntrans refactoring.
20051231	Continuing on the machine registry redesign.
20060101-10	Continuing... moving more machines. Moving MD interrupt stuff
		from machine.c into a new src/machines/interrupts.c.
20060114	Adding various mvmeppc machine skeletons.
20060115	Continuing on mvme* stuff. NetBSD/mvmeppc prints boot messages
		(for MVME1600) and reaches the root device prompt, but no
		specific hardware devices are emulated yet.
20060116	Minor updates to the mvme1600 emulation mode; the Eagle PCI bus
		seems to work without much modification, and a 21143 can be
		detected, interrupts might work (but untested so far).
		Adding a fake MK48Txx (mkclock) device, for NetBSD/mvmeppc.
20060121	Adding an aux control register for ARM. (A BIG thank you to
		Olivier Houchard for tracking down this bug.)
20060122	Adding more ARM instructions (smulXY), and dev_iq80321_7seg.
20060124	Adding disassembly of more ARM instructions (mia*, mra/mar),
		and some semi-bogus XScale and i80321 registers.
20060201-02	Various minor updates. Moving the last machines out of
		machine.c.
20060204	Adding a -c command line option, for running debugger commands
		before the simulation starts, but after all files have been
		loaded.
		Minor iq80321-related updates.
20060209	Minor hacks (DEVINIT macro, etc).
		Preparing for the generalization of the 64-bit dyntrans address
		translation subsystem.
20060216	Adding ARM ldrd (double-register load).
20060217	Continuing on various ARM-related stuff.
20060218	More progress on the ATA/wdc emulation for NetBSD/iq80321.
		NetBSD/evbarm can now be installed :-)  Updating the docs, etc.
		Continuing on Algor emulation.

==============  RELEASE 0.3.8  ==============


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

  ViewVC Help
Powered by ViewVC 1.1.26