User Tools

Site Tools


usersguide:multipleoperatingsystems

Running Multiple Operating Systems

Booting MINIX 3 Directly

MINIX 3 uses a close derivative of NetBSD boot loader and MBR boot code. Just as with NetBSD, it can coexist on a hard disk with installations of NetBSD, Windows, or Linux; by installing the extended boot code, it is possible to choose one or another partition and then boot the corresponding operating system without disturbing the others.

Using GRUB 2 to boot MINIX 3

GRUB 2 stores its configuration in a file called grub.cfg (usually /boot/grub/grub.cfg) but you shouldn't edit it directly as it is generated with the information given in /etc/default/grub and the files in /etc/grub.d.
To boot MINIX 3 with GRUB 2 there's two alternatives:

add a menu entry for loading the MINIX bootloader

Edit /etc/grub.d/40_custom (you will probably have to be root to do so) and add the following code:

menuentry "MINIX 3" {
        set root=(hdX,Y)
        chainloader +1
}

Here are some examples of GRUB's naming convention for the disks and partitions:

  • (hd0,1) - first primary partition on first hard disk
  • (hd0,2) - second primary partition on first hard disk
  • (hd0,3) - third primary partition on first hard disk
  • (hd0,4) - fourth primary partition on first hard disk
  • (hd1,1) - first primary partition on second hard disk
  • (hd1,2) - second primary partition on second hard disk
  • and so on

<!> Note: GRUB 1 and GRUB 2 have different naming conventions for partitions.

Alternatively, if you want to use GRUB to boot MINIX directly:

add a menu entry for MINIX

The entry should have this shape:

menuentry "Minix Latest" {
        set root=(hd0,3,1)
        multiboot /boot/minix_latest/kernel rootdevname=c0d0p2s0
        module /boot/minix_latest/mod01_ds.gz
        module /boot/minix_latest/mod02_rs.gz
        module /boot/minix_latest/mod03_pm.gz
        module /boot/minix_latest/mod04_sched.gz
        module /boot/minix_latest/mod05_vfs.gz
        module /boot/minix_latest/mod06_memory.gz
        module /boot/minix_latest/mod07_tty.gz
        module /boot/minix_latest/mod08_mfs.gz
        module /boot/minix_latest/mod09_vm.gz
        module /boot/minix_latest/mod10_pfs.gz
        module /boot/minix_latest/mod11_init.gz
}

If your disk is configured as a native SATA (AHCI) device, you will need to include the line set ahci=yes in the entry.

[optional] un-hide the boot menu on startup

Edit /etc/default/grub and change GRUB_HIDDEN_TIMEOUT=0 to # GRUB_HIDDEN_TIMEOUT=0.
(You can also press shift during GRUB's startup to show the boot menu.)

generate new grub.cfg

Run grub-mkconfig as root to rewiew the new configuration.
Run grub-mkconfig -o /boot/grub/grub.cfg as root to overwrite your old grub.cfg with the new configuration.
(change the path to your grub.cfg if it differs from the one given above)

Using GRUB 0.9x (GRUB1) to boot MINIX 3

To have GRUB1 boot MINIX, you can just add the following lines to your GRUB config file (typically /boot/grub/menu.lst):

title Minix
rootnoverify (hdX,Y) # (hdX,Y) is the disk and partition where you install Minix
chainloader +1       # tells GRUB to call Minix's boot loader

Here are some examples of GRUB's naming convention for the disks and partitions:

  • (hd0,0) - first primary partition on first hard disk
  • (hd0,1) - second primary partition on first hard disk
  • (hd0,2) - third primary partition on first hard disk
  • (hd0,3) - fourth primary partition on first hard disk
  • (hd1,0) - first primary partition on second hard disk
  • (hd1,1) - second primary partition on second hard disk
  • and so on

<!> Note: GRUB 1 and GRUB 2 have different naming conventions for partitions.

Using MINIX3 CD-ROM

If you don't want to use a multiboot loader, you can use the MINIX 3 CD-ROM to boot MINIX.

Don't forget to change the Boot Order in your BIOS if necessary. You want to boot from the CD before booting from disk.

  • Insert the MINIX 3 CD-ROM and boot
  • Stop at the MINIX 3 boot monitor (pressing space)
  • Type 4 to drop to boot prompt
  • Now type (assuming a US keyboard, so : is on the key right to L):
dev hd0i:

to boot from the operating system image file on BIOS drive 0, first MINIX sub-partition. If your installation is complex or if you are unsure, use:

dev

to list all the recognized partitions.

  • Then type (again assuming US keyboard, so * is shifted 8 key, _ is the shifted key right to 0, and / is at lower right):
load_mods /boot/minix_latest/mod*
multiboot /boot/minix_latest/kernel rootdevname=c0d0p0s0

assuming you want to boot the latest image of MINIX and to use the root file system found by MINIX at controller 0, drive 0, partition 0, subpartition 0; append

ahci=yes

if your system uses SATA disks; any other boot monitor parameter can also be appended.

Archives

MINIX used to have other ways to coexist with other operating systems, and many people wrote about it. You can find some pointers on the previous version of this wiki page. However, much of it is outdated and does not apply directly to current versions of MINIX3.

usersguide/multipleoperatingsystems.txt · Last modified: 2015/06/20 02:39 by jacobadams