Announcement

Collapse
No announcement yet.

Misplaced Kernel? Boot from GRUB?

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

    Misplaced Kernel? Boot from GRUB?

    Hi All,
    I am exceptionally new to Kubuntu so any help that you can offer will be greatly appreciated. That said, here is my problem.
    In the course of trying to restore my sound and mic capabilites--I got caught in an update that wiped out both of those--I somehow managed to erase or misplace my kernel. At least, I think that is what I did. I was following instructions I found on an Ubuntu thread that said to revert to an older kernel to restore the sound and mic. However, after completing the instructions and rebooting, all I get now is

    grub>

    Simply that and nothing more. I can boot from a CD and can see my hard drive, though I have been unable to back up my data.

    My hope is that there is some way to restore the kernel/grub without losing any of the data or having to reinstall all of my programs. Any help/suggestions that you can offer will be greatly appreciated

    #2
    Re: Misplaced Kernel? Boot from GRUB?

    Well, first, we need to know what version of Kubuntu your are running, and whether it was a "new" install or an upgrade. Why? We need to know what version of Grub you are using.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Misplaced Kernel? Boot from GRUB?

      Hard telling what happened.
      If this is exactly what you see:
      grub>
      then it looks like GRUB legacy, and this applies:
      -- How To GRUB Methods - Toolkit
      http://kubuntuforums.net/forums/inde...opic=3081671.0

      Do you know what partition Kubuntu is on? If only Kubuntu is on the boot-drive disk, it is probably the first partition: (hd0,0). (The how-to explains this notation.) If Kubuntu is on the 2nd partition of the boot-drive, then it is on (hd0,1).
      The geometry command may help:
      grub>geometry (hd<Press the TAB key now>
      (do not type the < or the >)
      You can explore your drives:
      grub>geometry (hd0,0)
      grub>geometry (hd0,1)
      etc.
      Find the Kubuntu partition.
      Say it is (hdx,y).
      Then:

      grub>
      grub>root (hdx,y)
      grub>configfile /boot/grub/menu.lst

      That should show you a boot menu of kernels.
      Try one.
      (If you do NOT see such a boot menu, then maybe it is destroyed.)

      If you get into your Kubuntu that way, try to generate a new menu.lst:
      Konsole
      sudo update-grub

      Do you see a good
      /boot/grub/menu.lst
      file?

      Or, better yet, follow the how-to to "re-install GRUB" (root--setup--quit).


      Another idea:
      If you can boot into your Kubuntu, download and burn a Super Grub Disk CD, then use that to Fix Boot of GNU/LINUX (or to boot into your Kubuntu).

      http://developer.berlios.de/project/...group_id=10921
      Cdrom
      0.97992009-10-05 00:00
      super_grub_disk_0.9799.iso

      Whatever happens, you should NOT lose any of your data: you can use a Live Kubuntu CD to rescue it and copy it to a flash drive or another hard drive or a CD.
      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: Misplaced Kernel? Boot from GRUB?

        Originally posted by ahmarras
        Hi All,
        I am exceptionally new to Kubuntu so any help that you can offer will be greatly appreciated. That said, here is my problem.
        In the course of trying to restore my sound and mic capabilites--I got caught in an update that wiped out both of those--I somehow managed to erase or misplace my kernel. At least, I think that is what I did. I was following instructions I found on an Ubuntu thread that said to revert to an older kernel to restore the sound and mic. However, after completing the instructions and rebooting, all I get now is

        grub>

        Simply that and nothing more. I can boot from a CD and can see my hard drive, though I have been unable to back up my data.

        My hope is that there is some way to restore the kernel/grub without losing any of the data or having to reinstall all of my programs. Any help/suggestions that you can offer will be greatly appreciated
        Are you using Wubi and Grub 2? If so go to this url https://bugs.launchpad.net/ubuntu/+s...in/+bug/477169
        the fix is found in comment #160.

        Comment


          #5
          Re: Misplaced Kernel? Boot from GRUB?

          I think that the system is ok and kubuntu is still running and functional and works perfects but the problem u got is that when u took of the kernel the grub now cant boot (the grub is the loader of the OS so if the grub cant find ur OS u cant start ur OS u understand me?) so the prob that u got is this one in simple words...

          In the grub there are some directions that say were the OS is located saying for example: ''Kubuntu 9.10 karmic Koala kernel 2.15.31 '' or whatever other direction u got, but when u removed that kernel or changed it or whatever that direction is still without being changed so the prob is that the grub is referring to an inexistent location.

          Ur only prob is that u need to find what is the new location of the OS and change it in the menu.lst of the grub.

          Here this might be usefull for ya...http://kubuntuforums.net/forums/inde...opic=3081671.0 if u need help with the grub tell me ok.


          Well and that s my opinion about whats ur prob but im not sure 100% worth it of giving it a try.

          Comment


            #6
            Re: Misplaced Kernel? Boot from GRUB?

            Originally posted by Qqmike
            Hard telling what happened.
            If this is exactly what you see:
            grub>
            then it looks like GRUB legacy, and this applies:
            -- How To GRUB Methods - Toolkit
            http://kubuntuforums.net/forums/inde...opic=3081671.0

            Do you know what partition Kubuntu is on? If only Kubuntu is on the boot-drive disk, it is probably the first partition: (hd0,0). (The how-to explains this notation.) If Kubuntu is on the 2nd partition of the boot-drive, then it is on (hd0,1).
            The geometry command may help:
            grub>geometry (hd<Press the TAB key now>
            (do not type the < or the >)
            You can explore your drives:
            grub>geometry (hd0,0)
            grub>geometry (hd0,1)
            etc.
            Find the Kubuntu partition.
            Say it is (hdx,y).
            Then:

            grub>
            grub>root (hdx,y)
            grub>configfile /boot/grub/menu.lst

            That should show you a boot menu of kernels.
            Try one.
            (If you do NOT see such a boot menu, then maybe it is destroyed.)

            If you get into your Kubuntu that way, try to generate a new menu.lst:
            Konsole
            sudo update-grub

            Do you see a good
            /boot/grub/menu.lst
            file?

            Or, better yet, follow the how-to to "re-install GRUB" (root--setup--quit).


            Another idea:
            If you can boot into your Kubuntu, download and burn a Super Grub Disk CD, then use that to Fix Boot of GNU/LINUX (or to boot into your Kubuntu).

            http://developer.berlios.de/project/...group_id=10921
            Cdrom
            0.97992009-10-05 00:00
            super_grub_disk_0.9799.iso

            Whatever happens, you should NOT lose any of your data: you can use a Live Kubuntu CD to rescue it and copy it to a flash drive or another hard drive or a CD.

            Oh i didnt saw Qqmike post!!! yeah now im sure of what i was thinking cause he just said it, better to listen to him on ur prob he's pretty good at grub probs he helped me at mine .............Cheers Qqmike!!!

            Comment


              #7
              Re: Misplaced Kernel? Boot from GRUB?

              Originally posted by Qqmike
              Hard telling what happened.
              If this is exactly what you see:
              grub>
              then it looks like GRUB legacy, and this applies:
              -- How To GRUB Methods - Toolkit
              http://kubuntuforums.net/forums/inde...opic=3081671.0

              Do you know what partition Kubuntu is on? If only Kubuntu is on the boot-drive disk, it is probably the first partition: (hd0,0). (The how-to explains this notation.) If Kubuntu is on the 2nd partition of the boot-drive, then it is on (hd0,1).
              The geometry command may help:
              grub>geometry (hd<Press the TAB key now>
              (do not type the < or the >)
              You can explore your drives:
              grub>geometry (hd0,0)
              grub>geometry (hd0,1)
              etc.
              Find the Kubuntu partition.

              I found the Kubuntu partition using the command find /boot/grub/stage1
              It returned (hd0,0)

              (This seems logical to me because I only have Kubuntu on my computer and when I first turn the computer on it says GRUB loading stage 1.5) before it gives me a message stating that "Minimal BASH-like line editing is supported. For first word, TAB lists possible completions of devices/filenames" and the command line grub>


              Say it is (hdx,y).
              Then:

              grub>
              grub>root (hdx,y)
              grub>configfile /boot/grub/menu.lst

              That should show you a boot menu of kernels.
              Try one.
              (If you do NOT see such a boot menu, then maybe it is destroyed.)

              When I tried this, I got an Error 15

              If you get into your Kubuntu that way, try to generate a new menu.lst:
              Konsole
              sudo update-grub

              Do you see a good
              /boot/grub/menu.lst
              file?

              I assume the aforementioned two items are a moot point because I get the Error 15 message, correct?

              Or, better yet, follow the how-to to "re-install GRUB" (root--setup--quit).

              With regard to this, if I understand this correctly--which I can't guarantee--I should use the live CD to
              1) get to the get to the grub,
              2) Type root (hd0,0) Since this is my hard drive
              3) Type setup (hd0,0)
              4) Type quit
              5) Type reboot

              Am I understanding that correctly?


              Another idea:
              If you can boot into your Kubuntu, download and burn a Super Grub Disk CD, then use that to Fix Boot of GNU/LINUX (or to boot into your Kubuntu).

              http://developer.berlios.de/project/...group_id=10921
              Cdrom
              0.97992009-10-05 00:00
              super_grub_disk_0.9799.iso

              Whatever happens, you should NOT lose any of your data: you can use a Live Kubuntu CD to rescue it and copy it to a flash drive or another hard drive or a CD.

              Also, with regard to my data, I have booted from the Live CD and can see my Hard Drive, but when I try to transfer the data, all the actually is transferred to my external drive are empty folders. They are labeled appropriately, but they do not contain the information. Yet, I know the information is there because I can see it on my computer's internal drive (e.g. my pictures folder still contains my pictures--I can see them, yet only the empty pictures folder is copied to the external hard drive.) [I am using the copy/paste capability to copy to the external hard drive. Is there a better method to use?]

              Thank you again for all your help and patience!!

              Comment


                #8
                Re: Misplaced Kernel? Boot from GRUB?

                It would be

                grub>root (hd0,0)
                grub>setup (hd0)
                grub>quit

                and reboot to test it.

                I'm concerned about your Error 15--can't find the menu.lst.

                Try this first.
                Another option is to use Super GRUB Disk Live CD to Fix Boot of GNU/Linux (see my post above).

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

                Comment


                  #9
                  Re: Misplaced Kernel? Boot from GRUB?

                  Originally posted by Qqmike
                  It would be

                  grub>root (hd0,0)
                  grub>setup (hd0)
                  grub>quit

                  and reboot to test it.

                  I'm concerned about your Error 15--can't find the menu.lst.
                  So if you're concerned, how concerned should I be about this?

                  Try this first.
                  Another option is to use Super GRUB Disk Live CD to Fix Boot of GNU/Linux (see my post above).

                  I've burned the Super GRUB CD just as you suggested, is there anything special that I should--or more importantly, should NOT--do? My apologies for my ignorance, but I want to be sure that all my ducks are in a row.

                  Right now as I see it, I boot the computer from the Super Grub CD and then follow whatever instructions pop up. Correct? Or do I use the commands that you typed at the beginning of this post? Again, I apologize for requiring such specific details/instructions!


                  Thank you SO much!

                  Comment


                    #10
                    Re: Misplaced Kernel? Boot from GRUB?

                    Did you try those commands at a live Kubuntu CD -- at Konsole?

                    sudo grub
                    then the commands (above)

                    (The Error 15 may vanish if you get a good "re-install" of GRUB. It just means your GRUB is damaged--maybe that file got erased.)

                    SGD:
                    Yes, read any instructions you see. But the part you'll want is GNU/Linux > Fix Boot.

                    But try those commands first, from a Live Kubuntu CD.
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      Re: Misplaced Kernel? Boot from GRUB?

                      Originally posted by Qqmike
                      Did you try those commands at a live Kubuntu CD -- at Konsole?

                      sudo grub
                      then the commands (above)
                      When I tried that I get a message stating that: "The program 'grub' is not currently installed. You can install it by typing
                      sudo apt-get install grub"

                      This there anything that I should be on the look-out for if I type that command? Does thsi affect my data in any way? Thank you again!!


                      (The Error 15 may vanish if you get a good "re-install" of GRUB. It just means your GRUB is damaged--maybe that file got erased.)

                      SGD:
                      Yes, read any instructions you see. But the part you'll want is GNU/Linux > Fix Boot.

                      But try those commands first, from a Live Kubuntu CD.

                      Comment


                        #12
                        Re: Misplaced Kernel? Boot from GRUB?

                        It's safe to install GRUB that way.
                        As you said in your first post, various things got deleted! I hope that ONLY GRUB got affected, but who knows. It is safe to investigate this and see if fixing GRUB will fix "the problem."
                        So
                        sudo apt-get install grub
                        then do the rest.

                        You ARE working in a Live Kubuntu Cd, right?
                        Strange that GRUB is not already installed there (in the live CD session).
                        Oh well, keep continuing.
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #13
                          Re: Misplaced Kernel? Boot from GRUB?

                          Originally posted by Qqmike
                          It's safe to install GRUB that way.
                          As you said in your first post, various things got deleted! I hope that ONLY GRUB got affected, but who knows. It is safe to investigate this and see if fixing GRUB will fix "the problem."
                          So
                          sudo apt-get install grub
                          then do the rest.
                          Ok, so when I booted from the Kubuntu CD, I went to the terminal (it did not list my computer's name, I'm not sure it that is usual or not; it also didn't ask for any passwords) and typed sudo apt-get install grub. Everything seemed to go well, but when I rebooted the computer, I received the same message.
                          Loading GRUB 1.5...
                          GRUB>


                          Since I keep getting the "grub>" line immediately after turning the computer on, I tried the "root, setup, quit" commands from one of your previous posts there. Here's what happened
                          grub> root (hd0,0)
                          grub>
                          grub> setup (hd0)
                          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 (hd)”... 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.

                          grub>
                          grub> quit
                          Error 27: Unrecognized Command



                          You ARE working in a Live Kubuntu Cd, right?
                          With regard to this question, I went to http://www.kubuntu.org/getkubuntu/download and burned the CD. Initially, my computer had 8.10 ( also have the CD for that), but I had since upgraded it to 9.10, I downloaded and burned the 9.10 CD. I assume that is the Live Kubuntu CD.
                          Also, with regard to the Super GRUB disk, I burned the CD from that link that you gave me, but my computer says that it is not a bootable CD (why it wouldn't be bootable I can't say) and then give me the same message--
                          Loading GRUB 1.5...
                          grub>


                          Strange that GRUB is not already installed there (in the live CD session).
                          Oh well, keep continuing.

                          Comment


                            #14
                            Re: Misplaced Kernel? Boot from GRUB?

                            Originally posted by ahmarras
                            Also, with regard to the Super GRUB disk, I burned the CD from that link that you gave me, but my computer says that it is not a bootable CD (why it wouldn't be bootable I can't say) and then give me the same message--
                            Loading GRUB 1.5...
                            grub>[/b][/color]
                            Are you sure you 'burned' the downloaded .iso file and not simply copied it to the CD? Have to ask that, as you say your system reports that it isn't a bootable CD, meaning either 1) you copied the .iso file to the CD, or 2) the burn was 'bad' - did you verify both, the md5 hash on the .iso file itself before burning, and again, the md5 on the burned CD itself?
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Re: Misplaced Kernel? Boot from GRUB?

                              Well, looks like you may have deleted your boot menu, /boot/grub/menu.lst. That's why you still get grub> even after you successfully re-installed GRUB (using root-setup-quit, which DID succeed). (the grub> => there is no stage 2 menu.lst).

                              And we still don't know what kernel(s) ("vmlinuz"'s) you may have left to boot.

                              You can check these things using your Live Kubuntu CD. They are in /boot and /boot/grub.

                              I also know why you got "no grub installed" in your Live Kubuntu CD: you are using the new 9.10 Kubuntu which uses the new GRUB 2.
                              For now, let's stick with GRUB Legacy (the old one) since that's what we started.

                              You might also be able to generate a new menu.lst from the live CD, but I'm not sure in GRUB Legacy if you need to chroot into that partition to do so.
                              You could try from the live CD to mount that partition, then do a
                              sudo update-grub
                              and see if that would work (re-boot to test).

                              Lots of things you can do to fix this, but it gets complicated in the sense that you need to use some Linux techniques.

                              You can study the GRUB Legacy how-to, learn how to boot from the GRUB prompt (grub>) using TAB completion, and THAT would tell you a simple way to make a boot menu (/boot/grub/menu.lst). (See below.)

                              But here's two tangible things to try first:

                              Another simple way to make a menu.lst would be:
                              Make a text file, as root, say using kate:
                              At Konsole,
                              kdesudo kate
                              call it /boot/grub/menu.lst
                              and type this into it:

                              # My homemade menu.lst
                              timout=15
                              default=0

                              title My Kubuntu on (hd0,0) = sda1
                              root (hd0,0)
                              kernel /vmlinuz root=/dev/sda1 ro quite splash
                              initrd /initrd.img

                              That should work to boot you into the latest kernel listed under /boot (that's where your kernels should be). In fact, try this FIRST at that grub> you keep getting:

                              grub>
                              grub>root (hd0,0)
                              grub>kernel /vmlinuz root=/dev/sda1 ro quite splash
                              grub>initrd /initrd.img
                              grub>boot

                              (don't copy these lines; actually type them)
                              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