====== Installing MINIX 3 ======
This page describes the process of installing MINIX.
===== Getting MINIX =====
Download the CD-ROM installer image from the [[http://www.minix3.org/download|download page]]. For instructions on installing Minix/arm, see [[..:developersguide:minixonarm|Minix on ARM]].
===== Preparation & Booting =====
Please make sure your system meets the [[.:hardwarerequirements|Installation Requirements]] first.
If you already have the CD-ROM (e.g., from the book), you can skip to steps 2.1.1 and 2.3, and then continue with section 3. But it is wise to check the [[http://www.minix3.org/download|download page]] to see if a newer version is available.
If you're installing to a virtual machine, you can skip to step 2.4.
==== Creating a bootable CD-ROM ====
Decompress the downloaded file. You will get a CD-ROM image file with extension //.iso//. The //.iso// file is a bit-for-bit CD-ROM image. Burn it to a CD-ROM disk to create a bootable MINIX CD-ROM. Please consult your CD burning program's documentation to learn how to burn //ISO// images to CD-ROM media.
If you are running Windows XP and do not have a CD-ROM burning program, take a look at [[http://alexfeinman.brinkster.net/isorecorder.htm|ISO Recorder]] for a free one and use it to create a CD image.
=== Booting from CD-ROM ===
Insert the CD-ROM into your CD-ROM drive and boot the computer from it. If the computer boots from the hard disk instead of the CD-ROM, boot again and enter the BIOS setup program to change the order of boot devices, putting the CD-ROM before the hard disk.
You may need to change the //Boot Order// in the BIOS so that the machine boots off the CD-ROM, as opposed to the hard disk.
If you're using SATA storage devices, then please follow the [[.:sata|SATA guide]].
==== Booting over the network ====
It is possible to boot your computer over network. This requires a host and a client computer. See the [[.:bootingovernetworkusingpxe|PXE guide]] for details.
==== Partitioning your hard disk ====
You can boot the computer from your CD-ROM if you like and MINIX will start, but to do anything useful, you have to create a partition for it on your hard disk. But before partitioning, be sure to **back up your data** to an external medium such as a CD-ROM or DVD as a safety precaution, just in case something goes wrong. Your files are valuable; protect them.
Unless you are sure you are an expert on disk partitioning, it is strongly suggested that you read the tutorial on [[.:diskpartitions|disk partitioning]]. If you already know how to manage partitions, create a contiguous chunk of free disk space that fits the [[.:hardwarerequirements|hardware requirements]] and your needs.
If you do not know how to manage partitions but have a partitioning program like //Partition Magic//, use it to create a region of free disk space. Also make sure there is at least one primary partition (i.e., Master Boot Record slot) free. The MINIX //setup// script will guide you through creating a MINIX partition in the free space, which can be on either the first or second hard disk.
**WARNING: If you make a mistake during disk partitioning, you can lose all the data on the disk, so be sure to back it up to CD-ROM or DVD before starting. Disk partitioning requires great care, so proceed with caution.**
By now you should have allocated some free space on your disk. If you have not done so yet, please do it now unless there is an existing partition you are willing to convert to MINIX.
==== Setting up a virtual machine ====
If you want to run MINIX on a virtual machine instead of natively, see the installation page for your VM of choice before reading this page:
* [[.:runningonvmware| VMware]]
* [[.:runningonqemu|Qemu (and KVM)]]
* [[.:runningonbochs|Bochs]]
* [[.:runningonparallels|Parallels]]
* [[.:runningonvirtualbox|VirtualBox]]
* [[.:runningonvirtualpc|Microsoft VirtualPC 2007]]
===== Installing =====
These steps correspond to the steps on the screen.
==== Running the Setup script ====
When the //login// prompt appears, login as root. Press //Enter// when prompted for a password.
To start the installation of MINIX on the hard disk, type
setup
After this and all other commands, be sure to type ENTER (RETURN). When the installation script ends a screen with a colon, hit ENTER to continue.
If the screen suddenly goes blank, press CTRL-F3 to select software scrolling (should only be needed on very old computers). Note that CTRL-key means depress the CTRL key and while holding it down, press "key."
==== Select keyboard type ====
When you are asked to select your national keyboard, do so. This and other steps have a default choice, in square brackets. If you agree with it, just hit ENTER. In most steps, the default is generally a good choice for beginners. The //us-swap// keyboard interchanges the CAPS LOCK and CTRL keys, as is conventional on UNIX systems.
==== Create or select a partition for MINIX ====
You will first be asked if you are an expert in MINIX disk partitioning. If so, you will be placed in the //part// program to give you full power to edit the Master Boot Record (and enough rope to hang yourself). If you are not an expert, press ENTER for the default action, which is an automated step-by-step guide to formatting a disk partition for MINIX.
=== Select a disk ===
An IDE controller may have up to four disks. The setup script will now look for each one. Just ignore any error messages. When the drives are listed, select one. and confirm your choice.
If you have two hard disks and you decide to install MINIX to the second one and have trouble booting from it, see [[.:installationtroubleshooting|Installation Troubleshooting]].
=== Select a disk region ===
Now choose a region to install MINIX into. You have three choices:
- Select a free region
- Select a partition to overwrite
- Delete a partition to free up space and merge with adjacent free space
For choices (1) and (2), type the //region number//. For (3) type:
delete
then give the region number when asked. This region will be overwritten and its previous contents lost forever.
=== Confirm your choices ===
You have now reached the point of no return. You will be asked if you want to continue. If you do, the data in the selected region will be lost forever. If you are sure, type:
yes
and then ENTER. To exit the setup script without changing the partition table, hit //CTRL-C//.
==== Reinstall choice ====
If you chose an existing MINIX partition, in this step you will be offered a choice between a Full install, which erases everything in the partition, and a Reinstall, which does not affect your existing ///home// partition. This design means that you can put your personal files on ///home// and reinstall a newer version of MINIX when it is available without losing your personal files.
==== Select the size of /home ====
The selected partition will be divided into three subpartitions: //root//, ///usr//, and ///home//. The latter is for your own personal files. Specify how much of the partition should be set aside for your files. You will be asked to confirm your choice.
==== Select a block size ====
Disk block sizes of 1-KB, 2-KB, 4-KB, and 8-KB are supported, but to use a size larger than 4-KB you have to change a constant and recompile the system. Use the default (4 KB) here.
==== Wait for files to be copied ====
Files will be automatically copied from the CD-ROM to the hard disk. Every file will be announced as it is copied.
==== Select your Ethernet chip ====
You will now be asked which (if any) of the available Ethernet drivers you want installed. Network settings can be changed after installation. Please see [[.:networkconfiguration|Network Configuration]] for details.
==== Restart ====
When the copying is complete, MINIX is installed. Shut the system down by typing:
shutdown
Always stop MINIX this way to avoid data loss as MINIX keeps some files on the RAM disk and only copies them back to the hard disk at shutdown time.
You can now remove any CD-ROM or floppy disk and turn off the computer. When you boot up again, you will be running MINIX.
If you are running a virtual machine, you will need to unmount the ISO image and tell the VM to boot from the hard disk. See the installation page for your VM for how to do this.
===== Next Steps =====
Note! The MINIX installation does not install the things like X11 and GCC automatically. You have to do this after reboot. Type shutdown and reboot and then follow these instructions on Post installation.
Now that you've installed MINIX, you can go about configuring it. If you plan on booting multiple operating systems (i.e., you didn't install the MINIX boot loader to your Master Boot Record), you should read [[.:multipleoperatingsystems|Running Multiple Operating Systems]].
You should also read [[.:postinstallation|Post Installation]] for some configuration tips and instructions on how to install packages. To do anything useful, you will need to install some packages as the base system is very barebones.