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