<!--
ml version="1.0" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://docbook.org/xml/4.1.2/docbookx.dtd">
-->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<article id="index">
<!--
  <articleinfo>
-->
<artheader>
    <title>Linux+Win9x+Grub HOWTO</title>

<authorgroup>
    <author><firstname>Joel</firstname><surname>Rosen</surname></author>
<!--
    <authorinitials>jr</authorinitials>
-->

<othercredit role='translator' lang="ja">
    <firstname>千絵</firstname>
    <surname>中谷</surname>
    <contrib>日本語翻訳</contrib>
    <affiliation>
      <address>
       <email>jeanne@mbox.kyoto-inet.or.jp</email>
      </address>
    </affiliation>
   </othercredit>
  </authorgroup>

    <revhistory>
      <revision>
         <revnumber>v1.0</revnumber>
         <date>2002-01-10</date>
         <authorinitials>jr</authorinitials>
          <revremark>
                Initial release.
         </revremark>
      </revision>
    </revhistory>

    <abstract>
<para>
<!--
This HOWTO will tell you how to use the GRUB bootloader to turn your computer into a Windows + Linux dual boot machine, without affecting your current Linux installation.
-->
この HOWTO は、インストール済みの linux に影響を与えずに、コンピュー
タを、Windows と Linux のデュアルブートマシンに変更するため GRUB ブー
トローダを使う方法について述べています。
</para>
    </abstract>

<!--
  </articleinfo>
-->
</artheader>

  <sect1 id="intro">
    <title><!--Introduction-->はじめに</title>
    <sect2>
      <title><!--Why use this method?-->この方法で行う理由</title>

<para>
<!--
I'm a big fan of things that aren't Microsoft, so when I got my new computer I had it come with Linux preinstalled.  It's a great desktop machine, but I've been sorely missing my Windows games, and the GIMP just isn't cutting it.  So I finally gave in and decided to make the machine dual boot.  When I looked for instructions on how to accomplish this, all I found was directions on how to install Linux if you already have Windows installed and how to boot with Loadlin.  Unfortunately, because Loadlin runs from under DOS, the Loadlin method of making your system dual boot requires that you have Windows installed on the first partition of your first hard drive, due to the fact that Windows believes it is the center of the universe and all your other operating systems should revolve around it.  This is a problem if you already have Linux on that partition and you don't want to wipe out your system to install Windows.
-->
私は、Microsoft製品でないものをひいきにしてますので、コンピュータを新規
購入したとき、Linux がプリインストールされたものにしました。すばらしいデ
スクトップマシンでしたが、Windows のゲームができないのはやはり悲しいです
し、GIMP は思ったように動いてくれません。結局のところ私が折れて、マシン
をデュアルブートするように決めました。デュアルブートにする方法について文
書を探したのですが、私が見つけたものは、あとで Linux をインストールする
方法についての文書ばかりでした。つまり、すでに windows がインストールさ
れているなら、Loadlin でブートするという方法です。

残念なことに、loadlin は DOS から動作しますから、システムをデュアルブー
トにするため loadlin を使う方法では、一つ目のハードディスクの最初のパー
ティションに windows をインストールしなければいけません。Windows は、
Windows が世界の中心で、別のシステムはその周辺にあるべきだと信じている
からそうなるのです。すでにそのパーティションに Linux をインストールし
ていて、windows をインストールするために Linux を消してしまいたくない
のならこれは問題です。
</para>

<para>
<!-- This is where GNU GRUB, the GRand Unified Bootloader comes in.
It differs from bootloaders such as LILO in that it can lie to Windows
and make Windows believe that it's installed on the first partition
even if it's not.  So you can keep your current Linux system where it
is and install Windows on the side.  --> 
こんなとき GNU GRUB が使えます。 GRand Unified Bootloader の略です。
LILO のようなブートローダーとは違って、Windows をだまして、たとえ 
windows が最初のパーティションになくても、最初のパーティションに 
windows がインストールされているのだと windows を信じこませることができま
す。そうすれば、現在お使いの Linux システムをそのままにして、別の場所
に Windows をインストールできるわけです。
</para>

    </sect2>

    <sect2>
      <title><!--Copyright and License-->著作権とライセンス</title>
<para>

 Copyright (c)  2002 Joel Rosen.
      Permission is granted to copy, distribute and/or modify this document
      under the terms of the GNU Free Documentation License, Version 1.1
      or any later version published by the Free Software Foundation;
      with no Invariant Sections, with the no Front-Cover Texts, and with no Back-Cover Texts.
      A copy of the license may be found <ulink url="http://www.gnu.org/copyleft/fdl.html">here</ulink>.

著作権は Copyright (c) 2002 Joel Rosen にあります。この文書のコピー、
配付あるいは修正は、GNU Free Documentation License Version 1.1 または 
Free Software Foundation から発行された最新版；(変更不可部分のないもの、
表紙テキストのない、裏表紙テキストがない)の条項のもとに許可されていま
す。
ライセンスのコピーは  <ulink url="http://www.gnu.org/copyleft/fdl.html">こちら</ulink>にあります。
</para>

<para>
日本語訳注：「GNU フリー文書利用許諾契約書」の日本語訳は<ulink url="http://www.debian.or.jp/~mhatta/fdl.ja.txt">こちら</ulink>にあります。
</para>

    </sect2>

  </sect1>

  <sect1 id="reqs">
    <title><!--Requirements-->必要なもの</title>
    <sect2>
      <title><!--What are the requirements?-->何が必要か</title>

<para>
<!--
You will need:-->
下の手順を使うには、次のような条件を満たしていること：

<!--
  <itemizedlist>
    <listitem>A computer with a working installation of Linux.</listitem>
    <listitem>Enough free disk space for your new Windows partition.</listitem>
    <listitem>A partition editor such as <ulink url="http://www.gnu.org/software/parted/">GNU Parted</ulink>.</listitem>
    <listitem><ulink url="http://www.gnu.org/software/grub/">GRUB</ulink> rpm or source.</listitem>
    <listitem>A Windows/DOS boot disk with CDROM support and a CD with the Windows 9x install on it, or a bootable Windows 9x install CD.</listitem>
    <listitem><emphasis>(Recommended)</emphasis> A Linux boot disk.</listitem>
  </itemizedlist>
-->
 <itemizedlist>
   <listitem><para>Linux がインストールしてあり、動作していること。</para></listitem>
   <listitem><para>Windows をインストールするパーティションを作成するのに十分な
余裕があること。</para></listitem>
   <listitem><para>GNU Parted <ulink url="http://www.gnu.org/software/parted/">GNU Parted</ulink>のようなパーティションエディタを持っていること。</para></listitem>
   <listitem><para><ulink url="http://www.gnu.org/software/grub/">GRUB</ulink>の rpm パッケージまたはソースを持っていること。</para></listitem>
   <listitem><para>CDROM をサポートしている Windows/DOS ブートディスクと
    Windows 9x がインストールしてある CD、
   または、起動可能な Windows 9x インストール CD があること。
   あるいはブート可能なインストール CD があること。</para></listitem>
   <listitem><para><emphasis>(あったほうがよいもの)</emphasis> Linux のブートディスク</para></listitem>
</itemizedlist>

</para>
    </sect2>
  </sect1>

  <sect1 id="proc">
    <title><!--Procedure-->手順</title>

    <sect2>
      <title><!--Creating the Windows partition-->Windows 用のパーティションを作る</title>

<para>
<!--
If you already have a clear partition or disk for your Windows installation, you can skip this section.  Otherwise, you'll need to run a partition editor to defragment your disk and create a new partition for Windows.  I used <ulink url="http://www.gnu.org/software/parted/">GNU Parted</ulink> for my installation; sfdisk should work as well.  <emphasis>DO NOT</emphasis> use fdisk, it won't preserve your data.  And note, this process is not guaranteed, make sure to backup any important files before you begin.
-->
 Windows をインストールするために、すでに空きパーティションやディスク
を確保しているなら、この項はとばしてください。そうでない場合は、お使い
のディスクをデフラグして、Windows のための新しいパーティションを作るために
パーティションエディタを使わなければいません。
そのあとで、Windows のために新しいパーティションを作ります。私
は <ulink url="http://www.gnu.org/software/parted/">GNU Parted</ulink>
を使いました。
sfdisk でも十分でしょう。 fdisk を<emphasis>使ってはいけません</emphasis>。
fdisk はあなたのデータを壊します。さらに注意しますが、この作業には保証は
ありませんから、重要なファイルをちゃんとバックアップしてから始めてください。
</para>

<para><!--Here is how my partition table looked pre-install:-->次の表は、
インストールする前の私のパーティションテーブルがどうなって
いるかを示したものです。</para>

<programlisting>
Device	    Start	 End	      System

/dev/hda1   1		 3	      Linux
/dev/hda2   4		 1222	      Extended
/dev/hda5   4		 36	      Linux swap
/dev/hda6   37		 1222	      Linux
</programlisting>

<para>
<!--
/dev/hda1 is my /boot partition (you may or may not have a separate boot partition for Linux), /dev/hda2 is an extended partition which contains two logical drives, /dev/hda5 and /dev/hda6, which contain my Linux swap partition and Linux installation partition.
-->
/dev/hda1 は私の /boot パーティションです(この文書を読んでいるあなたも
同じように独立した Linux の boot パーティションを用意しているかもしれ
ませんし、していないかもしれませんが)。/dev/hda2 は/dev/hda5 と 
/dev/hda6 という二つの論理ドライブがある拡張パーティションで、 Linux 
の swap パーティションと Linux をインストールしたパーティションがあり
ます。
</para>

<para>
<!--
As root, run your partition editor.  Resize your Linux partition to however small you decide to make it. (Make sure this size isn't smaller than the amount of data on your disk.)  The program will defragment for a good while and then change the partition table.  Resize the extended partition which contains your Linux partition accordingly.  You should now have enough unused space on your disk in which to create a new primary Windows partition.  Go ahead and create the partition with a Win95 FAT32 (LBA) filesystem on it.  Now your partition table should look something like this:
-->
root で、パーティションエディタを使います。どれだけ縮小するかを決めて 
Linux パーティションの大きさを変更します(このサイズは、お使いのディス
ク上にあるデータの量よりも小さくならないように気を付けてください)。プ
ログラムは十分に時間をかけてデフラグし、それから、パーティションテー
ブルを変更します。同様に、Linux パーティションがある拡張パーティション
のサイズを変更します。 これで、ディスク上に Windows 用のプライマリパー
ティションを作るのに十分な未使用領域ができたはずです。では、そこに 
Win95 FAT32 (LBA) ファイルシステムでパーティションを作成しましょう。
すると、パーティションテーブルは次のようになります。
</para>

<programlisting>
Device	     Start	    End	     System

/dev/hda1    1		    3	     Linux
/dev/hda2    4		    905	     Extended
/dev/hda3    906	    1222     Win95 FAT32 (LBA)
/dev/hda5    4		    36	     Linux swap
/dev/hda6    37		    905	     Linux
</programlisting>

<para>
<!--
I strongly recommend that you run fdisk at this point and write down all of your partition information on a piece of paper.  If you make a mistake in your installation, Windows will be all too happy to rewrite your partition table to its liking, and you'll need to know what your partitions look like in case of emergency.
-->
ここで fdisk を起動し、メモ用紙にパーティション情報を書き出しておくこ
とを強くお勧めします。インストール作業で間違いをすると、Windows はあま
りにもおばかさんなので、自分の好きなようにパーティションテーブルを書き
換えてしまいます。ですから、緊急事態発生の場合に備えて、自分のパーティ
ションがどんな風になっていたかを知っておいたほうが良いでしょう。
</para>

    </sect2>

    <sect2>
      <title><!--Installing GRUB-->GRUB をインストールする</title>

      <sect3><title><!--Installation-->インストール</title>
<para>
<!--
You should have either an RPM or source package of <ulink url="http://www.gnu.org/software/grub/">GRUB</ulink> somewhere on your disk.  Go through the appropriate installation procedure for your system.  GRUB should now be installed but not loaded.  As root run:
-->
<ulink url="http://www.gnu.org/software/grub/">GRUB</ulink>にある GRUB 
の RPM またはソースパッケージをディスクの好きな場所に置きます。お使い
のシステムに合うインストール作業を行います。さて、GRUB はインストール
されているはずですが、ロードされていません。root で次のようなコマンド
を実行します。
</para>

<programlisting>
# /sbin/grub-install /dev/hda
</programlisting>

<para>
<!--This will load GRUB into the master boot record of your disk.  Now you need to edit /boot/grub/grub.conf to configure the GRUB boot menu:
-->
これで、お使いのディスクのマスターブートレコードに GRUB がロードされます。
次に、GRUBのブートメニューを設定するために、 /boot/grub/grub.conf
を編集しなければいけません。
</para>

<para>
 日本語訳注：英語原文では、GRUBのブートメニューの設定ファイルの名称は
 "/boot/grub/grub.conf" になっています。オリジナルでは "menu.lst" なので
すが、Red Hat Linux 7.2 等のディストリビューションでは "grub.conf" を利
用するように変更されているようです。お使いの環境に合わせて読み替えてくだ
さい。

</para>
      </sect3>
      <sect3><title><!--Editing grub.conf-->grub.conf(日本語訳注：環境によっては/boot/grub/menu.lst)を編集する</title>
<programlisting>
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.7-10)
	root (hd0,0)
	kernel /vmlinuz-2.4.7-10 ro root=/dev/hda6
	initrd /initrd-2.4.7-10.img

title Windows 98
	map (hd0,0) (hd0,2)
	map (hd0,2) (hd0,0)
	rootnoverify (hd0,2)
	chainloader +1

title DOS Boot Disk
	map (hd0,0) (hd0,2)
	map (hd0,2) (hd0,0)
	chainloader (fd0)+1
</programlisting>

<para><!--Let's go through and see what this means.-->全部を通して内容を見ていきましょう。</para>

<para>
<!--
"default=0" and "timeout=10" will cause Linux to boot in 10 seconds if you don't touch anything.  "splashimage" is self-explanatory and not very important.
-->
''default=0'' と ''timeout=10'' は、何もしなければ 10 秒後に Linux を
起動します。''splashimage''は文字通り、画像を表示するための指定です。 
重要ではありません。
</para>

<para>
<!--
"title" denotes each boot setting and the text that follows is what will appear in your menu at startup.  "root" specifies which partition contains your Linux kernel image (this may or may not be your actual root (/) partition).  So, "root (hd0,0)" tells GRUB that the kernel is on the first partition of /dev/hda.  You can see that GRUB has a funny numbering system, 0-3 for primary partitions and 4+ for logical partitions.  The next line tells GRUB just where to find your kernel and where your actual root partition with your Linux system is.  "initrd" tells where your init ramdisk image is located.  Note that these few lines will probably be somewhat different if you don't have a separate /boot partition.  Look at the GRUB info page if you need more help.
-->
''title'' は各々の起動環境の宣言の開始を示し、引き続くテキスト部分が始動
時にメニューとして現われます。''root'' には、お使いの Linux の kernel イ
メージがあるパーティション (実際の root (/)パーティションとは違っている
かもしれません)を指定します。つまり、''root (hd0,0)'' と書いてあるのは、
カーネルが /dev/hda の最初のパーティションにあることを GRUB に教えている
のです。

GRUB は少し不思議な番号付けの方法を使うように見えるかもしれませんが、
基本パーティションに対して 0-3 を使い、論理パーティションに対して、4 以
上を使います。次の行は、お使いのカーネルがある場所と、Linux システムが
ある 実際の root パーティションがどこかを GRUB に伝えます。''initrd''
は、お使いの init ramdisk イメージがある場所を GRUB に伝えます。これら
数行は、独立した /boot パーティションを置いていないなら、幾分違ったも
のになることにご注意ください。もっと詳しく知りたいなら、GRUB の info 
ページを見てください。
</para>

<para>
<!--
The "map" lines under the Windows 98 section are essential for getting your installation to work.  These are the magical lines that trick Windows into believing that it's installed on the first partition of the first disk.  If you don't map the Windows partition to (hd0,0), Windows will destroy your partition table and you won't be able to boot anything.
-->
Windows 98 部分の下にある ''map'' という行はインストール作業をするのに
とても大事なものです。これらの行は、最初のディスクの第一パーティション
に Windows インストールするのだと Windows をだますためのおまじないのよ
うな行です。Windows パーティションを (hd0,0) に map しておかないと、
Windows はパーティションテーブルを壊し、何もブートできなくなって
しまいます。
</para>

<para>
<!--
"rootnoverify" tells GRUB to boot from the Windows partition, but not to attempt to mount it, and "chainloader +1" tells GRUB to chain to Windows' bootloader which will start Windows.
-->
''rootnoverify'' は、Windows パーティションからブートし、マウントは試み
ないようGRUB に伝えます。さらに、''chainloader +1'' が、Windows を始動す
る Windows のブートローダに橋渡しするよう GRUB に伝えます。
</para>

<para>
<!--
The "DOS boot disk" section is needed if you are going to boot from floppy to begin the Windows install, but it will also come in handy after your install if you ever want to use a DOS boot disk for whatever reason.  If your Windows install CD is bootable, you'll need to have a "Windows boot disk" section which chainloads to whatever your CDROM device is called.
-->
''DOS boot disk'' の部分は、Windows をインストールする時にフロッピーから
ブートする予定なら必要なものですが、インストール後もいつか何らかの理由で 
DOS のブートディスクを使いたくなったときに役立つでしょう。お手もとの 
Windows のインストール CD がブート可能なら、 CDROM デバイスが呼ばれた時
にはいつでも続いて呼び出せるように ''Windows boot disk'' という部分が必
要になります。
</para>

<para>
<!--
Now save grub.conf and exit your text editor.  Unlike LILO, GRUB does not require you to run any executable after you've modified the boot configuration.  Now, with your emergency Linux boot disk handy, try rebooting your computer.  When the system comes up you should see the GRUB menu with your three boot options.  Select Linux.  Hopefully, Linux will boot as usual and you'll have installed GRUB properly.  If it doesn't, you thankfully have a Linux boot disk so that you can boot into Linux and fix your grub.conf.  Once you've got GRUB successfully booting Linux, it's time to install Windows.
-->
grub.conf を保存し、テキストエディタから抜けます。LILO とは違って、
GRUB はブート設定を変更したあとで起動可能にする作業はなにも必要ありま
せん。緊急用 Linux ブートディスクを手もとにおいて、コンピュータを再起動
してみましょう。システムが始動すると、三つの選択肢を持つ GRUB メニュー
が見えるでしょう。Linux を選択してみましょう。うまくいけば、Linux はい
つも通りに起動するでしょうし、GRUB はちゃんとインストールされています。
うまくいかないなら、ありがたいことに Linux のブートディスクがあります
から、Linux をブートさせて、grub.conf を修正します。GRUB がうまく 
Linux を起動できるなら、Windows をインストールできます。

</para>
      </sect3>
    </sect2>

    <sect2>
      <title><!--Installing Windows-->Windows をインストールする</title>

<para>
<!--
Remove all diskettes and CDs from your computer and reboot.  <emphasis>DO NOT boot your computer with the installation media already in the drive.</emphasis>  If you do that, your BIOS will just boot the Windows install directly and GRUB won't get a chance to work its magic.  When the GRUB menu comes up, insert your floppy or CD and select the DOS boot disk or Windows install CD boot, depending on your installation method.  Windows install should see the partition you've made for it on the C: drive.  Go ahead and install Windows.
-->
コンピュータから、フロッピーディスクと CD をすべて外し、再起動します。
ドライブにインストールメディアを入れたまま、再起動してはいけません。そ
の場合、BIOS は、直接的に Windows インストールを起動してしまい、GRUB 
はそのからくりを使うチャンスがなくなってしまいます。GRUB メニューが立
ち上がってから、インストールの方法によって、フロッピーディスクまたは 
CD を差し込み、DOS boot disk または、Windows install CD boot を選択し
ます。Windows のインストールは、Windows から C: ドライブに見えるように
作ったパーティションを見つけるはずです。さあ、Windows をインストールし
ましょう。
</para>

<para>
<!--
That's it.  Your computer is now all set as a dual boot machine.
-->
さあ、これで、あなたのコンピュータはデュアルブートマシンになります。
</para>

    </sect2>
  </sect1>

<!-- 以下、日本語訳で付加した部分 -->
    <sect1 id="jp"><title>日本語訳について</title>
    <para>
      翻訳に関するご意見は JF プロジェクト &lt;JF@linux.or.jp&gt; 宛に連絡
      してください。
    </para>
<variablelist>
<VarListentry><term>校正およびご意見を頂いた方々::</term>

      <listitem>
	<para>日本語訳   Feb. 2002</para>
        <itemizedlist>
          <listitem><para>
          水原さん：<email>mizuhara@acm.org</email>
          </para></listitem>

          <listitem><para>
          TAKAHASHI, Tamotsu さん：<email>arms405@jade.dti.ne.jp</email>
          </para></listitem>

          <listitem><para>
          谷さん：<email>tani-yukio@yis.yamatake.co.jp</email>
          </para></listitem>

          <listitem><para>
          よしむらさん：<email>ramsy@linux.or.jp</email>
          </para></listitem>

         <listitem><para>
         Konkiti さん：<email>konkiti@lares.dti.ne.jp</email>
         </para></listitem> 

         <listitem><para>
         Seiji Kaneko さん：<email>skaneko@a2.mbn.or.jp</email>
         </para></listitem>

         <listitem><para>
          Yuji Senda さん<email>ysenda@pop01.odn.ne.jp</email>
          (日本語訳 sgml のチェック)
         </para></listitem>
        </itemizedlist>
      </listitem>
    </varlistentry>
    </variablelist>

 </sect1>

</article>

