centOSとwindowsの順番を逆にしたい

このQ&Aのポイント
  • CドライブにwindowsXPがインストールされており、後から増設したDドライブにcentOS5をインストールしてgrubにてデュアルブートさせておりますが、優先して起動するOSがcentOSになっています。
  • 優先して起動するOSをwindowsにする場合は下記grub.confのどこをどのように書き換えればいいのでしょうか。
  • # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 # initrd /initrd-version.img boot=/dev/hdd default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-8.el5) root (hd0,0) kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet initrd /initrd-2.6.18-8.el5.img title WindowsXP map (hd0) (hd1) map (hd1) (hd0) rootnoverify (hd1,0) chainloader +1
回答を見る
  • ベストアンサー

centOSとwindowsの順番を逆にしたい

2度目の質問になります。matyuといいます、よろしくお願いいたします。 CドライブにwindowsXPがインストールされており、後から増設したDドライブにcentOS5をインストールしてgrubにてデュアルブートさせておりますが、優先して起動するOSがcentOSになっています。 優先して起動するOSをwindowsにする場合は下記grub.confのどこをどのように書き換えればいいのでしょうか。 # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 # initrd /initrd-version.img #boot=/dev/hdd default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-8.el5) root (hd0,0) kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet initrd /initrd-2.6.18-8.el5.img title WindowsXP map (hd0) (hd1) map (hd1) (hd0) rootnoverify (hd1,0) chainloader +1

質問者が選んだベストアンサー

  • ベストアンサー
  • astronaut
  • ベストアンサー率58% (303/516)
回答No.1

default=1

matyu0531
質問者

お礼

astronautさん、即レスありがとうございます。 早速やってみます。

matyu0531
質問者

補足

ありがとうございました。 何もしない状態でwindowsXPが起動、何か押すgrubメニュー画面がでて選択できるようになりました。 また何かありましたらよろしくお願いいたします。

関連するQ&A

  • grubのエラーについて

    ブートローダ修復時に、以下のようなエラーになってしまいます。 # chroot /mnt/sysimage # grub-install --root-directory=/ /dev/cciss/c0d0 上記のコマンドを打つと 「エラー:/dev/cciss/c0d0:not found or not a block device」 になってしまいます。 chroot すると、/dev/ccissを認識しないようです。 どのように認識させたらよいかご存知でしょうか。 ○/mnt/sysimage/boot/grub/device.map # this device map was generated by anaconda (fd0) /dev/fd0 (hd0) /dev/cciss/c0d0 ○/mnt/sysimage/boot/grub/grub.conf # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/cciss/c0d0p7 # initrd /initrd-version.img #boot=/dev/cciss/c0d0 default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Enterprise Linux ES (2.6.9-42.ELsmp) root (hd0,0) kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.9-42.ELsmp.img title Red Hat Enterprise Linux ES (2.6.9-42.EL) root (hd0,0) kernel /vmlinuz-2.6.9-42.EL ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.9-42.EL.img よろしくお願いします。

  • Redhatのシングルユーザーモードの起動方法

    GRUB上で、以下のコマンドを実行しましたが、起動しません。カーネルパニックになって止まります。 grub> kernel /boot/vmlinuz-2.6.9-42.EL ro root=LABEL=/ 1 initrd /boot/initrd-2.6.9-42.EL.img この後に・・・ grub> boot で、起動途中でカーネルパニックになってしまいます。 よろしくおねがいします。

  • VMWare上のkernel再構築

    VMWare 上のRedHat9でカーネルの再構築(練習)で失敗しています。お助けください。 現在のカーネル2.4.20に2.4.23を追加する。 make mrproper make menuconfig make bzImage make modules make modules_install 以上完了 /boot/grub/grub.confは次のようになっています # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/hda2 # initrd /initrd-version.img #boot=/dev/hda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Linux (2.4.20-8) root (hd0,0) kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi initrd /initrd-2.4.20-8.img これに追加して title Red Hat Linux (2.4.23) root (hd0,0) kernel /vmlinuz-2.4.23 ro root=LABEL=/ hdc=scsi initrd /initrd-2.4.20-8.img を記述して再起動し2.4.23を選択するとdmssgの途中で NET4:Unix domain sockets1.0/SMP for Linux NET4.0 ds:no socket driver loaded VFS:Cannot open root device "/LABEL=/" or 00:00 Kernel panic:VFS:Unable to mount root fs on 00:00 で停止します。 kernel /vmlinuz-2.4.23 ro root=/dev/hda1 (註/bootパーティション) としてもdmesgは停止位置はほぼ同じで内容は以下のとおりです。 Kernel panic:No init found.Try passing=option to karnel 何かヒントを頂けるとありがたいのですが・・・よろしくお願いします。

  • 同じようにインストールした2台のLinuxをデュアルブートしたい

    全く同じようにインストールした2台のLinux入りHDDをプライマリマスターとセカンダリマスターに接続し、 GRUBでデュアルブートさせたいです。 どちらのLinuxマシンも同じようにインストールしているので、 /boot/grub/grub.confには、  title Linux  kernel (hd0,0)/vmlinuz root=0303  initrd (hd0,0)/initrd と全く同じように書かれており、これで起動しています。 2台のHDDを接続し、プライマリに接続したHDDで起動し(こちらでしか起動できなかった)、 /sbin/fdisk -l で確認したところ、 プライマリに接続したHDDのデバイス名は/dev/hda1~3, セカンダリに接続したHDDのデバイス名は/dev/hdc1~3でした。 http://oshiete1.goo.ne.jp/qa1787988.html ↑には、hdaが(hd0)、hdbが(hd1)のように書かれていたので、 hdcは(hd2)かと思い、 grub.confに、  title Linux1  kernel (hd0,0)/vmlinuz root=0303  initrd (hd0,0)/initrd  title Linux2  kernel (hd2,0)/vmlinuz root=0303  initrd (hd2,0)/initrd と書いてみたのですが、GRUBで「Linux2」を選択しても、セカンダリに繋いだ方は起動しませんでした。 (ちなみに(hd1,0)と書いた場合は、(hd0,0)と同じくプライマリに繋いだ方が起動しました) この環境でデュアルブートするには、grub.confにはどのように書いたらよいでしょうか。

  • GRUBでOSの選択画面が出ない

    今、大学生協で買ったdynabookSS MX25Aを使っています。 もともとWindowsXPとVineLinuxが入っていて GRUBでOSを選択するようになっていたのですが、 WindowsXPが起動しなくなってしまったので、 PowerX Hard Disc Manager7を使って リカバリーをかけました。 (バックアップを取ったのは買った時です) そうしたら今度は起動した時 GRUBの選択画面(WindowsかLinuxか)が 出ず grub>のコンソールだけ出るようになってしまいました。 Knoppixで立ち上げてみたところ Windowsのパーティション(NTFS)も Linuxのパーティション(Ext3)も認識しますし 中身もきちんとリカバリー出来ているように思います。 どうやったら元のようにOSを選択して 起動できるようになるのでしょうか? 生協に行けば済むかもしれませんが 家の都合で今行けないんです。。。 パーティションの構成↓ 1.WindowsXP(NTFS) 2.VineLinux(Ext3) 3.?(LinuxSwapと出ています) 4.?(WindowsXPのアプリ用領域) 2番目のVineLinuxの/boot/grub/grub.confには #menu.lst generated by anaconda # # Note that you do not have to rerun grub after changes to this file # NOTICE: You do not have a /boot partition. This means that # all kernel and inited paths are relative to /, eg. # root(hd0,2) # kernel /boot/vmlinuz-version ro root=/dev/sda3 # initrd /boot/initrd-version.img default=1 timeout=10 title Windows rootnoverify (hd0,0) chainloader +1 title VineLinux root(hd0,2) kernel /boot/vmlinuz ro root=LABEL=/ resume2=swap:/dev/sda5 vga=0x314 hdc=ide-scsi initrd /boot/initrd.img #title VineLinux (Previous kernel) # root (hd0,2) # kernel /boot/vmlinuz.old ro root=LABEL=/ resume2=swap:/dev/sda5 vga=0x314 # initrd /boot/initrd.old.img と書いてあります。

  • GRUBでOSのトリプルブートが出来ない

    Linuxを始めたばかりの高校生です。 マシンはWin7、64bitの入ったものでマスターHDDはWin7に、スレーブHDDにはSwap,CentOS 5.4, Fedora 12をパーティションを切って入れました。 ところが、GRUBのメニューで選択すると先に入れたLinux OSが起動しません。「Error 15 File not found Press any key to continue......」なるメッセージです。後から入れたものは問題なく起動します。当然Win 7の起動はいずれもOKです。つまりデユアルブートなら問題ありません。 grub.confの内容は以下の通りです。(Fedora 12の場合) default=0 timeout=10 splashimage=(hd1,0)/boot/grub/splash.xpm.gz #hiddenmenu title CentOS 5.4 (2.6.18-164.11.1.el5) root (hd1,0) kernel /boot/vmlinuz-2.6.18-164.11.1.el5 ro root=LABEL=/ rhgb quiet initrd /boot/initrd-2.6.18-164.11.1.el15.img title Fedora 12 (2.6.31.5-127.fc12.x86_64) root (hd1,2) kernel /boot/vmlinuz-2.6.31.5-127.fc12.x86_64 ro root=UUID=799e26d1-a3e4-49c6-964d-c0801241d7d9 LANG=ja_JP.UTF-8 KEYBOARDTYPE=pc KEYTABLE=jp106 rhgb quiet initrd /boot/initramfs-2.6.31.5-127.fc12.x86_64.img title WINDOWS 7 rootnoverify (hd0,1) chinloader +1 Error 15の理由がgrub.confの記述のやり方が悪いのか検索で調べましたがまだ判っておりません。 どうか解決策を教えて下さい。

  • ubuntu上でvistaの起動画面を復活させるには

    virtualboxを試そうとして無駄なパッケージをインストールしたためか、(途中で何かを最新にするという表示でOKしたと思います)vistaOSの選択画面が消えてしまい、ubuntuばかりがでてきます。その後インストールしたパッケージをすべてアンインストールしたのですが、状況は変わりません。vistaのデータはまだ生きているのですが、どうしたらvistaを起動できるようになるでしょうか。(下のように表示されています。) title Ubuntu 8.04.1, kernel 2.6.24-22-generic root (hd0,3) kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro quiet splash locale=ja_JP initrd /boot/initrd.img-2.6.24-22-generic quiet title Ubuntu 8.04.1, kernel 2.6.24-22-generic (recovery mode) root (hd0,3) kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro single initrd /boot/initrd.img-2.6.24-22-generic title Ubuntu 8.04.1, kernel 2.6.24-21-386 root (hd0,3) kernel /boot/vmlinuz-2.6.24-21-386 root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro quiet splash locale=ja_JP initrd /boot/initrd.img-2.6.24-21-386 quiet title Ubuntu 8.04.1, kernel 2.6.24-21-386 (recovery mode) root (hd0,3) kernel /boot/vmlinuz-2.6.24-21-386 root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro single initrd /boot/initrd.img-2.6.24-21-386 title Ubuntu 8.04.1, kernel 2.6.24-21-generic root (hd0,3) kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro quiet splash locale=ja_JP initrd /boot/initrd.img-2.6.24-21-generic quiet title Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode) root (hd0,3) kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro single initrd /boot/initrd.img-2.6.24-21-generic title Ubuntu 8.04.1, kernel 2.6.24-16-generic root (hd0,3) kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro quiet splash locale=ja_JP initrd /boot/initrd.img-2.6.24-16-generic quiet title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode) root (hd0,3) kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro single initrd /boot/initrd.img-2.6.24-16-generic title Ubuntu 8.04.1, kernel 2.6.22-14-generic root (hd0,3) kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro quiet splash locale=ja_JP initrd /boot/initrd.img-2.6.22-14-generic quiet title Ubuntu 8.04.1, kernel 2.6.22-14-generic (recovery mode) root (hd0,3) kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro single initrd /boot/initrd.img-2.6.22-14-generic title Ubuntu 8.04.1, memtest86+ root (hd0,3) kernel /boot/memtest86+.bin quiet ### END DEBIAN AUTOMAGIC KERNELS LIST # This is a divider, added to separate the menu items below from the Debian # ones. title Other operating systems: root title Ubuntu 8.04, kernel 2.6.24-16-generic root (hd0,3) kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro quiet splash locale=ja_JP initrd /boot/initrd.img-2.6.24-16-generic quiet title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode) root (hd0,3) kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro single initrd /boot/initrd.img-2.6.24-16-generic title Ubuntu 8.04, kernel 2.6.22-14-generic root (hd0,3) kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro quiet splash locale=ja_JP initrd /boot/initrd.img-2.6.22-14-generic quiet title Ubuntu 8.04, kernel 2.6.22-14-generic (recovery mode) root (hd0,3) kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=f7fabd13-d105-4d31-9223-700df6398ce0 ro single initrd /boot/initrd.img-2.6.22-14-generic title Ubuntu 8.04, memtest86+ root (hd0,3) kernel /boot/memtest86+.bin quiet

  • カーネルパニック(Kernel panic)でRedhat Enter

    カーネルパニック(Kernel panic)でRedhat Enterprize ES4が起動できない keiと申します。 Redhat Enterprize ES4を起動したら、以下メッセージが出て次に進まなくなってしまいました。 再インストール以外に、復旧させる方法はあるのでしょうか? ちなみに、KNOPPIXを立ち上げてみたのですが、/dev/VolGroup00/LogVol00が自動マウント されず、HDDの中身が何も見えませんでした。 ---BOOT時の出力メッセージ--- Filessystem type is ext2fs, partition type 0x83 kernel /vmlinuz-2.6.9-5.ELsmp kernel /vmlinuz-2.6.9-6.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet [Linux-bzImage, setup=0x1400, size=0x15492c] initrd /initrd-2.6.9-5.ELsmp.img [Linux-initrd @ 0x37eee000, 0x10145d bytes] Umcompressing Linux... OK, booting the kernel, Unknown boot option '/vmlinuz-2.6.9-6.ELsmp': ignoring audit(1264589178.286:0): initialized Red Hat nash version 4.1.18 starting File descriptor 3 left open Reading all physical volumes. This may take a while... /dev/hda: open failed: No medium found Found volume group "VolGroup00" using metadata type lvm2 File description 3 left open 2 logical volume(s) in volume group "VolGroup00" now active File descripter 3 left open VFS: Can't find ext3 filesystem on dev dm-0. mount: error 22 mounting ext3 mount: error 2 mounting none switchroot: mount failed: 22 umount /initrd/dev failed: 2 Kernel panic - not syncing: Attempted to kill init! ---ここまで---

  • grubでkernel panic

    DELLノートにXPとVine2.6のデュアルブートをしたいのですが,grubでLinuxを起動できません. インストールではliloをMBRではなくBOOTに書き込んでいます. つまり,先にXPを起動できるようにしてから次にgrubでLinuxを起動させる手順を選択しております. デュアルブートの解決方法などを教えていただけませんでしょうか? …以下、症状です… 僕は hda1: DELL hda2: NTFS hda3: ext3 hda4: extenstion hda5: ext3 hda6: swap でhda3にBOOT,hda5に本体を置いてるので  grub> root (hd0,2)  grub> kernel /vmlinuz root=/dev/hda3  grub> boot だけだと kernel panic: no init found Try passing it=option to kernel と怒られますので bootの直前に  grub> root (hd0,4)  grub> initrd /initrd/initrd.img としようとするのですが、initrd.imgがありません.  grub> root (hd0,2) と打つと Filesystem type is ext2fs, partision type 0x83 と帰ってきますが,   ^ ext3fsでないのが気になります. 再インストールしてliloをMBRに書き込んでから 先にLinuxを起動できるようにして, 次にgrubでXPを起動させる方が簡単でしょうか?

  • <FDD起動のnotePCにCentOS5.5を導入したい>

    <FDD起動のnotePCにCentOS5.5を導入したい> 上記の通り、いろいろ試行錯誤しているのですが、、 FDブートしかできないPCになんとか最新OSを入れたいです。 申し訳ありませんが、どなたか先人の知恵のお借りしたく アドバイスお願い致します。 ○スペック PC:Panasonic AL-N2 MEM:160M HDD:40G (Disk Manager 2000でBIOS騙し) pcmcia LAN card: corega PCC-TL ○状況  1. Cent3のFDDブートimgにて同PCにCent3を導入完了    /boot 200M 、swap:200 、/:残り全部 2. /boot以下にcent5のinitrdとvmlinuzを展開    mkdir /boot/centos5 cd /boot/centos5 wget http://-----/vmlinuz wget http://-----/initrd.img 3. grub.confに追記。  title CentOS-5 Install root (hd0,0) kernel /centos5/vmlinuz ramdisk_size=8192 initrd /centos5/initrd.img 4. 再起動後、「CentOS-5 install」で起動するも   カーネルパニックになるのか、initrd.img起動 途中でPCが再起動される。。。。 ○その他  同様の手順で、CentOS3のinitrdとvmlinuzなら  普通にインストーラーが起動されることは確認。 ただし、CentOS4の場合は、5と同様に再起動がかかる。