Announcement

Collapse
No announcement yet.

Repairing GRub

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Repairing GRub

    As often the case Grub fails after transferring to another hard disk.

    The install is Debain I've tried there net install CD which allows you to install the Grub loader but but then insists on wanting to format the drives instead.

    Suse Live CD can't see the disk.

    Knoppix live CD won't boot on the machine hanging on the RTC clock.

    Unbunto Live CD hangs after loading X windows. Couldn't see options on start up.

    Any other ideas??
    Chief Lemon Buyer no more Linux sucks but not as much
    Weather nut and sad git.

    My Weather Page

  • #2
    Ask on Linux specific forums? (ubuntuforums are quite helpfull, and with no RTFM attitude...)

    Comment


    • #3
      Originally posted by Nowhere
      Ask on Linux specific forums? (ubuntuforums are quite helpfull, and with no RTFM attitude...)
      Got an answer to RTFM I haven't got one. Posted the same question elsewhere.
      Chief Lemon Buyer no more Linux sucks but not as much
      Weather nut and sad git.

      My Weather Page

      Comment


      • #4
        Really? Hmmm...never had this answer (even if asking things that can be fairly easily found), perhaps try in "beginner" section of the forums under different nick/lie a bit.

        Comment


        • #5
          Would help if the Linux guru at work wasn't away.

          He did pay the author who created the Kiosk a complement. "He's done a good job of locking it down". Problem was I couldn't slow him down long enough to see what he was altering so we could modify it. If he done that I could just re-installed a new copy.
          Chief Lemon Buyer no more Linux sucks but not as much
          Weather nut and sad git.

          My Weather Page

          Comment


          • #6
            Hey PIT.

            Do you know flavor of linux was running on this box? Maybe try using the install boot cd from that version and
            go into it's rescue mode (assuming it has one).

            Another option would be to try the first disk from any Redhat/Fedora/CentOS set? At the boot prompt, enter
            "linux rescue". This will eventually get you down to a console. If it was a Redhat/etc. install, it should find it and
            mount the installation under /mnt/sysimage. If it didn't find any system, then you have to search on the disk. I'd
            personally use fdisk, do a "p" to see the partition table, and then "q" to quit. This will give you an idea of how the
            drive is partitioned. If you can find ext2/3 partitions on the drive, then mount them to /mnt/sysimage. There might be a
            small /boot partition. Make sure you mount the / partition to /mnt/sysimage and them mount the /boot partition to
            /mnt/sysimage/boot. Under redhat, the grub.conf file is located in the /boot directory, so you need to make sure
            it is there or you can't reinstall grub.

            Once you have located your OS and mounted it, then just do a "chroot /mnt/sysimage". This will change the root of
            the system from the linux rescue image to the root of the hard drive OS. Then run "grub-install /dev/xxx" where xxx
            is hda, sda, whatever the main drive is. This will re-read the grub.conf on the hard drive and install the appropriate
            grub boot loader configuration to the hard drive.

            The other live cd's may not have worked because the system might be formatted with some filesystem they don't
            understand (like xfs, reiserfs, reiser4).

            Let me know if you have any other questions.

            - Mike

            Comment


            • #7
              Originally posted by WxDude
              Hey PIT.

              Do you know flavor of linux was running on this box? Maybe try using the install boot cd from that version and go into it's rescue mode (assuming it has one).

              Another option would be to try the first disk from any Redhat/Fedora/CentOS set? At the boot prompt, enter "linux rescue". This will eventually get you down to a console. If it was a Redhat/etc. install, it should find it and mount the installation under /mnt/sysimage. If it didn't find any system, then you have to search on the disk. I'd personally use fdisk, do a "p" to see the partition table, and then "q" to quit. This will give you an idea of how the
              drive is partitioned. If you can find ext2/3 partitions on the drive, then mount them to /mnt/sysimage. There might be a small /boot partition. Make sure you mount the / partition to /mnt/sysimage and them mount the /boot partition to /mnt/sysimage/boot. Under redhat, the grub.conf file is located in the /boot directory, so you need to make sure
              it is there or you can't reinstall grub.

              Once you have located your OS and mounted it, then just do a "chroot /mnt/sysimage". This will change the root of the system from the linux rescue image to the root of the hard drive OS. Then run "grub-install /dev/xxx" where xxx is hda, sda, whatever the main drive is. This will re-read the grub.conf on the hard drive and install the appropriate
              grub boot loader configuration to the hard drive.

              The other live cd's may not have worked because the system might be formatted with some filesystem they don't
              understand (like xfs, reiserfs, reiser4).

              Let me know if you have any other questions.

              - Mike

              Debian is the distro. Hadn't had time to look at the machine today due to other commitments and having to go to the doctors again. Debians net install CD image doesn't have a rescue option. I tried downloading the DVD version today but it crapped out on saving to the desktop.

              So I'll have another go Monday. Hopefully the Linux dude is back and has the CD's. Some Bugger nicked mine and my mates as well.
              Chief Lemon Buyer no more Linux sucks but not as much
              Weather nut and sad git.

              My Weather Page

              Comment


              • #8
                Well, you could try using one of the RedHat/Fedora/CentOS boot cd's (Disc 1) to get access to the system. That
                is what I would try if your linux guy isn't in today.

                Good Luck

                -Mike

                Comment


                • #9
                  Fedora Cd1 did the trick following your instructions. Thanks mate
                  Chief Lemon Buyer no more Linux sucks but not as much
                  Weather nut and sad git.

                  My Weather Page

                  Comment


                  • #10
                    Cool! Glad I could help!

                    -Mike

                    Comment


                    • #11
                      Now I wish I could make this Linux Kiosk move to different hardware. Now that would be really useful.
                      Chief Lemon Buyer no more Linux sucks but not as much
                      Weather nut and sad git.

                      My Weather Page

                      Comment


                      • #12
                        Is there some special piece of hardware it needs that prevents you from moving it? Like a touch screen physically
                        mounted in something?

                        Have you tried putting the hard drive into another computer? It should work. Linux isn't quite as picky about changing
                        hardware out from under it assuming you are using the same basic stuff. It's not too picky about chipset stuff. Biggest
                        thing to worry about would be changing drive interfaces.

                        Before moving it, edit the inittab and have it boot to a command line rather than X. That will take an additional possible
                        problem out of the way before moving it.

                        Feel free to PM or email me with any questions. I'd be glad to help

                        - MIke

                        Comment


                        • #13
                          Originally posted by WxDude
                          Is there some special piece of hardware it needs that prevents you from moving it? Like a touch screen physically
                          mounted in something?

                          Have you tried putting the hard drive into another computer? It should work. Linux isn't quite as picky about changing
                          hardware out from under it assuming you are using the same basic stuff. It's not too picky about chipset stuff. Biggest
                          thing to worry about would be changing drive interfaces.

                          Before moving it, edit the inittab and have it boot to a command line rather than X. That will take an additional possible
                          problem out of the way before moving it.

                          Feel free to PM or email me with any questions. I'd be glad to help

                          - MIke
                          Funny you say it's not picky. I tend to find if you move Linux to different hardware it falls over and dies very rapidly. Worst one is Kernel panic. The other problem if it's unsupported hardware normally you're snookered while with Windows you can normally get buy on standard drivers. Pity Linux doesn't have a sysprep like Windows or does it and no one mentions it.
                          Chief Lemon Buyer no more Linux sucks but not as much
                          Weather nut and sad git.

                          My Weather Page

                          Comment


                          • #14
                            No, It doesn't have sysprep. Probably the best thing you can do is to edit the /etc/modprobe.conf file (or something similar
                            under Debian, which I am not really sure about) to reflect you new hardware, and the regenerate your initrd file in /boot.
                            Then you would have the drivers available for the new hardware. In the Redhat world, they have a tool that detects
                            hardware changes and makes the required updates on bootup.

                            Comment


                            • #15
                              If they've done a "good job of locking it down," then it may not have modules/drivers compiled for any hardware other than the models/chipsets it was originally meant for.

                              Also, anything in modules.conf to give you a hint?

                              Is it "straight off the CD" Debian, or is it "special kiosk-brand Debian?"
                              Gigabyte P35-DS3L with a Q6600, 2GB Kingston HyperX (after *3* bad pairs of Crucial Ballistix 1066), Galaxy 8800GT 512MB, SB X-Fi, some drives, and a Dell 2005fpw. Running WinXP.

                              Comment

                              Working...
                              X