Results 1 to 3 of 3

Thread: Tid-Bits #6- GRUB error code

Hybrid View

  1. #1

    Tid-Bits #6- GRUB error code

    Ok, now i am turning my attention from lilo to grub. This is a large topic so i am breaking it into two posts, since it can't be posted as one. (sigh, and i have already lost all my work once tonight )

    Stage 1 Errors:

    The general way that the Stage 1 handles errors is to print an error string and then halt. Pressing CTRL-ALT-DEL will reboot.

    Hard Disk Error
    The stage2 or stage1.5 is being read from a hard disk, and the attempt to determine the size and geometry of the hard disk failed.

    Floppy Error
    The stage2 or stage1.5 is being read from a floppy disk, and the attempt to determine the size and geometry of the floppy disk failed. It's listed as a separate error since the probe sequence is different than for hard disks.

    Read Error
    A disk read error happened while trying to read the stage2 or stage1.5.

    Geom Error
    The location of the stage2 or stage1.5 is not in the portion of the disk supported directly by the BIOS read calls. This could occur because the BIOS translated geometry has been changed by the user or the disk is moved to another machine or controller after installation, or GRUB was not installed using itself (if it was, the Stage 2 version of this error would have been seen during that process and it would not have completed the install).

    Stage 1.5 - 2 (they adhere to the same number codes and system reset command)

    1 : Filename must be either an absolute filename or blocklist
    This error is returned if a file name is requested which doesn't fit the syntax/rules listed in the section Filesystem syntax and semantics.

    2 : Bad file or directory type
    This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO.

    3 : Bad or corrupt data while decompressing file
    This error is returned if the run-length decompression code gets an internal error. This is usually from a corrupt file.

    4 : Bad or incompatible header in compressed file
    This error is returned if the file header for a supposedly compressed file is bad.

    5 : Partition table invalid or corrupt
    This error is returned if the sanity checks on the integrity of the partition table fail. This is a bad sign.

    6 : Mismatched or corrupt version of stage1/stage2
    This error is returned if the install command is pointed to incompatible or corrupt versions of the stage1 or stage2. It can't detect corruption in general, but this is a sanity check on the version numbers, which should be correct.

    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
    This error is returned if GRUB is told to execute the boot sequence without having a kernel to start.

    9 : Unknown boot failure
    This error is returned if the boot attempt did not succeed for reasons which are unknown.

    10 : Unsupported Multiboot features requested
    This error is returned when the Multiboot features word in the Multiboot header requires a feature that is not recognized. The point of this is that the kernel requires special handling which GRUB is likely unable to provide.

    11 : Unrecognized device string
    This error is returned if a device string was expected, and the string encountered didn't fit the syntax/rules listed in the section Filesystem syntax and semantics.

    12 : Invalid device requested
    This error is returned if a device string is recognizable but does not fall under the other device errors.

    13 : Invalid or unsupported executable format
    This error is returned if the kernel image being loaded is not recognized as Multiboot or one of the supported native formats (Linux zImage or bzImage, FreeBSD, or NetBSD).

    14 : Filesystem compatibility error, cannot read whole file
    Some of the filesystem reading code in GRUB has limits on the length of the files it can read. This error is returned when the user runs into such a limit.

    15 : File not found
    This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.

    16 : Inconsistent filesystem structure
    This error is returned by the filesystem code to denote an internal error caused by the sanity checks of the filesystem structure on disk not matching what it expects. This is usually caused by a corrupt filesystem or bugs in the code handling it in GRUB.

    17 : Cannot mount selected partition
    This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.

    18 : Selected cylinder exceeds maximum supported by BIOS
    This error is returned when a read is attempted at a linear block address beyond the end of the BIOS translated area. This generally happens if your disk is larger than the BIOS can handle (512MB for (E)IDE disks on older machines or larger than 8GB in general).

    19 : Linux kernel must be loaded before initrd
    This error is returned if the initrd command is used before loading a Linux kernel. Similar to the above error, it only makes sense in that case anyway.

    20 : Multiboot kernel must be loaded before modules
    This error is returned if the module load command is used before loading a Multiboot kernel. It only makes sense in this case anyway, as GRUB has no idea how to communicate the presence of location of such modules to a non-Multiboot-aware kernel.

    21 : Selected disk does not exist
    This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.

    22 : No such partition
    This error is returned if a partition is requested in the device part of a device- or full file name which isn't on the selected disk.

    23 : Error while parsing number
    This error is returned if GRUB was expecting to read a number and encountered bad data.

    24 : Attempt to access block outside partition
    This error is returned if a linear block address is outside of the disk partition. This generally happens because of a corrupt filesystem on the disk or a bug in the code handling it in GRUB (it's a great debugging tool).

    25 : Disk read error
    This error is returned if there is a disk read error when trying to probe or read data from a particular disk.

    26 : Too many symbolic links
    This error is returned if the link count is beyond the maximum (currently 5), possibly the symbolic links are looped.

    27 : Unrecognized command
    This error is returned if an unrecognized command is entered into the command-line or in a boot sequence section of a configuration file and that entry is selected.

    28 : Selected item cannot fit into memory
    This error is returned if a kernel, module, or raw file load command is either trying to load its data such that it won't fit into memory or it is simply too big.

    29 : Disk write error
    This error is returned if there is a disk write error when trying to write to a particular disk. This would generally only occur during an install of set active partition command.

    30 : Invalid argument
    This error is returned if an argument specified to a command is invalid.

    31 : File is not sector aligned
    This error may occur only when you access a ReiserFS partition by block-lists (e.g. the command @command{install}). In this case, you should mount the partition with the `-o notail' option.

    32 : Must be authenticated
    This error is returned if you try to run a locked entry. You should enter a correct password before running such an entry.


    Now see the next reply down for a section on the Filesystem syntax and semantics.


    Babbing 8)

  2. #2

    Re:Tid-Bits #6.1- GRUB error code - Filesystem Syntax and Semantics

    This is just a little reference on how GRUB speaks to the BIOS, so that you may be as well versed as GRUB :P.


    GRUB uses a special syntax for specifying disk drives which can be accessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish between IDE, ESDI, SCSI, or others. You must know yourself which BIOS device is equivalent to which OS device. Normally, that will be clear if you see the files in a device or use the command @command{find}

    To Specify a Drive:

    The device syntax is like this:

    (device[,part-num][,bsd-subpart-letter])


    `[]' means the parameter is optional. device should be either `fd' or `hd' followed by a digit, like `fd0'. But you can also set device to a hexadecimal or a decimal, which is a BIOS drive number, so the following are equivalent:

    (hd0)
    (0x80)
    (128)


    part-num represents the partition number of device, starting from zero for primary partitions and from four for extended partitions, and bsd-subpart-letter represents the BSD disklabel subpartition, such as `a' or `e'.

    A shortcut for specifying BSD subpartitions is (device,bsd-subpart-letter), in this case, GRUB searches for the first PC partition containing a BSD disklabel, then finds the subpartition bsd-subpart-letter. Here is an example:

    (hd0,a)


    The syntax like `(hd0)' represents using the entire disk (or the MBR when installing GRUB), while the syntax like `(hd0,0)' represents using the partition of the disk (or the boot sector of the partition when installing GRUB).

    If you enabled the network support, the special drive, `(nd)', is also available. Before using the network drive, you must initialize the network.

    To Specify a File:

    There are two ways to specify files, by absolute file name and by block list.

    An absolute file name resembles a Unix absolute file name, using `/' for the directory separator (not `\' as in DOS). One example is `(hd0,0)/boot/grub/menu.lst'. This means the file `/boot/grub/menu.lst' in the first partition of the first hard disk. If you omit the device name in an absolute file name, GRUB uses GRUB's root device implicitly. So if you set the root device to, say, `(hd1,0)' by the command @command{root}, then /boot/kernel is the same as (hd1,0)/boot/kernel.

    To Specify Block Lists:

    A block list is used for specifying a file that doesn't appear in the filesystem, like a chainloader. The syntax is [offset]+length[,[offset]+length].... Here is an example:

    0+100,200+1,300+300


    This represents that GRUB should read blocks 0 through 99, block 200, and blocks 300 through 599. If you omit an offset, then GRUB assumes the offset is zero.

    Like the file name syntax (see To specify files), if a blocklist does not contain a device name, then GRUB uses GRUB's root device. So (hd0,1)+1 is the same as +1 when the root device is `(hd0,1)'.



    Cool, looks like i covered most of it, if anyone has anything to add, just put it up and lets discuss it :P


    Goodluck,


    Babbing 8)

  3. #3

    Re:Tid-Bits #6- GRUB error code

    Sheesh, that was a whooper :P

Similar Threads

  1. Grub Error
    By pradeepgroup in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 03-17-2012, 12:46 PM
  2. grub error in raid 1
    By fareedreg in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 09-16-2010, 01:24 PM
  3. firewall code error
    By manju5122 in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 02-08-2006, 04:31 AM
  4. GRUB Read Error
    By jimmy in forum Linux - General Topics
    Replies: 2
    Last Post: 01-26-2005, 06:01 AM
  5. Tid-Bits #5- LILO error code
    By babbing in forum Linux - General Topics
    Replies: 0
    Last Post: 09-09-2002, 04:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •