This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
usersguide:multipleoperatingsystems [2014/11/12 10:57] lionelsambuc [Archives] |
usersguide:multipleoperatingsystems [2015/06/20 02:39] (current) jacobadams Update multiboot grub entry for removal of log |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Running Multiple Operating Systems ====== | ||
+ | |||
+ | |||
+ | ===== Booting MINIX 3 Directly ===== | ||
+ | MINIX 3 uses a close derivative of [[http://netbsd.gw.com/cgi-bin/man-cgi?boot|NetBSD boot loader]] and [[http://netbsd.gw.com/cgi-bin/man-cgi?mbr+8|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: | ||
+ | |||
+ | <code> | ||
+ | menuentry "MINIX 3" { | ||
+ | set root=(hdX,Y) | ||
+ | chainloader +1 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 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: | ||
+ | <code> | ||
+ | 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 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 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//): | ||
+ | |||
+ | <code> | ||
+ | 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 | ||
+ | </code> | ||
+ | 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 <fs small>(assuming a US keyboard, so '':'' is on the key right to L)</fs>: | ||
+ | <code> | ||
+ | dev hd0i: | ||
+ | </code> | ||
+ | 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: | ||
+ | <code> | ||
+ | dev | ||
+ | </code> | ||
+ | to list all the recognized partitions. | ||
+ | |||
+ | * Then type <fs small>(again assuming US keyboard, so ''*'' is shifted 8 key, ''_'' is the shifted key right to 0, and ''/'' is at lower right)</fs>: | ||
+ | <code> | ||
+ | load_mods /boot/minix_latest/mod* | ||
+ | multiboot /boot/minix_latest/kernel rootdevname=c0d0p0s0 | ||
+ | </code> | ||
+ | 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 | ||
+ | <code> | ||
+ | ahci=yes | ||
+ | </code> | ||
+ | if your system uses [[.:sata|SATA]] disks; any other [[.:bootmonitor|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 [[:releases:3.2.0:usersguide:multipleoperatingsystems|the previous version]] of this wiki page. However, much of it is outdated and does not apply directly to current versions of MINIX3. | ||