Multiboot with GRUB Mini-HOWTO <author>Ivan Kanis (<tt>ivank@juliva.com</tt>) <date>v1.0, 2001-01-15 <trans> 翻訳:中谷千絵 (<tt>jeanne@mbox.kyoto-inet.or.jp</tt>) <tdate> 日本語訳: Mar.27,2001 <abstract> <!-- This document describes how to install Windows 98, Windows 2000, DOS and Linux using GRUB.--> この文書は GRUB を利用して、Windows 98、Windows 2000、DOS そして Linux をインストールする方法を説明したものです。 </abstract> <toc> <sect><!-- Why ?--> この文書を書いた理由 <p> <!-- 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.--> 私は、複数のメニューを順番に通過しないで、すべてのオペレーティングシステ ムをブートできるようにしたいと思いました。DOS の上に Win9x を、さらにそ の上に NT をインストールできることがわかっています。このような場合、まず NT のメニューを通り抜け、さらに DOS をブートするために win9x のメニューを 使わなければいけません。ひとつのメニューの操作だけで、すべてのオペレーティ ングシステムをブートできるようにしたいと考えました。 [訳注:GRUBとは、GRand Unified Bootloader の略で、多機能のブートローダです。 GRUBについては、<htmlurl url= "http://www.gnu.org/software/grub/grub.ja.html" name="GRUB の日本語のページ"> 等を参照してください。] <p> <!-- 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. --> これはなかなかやっかいなことになりそうだとわかりました。Microsoft の オ ペレーティングシステムには、どのオペレーションシステムもブートのために、 第一パーティション(Cドライブ)を要求するという問題があります。そこで GRUB の出番です。すると、GRUB は基本パーティションを隠すことができますから、 Microsoft のオペレーティングシステムをインストールするため、三つのパーティ ションを使うことができるようになります。GRUB はその他 2 つの基本パーティ ションを隠しますから、そのオペレーティングシステムからは見えなくなります。 そこで、DOS、Win9x そして、Windows 2000 の間でデータを共有するために、別 のパーティションが必要になりますが、4 番目のパーティションを拡張パーティ ションとして使えます。 <p> <!-- I also wanted a menu system and GRUB provides a nice one.--> メニューシステムも必要でしたし、GRUB はとてもよいメニューを持っています。 <p> <!-- 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.--> GRUB のもうひとつの良い点は、reiserfs をサポートしているので、ext2 の /boot パーティションを別に持つ必要がないということです。 [訳注:reiserfs は、Hans Reiser氏が開発した File Systemの略です。] <sect><!-- Installation procedure--> インストール方法 <sect1><!-- Preparing boot floppies--> ブートフロッピーを用意する <p> <!-- You will need 3 floppy disks. Make the first floppy a DOS bootable disk. Copy fdisk.exe and sys.exe onto this floppy disk.--> 3枚のフロッピーディスクが必要です。始めに DOS を起動するフロッピーディ スクを作ります。 このディスクに、fdisk.exe と sys.exe をコピーします。 <quote> <verb> FORMAT /S A: COPY FDISK.EXE A: COPY SYS.EXE A: </verb> </quote> <p> <!-- Use your second floppy disk to make a Windows 98 emergency disk. You will use the third floppy for GRUB shortly.--> Windows 98 の緊急起動ディスクを作るため、2 枚目のフロッピーディスクを 使います。3 枚目のフロッピーディスクを GRUB 用に使います。 <sect1><!-- Installing linux--> linux をインストールする <p> <!-- 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.--> お好みの linux ディストリビューションをインストールします。fdisk を使っ てハードディスクにパーティションを確保しなければいけません。お使いにな るオペレーティングシステムにそれぞれにどれくらいのディスクを割り当てる かをあらかじめ計算しておきます。 <p> <!-- Here is how I partitioned my hard disk:--> 私のハードディスクは次のようになっています。 <quote> <verb> 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 </verb> </quote> <p> <!-- My first partition is for booting Windows 2000. 10MG should be plenty [My first partition is for booting Windows 2000. 48MB 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.--> 最初のパーティションは Windows 2000 を起動するためのものです。 48MB あれば十分なはずです。最初のパーティションには boot.ini 、ntldr, ntdetect.com などのような NT を起動するために必要なファイルだけを置い ています。私の例では、パーティション 6 に NT を入れます。これらのパー ティションは隠しFAT16 になっています。 [訳注:windows NT/2000のdevice driverの中には NTFS が認識できない ものがありますので、device driver のために、約50MByte 用意する ことをお勧めします。] <p> <!-- The second partition is for DOS. I deemed 100M sufficient. This is FAT16 too--> 2 番目のパーティションは DOS 用です。 100M もあれば十分です。 これもまた FAT16 です。 [訳注:日本語の DOS 用アプリケーションをたくさん持っている方は、 500MByte程用意したほうが、良いでしょう。] <p> <!-- The third partition is for Win9x. I gave it 5G and made it FAT32 for performance.--> 3つ目のパーティションは Win9x 用です。5G を割り当て、 パフォーマンスのために FAT32 にしています。 <p> <!-- Next create the extended partition for the remaining of your hard disk. This shows up as partition 4 on fdisk.--> 次にハードディスクの残りに拡張パーティションを作ります。 fdiskでは、4つ目のパーティションとして表示されます。 <p> <!-- 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.--> 2GB のパーティションを作ります。このパーティションはすべてのオペレーティ ングシステムでデータを共有するために使います。ともあれパーティションは 8GB 以下にします。これは DOS の限界です。 <p> <!-- 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. --> 次に Windows 2000用のパーティションを作ります。windows は豚のようにどん どん太るものなので、10G をこれに当てています。HPFS または NTFS にします。 <p> <!-- 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.--> 次にスワップパーティションと linux 用パーティションを作ります。/boot に別のパーティションを当てていないかもしれません。ルートパーティション に /boot を置いているなら、GRUB にはより都合がよいようです。 <p> <!-- After you have installed linux go ahead and format the fat16 partitions:--> linux をインストールしてから、fat16 パーティションをフォーマットします。 <quote> <verb> mkdosfs /dev/hda1 mkdosfs /dev/hda2 mkdosfs /dev/hda6 </verb> </quote> <sect1><!-- Installing GRUB--> GRUB をインストールする <p> <!-- 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.--> GRUB の最新版を持っているかを確かめてください。私は、バージョン 0.5.96.1 を使っています。私が使用したディストリビューションに添付されていたバージョ ンはもう古くなっていて、うまくいかないことがたくさんありました。<htmlurl url="http://www.fsf.org" name="http://www.fsf.org"> から最新版をロードで きます。 <p> <!-- 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 をインストールしたくないかもしれませ んが、 Windows 2000 が上書きしてしまいますから、いまはまだハードディスク 上にはインストールしないほうがよいでしょう。 <quote> <verb> grub-install '(fd0)' </verb> </quote> <p> <!-- Create the following menu.lst for GRUB. This file lives in /boot/grub.--> 次に示すようにGRUB の menu.lst を作ります。 このファイルは、/boot/grub に置きます。 <quote> <verb> # # <!-- Sample boot menu configuration file-->ブートメニュー設定例 # # <!-- Boot automatically after a minute.-->1分後に自動的にブート timeout 60 # <!-- By default, boot the second entry.-->デフォルトで、2番目の登録をブートする。 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-->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 # <!-- For booting Linux-->Linux をブートする title Linux (single user) root (hd0,7) kernel /boot/vmlinuz-2.2.17 root=/dev/hda8 video=matrox:vesa:261 single title Partition 2 (floppy) hide (hd0,0) unhide (hd0,1) hide (hd0,2) chainloader (fd0)+1 title Partition 3 (floppy) hide (hd0,0) hide (hd0,1) unhide (hd0,2) chainloader (fd0)+1 </verb> </quote> <p> <!-- Check that you can boot linux with the floppy disk. If you are having trouble you can drop in GRUB's command line and figure out what is going on. GRUB is very well documented, if you have any trouble please take a look at the documentation.--> フロッピーディスクで linux をブートできるのを確かめてください。何か問題 があれば、GRUB のコマンドに抜けて、何が問題になっているかを見つけ出す ことができます。GRUB にはとてもよい文書があります。何かトラブルがあれ ば、文書を見てください。 <sect1><!-- Installing windows 2000:--> windows 2000 をインストールする <p> <!-- I had to initialize the first partition before installing windows 2000. Insert the DOS startup disk and reboot your computer. Once you get to the DOS prompt do the followings:--> windows 2000 をインストールする前にまずパーティションを初期化しなけれ ばいけません。DOS の起動ディスクをいれて、コンピュータを再起動します。 DOS のプロンプトが出たら、次のコマンドを入力します。 <quote> <verb> FDISK /MBR SYS C: </verb> </quote> <p> <!-- Now you can go ahead and install windows 2000. At some point Windows 2000 will prompt you for the partition on which you want to install. The partition you created with fdisk should show up as damaged or unformatted partition. Go ahead and select it.--> そのまま続行して、 windows 2000 をインストールします。しばらくすると、 Windows 2000 はインストールしたいパーティションでプロンプトを返すでしょ う。fdisk で作成したパーティションは壊れたもの、あるいは、フォーマットさ れていないパーティションとして表示するはずです。続行して、そこを選択しま す。 <p> <!-- To hide the Windows 2000 menu edit a file called boot.ini that should be in the C: drive. Change the timeout value from 30 to 0.--> Windows 2000 のメニューを隠すために、C ドライブにあるはずの boot.ini という名前のファイルを編集します。 timeout の値を 30 から 0 に変更しま す。 <quote> <verb> [boot loader] timeout=0 default=multi(0)disk(0)rdisk(1)partition(1)\WINNT [operating systems] ... </verb> </quote> <sect1><!-- Installing DOS.--> DOS をインストールする <p> <!-- Insert the GRUB disk. When you see the menu insert the DOS boot disk. Select partition 2 (floppy) from the menu.Hit enter. This will boot the floppy disk and hide partition 1 and 3.--> GRUB のディスクを差し込みます。メニューが出たら、DOS の起動ディスクをい れます。メニューから、パーティション2 (floppy) を選択し、Enter キーを押 します。これでフロッピーディスクから起動して、パーティション 1 と 3 を隠 します。 <p> <!-- Run FDISK and check that the C: drive is partition 2. Next install DOS:--> FDISK を起動し、C ドライブがパーティション 2 であることを確認します。 そして DOS をインストールします。 <quote> <verb> SYS C: </verb> </quote> <sect1><!-- Installing Windows 98--> Windows 98 をインストールする <p> <!-- Insert the GRUB disk. When you see the menu insert the Windows 98 Emergency disk. Select partition 3 (floppy) from the menu.Hit enter. This will boot the floppy disk and hide partition 1 and 2.--> GRUB ディスクをいれます。メニューが出たら、Windows 98 の起動ディスクをい れます。メニューからパーティション3 (floppy) を選択し、Enter キーを押し ます。これでフロッピーディスクから起動し、パーティション 1 と 2 を隠しま す。 <p> <!-- Run FDISK and check that the C: drive is partition 3. Next install Windows 98:--> FDISK を起動し、C ドライブがパーティション3 であることを確かめてください。 それから、Windows 98 をインストールします。 <quote> <verb> SYS C: </verb> </quote> <sect1><!-- The final touch--> 仕上げ <p> <!-- Test that everything is working from GRUB:--> GRUB からすべてのものが動くことをテストします。 <p> <!-- You should be able to boot from all 4 operating systems from the GRUB floppy disk.--> GRUB をインストールしたフロッピーディスクから、4種類のオペレーティ ングシステムをブートすることができるはずです。 <p> <!-- If everything looks right you can go ahead and install GRUB on your hard disk. From linux type:--> すべてがきちんとなっているなら、続行して、ハードディスクに GRUB を インストールします。Linux から次のように入力します。 <quote> <verb> grub-install /dev/hda </verb> </quote> <p> <!-- You should now be able to boot all 4 operating systems from the GRUB menu. Enjoy!--> GRUB メニューから4つのオペレーティングシステムをブートできるでしょう。 おめでとう! <sect><!-- References--> 参考文献 <p> <!-- I have found these links useful while setting up my system. 私のシステムを設定している間に、次のようなリンクを見つけました。--> <itemize> <item> <url url="http://www.gnu.org/software/grub/grub.html" name="GNU GRUB"> </item> <item> <url url="http://www.linuxdoc.org/HOWTO/mini/Linux+DOS+Win95+OS2.html" name="The Linux-DOS-Win95-OS2 mini-HOWTO"> </itemize> <sect><!-- Feedback--> フィードバック <p> <!-- I would like to hear about your experience (good or bad) with this document. If you have some instructions for adding another OS please send them to <htmlurl url="mailto:ivank@juliva.com" name="me"> so that I can add them.--> この文書での私の体験(是非)についてご意見を聞かせて頂きたいと思います。あ なたがさらに別の OS を追加するための何か助言をお持ちなら、私宛 <htmlurl url="mailto:ivank@juliva.com" name="me">お知らせください。追加しましょう。 校正: <itemize> <item>Okayama Yoichi" <okayama@pp.iij4u.or.jp> <item>Tsutomu Kawashima <kawawa@mail.interq.or.jp> <item>TAKEI Nobumitsu <takei@webmasters.gr.jp> </itemize> </article>