Announcement

Collapse
No announcement yet.

SOLVED Can't Get Grub To Work Error 21

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SOLVED Can't Get Grub To Work Error 21

    Hey Everyone,

    Ok so I reinstalled HH last night and now I cannot get Grub to boot either of my OS's (Vista, Kubuntu HH) The error that if keeps giving me is Error 21 Specified Disk does not exist. I have read through many google results talking about the bios and I've tried all of those suggestions. Prior to my reinstall everything was working great so I am not sure what happened. Right now I'm using the live cd but man would it be great to get back into Kubuntu. I'm not giving up on this as I am sure that there is a way to fix this. Thanks everyone for your help in advance. I am a newbie but I do understand most command line commands but I'm a little hesitant to try figuring grub out on my own.

    Here is the output of my grub config file

    # 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 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=60caa850-324f-4896-990a-d9fad8d798fc ro

    ## Setup crashdump menu entries
    ## e.g. crashdump=1
    # crashdump=0

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd4,1)

    ## 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.04, kernel 2.6.24-16-generic
    root (hd4,1)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=60caa850-324f-4896-990a-d9fad8d798fc ro quiet splash
    initrd /boot/initrd.img-2.6.24-16-generic
    quiet

    title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
    root (hd4,1)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=60caa850-324f-4896-990a-d9fad8d798fc ro single
    initrd /boot/initrd.img-2.6.24-16-generic

    title Ubuntu 8.04, memtest86+
    root (hd4,1)
    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/sde1
    title Windows Vista/Longhorn (loader)
    root (hd4,0)
    savedefault
    makeactive
    map (hd0) (hd4)
    map (hd4) (hd0)
    chainloader +1

    Kubuntu II on both Laptop and Desktop and some servers here at the office

    #2
    Re: Can't Get Grub To Work Error 21

    Looks like you have at least 5 hard drives?

    From the live CD, you can see the drives by running at Konsole
    sudo fdisk -lu
    and post it here.

    While you are there, also try this:

    sudo grub
    grub> find /boot/grub/stage1
    and post that here.

    Your menu.lst is referring to some (hdx,y) where the hdx "does not exist."


    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: Can't Get Grub To Work Error 21

      I guess I have a total of 6 hard drives 4 of them are on a soft raid via SATA the other two are on IDE on is 30GB with 2 partition one for home the other for swap the other is a 74GB with two partitions one for Vista the other one for Kubuntu

      output from fdisk

      Disk /dev/sda: 160.0 GB, 160041885696 bytes
      255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Disk identifier: 0x48814880

      Device Boot Start End Blocks Id System
      /dev/sda1 * 63 937730114 468865026 7 HPFS/NTFS

      Disk /dev/sdb: 160.0 GB, 160041885696 bytes
      255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Disk identifier: 0x00000000

      Disk /dev/sdb doesn't contain a valid partition table

      Disk /dev/sdc: 160.0 GB, 160041885696 bytes
      255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Disk identifier: 0x00000000

      Disk /dev/sdc doesn't contain a valid partition table

      Disk /dev/sdd: 160.0 GB, 160041885696 bytes
      255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Disk identifier: 0x48814880

      Device Boot Start End Blocks Id System
      /dev/sdd1 63 937730114 468865026 7 HPFS/NTFS

      Disk /dev/sde: 80.0 GB, 80026361856 bytes
      255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Disk identifier: 0xfb81fb81

      Device Boot Start End Blocks Id System
      /dev/sde1 * 2048 81922047 40960000 7 HPFS/NTFS
      /dev/sde2 81931500 156296384 37182442+ 83 Linux

      Disk /dev/sdf: 30.0 GB, 30020272128 bytes
      255 heads, 63 sectors/track, 3649 cylinders, total 58633344 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Disk identifier: 0x9dc96e9e

      Device Boot Start End Blocks Id System
      /dev/sdf1 63 50781464 25390701 83 Linux
      /dev/sdf2 50781465 58621184 3919860 82 Linux swap / Solaris
      the 160GB drives is my raid

      Output from Grub

      (hd4,1)

      Thanks for your help
      Kubuntu II on both Laptop and Desktop and some servers here at the office

      Comment


        #4
        Re: Can't Get Grub To Work Error 21

        Well, raid, SATA mixed with IDE ... issues of hard disk controllers ... issue of “How does BIOS & GRUB see the drives (which is hd0? which is hd1? Etc.)” ...
        sounds like the worst case we see here in terms of complications.


        Menu.lst contains two device references
        Kubuntu:
        root (hd4,1)
        and
        Vista:
        root (hd4,0)
        btw, a side note: to be safe, maybe the Vista should be
        rootnoverify (hd4,0)


        Rather than try to reason this out (where many before you have failed!), you can guess at it. What you need, simply, is the correct (hdx,0) and (hdx,1) device references, and there are only six to guess from:
        hd0, hd1, hd2, hd3., hd4, hd5.


        When you re-boot and see the GRUB boot menu, notice that you can hit the “e” key to edit.
        Then highlight the root line, and hit “e,” change the root statement, hit Enter to accept the edit, hit “b” to boot using the edited root statement. The edit is only temporary. If you find something that works (for root (hdx,0) & (hdx,1)), you'll have to permanently edit menu.lst to reflect the final edits.

        EDIT added: If your guess fails, you should be able to try another guess, again by highlighting Kubuntu or Vista and hitting "e" and repeat the experiment with another hdx in the root statement.

        A note here:

        What drive is BIOS set to boot from? Whatever drive it is, THAT drive is seen by BIOS and by GRUB as hd0 * when the machine actually boots from that drive * .
        If your BIOS is set to boot from the Kubuntu drive, then you need root (hd0,0) for Vista and root (hd0,1) for Kubuntu (--normally, speaking. With raid & all, who knows for certain).



        Later: to edit menu.lst, in case you need it but it sounds like you know this stuff:
        How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...opic=3081671.0
        Reply #1:
        --- HOW To: Change the Default Operating System (Also: Changing the timeout, boot menu, and other tips) Reply #1

        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          SOLVED Can't Get Grub To Work Error 21

          Thanks for the help editing the menu.lst and changing the HD to hd 0,1 did the trick.
          Kubuntu II on both Laptop and Desktop and some servers here at the office

          Comment


            #6
            Re: SOLVED Can't Get Grub To Work Error 21

            Good work.

            And, as you probably realize, Vista will be affected:
            rootnoverify (hd0,0)
            and you won't need the map commands:

            title Windows Vista/Longhorn (loader)
            rootnoverify (hd0,0)
            savedefault
            makeactive
            chainloader +1


            Again, good job and glad you got this.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment

            Working...
            X