
Ubuntu日本語フォーラム

ログインしていません。
先日、ubuntu8.10+WindowsXPのデュアルブート環境をubuntu9.04にアップデートマネージャーを使って、アップデートしました。
インストールは問題なく終了したのですが、
起動時に表示されるgrubのOS選択メニューにおいて、タイムアウトしない状態になってしまいました。
(以前は5秒経過後にDefault設定のOSが起動していました)
カウンターが表示されていない状況です。
試しにmenu.lstのtimeout値を変更してみましたが、変化はありません。
default値の変更は正しく反映されるようです。
インストール中にmenu.lstを更新するか聞かれましたが「ローカルバージョンを保持」を選択したのがいけなかったでしょうか?
確認すべき点等ありましたら、教えて頂けたらと思います。
よろしくお願いします。
オフライン
私は今までそういう状況に陥ったことがないので、うまくいくかわかりませんが、
端末から、下記のように実行して再起動してみた場合、どうでしょうか?
sudo update-grub
sudo grub-install /dev/sda
2 行目はこの場合、意味の無いコマンドかも知れないが・・・。
まぁ、取り敢えずやってみてください。
オフライン
回答ありがとうございます。
sudo update-grub
sudo grub-install /dev/sda
この2つのコマンドを実行してみました。
それぞれ、特にエラー無く処理が進んだようでしたが、現象に変化はありませんでした。
相変わらず、タイムアウトしないです。
オフライン
何かがわかる、という保証はないのですが、
uname -a
の結果と、menu.lst の内容を張り付けることはできますか?
それとインストールされているカーネルのバージョンを Synaptic 等で調べて、リストしていただくこともできますか?
というのは私が経験している範囲では「ローカルバージョンを保持」するかどうかを選択するダイアログボックスは、カーネルのバージョンアップがあった時にだけなので。
回答ありがとうございます。
uname -aの結果を以下に示します。
Linux tadashi-ubunPC 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux
インストールされているカーネルのバージョンをSynapticで調べる方法は分からなかったので、
/bootフォルダの中身を以下に示します。
System.map-2.6.22-14-generic initrd.img-2.6.22-14-generic
System.map-2.6.24-21-generic initrd.img-2.6.22-14-generic.bak
System.map-2.6.27-11-generic initrd.img-2.6.24-21-generic
System.map-2.6.28-13-generic initrd.img-2.6.24-21-generic.bak
abi-2.6.22-14-generic initrd.img-2.6.27-11-generic
abi-2.6.24-21-generic initrd.img-2.6.28-13-generic
abi-2.6.27-11-generic memtest86+.bin
abi-2.6.28-13-generic vmcoreinfo-2.6.27-11-generic
config-2.6.22-14-generic vmcoreinfo-2.6.28-13-generic
config-2.6.24-21-generic vmlinuz-2.6.22-14-generic
config-2.6.27-11-generic vmlinuz-2.6.24-21-generic
config-2.6.28-13-generic vmlinuz-2.6.27-11-generic
grub vmlinuz-2.6.28-13-generic
menu.lstの内容を以下に示します。
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 4
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=7e61725a-c120-4957-920f-f70ea471b8b6 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,3)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash locale=ja_JP
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 8.10, kernel 2.6.27-11-generic
root (hd0,3)
kernel /boot/vmlinuz-2.6.27-11-generic root=UUID=7e61725a-c120-4957-920f-f70ea471b8b6 ro quiet splash locale=ja_JP
initrd /boot/initrd.img-2.6.27-11-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-11-generic (recovery mode)
root (hd0,3)
kernel /boot/vmlinuz-2.6.27-11-generic root=UUID=7e61725a-c120-4957-920f-f70ea471b8b6 ro single
initrd /boot/initrd.img-2.6.27-11-generic
title Ubuntu 8.10, 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
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
オフライン
こういう場合は
grep "^[^#|^$]" /boot/grub/menu.lst
とかするといいですよ。
tashi による投稿:
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
とか、よくわからない行がありますが、一度削除してみましょう。
あと、default の数字も0あたりに。
オフライン
なるほど、Windows とデュアルブートにされているのですね。defaultはWindows用パーティションの4のままで問題ないかと思います。
tashiさんのマシンが、現在どういう状態なのかは説明できそうです。どうやらUbuntuのバージョンアップに失敗しています。でも致命的な失敗ではありません。
以下まずは現在の状態だけ列記します。
・各パッケージは全てUbuntu 9.04 Jaunty Jackalopeのものに入れ替わっている。
・「ローカルバージョンを保持」を選択したために、カーネルのみUbuntu 8.10 Intrepid Ibexのパッケージになっている。
・Ubuntu 9.04 Jaunty Jackalope用のカーネル自体は入っている。
以上から、アクティブ(という表現でいいのかな?)なカーネルを2.6.28-13にしてやればいいことになります。
# 同じトラブルを経験したことがないので、カーネルの差し替えに関しては先達に委ねたいと思います。
n_saitoさんのご指摘どおりに、
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
の部分をコメントアウトしたところ、正しくタイムアウト動作するようになりました。
確か、この行は以前から存在していたと思います。以前はコメントアウトせずに動いていたような。
やはり、カーネルのバージョン不一致が悪さしてるのでしょうか?
オフライン
tashiさん による投稿:
やはり、カーネルのバージョン不一致が悪さしてるのでしょうか?
タイムアウトの件との関連は分かりかねますが、少なくともUbuntu 9.04 Jaunty Jackalope用のパッケージ群がUbuntu 8.10 Intrepid Ibex用のカーネル上で動いているのは、望ましいことではないと思います。
# 恐らく memu.lst を修正してpetitbootangさんのおっしゃっているコマンドを実行すればいい、とは思うのですが
# 状況悪化予防のために、識者からのレスがつくまでしばらく待たれることをお薦めします。
たんなる推測ですが、デュアルブートということでmenu.lstファイルの最後にWindowsを起動する部分が ### END DEBIAN AUTOMAGIC KERNELS LIST 行以下にかかれるわけですが、grubのメニュー画面で「Other operating systems:」という行があってその下に「Microsoft Windows XP Home Edition」が出てきていたのではないかと思います。
で、どこかで savedefault が有効にされた時にdefaultの値は4のままで起動した形のあと無効になってしまったとか、なんらかのkernel(memtest86?)が追加されてしまったがために、「Other operating systems:」の行(=4つ目のtitleでのくくり)をタイムアウト後実行する形になってしまっていた気がします。
# たぶんdefaultの数字を5にすれば良かっただけなのでは?と後で気づいて、コメントしたものは当たったもののかなりあてずっぽうだというのがバレバレに...(汗
# このコメントもあてずっぽうで申し訳ないです(滝汗
オフライン
n_saitoさん による投稿:
# たぶんdefaultの数字を5にすれば良かっただけなのでは?と後で気づいて、コメントしたものは当たったもののかなりあてずっぽうだというのがバレバレに...(汗
defaultは0始まりでは?
【あくまで参考】
tashiさんのmenu.lstを見ていて変だな、と思うのは
Ubuntu 8.10, kernel 2.6.27-11-generic
とあることと、UUIDでディスク・デバイスが指定されていないことですね。
root (hd0,3)
というディスク・デバイスの指定方法は、"Ubuntu 8.10 Intrepid Ibex" までの指定方法なので。
私のUbuntu 9.04 Jaunty Jackalopeのmenu.lstは以下の通りです (vgaオプションを追加しています)。
[略] default 0 [略] timeout 3 [略] hiddenmenu [略] ## ## End Default Options ## title Ubuntu 9.04, kernel 2.6.28-13-generic uuid 944b884d-d447-4350-9b82-db3d4bb7328e kernel /boot/vmlinuz-2.6.28-13-generic root=UUID=944b884d-d447-4350-9b82-db3d4bb7328e ro quiet nosplash vga=0x366 initrd /boot/initrd.img-2.6.28-13-generic quiet title Ubuntu 9.04, kernel 2.6.28-13-generic (recovery mode) uuid 944b884d-d447-4350-9b82-db3d4bb7328e kernel /boot/vmlinuz-2.6.28-13-generic root=UUID=944b884d-d447-4350-9b82-db3d4bb7328e ro single vga=0x366 initrd /boot/initrd.img-2.6.28-13-generic title Ubuntu 9.04, memtest86+ uuid 944b884d-d447-4350-9b82-db3d4bb7328e 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
確認ですが、起動時の grub のメニュー画面では Ubuntu のバージョンはどうなっていますか?
9.04ですか? 8.10のままですか?
もし9.04であれば、#6の menu.sl は実際は使われていないものという事になります。
そうであれば、どこかにもう一つ menu.lst があるような気がします。
オフライン
もしなんらかの作業を行うなら、まずは menu.lst をバックアップしておくことを強くお薦めします。
# ところで Ubuntu は見掛け上、正常に動いてますか?
# もし見掛け上でも動いているなら、今のうちにデータのバックアップを取っておいてください。
# WinXp Home Edition のパーティションも同様です。
※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。
オフライン
defaultについては私の勘違いですね、すいません。
kiyoshi による投稿:
avidyaさんのご指摘のように、menu.lstをバックアップされた方が良いです。例えば、
「アプリケーション」ー「アクセサリ」ー「端末」で
~$
に続けて、
cp /boot/grub/menu.lst ./menu.lst.backup
とかやれば、「場所」ー「ホーム・フォルダ」に
menu.lst.backup
という名前でコピーされます。
sudo update-grub が実行できるのであれば、すでに /boot/grub/menu.lst~ がバックアップとして残るはずで...。
うまく動いていない場合でのバックアップというならば、/boot/grub/menu.lst~のほうをコピーというのがベターかと。
あと、こういう場合は cp に p オプションをつけるとタイムスタンプを残してくれます。
この形でバックアップしたものは、いつの時点のに変更されたかがすぐ判るのでオススメです。
オフライン
GHO による投稿:
確認ですが、起動時の grub のメニュー画面では Ubuntu のバージョンはどうなっていますか?
9.04ですか? 8.10のままですか?
もし9.04であれば、#6の menu.sl は実際は使われていないものという事になります。
そうであれば、どこかにもう一つ menu.lst があるような気がします。
GHO様、
現在のgrubのメニューには、menu.lstのtitleどおりに、
Ubuntu 8.10, kernel 2.6.27-11-generic
Ubuntu 8.10, kernel 2.6.27-11-generic(recorvery mode)
Ubuntu 8.10, memtest86+
Microsoft Windows XP Home Edition
が表示されています。
オフライン
aviva様、kiyoshi様、n_saito様
コメントありがとうございます。
menu.lstのコピーをとっておきました。
menu.lst~に関しては、既にほとんど同一の物(default部分だけが違う)でしたので、menu.lstのほうをコピーしました。
本来、アップデート時にmenu.lstの選択が出たときには何を選ぶのが正解なのでしょう?今回は、「ローカルバージョンを保持」を選んでしまいましたが。
どうも表現が難しくて、毎回悩んでしまいまして。
オフライン
※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。
オフライン
※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。
オフライン
kiyosiさん、カーネルの変更方法ありがとうございます。
早速、適用してみました。
結果、問題なく起動しました。
uname -aの結果も、
Linux tadashi-ubunPC 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 i686 GNU/Linux
となっていますので、問題なく正しいカーネルが起動していると思います。
menu.lstの選択方法も教えて頂き、ありがとうございます。
次のバージョンアップ時は、「違いを表示」を選んで見ます。
オフライン
※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。
オフライン
私の環境では
title Other operating systems:
root
の行があっても普通にタイムアウトしますのでtashiさんの環境でタイムアウトしない原因は不明のままではないでしょうか。
また、現状のmenu.lstでは本来希望しているデフォルトでWindowsXPが起動せずに2.6.27-11-genericのUbuntuが起動しませんか?
もしそうであればmenu.lstを適当にリネームしてupdate-grubを実行し作り直してみてはどうでしょう。
menu.lstが生成されなけばシステムが変です。
grubパッケージを再インストールしてみましょう。
無事にmenu.lstが生成されればWindows用に
title Microsoft Windows XP Home Edition
root (hd0,0)
makeactive
chainloader +1
をmenu.lstの### BEGIN AUTOMAGIC KERNELS LIST行の前に追加します。
menu.lstの### END DEBIAN AUTOMAGIC KERNELS LIST行以降にWindows用の行を追加する場合は、menu.lstのdefault 0をdefault savedに変更し
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
を追加すれば本来の希望する動作になると思います。
オフライン
※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。
オフライン