Announcement

Collapse
No announcement yet.

[c] my grub has died!

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

    [c] my grub has died!

    Bootup stops with "GRUB 1.5" (no other info) where the menu should be, goes to black, and reboots the machine...

    i found this online, but i couldn't get any of their suggestions to work.

    it was working just fine earlier today... i don't think i did anything weird to mess it up... but now i can't boot to anything!

    #2
    Re: my grub has died!

    Not much information to work with but let me see (being a noob myself) what to do....
    i think dapper's live cd has a thing you could use to fix the problem .... might try booting from there. Or a floppy or something...

    You might also try to edit Grub's config file from Knoppix (or kubuntu's live cd... but knoppix has more tools  )

    If those don't work, maybe try reinstalling? (i hate to say that, because that's an old windoz habbit, something i like to totally avoid except for major upgrades )

    Hope it helps! (i might be able to help more if you have more specific information like what is in your grub config if possible, what you have to work with, or that kind of stuff....)

    Comment


      #3
      Re: my grub has died!

      no problem... here's my menu.lst 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 change this entry to 'saved' or your
      # array will desync and will not let you boot your system.
      default saved

      ## timeout sec
      # Set a timeout, in SEC seconds, before automatically booting the default entry
      # (normally the first entry defined).
      timeout 5

      ## 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=/dev/hda5 ro

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

      ## 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

      ## altoption boot targets option
      ## multiple altoptions lines are allowed
      ## e.g. altoptions=(extra menu suffix) extra boot options
      ## altoptions=(recovery mode) 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

      ## ## End Default Options ##

      title win_xp-sp2
      root (hd0,0)
      savedefault
      makeactive
      chainloader +1

      title lin_2.6.15-25-386
      root (hd0,4)
      kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hda5 ro quiet splash
      initrd /boot/initrd.img-2.6.15-25-386
      savedefault
      boot

      title Ubuntu, kernel 2.6.15-25-386 (recovery mode)
      root (hd0,4)
      kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hda5 ro single
      initrd /boot/initrd.img-2.6.15-25-386
      boot

      #title Ubuntu, kernel 2.6.15-23-386
      #root (hd0,4)
      #kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda5 ro quiet splash
      #initrd /boot/initrd.img-2.6.15-23-386
      #savedefault
      #boot

      #title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
      #root (hd0,4)
      #kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda5 ro single
      #initrd /boot/initrd.img-2.6.15-23-386
      #boot

      #title Ubuntu, memtest86+
      #root (hd0,4)
      #kernel /boot/memtest86+.bin
      #boot

      ### 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



      and here's what happens when i try to use grub-install:





      ubuntu@ubuntu:~$ sudo mkdir /media/lin
      ubuntu@ubuntu:~$ sudo mount /dev/hda5 /media/lin
      ubuntu@ubuntu:~$ grub-install /media/lin
      ubuntu@ubuntu:~$ sudo grub-install /media/lin
      Probing devices to guess BIOS drives. This may take a long time.
      Format of install_device not recognized.
      Usage: grub-install [OPTION] install_device
      Install GRUB on your drive.

      -h, --help print this message and exit
      -v, --version print the version information and exit
      --root-directory=DIR install GRUB images under the directory DIR
      instead of the root directory
      --grub-shell=FILE use FILE as the grub shell
      --no-floppy do not probe any floppy drive
      --force-lba force GRUB to use LBA mode even for a buggy
      BIOS
      --recheck probe a device map even if it already exists

      INSTALL_DEVICE can be a GRUB device name or a system device filename.

      grub-install copies GRUB images into the DIR/boot directory specfied by
      --root-directory, and uses the grub shell to install grub into the boot
      sector.


      Report bugs to <bug-grub at gnu . org>.
      ubuntu@ubuntu:~$

      ####################################

      i don't understand why grub-install isn't working... should i mount the partition with different options?

      Comment


        #4
        Re: my grub has died!

        The exact same thing happened to me two weeks ago. Not sure the exact cause, but I admit it was right after I impatiently pulled the plug on the system when it didn't shut down in a timely fashion ;-).

        I downloaded a Gentoo stage to a spare partition I had, chrooted to it, and ran "grub-install hd0" all from an ol' Gentoo livecd I had in a drawer.

        I would assume it's complaining because you're giving it a mount point, not a grub-format device designator (hd0).

        SigmaX

        Comment


          #5
          Re: my grub has died!

          Originally posted by SigmaX
          I would assume it's complaining because you're giving it a mount point, not a grub-format device designator (hd0).

          SigmaX
          that's about the ontly thing i saw...
          Instead of /dev/hda5, try (hd0,5)
          or was it (hd0,4) ... don't remember if it starts on 0 and /dev starts on 1 or what :-) anyway you get the idea.

          Comment


            #6
            Re: my grub has died!

            yeah -- i think it may have happened after my laptop ran out of battery.

            so let me get this right:

            i download a kubuntu stage to my thumb drive, put that thumb drive into my laptop, copy the file to the grub folder, chroot to that folder, and do a sudo grub-install (hd0,5)?

            Comment


              #7
              Re: my grub has died!


              ubuntu@ubuntu:~$ sudo grub-install hd0,5
              Probing devices to guess BIOS drives. This may take a long time.
              Could not find device for /boot: Not found or not a block device.
              ubuntu@ubuntu:~$


              and how on earth do i download a kubuntu stage?

              Comment


                #8
                Re: [c] my grub has died!

                # here's my partition table, according to qtparted:
                http://www.glenmo.com/images/snapshot1.png

                # if i just boot to the dvd, and sudo grub, it sees my partitions and i can choose the one to install to:

                grub> root (hd0,
                Possible partitions are:
                   Partition num: 0,  Filesystem type unknown, partition type 0x7
                   Partition num: 1,  Filesystem type is fat, partition type 0xc
                   Partition num: 2,  Filesystem type is ext2fs, partition type 0x83
                   Partition num: 4,  Filesystem type is ext2fs, partition type 0x83
                   Partition num: 5,  Filesystem type unknown, partition type 0x82

                grub> root (hd0,2)
                Filesystem type is ext2fs, partition type 0x83

                grub>


                # if i chroot to /media/lin, then run grub, it won't find my drives: 

                grub> root (hd0,2)

                Error 21: Selected disk does not exist

                grub>


                # then after chrooting, i can exit chroot and try to run grub, and root (hd0,2) it only sees hd0,0 which it thinks is a fat partition...

                # after a reboot, i can do a sudo grub, and we can get a little farther:

                grub> root (hd0,
                Possible partitions are:
                   Partition num: 0,  Filesystem type unknown, partition type 0x7
                   Partition num: 1,  Filesystem type is fat, partition type 0xc
                   Partition num: 2,  Filesystem type is ext2fs, partition type 0x83
                   Partition num: 4,  Filesystem type is ext2fs, partition type 0x83
                   Partition num: 5,  Filesystem type unknown, partition type 0x82

                grub> root (hd0,2)
                Filesystem type is ext2fs, partition type 0x83

                grub> setup hd
                Error 11: Unrecognized device string

                grub> setup (hd
                Possible disks are:  hd0 hd1

                grub> setup (hd0)
                Checking if "/boot/grub/stage1" exists... no
                Checking if "/grub/stage1" exists... no

                Error 15: File not found

                grub>                           

                # but it dies at the setup, which kinda makes sense, as there really is no hd0 -- they're all hd0,[some number, 2 is the one that has the boot folder)
                # so i try setup (hd0,2):

                grub> setup (hd0,2)
                Checking if "/boot/grub/stage1" exists... no
                Checking if "/grub/stage1" exists... no

                Error 15: File not found

                grub>                           



                # i'm really at my wit's end...

                Comment


                  #9
                  Re: [c] my grub has died!

                  First, I'm assuming that you've mounted /dev/hda5 as read-write (sudo mount -o dev,rw /mnt/hda5).

                  If so, then try this command:

                  sudo chroot /mnt/hda5 grub-install /dev/hda

                  I think that should work to put grub on /dev/hda5. If hda5 isn't writeable, then mount it that way before doing the install.

                  Comment


                    #10
                    Re: [c] my grub has died!

                    ubuntu@ubuntu:~$ sudo mkdir /media/lin

                    ubuntu@ubuntu:~$ sudo mount -o dev,rw /dev/hda5 /media/lin

                    ubuntu@ubuntu:~$ sudo chroot /media/lin grub-install /dev/hda

                    /dev/hda: Not found or not a block device.
                    ubuntu@ubuntu:~$

                    that's not working for me... what am i doing wrong?

                    Comment


                      #11
                      Re: [c] my grub has died!

                      Now it's not working because you are still trying to make /media/lin your root directory and you can't do that. You're going to have to install grub to your /dev/hda? (in your case, I assume hda5 because that's where your Linux root sits). That's why in my previous post I showed the chroot command as putting you into that directory.

                      Comment


                        #12
                        Re: [c] my grub has died!

                        well... i popped in my hiren's boot disk and checked it out with various tools 'cause i started to figure it was some kind of hardware problem...

                        long story short, i'm just gonna wipe it and start over.

                        any ideas on what could have caused this to happen?

                        Comment


                          #13
                          Re: [c] my grub has died!

                          Hi I had a something like this happen but had no access to any drives although they showed up in BIOS ok even if I tried to boot from CD all I got was a grub error? I found the answer was to unplug mains press the boot button(to discharge the cmos) replace mains lead and boot enter BIOS and set system defaults and everything worked. I can offer no logic for how this could happen or why this should have cleared it up.

                          Regards John.

                          Comment


                            #14
                            Re-installing grub

                            In this example the first partition on the drive is windows, 2nd /boot, 3rd swap and 4th / (root)
                            Prefixing commands with sudo when working on a system level repair is counter productive in my eyes, so if you are not root then run
                            Code:
                            sudo su
                            or equivalent.

                            Boot the livecd of your choice.
                            Make the root drive directory
                            Code:
                            mkdir /media/ubuntu
                            make the boot dir
                            Code:
                            mkdir /media/ubuntu/boot
                            mount the root drive and boot drive
                            Code:
                            mount /dev/hda5 /media/ubuntu
                            mount /dev/hda2 /media/ubuntu/boot
                            Bind mount /dev so grub can find the drives when chrooted, and mount the /proc filesystem
                            Code:
                            mount -o bind /dev /media/ubuntu/dev
                            mount -t proc none /media/ubuntu/proc
                            Chroot...
                            Code:
                            chroot /media/ubuntu /bin/bash
                            Run grub (I have no floppy drive and the --no-floppy option stops it taking ages to run)DO NOT use grub-install as this needs /etc/mtab to work, and doing it by hand is good practice for when it REALLY goes wrong.
                            Code:
                            grub --no-floppy
                            You are now in the grub console.
                            Set where your /boot partiton is, install grub to the drives MBR, and exit
                            Code:
                             grub> root (hd0,1)
                            grub> setup (hd0)
                            grub> quit
                            If you do have a floppy then
                            Code:
                            grub> setup (fd0)
                            before quitting will make a floppy boot loader, along with some other steps, for the next time the MBR gets f*****.

                            Comment

                            Working...
                            X