Multiboot-with-GRUB.pdf

(21 KB) Pobierz
Multiboot with GRUB Mini-HOWTO
Multiboot with GRUB Mini−HOWTO
Multiboot with GRUB Mini−HOWTO
Table of Contents
Multiboot with GRUB Mini−HOWTO. ............................................................................................................1
Ivan Kanis, ivank@juliva.com. ..............................................................................................................1
1. Why ?. ..................................................................................................................................................1
2. Installation procedure. ..........................................................................................................................1
3. References. ...........................................................................................................................................1
4. Feedback . ............................................................................................................................................1
1. Why ?. ..................................................................................................................................................1
2. Installation procedure. ..........................................................................................................................2
2.1 Preparing boot floppies. .....................................................................................................................2
2.2 Installing linux. ..................................................................................................................................2
2.3 Installing GRUB. ...............................................................................................................................3
2.4 Installing windows 2000:. ..................................................................................................................4
2.5 Installing DOS.. .................................................................................................................................4
2.6 Installing Windows 98. ......................................................................................................................5
2.7 The final touch. ..................................................................................................................................5
3. References. ...........................................................................................................................................5
4. Feedback . ............................................................................................................................................5
i
184432013.001.png
Multiboot with GRUB Mini−HOWTO
Ivan Kanis, ivank@juliva.com
v1.0, 2001−01−15
This document describes how to install Windows 98, Windows 2000, DOS and Linux using GRUB.
1. Why ?
·
·
1. Why ?
I wanted to be able to boot all operating systems without having to go through multiple menus. I know I can
install NT on top of win9x on top of DOS. I would have to go through the NT menu then the win9x menu in
order to boot DOS. I wanted to be able to boot all these operating systems at once.
This turned out to be quite a challenge. The problem with Microsoft operating system is that they all want to
boot from the primary partition. This is where GRUB comes in. It can hide primary partitions. You can use
up to 3 partitions to install Microsoft operating systems. GRUB will hide the other 2 partitions so that the
operating systems will not see it. This means you will need another partition to share data between DOS,
Win9x and Windows 2000. The 4th partition is used for the extended partition.
I also wanted a menu system and GRUB provides a nice one.
Another nice feature of GRUB is that it supports reiserfs so I don't need to keep my /boot file in a separate
ext2 partition.
Multiboot with GRUB Mini−HOWTO
1
·
·
184432013.002.png
Multiboot with GRUB Mini−HOWTO
2.1 Preparing boot floppies
You will need 3 floppy disks. Make the first floppy a DOS bootable disk. Copy fdisk.exe and sys.exe onto
this floppy disk.
FORMAT /S A:
COPY FDISK.EXE A:
COPY SYS.EXE A:
Use your second floppy disk to make a Windows 98 emergency disk. You will use the third floppy for GRUB
shortly.
2.2 Installing linux
Install your favorite distribution of linux. You will need to use fdisk to partition your hard disk. Calculate
ahead of time how much disk space each of your operating systems will take.
Here is how I partitioned my hard disk:
Device Boot Start End Blocks Id System
/dev/hda1 1 6 48163+ 16 Hidden FAT16
/dev/hda2 7 19 104422+ 16 Hidden FAT16
/dev/hda3 20 593 4610655 1b Hidden Win95 FAT32
/dev/hda4 594 3737 25254180 5 Extended
/dev/hda5 594 848 2048256 6 FAT16
/dev/hda6 849 2123 10241406 7 HPFS/NTFS
/dev/hda7 2124 2140 136521 82 Linux swap
/dev/hda8 2141 2523 3076416 83 Linux
My first partition is for booting Windows 2000. 10MG should be plenty to do that. This partition will only
contains the file necessary to boot NT such as boot.ini, ntldr, ntdetect.com, etc... NT will reside in partition 6
in my example. This partition is Hidden FAT16.
The second partition is for DOS. I deemed 100M sufficient. This is FAT16 too
The third partition is for Win9x. I gave it 5G and made it FAT32 for performance.
Next create the extended partition for the remaining of your hard disk. This shows up as partition 4 on fdisk.
Create a 2GB partition. This partitions is used to share data between all operating systems. Make sure that all
the sum of all above partitions are less than 8GB. This is a DOS limitation.
Next create your Windows 2000 partition. I gave it 10G since this breed of windows is a bloated pig. I made
it a HPFS/NTFS partition for speed.
Next add your swap partition and linux partition. Make sure you do not have a separate partition for /boot.
Things look better in GRUB if you keep /boot in the root partition.
After you have installed linux go ahead and format the fat16 partitions:
2. Installation procedure
2
 
Multiboot with GRUB Mini−HOWTO
mkdosfs /dev/hda1
mkdosfs /dev/hda2
mkdosfs /dev/hda6
2.3 Installing GRUB
Make sure you have the latest version of GRUB. I am using version 0.5.96.1. The version that came with my
distribution was out of date and gave me a lot of grief. You can download the latest version at
http://www.fsf.org.
Now you'll want to install GRUB on the floppy disk. You don't want to install it on the hard disk yet because
Windows 2000 will overwrite it.
grub−install '(fd0)'
Create the following menu.lst for GRUB. This file lives in /boot/grub.
#
# Sample boot menu configuration file
#
# Boot automatically after a minute.
timeout 60
# By default, boot the second entry.
default 1
# Fallback to the first entry.
fallback 0
title Windows 2000
unhide (hd0,0)
hide (hd0,1)
hide (hd0,2)
rootnoverify (hd0,0)
chainloader +1
makeactive
# For booting Linux
title Linux
root (hd0,7)
kernel /boot/vmlinuz−2.2.17 root=/dev/hda8 video=matrox:vesa:261
title Windows 98
hide (hd0,0)
hide (hd0,1)
unhide (hd0,2)
rootnoverify (hd0,2)
chainloader +1
makeactive
title DOS 6.22
hide (hd0,0)
unhide (hd0,1)
hide (hd0,2)
rootnoverify (hd0,1)
chainloader +1
makeactive
2.3 Installing GRUB
3
Zgłoś jeśli naruszono regulamin