/[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 40 - (show annotations)
Mon Oct 8 16:22:11 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: text/html
File size: 96398 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1539 2007/05/01 04:03:51 debug Exp $
20070415	Landisk PCLOCK should be 33.33 MHz, not 50 MHz. (This makes
		the clock run at correct speed.)
		FINALLY found and fixed the bug which caused OpenBSD/landisk
		to randomly bug out: an &-sign was missing in the special case
		handling of FPSCR in the 'LDS.L @Rm+,FPSCR' instruction.
		Adding similar special case handling for 'LDC.L @Rm+,SR'
		(calling sh_update_sr() instead of just loading).
		Implementing the 'FCNVSD FPUL,DRn' and 'FCNVDS DRm,FPUL'
		SuperH instructions.
		The 'LDC Rm,SR' instruction now immediately breaks out of the
		dyntrans loop if an interrupt is to be triggered.
20070416	In memory_rw.c, if mapping a page as writable, make sure to
		invalidate code translations even if the data access was a
		read.
		Minor SuperH updates.
20070418	Removing the dummy M68K emulation mode.
		Minor SH update (turning unnecessary sts_mach_rn, sts_macl_rn,
		and sts_pr_rn instruction handlers into mov_rm_rn).
20070419	Beginning to add a skeleton for an M88K mode: Adding a hack to
		allow OpenBSD/m88k a.out binaries to be loaded, and disassembly
		of a few simple 88K instructions.
		Commenting out the 'LDC Rm,SR' fix from a few days ago, because
		it made Linux/dreamcast bug out.
		Adding a hack to dev_sh4.c (an extra translation cache
		invalidation), which allows OpenBSD/landisk to boot ok after
		an install. Upgrading the Landisk machine mode to stable,
		updating documentation, etc.
20070420	Experimenting with adding a PCI controller (pcic) to dev_sh4.
		Adding a dummy Realtek 8139C+ skeleton device (dev_rtl8139c).
		Implementing the first M88K instructions (br, or[.u] imm), and
		adding disassembly of some more instructions.
20070421	Continuing a little on dev_rtl8139c.
20070422	Implementing the 9346 EEPROM "read" command for dev_rtl8139c.
		Finally found and fixed an old bug in the log n symbol search
		(it sometimes missed symbols). Debug trace (-i, -t etc) should
		now show more symbols. :-)
20070423	Continuing a little on M88K disassembly.
20070428	Fixing a memset arg order bug in src/net/net.c (thanks to
		Nigel Horne for noticing the bug).
		Applying parts of a patch from Carl van Schaik to clear out
		bottom bits of MIPS addresses more correctly, when using large
		page sizes, and doing some other minor cleanup/refactoring.
		Fixing a couple of warnings given by gcc with the -W option (a
		few more warnings than just plain -Wall).
		Reducing SuperH dyntrans physical address space from 64-bit to
		32-bit (since SH5/SH64 isn't imlemented yet anyway).
		Adding address-to-symbol annotation to a few more instructions
		in the SuperH instruction trace output.
		Beginning regression testing for the next release.
		Reverting the value of SCIF_DELAYED_TX_VALUE from 1 to 2,
		because OpenBSD/landisk may otherwise hang randomly.
20070429	The ugly hack/workaround to get OpenBSD/landisk booting without
		crashing does NOT work anymore (with the April 21 snapshot
		of OpenBSD/landisk). Strangely enough, removing the hack
		completely causes OpenBSD/landisk to work (!).
		More regression testing (re-testing everything SuperH-related,
		and some other things).
		Cobalt interrupts were actually broken; fixing by commenting
		out the DEC21143s in the Cobalt machine.
20070430	More regression testing.
20070501	Updating the OpenBSD/landisk install instructions to use
		4.1 instead of the current snapshot.
		GAAAH! OpenBSD/landisk 4.1 _needs_ the ugly hack/workaround;
		reintroducing it again. (The 4.1 kernel is actually from
		2007-03-11.)
		Simplifying the NetBSD/evbarm install instructions a bit.
		More regression testing.

==============  RELEASE 0.4.5.1  ==============


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

  ViewVC Help
Powered by ViewVC 1.1.26