天天看點

GRUB常見錯誤

GRUB常見錯誤

1 Stage1 階段可能出現的錯誤 :

GRUB 對于該階段出現的錯誤一般是列印一個出錯資訊并挂起機器,除非按CTRL-ALT-DEL 重新開機。

a) Hard Disk Error :表示無法判讀 stage 1.5 檔案所在的磁盤的大小和 CHS 參數

b)Floppy Error :表示無法 stage 1.5 檔案所在的軟碟的大小和 CHS 參數

c)Read Error :表示無法讀取 stage 1.5 檔案或者 stage2 檔案

d)Geom Error :stage2 或者 stage 1.5 位于 BIOS 的 read 調用可以通路的範圍之外。

2 Stage 1.5/2 階段可能出現的錯誤 :

一般會列印一個 “Error <N>“的錯誤資訊,并根據錯誤的嚴重程度看是否繼續進行。

1 : Filename must be either an absolute filename or blocklist

解釋 :1号錯誤表示檔案名格式錯誤。在 GRUB 中要麼是以絕對路徑給出檔案

例子 :

grub> kernel vmlinuz root=label=/

Error 1: Filename must be either an absolute pathname or blocklist

grub>

2 : Bad file or directory type

解釋 :2号錯誤表示指令期望的是一個普通檔案,但相應檔案名的對象是一個符号連結、目錄、FIFO

例子 :

grub> kernel /testdir root=LABEL=/

Error 2: Bad file or directory type

grub>

3 : Bad or corrupt data while decompressing file

解釋 :3号錯誤表示解壓檔案時發生錯誤。可能是因為這個檔案被損壞了

4 : Bad or incompatible header in compressed file

解釋 :4号錯誤表示壓縮檔案的頭部格式不被相容或者錯誤

5 : Partition table invalid or corrupt

解釋 :5 号錯誤表示分區表無效或者被破壞。這是一個不好的預兆

6 : Mismatched or corrupt version of stage1/stage2

解釋 :6号錯誤表示 install 指令發現 stage1 和 stage2 的頒布号不被相容

7 : Loading below 1MB is not supported

解釋 :This error is returned if the lowest address in a kernel is below the 1MB boundary. The Linux zImage format is a special case and can be handled since it has a fixed loading address and maximum size

8 : Kernel must be loaded before booting

解釋 :8号錯誤表示執行 boot 指令之前沒有先執行 kernel 指令

9 : Unknown boot failure

解釋 :9 号錯誤表示未知的引導錯誤

10 : Unsupported Multiboot features requested

解釋 :10 号錯誤表示請求 Multiboot header 所要求功能不被 GRUB 所支援。

11 : Unrecognized device string

解釋 :11 号錯誤表示無法識别的裝置字元串。

例子 :

grub> root hd0

Error 11: Unrecognized device string

grub>

12 : Invalid device requested

解釋 :12 号錯誤表示請求的裝置無效

例子 :

grub> root (hd2)

Error 21: Selected disk does not exist

grub> kernel /grub/grub.conf root=LABEL=/

Error 12: Invalid device requested

grub>

13 : Invalid or unsupported executable format

解釋 :13 号錯誤表示無效或者無法識别的可執行格式

例子 :

grub> kernel /grub/grub.conf root=LABEL=/

Error 13: Invalid or unsupported executable format

grub>

14 : Filesystem compatibility error, cannot read whole file

解釋 :14 号錯誤表示檔案系統相容性錯誤,無法讀取整個檔案

15 : File not found

解釋 :請求的檔案無法找到

例子 :

grub> find /grub-noexist/grub.conf

Error 15: File not found

grub>

16 : Inconsistent filesystem structure

解釋 :16 号錯誤表示不一緻的檔案系統結構。可能是檔案系統結構被破壞了。

17 : Cannot mount selected partition

解釋 :17号錯誤表示無法挂載指定分區。例如 swap 分區

例子 :

grub> root (hd0,2) 這是一個 swap 分區

Filesystem type unknown, partition type 0x82

grub> kernel /vmlinuz

Error 17: Cannot mount selected partition

grub>

18 : Selected cylinder exceeds maximum supported by BIOS

解釋 :18 号錯誤表示選擇的柱面超過了 BIOS 支援的最大能力。這通常發生在不支援 LBA 模式的硬碟上。

19 : Linux kernel must be loaded before initrd

解釋 :19 号錯誤表示執行 initrd 指令前必須先執行 kernel 指令

20 : Multiboot kernel must be loaded before modules

解釋 :20 号錯誤表示執行 module 或者 moduleunzip 指令前必須先執行 kernel 指令

21 : Selected disk does not exist

解釋 :21 号錯誤表示選擇的磁盤不存在

例子 :

grub> root (hd2)

Error 21: Selected disk does not exist

grub>

22 : No such partition

解釋 :22 号錯誤表示分區不存在

例子 :

grub> root (hd0,10)

Error 22: No such partition

grub>

23 : Error while parsing number

解釋 :23 号錯誤表示參數解釋錯誤,希望是一個數值,但參數卻是其他類型

例子 :

grub> root (hda,0)

Error 23: Error while parsing number

grub>

24 : Attempt to access block outside partition

解釋 :24 号錯誤表示嘗試通路的 block 超出了分區

25 : Disk read error

解釋 :25 号錯誤表示磁盤讀錯誤

26 : Too many symbolic links

解釋 :26 号錯誤表示太多的符号連接配接(預設最多允許5個)

27 : Unrecognized command

解釋 :無法識别的指令

28 : Selected item cannot fit into memory

解釋 :選擇的對象無法被加載到記憶體中。

例子 :

[[email protected] boot]# dd if=/dev/zero of=vmlinuz-2.4.20-31.9 bs=1024 count=1 seek=1

讀入了 1+0 個塊

輸出了 1+0 個塊

[[email protected] boot]#grub

grub> kernel /vmlinuz-2.4.20-31.9 root=label=/

[Linux-bzImage, setup=0x1400, size=0xfffff200]

Error 28: Selected item cannot fit into memory

grub>

29 : Disk write error

解釋 :磁盤寫錯誤

30 : Invalid argument

解釋 :無效參數

例子 :

grub> serial --noarg=0

Error 30: Invalid argument

grub>

31 : File is not sector aligned

解釋 :This error may occur only when you access a ReiserFS partition by block-lists (e.g. the command `install'). In this case, you should mount the partition with the `-o notail' option.

32 : Must be authenticated

解釋 :要求輸入密碼才能繼續進行下面的操作。例如配置檔案中有 password 或者 lock 指令

例子 :

    password root1234

    title DOS

    lock

    rootnoverify (hd0,0)

    chainloader +1

33 : Serial device not configured

解釋 :33 号錯誤表示序列槽還沒有配置。這一般發生在你執行 terminal serial 的時候

34 : No spare sectors on the disk

解釋 :磁盤自由空間不足。可能發生在把 stage 1.5 嵌入到 MBR 之後的空間的時候。但這部分空間可能已經被分區表使用了