grub問題 Error 21 - Linux

By Connor
at 2010-12-14T15:51
at 2010-12-14T15:51
Table of Contents
大家好,我現在有一支很大的script
他主要的功能是自動製作可以開機的USB
但是中間有一的地方怪怪的,要請教大家
這支script會先dd出一個檔案,然後對它做fdisk等等等
詳細的過程就不說了,應該不是問題所在
最後再對它做grub(0.97),grub的部份是
device (hd0) 目標檔案
geometry (hd0) 123 16 63
root (hd0,0)
setup (hd0)
quit
我的問題是,現在有兩台機器
機器1,執行這段grub指令的時候,會有錯誤如下
grub> device (hd0) gen_initramfs.20418.2263.tmp.5
grub> geometry (hd0) 123 16 63
Error 21: Selected disk does not exist
grub> root (hd0,0)
Error 21: Selected disk does not exist
grub> setup (hd0)
Error 12: Invalid device requested
grub> quit
最後出來的檔案無法順利開機
機器2,執行grub則正常
grub> device (hd0) gen_initramfs.8942.29642.tmp.5
grub> geometry (hd0) 123 16 63
drive 0x80: C/H/S = 123/16/63, The number of sectors = 123984,
gen_initramfs.8942.29642.tmp.5
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... no
Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p
/boot/grub/grub.conf "... succeeded
Done.
grub> quit
最後出來的檔案可以正常開機
機器1做出來的檔案拿到機器2上執行grub也正常
所以差異就是兩台機器的環境了
理論上這兩台機器的環境應該是一模一樣的(一樣的安裝過程)
不應該發生這種問題才對
那假設他們沒有如想像中的一致
請問有人知道哪一個地方的設定有可能導致grub的結果不一樣嗎?
或是有其他的見解呢?
謝謝
--
他主要的功能是自動製作可以開機的USB
但是中間有一的地方怪怪的,要請教大家
這支script會先dd出一個檔案,然後對它做fdisk等等等
詳細的過程就不說了,應該不是問題所在
最後再對它做grub(0.97),grub的部份是
device (hd0) 目標檔案
geometry (hd0) 123 16 63
root (hd0,0)
setup (hd0)
quit
我的問題是,現在有兩台機器
機器1,執行這段grub指令的時候,會有錯誤如下
grub> device (hd0) gen_initramfs.20418.2263.tmp.5
grub> geometry (hd0) 123 16 63
Error 21: Selected disk does not exist
grub> root (hd0,0)
Error 21: Selected disk does not exist
grub> setup (hd0)
Error 12: Invalid device requested
grub> quit
最後出來的檔案無法順利開機
機器2,執行grub則正常
grub> device (hd0) gen_initramfs.8942.29642.tmp.5
grub> geometry (hd0) 123 16 63
drive 0x80: C/H/S = 123/16/63, The number of sectors = 123984,
gen_initramfs.8942.29642.tmp.5
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... no
Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p
/boot/grub/grub.conf "... succeeded
Done.
grub> quit
最後出來的檔案可以正常開機
機器1做出來的檔案拿到機器2上執行grub也正常
所以差異就是兩台機器的環境了
理論上這兩台機器的環境應該是一模一樣的(一樣的安裝過程)
不應該發生這種問題才對
那假設他們沒有如想像中的一致
請問有人知道哪一個地方的設定有可能導致grub的結果不一樣嗎?
或是有其他的見解呢?
謝謝
--
Tags:
Linux
All Comments
Related Posts
ubuntu 不想直接進x-window

By Gary
at 2010-12-14T10:12
at 2010-12-14T10:12
如何用ubuntu LiveCD修復mbr讓windows可以開機?

By Sierra Rose
at 2010-12-13T23:13
at 2010-12-13T23:13
為什麼fx在linux上面這麼吃cpu?

By Frederica
at 2010-12-13T21:48
at 2010-12-13T21:48
xorg.conf無用

By Donna
at 2010-12-13T13:42
at 2010-12-13T13:42
rm刪除的檔案

By Quintina
at 2010-12-13T12:00
at 2010-12-13T12:00