/[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 28 - (hide annotations)
Mon Oct 8 16:20:26 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: text/html
File size: 81298 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1298 2006/07/22 11:27:46 debug Exp $
20060626	Continuing on SPARC emulation (beginning on the 'save'
		instruction, register windows, etc).
20060629	Planning statistics gathering (new -s command line option),
		and renaming speed_tricks to allow_instruction_combinations.
20060630	Some minor manual page updates.
		Various cleanups.
		Implementing the -s command line option.
20060701	FINALLY found the bug which prevented Linux and Ultrix from
		running without the ugly hack in the R2000/R3000 cache isol
		code; it was the phystranslation hint array which was buggy.
		Removing the phystranslation hint code completely, for now.
20060702	Minor dyntrans cleanups; invalidation of physpages now only
		invalidate those parts of a page that have actually been
		translated. (32 parts per page.)
		Some MIPS non-R3000 speed fixes.
		Experimenting with MIPS instruction combination for some
		addiu+bne+sw loops, and sw+sw+sw.
		Adding support (again) for larger-than-4KB pages in MIPS tlbw*.
		Continuing on SPARC emulation: adding load/store instructions.
20060704	Fixing a virtual vs physical page shift bug in the new tlbw*
		implementation. Problem noticed by Jakub Jermar. (Many thanks.)
		Moving rfe and eret to cpu_mips_instr.c, since that is the
		only place that uses them nowadays.
20060705	Removing the BSD license from the "testmachine" include files,
		placing them in the public domain instead; this enables the
		testmachine stuff to be used from projects which are
		incompatible with the BSD license for some reason.
20060707	Adding instruction combinations for the R2000/R3000 L1
		I-cache invalidation code used by NetBSD/pmax 3.0, lui+addiu,
		various branches followed by addiu or nop, and jr ra followed
		by addiu. The time it takes to perform a full NetBSD/pmax R3000
		install on the laptop has dropped from 573 seconds to 539. :-)
20060708	Adding a framebuffer controller device (dev_fbctrl), which so
		far can be used to change the fb resolution during runtime, but
		in the future will also be useful for accelerated block fill/
		copy, and possibly also simplified character output.
		Adding an instruction combination for NetBSD/pmax' strlen.
20060709	Minor fixes: reading raw files in src/file.c wasn't memblock
		aligned, removing buggy multi_sw MIPS instruction combination,
		etc.
20060711	Adding a machine_qemu.c, which contains a "qemu_mips" machine.
		(It mimics QEMU's MIPS machine mode, so that a test kernel
		made for QEMU_MIPS also can run in GXemul... at least to some
		extent.)  Adding a short section about how to run this mode to
		doc/guestoses.html.
20060714	Misc. minor code cleanups.
20060715	Applying a patch which adds getchar() to promemul/yamon.c
		(from Oleksandr Tymoshenko).
		Adding yamon.h from NetBSD, and rewriting yamon.c to use it
		(instead of ugly hardcoded numbers) + some cleanup.
20060716	Found and fixed the bug which broke single-stepping of 64-bit
		programs between 0.4.0 and 0.4.0.1 (caused by too quick
		refactoring and no testing). Hopefully this fix will not
		break too many other things.
20060718	Continuing on the 8253 PIT; it now works with Linux/QEMU_MIPS.
		Re-adding the sw+sw+sw instr comb (the problem was that I had
		ignored endian issues); however, it doesn't seem to give any
		big performance gain.
20060720	Adding a dummy Transputer mode (T414, T800 etc) skeleton (only
		the 'j' and 'ldc' instructions are implemented so far). :-}
20060721	Adding gtreg.h from NetBSD, updating dev_gt.c to use it, plus
		misc. other updates to get Linux 2.6 for evbmips/malta working
		(thanks to Alec Voropay for the details).
		FINALLY found and fixed the bug which made tlbw* for non-R3000
		buggy; it was a reference count problem in the dyntrans core.
20060722	Testing stuff; things seem stable enough for a new release.

==============  RELEASE 0.4.1  ==============


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

  ViewVC Help
Powered by ViewVC 1.1.26