File: install.html

package info (click to toggle)
bochs 1.4pre2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,656 kB
  • ctags: 10,322
  • sloc: cpp: 66,880; ansic: 19,674; sh: 2,951; makefile: 2,183; asm: 2,110; yacc: 723; lex: 171; csh: 147; perl: 35
file content (552 lines) | stat: -rw-r--r-- 13,763 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="Author" CONTENT="Kevin Lawton">
   <TITLE>Compiling and Installing Bochs</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#ececec"  LINK="#3333cc" VLINK="#666666">

<H1>Compiling and Installing Bochs</H1>

<UL>
<LI> <A HREF="#Getting current source code">Getting current source code</A> </LI>
<LI> <A HREF="#Compiling source code">Compiling source code</A> </LI>
<LI> <A HREF="#Setting up environment">Setting up environment before running</A> </LI>
<LI> <A HREF="#Bochsrc file options">Bochsrc file options</A> </LI>
<LI> <A HREF="#Command line options">Bochs command line options</A> </LI>
<LI> <A HREF="#Installing an OS">Installing an OS (DOS/Win'95/Minix/Linux) within Bochs</A> </LI>
<LI> <A HREF="changelog.html">ChangeLog</A> </LI>
<LI> <A HREF="debugger.html">Optional command line debugger</A> </LI>
<LI> <A HREF="cosimulation.html">Optional cosimulation debugger</A> </LI>
<LI> <A HREF="instrumentation.html">Instrumentation</A> </LI>
<LI> <A HREF="mtools.html">mtools: utilities to access DOS disks in Unix</A> </LI>
</UL>

<BR>
<UL>
<LI> <A HREF="http://www.gnu.org/copyleft/lesser.html">LGPL License</A> </LI>
<LI> <A HREF="3rdparty.license.html">3rd Party Software Licensing and Temporary Files</A> </LI>
<LI> <A HREF="developers.html">Bochs source code developers email mailing list</A></LI>
<LI> <A HREF="features.html">Summary of current Bochs supported features</A></LI>
<LI> <A HREF="#Keyboard Hacks">X11 Keyboard Hacks</A></LI>
</UL>

<HR WIDTH="100%">
<H2>
<A NAME="Getting current source code"></A>Getting current source code
</H2>
Source code for Bochs, is available from the Bochs home page
at <a href="http://bochs.sourceforge.net">bochs.sourceforge.net</a>.
You can download the most recent release, or use CVS to check 
out the latest sources.  The releases are the most likely to compile 
and run without modification, but if you want the very newest features
try CVS instead.

<HR WIDTH="100%">
<H2>
<A NAME="Compiling source code"></A>Compiling source code
</H2>
All releases are gzip'd tar files. That means the whole Bochs source
code directory has been
consolidated into one file using the Unix command 'tar', then compressed
to save space with GNU 'gzip'.
To extract the source code, you'll need both 'tar' and 'gzip/gunzip'.
All files are contained within one
subdirectory named 'bochs-YYMMDDv'.

<PRE>
    cd /path/parent-directory
    gzip -dc bochs-YYMMDDv.tar.gz | tar -xvf -
    cd bochs-YYMMDDv
</PRE>

Before compiling, you'll need to run the configure script, which will configure
source code to run
on your system, and with your chosen options. There are many
options to 'configure', and you probably don't need any of them.
For example, if you run BeOS, specify '--with-beos' to configure.
To see a complete list:

<PRE>
    unix-> ./configure --help
</PRE>

For more complete documentation of options available to configure,
click on <a href="configure.html">this link</a>.
<p>
You will also need to set
environment variables to tell configure what compiler and options
to use.  Check out <a href="configure.html">this link</a>. &nbsp;
It's the same as the one above.
<p>

Now run configure, be it manually or by way of a script file.
<PRE>
    unix-> ./configure
       -or-
    unix-> ./.conf.x86
</PRE>

<P>If the configure script bombs, check 'config.log'. Specifically,
look for errors returned
by the compiler. You may have options incompatible with your
compiler. See the link on setting the environment variables above.

<P>
Assuming at this point all went well with the configure command,
edit the file 'config.h', which was generated by ./configure.
Look for the USER CONFIGURABLE OPTIONS section.  Each parameter
available for editing is documented. &nbsp;Generally the
defaults are fine for typical users.
Please read about each
parameter and edit carefully.  <B>NOTE:</B> This file is
generated, and will be deleted if you run 'make dist-clean'.

<P>
You may now compile the source.
<PRE>
    unix-> make
</PRE>

<p>
There are <a href="win32.html">separate instructions</a> for compiling
in Windows.
<p>

<HR WIDTH="100%">
<H2>
<A NAME="Setting up environment"></A>Setting up environment
before running
</H2>


In text mode, Bochs requires your X server to have access to the
VGA font.  If you don't already have it, you must install it from
one of the font files in bochs-yymmdd/font.
<P>
There are two options; you may install the VGA font in a global place, or
in a local directory.  You may need to install it locally if you don't have
root access.  If the VGA font is not installed properly, you will get
the error, "Could not open vga font".

<P>
<B>Option 1: installing VGA font in global font directory</B>
<PRE>

   # NOTE1: Make sure your DISPLAY variable points to local machine.
   # NOTE2: These steps require root privileges.
   # NOTE3: Your X11 fonts path will vary on different systems. For example:
   #        Solaris 2.x /usr/openwin/lib/X11/fonts
   #        Linux       /usr/lib/X11/fonts/
   root-> cp font/vga.pcf font-path-here/misc
   root-> compress font-path-here/misc/vga.pcf
   root-> mkfontdir font-path-here/misc
   root-> xset fp rehash
   root-> /etc/rc.d/init.d/xfs restart     (Restart your X font server)
</PRE>

The command to restart the X font server is given for Redhat systems, but
it will vary between different machines, and might not even be necessary at
all.  If you cannot figure out how to restart your font server, you can
just reboot.
<p>

<B>Option 2: installing VGA font in local font directory</B>
<PRE>
   # NOTE1: Make sure your DISPLAY variable points to local machine.
   # NOTE2: The "xset" command needs to be run for each X session.
   user-> mkfontdir bochs-YYMMDD/font
   user-> xset fp+ [full-path]/bochs-YYMMDD/font
</PRE>

<A NAME="Creating a hard disk image file"></A>
<B>Hard Drive Image File: </B> Bochs emulates a hard drive by using a
large Unix file, which you must create. The size of the hard drive is
dependent upon the number of cylinders, heads, and sectors-per-track that
you would like to emulate.  Here are some examples of possible
drive geometries:

<BR>
<BR>
<TABLE BORDER COLS=5 WIDTH="100%" >

<TR>
<TH>Size</TH>
<TH>Cylinders</TH>
<TH>Heads</TH>
<TH>Sectors/Track</TH>
<TH>Sectors Total</TH>
</TR>

<TR>
<TD>10MB</TD>
<TD>306</TD>
<TD>4</TD>
<TD>17</TD>
<TD>20808</TD>
</TR>

<TR>
<TD>20MB</TD>
<TD>615</TD>
<TD>4</TD>
<TD>17</TD>
<TD>41820</TD>
</TR>

<TR>
<TD>30MB</TD>
<TD>615</TD>
<TD>6</TD>
<TD>17</TD>
<TD>62730</TD>
</TR>

<TR>
<TD>46MB</TD>
<TD>940</TD>
<TD>6</TD>
<TD>17</TD>
<TD>95880</TD>
</TR>

<TR>
<TD>62MB</TD>
<TD>940</TD>
<TD>8</TD>
<TD>17</TD>
<TD>127840</TD>
</TR>

<TR>
<TD>112MB</TD>
<TD>900</TD>
<TD>15</TD>
<TD>17</TD>
<TD>229500</TD>
</TR>

<TR>
<TD>126MB</TD>
<TD>256</TD>
<TD>16</TD>
<TD>63</TD>
<TD>258048</TD>
</TR>

<TR>
<TD>483MB</TD>
<TD>1024</TD>
<TD>15</TD>
<TD>63</TD>
<TD>967680</TD>
</TR>

<TR>
<TD>504MB</TD>
<TD>1024</TD>
<TD>16</TD>
<TD>63</TD>
<TD>1032192</TD>
</TR>

<TR>
<TD>640MB</TD>
<TD>1300</TD>
<TD>16</TD>
<TD>63</TD>
<TD>1310400</TD>
</TR>

<TR>
<TD>886MB</TD>
<TD>1800</TD>
<TD>16</TD>
<TD>63</TD>
<TD>1814400</TD>
</TR>

<TR>
<TD>1280MB</TD>
<TD>2600</TD>
<TD>16</TD>
<TD>63</TD>
<TD>2620800</TD>
</TR>

<TR>
<TD>2215MB</TD>
<TD>4500</TD>
<TD>16</TD>
<TD>63</TD>
<TD>4536000</TD>
</TR>

<TR>
<TD>3495MB</TD>
<TD>7100</TD>
<TD>16</TD>
<TD>63</TD>
<TD>7156800</TD>
</TR>

<TR>
<TD>5020MB</TD>
<TD>10200</TD>
<TD>16</TD>
<TD>63</TD>
<TD>10281600</TD>
</TR>

<TR>
<TD>7088MB</TD>
<TD>14400</TD>
<TD>16</TD>
<TD>63</TD>
<TD>14515200</TD>
</TR>

<TR>
<TD>10041MB</TD>
<TD>20400</TD>
<TD>16</TD>
<TD>63</TD>
<TD>20563200</TD>
</TR>

<TR>
<TD>12206MB</TD>
<TD>24800</TD>
<TD>16</TD>
<TD>63</TD>
<TD>24998400</TD>
</TR>

<TR>
<TD>16045MB</TD>
<TD>32600</TD>
<TD>16</TD>
<TD>63</TD>
<TD>32860800</TD>
</TR>

<TR>
<TD>20672MB</TD>
<TD>42000</TD>
<TD>16</TD>
<TD>63</TD>
<TD>42336000</TD>
</TR>

<TR>
<TD>25003MB</TD>
<TD>50800</TD>
<TD>16</TD>
<TD>63</TD>
<TD>51206400</TD>
</TR>

<TR>
<TD>29974MB</TD>
<TD>60900</TD>
<TD>16</TD>
<TD>63</TD>
<TD>61387200</TD>
</TR>

<TR>
<TD>32238MB</TD>
<TD>65500</TD>
<TD>16</TD>
<TD>63</TD>
<TD>66024000</TD>
</TR>

</TABLE>

<BR>
For hard disk sizes larger than 528MB, be sure that newharddrivesupport is 
enabled.  This will be the compiled default in a future release, but for now
your .bochsrc still needs the line "newharddrivesupport: enabled=1" in order 
to support >1024 cylinders.
<p>
Pick the size of the hard drive you want to emulate, and create a blank file
according to the parameters in the table.  If you have the 'dd' command,
you can use it to create the file.  Keeping in mind that there are 512 bytes
in a sector, just use the number of "Sectors Total" from the table as the
'count=' option to dd, and tell dd to use a block size ('bs=') the same as
a disk sector size (512).  For example, for a 112MB drive, there are 229500
(900*15*17) sectors.

<PRE>
    unix-> dd if=/dev/zero of=112M bs=512 count=229500
</PRE>

<A NAME="Creating a floppy image file"></A>
<B>Floppy Disk Image File:</B> Bochs emulates a floppy drive/disk using either
a Unix file, or a real floppy drive Unix device.  To use either, you will need
an entry in your '.bochsrc' file pointing to the regular or device file.  Use
the 'floppya:' and 'floppyb:' directives.  If you are starting out, you will
need to make a copy of an <I>existing</I> bootable floppy.  Otherwise, you may create
a <I>blank</I> image file, if you intend on formatting it using the OS you boot
within Bochs.
<BR>
<BR>

<TABLE BORDER COLS=5 WIDTH="100%" >
<TR>
<TH>Size</TH>
<TH>Cylinders</TH>
<TH>Heads</TH>
<TH>Sectors/Track</TH>
<TH>Sectors Total</TH>
</TR>

<TR>
<TD>0.720MB</TD>
<TD>80</TD>
<TD>2</TD>
<TD>9</TD>
<TD>1440</TD>
</TR>

<TR>
<TD>1.2MB</TD>
<TD>80</TD>
<TD>2</TD>
<TD>15</TD>
<TD>2400</TD>
</TR>

<TR>
<TD>1.44MB</TD>
<TD>80</TD>
<TD>2</TD>
<TD>18</TD>
<TD>2880</TD>
</TR>

<TR>
<TD>1.680MB</TD>
<TD>80</TD>
<TD>2</TD>
<TD>21</TD>
<TD>3360</TD>
</TR>
</TABLE>

<BR>
<BR>
To create a <I>blank floppy image file</I>, you can use the same concept as above for
creating blank hard disk image files.  For example, to create a blank 1.44MB
floppy image file:
<PRE>
    unix-> dd if=/dev/zero of=1.44M bs=512 count=2880
</PRE>

To create a <I>copy of an existing floppy disk</I>, granted you have a floppy disk
drive on your workstation, you can use one of the following commands, where
'/dev/fd0' would be the path to your floppy drive device name.
<P><B>NOTE:</B> If your system uses a form of volume management to automount
your floppy drive, you may have to tell it you popped in a new floppy,
and use an alternative device name to access it.
</P>
<PRE>
    # Linux, direct use of floppy drive using 'dd'
    unix-> dd if=/dev/fd0 ibs=512 of=1.44M

        --or--

    # Linux, direct use of floppy drive using 'cp'
    unix-> cp /dev/fd0 1.44M

        --or--

    # With Volume Management handling floppy drive
    Solaris 2.x-> volcheck
    Solaris 2.x-> dd if=/vol/dev/aliases/floppy0 ibs=512 of=1.44M
</PRE>

<HR WIDTH="100%">
<H2>
<A NAME="Bochsrc file options"></A>
Bochsrc file options
</H2>

There are many options which you can change, to alter the behaviour
of bochs, enable features, etc.  You can set values for these options
in a file called <B>".bochsrc"</B>.  There should be a reference
file with this name, that comes with the source code distribution.
As, it's easier to maintain documenting possible commands in
the file itself, look in the reference file for more info.

<P>
Search Order:
<UL>
<LI>bochs first tries to find this file in your current directory
<LI>bochs then tries to find this file in your home directory
<LI>bochs then gives up and doesn't use one.
</UL>
<B>Note:</B> These options are overridden by any command line options you provide


<HR WIDTH="100%">
<H2>
<A NAME="Command line options"></A>
Bochs command line options
</H2>

You may now pass all options available in the ".bochsrc" file, to
bochs on the command line.  Syntax for command line options is
now identical to directives in ".bocshrc".  Old command line options,
such as <B>-bootC</B> are no longer valid.

Bochs expects that each option is passed as a single argument, so if
you need to use spaces, surround the option in quotes.  For example:

<PRE>
  bochs boot:c
  bochs "boot: c"  "diskc: file=../10M.vga, cyl=306, heads=4, spt=17"
  bochs romimage:/tmp/someimage
</PRE>
<B>Note:</B> Look in the reference ".bochsrc" for syntax

<HR WIDTH="100%">
<H2>
<A NAME="Installing an OS"></A>
Installing an OS (DOS/Win'95/Minix/Linux) within Bochs
</H2>

The goal of Bochs is to emulate the components of a basic PC (CPU, BIOS,
disk drive, floppy, keyboard, VGA, and other chipsets) well enough to allow
for multiple Operating Systems to run within the emulator.  So far,
Bochs has been successful in running several OS's at
one time or the other.  Follow the link of your choice to learn how
to install the OS of your interest.

<UL>
<!--
<LI> <A HREF="DOS.html">DOS</A> </LI>
<LI> <A HREF="Windows31.html">Windows 3.1</A> </LI>
-->
<LI> <A HREF="Windows95.html">Windows '95</A> </LI>
<LI> <A HREF="Minix.html">Minix</A> </LI>
<LI> <A HREF="Linux.html">Linux</A> </LI>
<LI> <A HREF="OldWindows95.html">Deprecated Win95 install instructions</A> </LI>
<LI> <A HREF="guestNT.html">WinNT 4.0</A> </LI>
</UL>

<HR WIDTH="100%">
<H2>
<A NAME="Keyboard Hacks">X11 Keyboard Hacks</A>
</H2>

<PRE>
  NOTE: your backspace key may not work properly.  You may have to
        source the file 'misc/xmods' in the main distribution directory.
        I need to look at this problem a little more.
        Using Ctrl-h always seems to work for me.
<PRE

</BODY>
</HTML>