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

Contents of /trunk/doc/guestoses.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (show annotations)
Mon Oct 8 16:18:51 2007 UTC (13 years, 3 months ago) by dpavlin
File MIME type: text/html
File size: 65661 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.982 2005/10/07 22:45:32 debug Exp $
20050816	Some success in decoding the way the SGI O2 PROM draws graphics
		during bootup; lines/rectangles and bitmaps work, enough to
		show the bootlogo etc. :-)
		Adding more PPC instructions, and (dummy) BAT registers.
20050817	Updating the pckbc to support scancode type 3 keyboards
		(required in order to interact with the SGI O2 PROM).
		Adding more PPC instructions.
20050818	Adding more ARM instructions; general register forms.
		Importing armreg.h from NetBSD (ARM cpu ids). Adding a (dummy)
		CATS machine mode (using SA110 as the default CPU).
		Continuing on general dyntrans related stuff.
20050819	Register forms for ARM load/stores. Gaah! The Compaq C Compiler
		bug is triggered for ARM loads as well, not just PPC :-(
		Adding full support for ARM PC-relative load/stores, and load/
		stores where the PC register is the destination register.
		Adding support for ARM a.out binaries.
20050820	Continuing to add more ARM instructions, and correcting some
		bugs. Continuing on CATS emulation.
		More work on the PPC stuff.
20050821	Minor PPC and ARM updates. Adding more machine types.
20050822	All ARM "data processing instructions" are now generated
		automatically.
20050824	Beginning the work on the ARM system control coprocessor.
		Adding support for ARM halfword load/stores, and signed loads.
20050825	Fixing an important bug related to the ARM condition codes.
		OpenBSD/zaurus and NetBSD/netwinder now print some boot
		messages. :)
		Adding a dummy SH (Hitachi SuperH) cpu family.
		Beginning to add some ARM virtual address translation.
		MIPS bugfixes: unaligned PC now cause an ADEL exception (at
		least for non-bintrans execution), and ADEL/ADES (not
		TLBL/TLBS) are used if userland tries to access kernel space.
		(Thanks to Joshua Wise for making me aware of these bugs.)
20050827	More work on the ARM emulation, and various other updates.
20050828	More ARM updates.
		Finally taking the time to work on translation invalidation
		(i.e. invalidating translated code mappings when memory is
		written to). Hopefully this doesn't break anything.
20050829	Moving CPU related files from src/ to a new subdir, src/cpus/.
		Moving PROM emulation stuff from src/ to src/promemul/.
		Better debug instruction trace for ARM loads and stores.
20050830	Various ARM updates (correcting CMP flag calculation, etc).
20050831	PPC instruction updates. (Flag fixes, etc.)
20050901	Various minor PPC and ARM instruction emulation updates.
		Minor OpenFirmware emulation updates.
20050903	Adding support for adding arbitrary ARM coprocessors (with
		the i80321 I/O coprocessor as a first test).
		Various other ARM and PPC updates.
20050904	Adding some SHcompact disassembly routines.
20050907	(Re)adding a dummy HPPA CPU module, and a dummy i960 module.
20050908	Began hacking on some Apple Partition Table support.
20050909	Adding support for loading Mach-O (Darwin PPC) binaries.
20050910	Fixing an ARM bug (Carry flag was incorrectly updated for some
		data processing instructions); OpenBSD/cats and NetBSD/
		netwinder get quite a bit further now.
		Applying a patch to dev_wdc, and a one-liner to dev_pcic, to
		make them work better when emulating new versions of OpenBSD.
		(Thanks to Alexander Yurchenko for the patches.)
		Also doing some other minor updates to dev_wdc. (Some cleanup,
		and finally converting to devinit, etc.)
20050912	IRIX doesn't have u_int64_t by default (noticed by Andreas
		<avr@gnulinux.nl>); configure updated to reflect this.
		Working on ARM register bank switching, CPSR vs SPSR issues,
		and beginning the work on interrupt/exception support.
20050913	Various minor ARM updates (speeding up load/store multiple,
		and fixing a ROR bug in R(); NetBSD/cats now boots as far as
		OpenBSD/cats).
20050917	Adding a dummy Atmel AVR (8-bit) cpu family skeleton.
20050918	Various minor updates.
20050919	Symbols are now loaded from Mach-O executables.
		Continuing the work on adding ARM exception support.
20050920	More work on ARM stuff: OpenBSD/cats and NetBSD/cats reach
		userland! :-)
20050921	Some more progress on ARM interrupt specifics.
20050923	Fixing linesize for VR4121 (patch by Yurchenko). Also fixing
		linesizes/cachesizes for some other VR4xxx.
		Adding a dummy Acer Labs M1543 PCI-ISA bridge (for CATS) and a
		dummy Symphony Labs 83C553 bridge (for Netwinder), usable by 
		dev_footbridge.
20050924	Some PPC progress.
20050925	More PPC progress.
20050926	PPC progress (fixing some bugs etc); Darwin's kernel gets
		slightly further than before.
20050928	Various updates: footbridge/ISA/pciide stuff, and finally
		fixing the VGA text scroll-by-changing-the-base-offset bug.
20050930	Adding a dummy S3 ViRGE pci card for CATS emulation, which
		both NetBSD and OpenBSD detects as VGA.
		Continuing on Footbridge (timers, ISA interrupt stuff).
20051001	Continuing... there are still bugs, probably interrupt-
		related.
20051002	More work on the Footbridge (interrupt stuff).
20051003	Various minor updates. (Trying to find the bug(s).)
20051004	Continuing on the ARM stuff.
20051005	More ARM-related fixes.
20051007	FINALLY! Found and fixed 2 ARM bugs: 1 memory related, and the
		other was because of an error in the ARM manual (load multiple
		with the S-bit set should _NOT_ load usermode registers, as the
		manual says, but it should load saved registers, which may or
		may not happen to be usermode registers).
		NetBSD/cats and OpenBSD/cats seem to install fine now :-)
		except for a minor bug at the end of the OpenBSD/cats install.
		Updating the documentation, preparing for the next release.
20051008	Continuing with release testing and cleanup.

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

  ViewVC Help
Powered by ViewVC 1.1.26