Results 1 to 8 of 8

Thread: 8.10 Install Problem - GRUB Error 2

  1. #1
    Join Date
    Jun 2006
    Beans
    Hidden!

    Unhappy 8.10 Install Problem - GRUB Error 2

    After a fresh install of Intrepid on an IDE drive, my system is hanging on a GRUB "Error 2". I searched around and found that many users are getting around this by making IDE-related changes in their BIOS. I seem to have tried changing as many BIOS settings as possible, but still I get Error 2. I thought it might be my grub config since there seems to be some hda/sda naming differences between various linux projects, but my menu.list references drives by UUID and the id's look valid to me.

    Here's my current setup:

    6 physical drives:

    sda (320 GB SATA)
    sdb (500 GB SATA - RAID)
    sdc (500 GB SATA - RAID)
    sdd (500 GB SATA - RAID)
    sde (500 GB SATA - RAID)
    sdf (40 GB PATA - This is the root intrepid drive - UUID is 0b23f801-3787-4898-8b7e-6e60402119d0)

    Why my 40 GB is being refered to as sda instead of hda is beyond me, but I suspect it may be part of the problem.

    menu.lst:

    Code:
    # 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		0
    
    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout		3
    
    ## 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=0b23f801-3787-4898-8b7e-6e60402119d0 ro
    
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=0b23f801-3787-4898-8b7e-6e60402119d0
    
    ## 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
    
    ## 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
    
    ## 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-7-generic
    uuid		0b23f801-3787-4898-8b7e-6e60402119d0
    kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=0b23f801-3787-4898-8b7e-6e60402119d0 ro quiet splash 
    initrd		/boot/initrd.img-2.6.27-7-generic
    quiet
    
    title		Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
    uuid		0b23f801-3787-4898-8b7e-6e60402119d0
    kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=0b23f801-3787-4898-8b7e-6e60402119d0 ro  single
    initrd		/boot/initrd.img-2.6.27-7-generic
    
    title		Ubuntu 8.10, memtest86+
    uuid		0b23f801-3787-4898-8b7e-6e60402119d0
    kernel		/boot/memtest86+.bin
    quiet
    
    ### END DEBIAN AUTOMAGIC KERNELS LIST
    Any help would be appreciated!

    -Epibeta.

  2. #2
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: 8.10 Install Problem - GRUB Error 2

    How about first opening your menu.lst and comment the "hiddenmenu" line so it looks like:
    Code:
    # hiddenmenu
    Next please post:
    Code:
    sudo fdisk -lu
    sudo dumpe2fs /dev/sdf1 | grep -i "inode size"
    sudo dd if=/dev/sdf count=1 2>/dev/null | strings | grep -ie grub -ie "missing operating system"
    sudo dd if=/dev/sdf bs=1 skip=1049 count=2 2>/dev/null | hexdump
    And replace sdf1 with whichever is your Intrepid partition on sdf if it is different.

    Also, are you booting from your Intrepid sdf drive on start up? Go ahead and reboot, and please let me know if you get the Grub error 2 before seeing a Grub menu, or after you get the Grub menu and select Ubuntu (I would guess it is the former case).

  3. #3
    Join Date
    Jun 2006
    Beans
    Hidden!

    Re: 8.10 Install Problem - GRUB Error 2

    Thanks a lot for the reply!

    The "hiddenmenu" line is now commented out in my menu.lst.

    Here's the output you requested...

    sudo fdisk -lu

    Code:
    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x000f30d3
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63   625137344   312568641   83  Linux
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00024fcb
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1              63   976768064   488384001   fd  Linux raid autodetect
    
    Disk /dev/sdc: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x0006ec8b
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1              63   976768064   488384001   fd  Linux raid autodetect
    
    Disk /dev/sdd: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x000d0fa5
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdd1              63   976768064   488384001   fd  Linux raid autodetect
    
    Disk /dev/sde: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00050d73
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sde1              63   976768064   488384001   fd  Linux raid autodetect
    
    Disk /dev/sdf: 40.0 GB, 40020664320 bytes
    255 heads, 63 sectors/track, 4865 cylinders, total 78165360 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x183d183d
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdf1              63    74862899    37431418+  83  Linux
    /dev/sdf2        74862900    78156224     1646662+   5  Extended
    /dev/sdf5        74862963    78156224     1646631   82  Linux swap / Solaris
    sudo dumpe2fs /dev/sdf1 | grep -i "inode size":

    Code:
    dumpe2fs 1.41.3 (12-Oct-2008)
    Inode size:	          256
    sudo dd if=/dev/sdf count=1 2>/dev/null | strings | grep -ie grub -ie "missing operating system":

    Code:
    GRUB
    sudo dd if=/dev/sdf bs=1 skip=1049 count=2 2>/dev/null | hexdump:

    Code:
    0000000 8100                                   
    0000002
    Thank you again for your help!

    -Epibeta.

  4. #4
    Join Date
    Jun 2006
    Beans
    Hidden!

    Re: 8.10 Install Problem - GRUB Error 2

    Oh, and yes - I am booting off of my Intrepid sdf drive and I am getting the error *before* any grub menu appears.

    Thanks again,
    -Epibeta.

  5. #5
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: 8.10 Install Problem - GRUB Error 2

    OK, looks like your problem might actually be easy to fix. According to the "dd" commands you ran, the Grub in the MBR (Master Boot Record) of your sdf drive is actually looking on the second drive in the boot order for its boot files; thus Grub is not installed properly, because Grub's boot files are on the sdf drive. To fix it, try the following:
    Code:
    sudo grub
    grub> device (hd0) /dev/sdf
    grub> root (hd0,0)
    grub> setup (hd0)
    grub> quit
    Please post the output of the above commands, go ahead and reboot, and let me know what happens on start up.

  6. #6
    Join Date
    Jun 2006
    Beans
    Hidden!

    Re: 8.10 Install Problem - GRUB Error 2

    Hrm... interesting... Here's the output:

    Code:
    Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
    succeeded
     Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
    /boot/grub/menu.lst"... succeeded
    Done.
    Trying a reboot now!

    -Epibeta.

  7. #7
    Join Date
    Jun 2006
    Beans
    Hidden!

    Re: 8.10 Install Problem - GRUB Error 2

    Yay! That did the trick - I am typing this from my new Intrepid install! You rock! The grub config stuff still seems a little unclear to me but you've given me some cool stuff to read up on. Thank you again so much for your help!

    -Epibeta.

  8. #8
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: 8.10 Install Problem - GRUB Error 2

    That's great news it's working and turned out to be a simple problem to fix. In case you want to read more about Grub, here are some good resources:

    http://www.users.bigpond.net.au/hermanzone/p15.htm
    http://www.gnu.org/software/grub/manual/

    And feel free to ask any questions. Anyway, cheers and have fun.

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
  •