Contributed by Alexander Schuch.
This section describes how to install FreeBSD 5.2.1 (miniinst) inside of Bochs, using an ISO image.
As 5.2.1-RELEASE-i386-miniinst.iso (240M) is no longer available from the FreeBSD FTP server, you might want to ask a (file) search engine of your choice for a download location. Once you downloaded the file, you should check its integrity using the provided MD5 checksum from the FreeBSD 5.2.1 release announcement.
Create a new hard disk image using bximage (see Section 9.22) with a size of at least 350M, as the standard installation uses 280M on its own.
Next, you need to setup your bochsrc so that Bochs knows about your (still empty) hard disk, as well as about your ISO image. Make Bochs boot from CD-ROM and start the emulation.
This is just a very short step-by-step installation guide for FreeBSD in Bochs. It doesn't explain what you do nor why you do it, it just tells you how to do it. For in-depth information refer to the FreeBSD handbook: Installing FreeBSD.
FreeBSD boots up and shows a nice (text-mode) boot option screen. Just press return there, that is, use the default option. After loading the kernel and needed device drivers, select 'Standard' in the installation menu.
A fdisk like partition program is loaded next, where you just press A to use the entire disk, followed by Q to finish the selection. The next dialog asks for the boot manager you want to use. Select 'Standard' and continue.
In the Disklabel Editor, you have to setup the layout of your partition. If your (virtual) hard disk is large enough, you can press A for auto-layout. However, you need to make sure that the /usr partition is at least 250M large, or you will end up with a 'disk full' error message during installation. If this is not the case, select one partition after another and press D to delete it again. After you deleted all partitions, create two new ones. The first one will be a swap partition; press C, enter '32M' as size and select 'Swap' from the dialog. Press C again, and accept the remaining capacity for your filesystem partition. Choose 'FS' as partition type and enter '/' (slash) as mount point. Your partition layout is complete now; press Q to leave the editor.
Note: This 'all-in-one' partition layout is not recommended for a FreeBSD installation on a real box; use 'auto-layout' or something comparable to that there.
You now can choose what set of programs/files (distribution) you want to install. Take 'User' (option 8), and select 'No' when asked to install the ports collection. You are back in the distribution selection, where you select the first item, called 'Exit'. Choose to install from 'CD/DVD' and answer the 'Are you sure?' dialog with 'yes'.
Now, while FreeBSD installs, it is a very good time to take a look at the FreeBSD documentation, especially the FreeBSD handbook and the FreeBSD FAQ.
All files are installed on your (virtual) hard disk now, and FreeBSD is ready for getting set up. As this is a very basic FreeBSD installation, you just answer 'no' to nearly all questions, but the one about your mouse: Answer 'yes' for PS/2 mouse, and choose 'Exit' at mouse configuration. The minimalist FreeBSD ISO image contains nearly no binary packages, so don't browse the package collection. Then, when asked to create a new user account, answer 'yes' and create a new user called 'bochs' (or whatever you like). You might want to use /bin/csh or /bin/tcsh as shell rather than /bin/sh. Next, you are asked for the super user (root) password. The installation is finished now, there is no need to visit the general configuration menu again - answer 'no' to that question. FreeBSD will then reboot. Shutdown Bochs, as soon as the (virtual) computer boots.
Open your bochsrc and change the boot sequence, so that Bochs will boot from hard disk, rather than from CD-ROM from now on. Start Bochs again and watch the FreeBSD boot process.
Your keyboard might use the wrong keymap, so login (into FreeBSD) as super user and use /stand/sysinstall to start the FreeBSD configuration program. Choose 'keymap' and select the keymap you want to use.
You have successfully installed FreeBSD now. You might want to shutdown FreeBSD using shutdown -h now, quit Bochs, and create a backup of your hard disk image, before you start playing around.