Announcement

Collapse
No announcement yet.

grub install failure

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

    grub install failure

    Hi all,
    I've been trying out kubuntu 7.04 from the live cd for a few days and decided to install it with a view to moving over from my current linux system. I tried to install through the icon on the livecd desktop and everything seemed to go well until the end, when I got a message like "grub_install (hd0) failed. This is a fatal error". I understand it's trying to write the master boot record.

    I'm installing kubuntu on hda. My current system is on hdb and boots from there. I can use my current system to look at hda and kubuntu looks to have installed (lots of files and folders in the root partition - 2Gb used) and in /boot there looks to have been some stuff installed but not everything.

    -
    # ls -l /boot
    total 13987
    -rw-r--r-- 1 root root 414210 2007-04-15 10:07 abi-2.6.20-15-generic
    -rw-r--r-- 1 root root 83234 2007-04-15 07:33 config-2.6.20-15-generic
    -rw-r--r-- 1 root root 4186112 2007-07-08 17:21 initrd.img-2.6.20-15-generic
    -rw-r--r-- 1 root root 6911184 2007-04-17 07:25 initrd.img-2.6.20-15-generic.bak
    drwx------ 2 root root 12288 2007-07-08 17:09 lost+found
    -rw-r--r-- 1 root root 94600 2006-10-20 13:44 memtest86+.bin
    -rw-r--r-- 1 root root 806942 2007-04-15 10:08 System.map-2.6.20-15-generic
    -rw-r--r-- 1 root root 1745100 2007-04-15 10:07 vmlinuz-2.6.20-15-generic
    -

    So the question is, am I in a state where I could boot kubuntu on hda my adding a menu item under /boot/grub/menu.lst in my working linux system on hdb? If so, what exactly should I add? If not, what can I do from here to get things working?

    [I'd like to keep both OSs working for the time being - I'm not worried about which disk they boot from as long as I still have the option of which one to boot]

    Thanks in advance.

    #2
    Re: grub install failure

    You may try to add an entry similar to the following (to be adapted to your system):

    Code:
    title  Kubuntu 06.10 [Kernel 2.6.17-11]
    root   (hd0,1)
    kernel  /boot/vmlinuz-2.6.17-11-generic root=/dev/sda2 ro quiet splash
    initrd  /boot/initrd.img-2.6.17-11-generic

    Comment


      #3
      Re: grub install failure

      First off, Yes, I think you can add a boot entry to your current menu.lst on hdb that will boot your Kubuntu that is on hda.

      This How-To tells you how to access/edit menu.lst and how to do whatever you wish to do with grub (like re-installing it, setting it up wherever you want it, etc.). (I realize you may already know all that stuff, but just to be sure, I’ve included this reference for you.)

      How To GRUB Methods - Toolkit
      http://kubuntuforums.net/forums/inde...opic=3081671.0


      To modify your /boot/grub/menu.lst on hdb, you need to know how GRUB sees your hda. Does it see hda as (hd0) or (hd1)? To find out,

      Get into Linux or a Live Kubuntu CD
      K-Menu > System > Konsole Terminal Program (ie, get a terminal to type commands into)
      Type sudo grub # and press Enter
      That gives you a GRUB prompt, grub>
      Now use the geometry command (see the How-To) to explore your hard drives, like:
      grub> geometry (hd0)
      See what that gives you – which drive is (hd0)? Do this for (hd1), also.
      (There are 512 bytes in one sector, and geometry gives you #sectors, so you can often tell which drive it is by its size, and so on.)

      So, the location of Kubuntu on hda is (hdx, y) and you must know what x and y are (for the root command in your menu.lst on hdb)
      Ex.: if hda is (hd1) and if you put Kubuntu on the first partition there, that would be (hd1, 0).
      (In GRUB, counting of drives x and of partitions y starts from zero.)
      One more thing: In your new Kubuntu on hda, look under /boot/grub. There should be a file called menu.lst there. If so, find the boot entry for this new Kubuntu (look after the *** Begin Automagic Kernels List line). That boot entry (those lines similar to what UnicornRider showed you) is what you need to put in your menu.lst in hdb, but as I say, check to be sure about the (hdx, y) that describes the root of Kubuntu on hda.

      The way you describe it, sounds like your BIOS is set to boot from hdb, which is OK, and as you imply, that can be changed. The MBR where GRUB is installed can also be easily changed (see the How-To).
      (Just curious, are both your hard drives SATA, or are both IDE, or are they mixed up?)
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        Re: grub install failure

        and, of course, you want to be sure that your CD was ok, right? The checksum and the "Check CD" option on the install menu?
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: grub install failure

          Thanks for the replies, both of you. I guess I'm a long time unix/linux user, so I don't mind playing around, but I don't really know how anything works.

          I've tried the grub shell like you advised and I can see that my hda is hd0 to grub. Both my disks are IDE.

          I've tried playing with /boot/grub/menu.lst on hdb. I got a few 'Error 15: file not found', but in the end this got me past that: (my /boot partition is hda1 and / partition hda2)

          -
          title Kubuntu 07.04
          root (hd0,0)
          kernel /vmlinuz-2.6.20-15-generic root=/dev/hda2
          initrd /initrd.img-2.6.20-15-generic
          -

          I now get a few screenfulls of diagnostics ending with:

          -
          Freeing unused kernel memory
          Loading, please wait
          Time: tsc clocksource has been installed
          Kernel panic - not syncing: Attempted to kill init!
          -

          I don't know, but it looks pretty nasty.

          In the beginning, I download the CD iso, burned it and booted it. As I recall the checksums were ok after download and burning, and the live CD was running ok.

          /boot/grub/ on hda doesn't exist - it failed before it got to that I guess.

          Do you guys reckon this is a grub problem or did something else in the installation go badly? Any ideas how I can get round the original error if I try to reinstall?

          Thanks again.

          Comment


            #6
            Re: grub install failure

            Originally posted by Don_B
            kernel /vmlinuz-2.6.20-15-generic root=/dev/hda2
            kernel /boot/vmlinuz-2.6.20-15-generic root=/dev/hda2 ro

            Originally posted by Don_B
            initrd /initrd.img-2.6.20-15-generic
            initrd /boot/initrd.img-2.6.20-15-generic

            --
            Furthermore, pointing at (hd0,0) (read: /dev/hda1) and /dev/hda2 at the same time does not really make sense :P

            (Refererence: GRUB intro)

            Comment


              #7
              Re: grub install failure

              Sorry, I thought it did. Having /boot in my paths resulted in "file not found". If (hd0,0) is the partition that gets mounted on /boot, I don't understand how it can know that it's /boot until it's booted.

              /dev/hda2 is the root partition for the kubuntu OS. Should the kernel line be pointing at the boot partition? Or should my 'root' line be pointing at the / partition and not the /boot partition?

              I didn't think it could be so wrong. If it wasn't trying to boot the kernel, how did the kernel panic?

              Comment


                #8
                Re: grub install failure

                Ok, I can't count. It should say /dev/hda3 not /dev/hda2 for the root partition, but I still get the kernel panic.

                Comment


                  #9
                  Re: grub install failure

                  “/boot/grub/ on hda doesn't exist - it failed before it got to that I guess.”

                  That is bothersome. Maybe you should re-install. I must say, now I’m confused.
                  A so-called /boot partition should contain the /boot and the /boot/grub files; it need not contain the root (/) files of the OS. The GRUB root statement, (root (hdx, y)) should point to that /boot partition. The kernel line should point to the place where the OS kernel is (/).

                  I would re-install since it looks like something is broken anyway.
                  Before you do, though, you must decide where you will have the Kubuntu installer put GRUB – in the MBR of which drive? Or, will you put it in the root partition of the 7.04 OS? It’s a choice.
                  If you put 7.04 in (hd0, 0), and put GRUB in the MBR (hd0), then your new OS /boot/grub/menu.lst will be the controlling boot menu when you turn on the PC. If you want the old Linux to control this boot menu, then just put GRUB in (hd0,0) along with your root files (it can always be installed in any MBR later, easily, using that How-To).

                  If you use the regular Live Desktop CD installer, choose the Manual partitioning method, work down through Step 6 (of 6 steps), and look for the Advanced button at the lower right (of Step 6).
                  Click that button – behind it is the place for you to specify where to install GRUB, either in (hd0) (ie, the MBR of the same hard drive where 7.04 is), or in (hd0, 0), as explained above.

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

                  Comment


                    #10
                    Re: grub install failure

                    Originally posted by Don_B
                    I didn't think it could be so wrong.
                    Maybe you should learn how to boot manually to understand better about the way the boot loader works.

                    Comment


                      #11
                      Re: grub install failure

                      Ok, I will next time.

                      I reckon I've got the solution. It's simple and I'm sorry to say I should have thought of it sooner. My boot partition isn't big enough. 16 Mb was big enough for my previous linuxes, but not this time. I'll try installing again tonight or tomorrow. It'll probably be ok.

                      Thanks for the help. Sorry it wasn't a more interesting thread.

                      Comment

                      Working...
                      X