Announcement

Collapse
No announcement yet.

Grub Error 18

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

    Grub Error 18

    First - thanks in advance for the help.

    I have an old server that I have been messing with for a while. Various flavors of Linux all in the name of home theater / general pc fun.

    Recently I switched out the 40GB HD for a 160GB.

    So on the new HD I put Win7 free beta on it and then loaded the latest LinuxMCE which starts with Kubuntu. The Win7 worked but the new MCE didn't like my nvidia driver settings or something... So I thought - heck I will just triple boot and add straight up Kubuntu so I can see what the conf file should look like. I know - long story but I wanted you to have the details.

    Well - Kubuntu installed nice - no issues. I did a guided install using unused space etc. Well - no boot. I get Grub Error 18. I have done some research and tried reinstalling Grub per Qqmike here : http://kubuntuforums.net/forums/inde...opic=3081671.0

    But that didn't do anything.

    Well here is my fdisk.

    Code:
    mepis1:~# sudo fdisk -l
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
      Device Boot   Start     End   Blocks  Id System
    /dev/sda1  *      1     13   102400  7 HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2       13    4990  39972656+  7 HPFS/NTFS
    Partition 2 does not end on cylinder boundary.
    /dev/sda3      4991    19457  116204760  5 Extended
    Partition 3 does not end on cylinder boundary.
    /dev/sda5      4991    7422  19527448+ 83 Linux
    /dev/sda6      18960    19457   3999208+ 82 Linux swap / Solaris
    /dev/sda7      7422    9960  20389288+ 83 Linux
    
    Partition table entries are not in disk order
    Not sure that I like the "partition table entries are not in disk order" error... Can someone give me a hint on where to start. I have read that my Bios may not recognize large HD. Is there a way to test that?

    Thanks in advance for any help or hints or clues...

    Frank

    #2
    Re: Grub Error 18

    Herman does this one very well:

    http://members.iinet.net.au/%7Eherman546/p15.html#18

    Let us know how it goes. Requires some messing around.
    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: Grub Error 18

      Okay - so I haven't had time to mess with this in a while but...

      I read the Grub manual from Herman

      http://members.iinet.net.au/%7Eherman546/p15.html#18

      But not so helpful. I already tried re-installing grub. Yes - my HD is larger than 137 GB but my BIOS is also from 2003. So I am thinking I am safe there. ??


      How about some basics - is it a problem that my partitions don't end on a cylinder boundary?

      Comment


        #4
        Re: Grub Error 18

        Originally posted by NooB Frank

        my BIOS is also from 2003. So I am thinking I am safe there. ??
        Apparently not.

        Using newer (2006+) motherboards, I have randomly set the hard drive partitions however I wanted, and I have never seen this "partition boundary" issue. I have to believe it is related to your older BIOS. 2003 was 4 cycles of Moore's law ago.



        How about some basics - is it a problem that my partitions don't end on a cylinder boundary?
        I think so -- you are trying to boot the OS on /dev/sda5 (I assume), but that is one of the partitions that does not start on a cylinder boundary. Apparently it is having a problem finding the OS there.

        As an experiment, you could use GParted to change the "boot" flag from /dev/sda1 to /dev/sda5, and try again to boot Linux. Just to see if makes a difference (some BIOS's are pretty hardwired for Windows ...). Of course, I know you don't wish to give up booting Windows, so that's no good as a permanent "solution" -- it would just be to learn more about the problem.

        Comment


          #5
          Re: Grub Error 18

          If you can, can you post the output of:
          Code:
          sudo fdisk -l
          (lower case 'L")
          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


            #6
            Re: Grub Error 18

            Well, I hate this error 18.
            Still thinking about this with you, but for now, a few thoughts ...

            sda7 starts at about 61 GB, which is well within any 137 GB limit (if that's an issue at all).

            I'm not concerned about "does not end on cylinder boundary" in this case. A cylinder is just 512*16065 bytes, and some of your partitions don't end exactly on a cylinder boundary. (BUT, I HAVE seen cases where a re-partitioning of an old disk DID fix this Error 18 when the partition boundaries were in question.)

            You have re-installed GRUB, which is what I have done when this happens, but that didn't help, right? sure? did it a couple times to be sure?

            Boy, you gotta be somewhat questioning of the BIOS:

            it's age? updates available (CAUTION: if so, read what they are! you don't want to mess up Windows. With recent Intels, you can always revert back if an update leaves you unhappy.)

            are the hard drive BIOS settings set right? set for LBA?
            -- If you enter BIOS setup and poke around, do you see the HD and is it correctly identified and seen (for size) and set correctly? no weird comments or flags seen there in BIOS? any other settings you can tweak (e.g., "Auto")?
            -- Can you access the motherboard manuf web site and investigate to see if anything cautionary shows up for that board and BIOS?

            (I would think that 2003 is fine, recent enough.)

            GRUB gets its info from BIOS, some BIOS's are "buggy/quirky," something is going on here that GRUB either isn't reading correctly or that it doesn't like.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: Grub Error 18

              I mean, when you re-installed GRUB, it showed no errors, embedded stage_1.5 OK? (it will say so)

              Your Kubuntu is on sda7, right? sda7 = (hd0,6) in GRUB Legacy 0.97 (for Kubuntu 8.04).

              grub>root (hd0,6)
              grub>setup (hd0)
              grub>quit
              exit
              and re-boot to test it?


              Can you use Super Grub Disk to boot into sda7 Kubuntu? does SGD work?
              (if you can, then maybe you could run those setup commands above again)

              If a no-go so far,
              can you use SGD to fix the boot of Linux (I think that's GNU LINUX/Fix Boot, something like that).
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Re: Grub Error 18

                more thoughts

                "I'm not concerned about "does not end on cylinder boundary" in this case. A cylinder is just 512*16065 bytes, and some of your partitions don't end exactly on a cylinder boundary."

                Hmmm. I'm OK with your cylinder boundaries. I'm sure that GParted is OK with them, too. My BIOS wouldn't mind them, either. BUT, maybe your BIOS is reading them quirky and thus GRUB is getting a bad reading from your BIOS registers (or whatever). I really don't know, but it's a thought.
                Again, maybe there's some clue in your BIOS setup--check all the menus you can find there that might apply to HDD.

                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: Grub Error 18

                  Sorry for the delay but
                  THANKS SO MUCH FOR THE HELP!!! I appreciate any help if for nothing else than learning something else that doesn't work...

                  Anyway - Here is my fdisk -l

                  Code:
                  Disk /dev/sda: 160.0 GB, 160041885696 bytes
                  255 heads, 63 sectors/track, 19457 cylinders
                  Units = cylinders of 16065 * 512 = 8225280 bytes
                  
                    Device Boot   Start     End   Blocks  Id System
                  /dev/sda1        1     13   102400  7 HPFS/NTFS
                  Partition 1 does not end on cylinder boundary.
                  /dev/sda2       13    4990  39972656+  7 HPFS/NTFS
                  Partition 2 does not end on cylinder boundary.
                  /dev/sda3      4991    19457  116204760  5 Extended
                  Partition 3 does not end on cylinder boundary.
                  /dev/sda5      4991    7422  19527448+ 83 Linux
                  /dev/sda6      18960    19457   3999208+ 82 Linux swap / Solaris
                  /dev/sda7  *    7422    9960  20389288+ 83 Linux
                  
                  Partition table entries are not in disk order
                  I used my Win7 disk and did a repair and it now boots in Windows. I turned the boot flag off on sda1. Turns out the boot flag was on sda7 too?? Anyway - about to do a reboot now.

                  are the hard drive BIOS settings set right? set for LBA?
                  I don't know what LBA is?? Or maybe a brain freeze??

                  Another thought - is sda1 the MBR for Win7? Is that where Grub needs to go?

                  I know that Grub is on sda5 and sda7...

                  But reading Qqmike's notes on reinstalling Grub - maybe I did do it wrong. I should have kept better notes.

                  Going to try the reboot now.

                  More later.

                  Comment


                    #10
                    Re: Grub Error 18

                    "Another thought - is sda1 the MBR for Win7? Is that where Grub needs to go?"

                    Yes, usually, I would think that's what you'd want. See my Reply #6 above on re-installing GRUB to the MBR of your (one and only) hard drive.

                    You can do it from a Kubuntu Live CD; or you can use SGD to boot into Kubuntu and do it from Konsole there.

                    Unless ... it works already.
                    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: Grub Error 18

                      Nope - that didn't work...

                      1962 - Boot sector error, no operating system
                      DISK BOOT FAILURE, INSERT SYSTEM DISK

                      Flipped the boot flag back on and Win7 works again...

                      Hmm... see your reply. Found my old notes... Looks like I installed or tried to reinstall grub to sda7...

                      Your Kubuntu is on sda7, right? sda7 = (hd0,6) in GRUB Legacy 0.97 (for Kubuntu 8.04).

                      grub>root (hd0,6)
                      grub>setup (hd0)
                      grub>quit
                      exit
                      and re-boot to test it?
                      Funny thing... I have grub in two places...

                      Here is what I have in sda5
                      Code:
                      title		Ubuntu 8.10, kernel 2.6.27-14-generic
                      uuid		37a5be2a-3a04-4a31-8b21-973d6d2a9c10
                      kernel		/boot/vmlinuz-2.6.27-14-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa quiet splash 
                      initrd		/boot/initrd.img-2.6.27-14-generic
                      quiet
                      
                      title		Ubuntu 8.10, kernel 2.6.27-14-generic (recovery mode)
                      uuid		37a5be2a-3a04-4a31-8b21-973d6d2a9c10
                      kernel		/boot/vmlinuz-2.6.27-14-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa single
                      initrd		/boot/initrd.img-2.6.27-14-generic
                      
                      title		Ubuntu 8.10, kernel 2.6.27-7-generic
                      uuid		37a5be2a-3a04-4a31-8b21-973d6d2a9c10
                      kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa quiet splash 
                      initrd		/boot/initrd.img-2.6.27-7-generic
                      quiet
                      
                      title		Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
                      uuid		37a5be2a-3a04-4a31-8b21-973d6d2a9c10
                      kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa single
                      initrd		/boot/initrd.img-2.6.27-7-generic
                      
                      title		Ubuntu 8.10, memtest86+
                      uuid		37a5be2a-3a04-4a31-8b21-973d6d2a9c10
                      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/sda1
                      title		Windows Vista/Longhorn (loader)
                      root		(hd0,0)
                      savedefault
                      makeactive
                      chainloader	+1

                      And here is what is in sda7
                      Code:
                      title		Ubuntu 8.10, kernel 2.6.27-7-generic
                      uuid		87b5abff-60a4-4305-8927-8aa15bfb3620
                      kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=87b5abff-60a4-4305-8927-8aa15bfb3620 ro quiet splash 
                      initrd		/boot/initrd.img-2.6.27-7-generic
                      quiet
                      
                      title		Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
                      uuid		87b5abff-60a4-4305-8927-8aa15bfb3620
                      kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=87b5abff-60a4-4305-8927-8aa15bfb3620 ro single
                      initrd		/boot/initrd.img-2.6.27-7-generic
                      
                      title		Ubuntu 8.10, memtest86+
                      uuid		87b5abff-60a4-4305-8927-8aa15bfb3620
                      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/sda1
                      title		Windows Vista/Longhorn (loader)
                      root		(hd0,0)
                      savedefault
                      makeactive
                      chainloader	+1
                      
                      
                      # This entry automatically added by the Debian installer for an existing
                      # linux installation on /dev/sda5.
                      title		Ubuntu 8.10, kernel 2.6.27-14-generic (on /dev/sda5)
                      root		(hd0,4)
                      kernel		/boot/vmlinuz-2.6.27-14-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa quiet splash 
                      initrd		/boot/initrd.img-2.6.27-14-generic
                      savedefault
                      boot
                      
                      
                      # This entry automatically added by the Debian installer for an existing
                      # linux installation on /dev/sda5.
                      title		Ubuntu 8.10, kernel 2.6.27-14-generic (recovery mode) (on /dev/sda5)
                      root		(hd0,4)
                      kernel		/boot/vmlinuz-2.6.27-14-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa single 
                      initrd		/boot/initrd.img-2.6.27-14-generic
                      savedefault
                      boot
                      
                      
                      # This entry automatically added by the Debian installer for an existing
                      # linux installation on /dev/sda5.
                      title		Ubuntu 8.10, kernel 2.6.27-7-generic (on /dev/sda5)
                      root		(hd0,4)
                      kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa quiet splash 
                      initrd		/boot/initrd.img-2.6.27-7-generic
                      savedefault
                      boot
                      
                      
                      # This entry automatically added by the Debian installer for an existing
                      # linux installation on /dev/sda5.
                      title		Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode) (on /dev/sda5)
                      root		(hd0,4)
                      kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa single 
                      initrd		/boot/initrd.img-2.6.27-7-generic
                      savedefault
                      boot
                      
                      
                      # This entry automatically added by the Debian installer for an existing
                      # linux installation on /dev/sda5.
                      title		Ubuntu 8.10, memtest86+ (on /dev/sda5)
                      root		(hd0,4)
                      kernel		/boot/memtest86+.bin 
                      savedefault
                      boot
                      Okay - so I think I am understanding a little more here...

                      Could I edit my grub from sda5 to include


                      Code:
                      title		Ubuntu 8.10, kernel 2.6.27-14-generic
                      uuid		37a5be2a-3a04-4a31-8b21-973d6d2a9c10
                      root		(hd0,6)
                      kernel		/boot/vmlinuz-2.6.27-14-generic root=UUID=37a5be2a-3a04-4a31-8b21-973d6d2a9c10 ro xforcevesa quiet splash 
                      initrd		/boot/initrd.img-2.6.27-14-generic
                      quiet
                      and then use the grub commands to reinstall grub

                      Code:
                      grub>root (hd0,4)
                      grub>setup (hd0)
                      grub>quit
                      exit
                      and re-boot to test it?
                      Since we know it worked as a dual boot machine and somehow the bios read out to hd0,4 or something like that??

                      But that is starting to make sense to me?

                      Thanks again for the help.

                      Comment


                        #12
                        Re: Grub Error 18

                        Yes, you can try that. Problem is, GRUB must be installed to the MBR of the first BIOS boot drive; otherwise, you can't boot into any Linux (since the 7 bootloader won't do it, unless you know how to make the 7 loader do that).
                        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: Grub Error 18

                          You said:
                          Hmm... see your reply. Found my old notes... Looks like I installed or tried to reinstall grub to sda7...
                          Quote
                          Your Kubuntu is on sda7, right? sda7 = (hd0,6) in GRUB Legacy 0.97 (for Kubuntu 8.04).
                          grub>root (hd0,6)
                          grub>setup (hd0)
                          grub>quit
                          exit
                          and re-boot to test it?


                          Correction to what you said:
                          What you did was this:
                          To install GRUB to the MBR of the drive (hd0) using the GRUB files located in the partition sda7 (= (hd0,6)).

                          In general, you must first pick a (Kubuntu) partition that contains GRUB files. Then, using those files, install GRUB to the MBR of the first BIOS boot drive. Thus, those GRUB files (in that Kubuntu partition) will "control" the booting: the boot menu you see upon re-booting will come from the /boot/grub/menu.lst located in that Kubuntu partition.

                          Just be aware that when writing GRUB to the MBR this way, it WILL overwrite any Windows bootloader files located in the MBR. If you ever decide to reverse that, you need to restore the Windows bootloader to the MBR of the drive, and for that, use this:
                          Restore Various Bootloaders: XP/Vista/7
                          http://ubuntuforums.org/showthread.php?t=1014708
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            Re: Grub Error 18

                            THANKS QQMike!!

                            I think we are getting somewhere. Not going to be able to play in front of the machine again till Saturday though... Traveling for work but this is sounding very plausible and promising.

                            Here is my plan though - I will copy the partition so that I can just restore it if I have any problems.

                            But help me with a little more with the background... Can I install the grub from sda5? Then edit the menu of grub to add a way to start sda7? Is that any problem. I don't know why I hesitate - but seems like I tried installing the grub of sda7 and just wonder if that was the problem?

                            So I am thinking I would boot with my kubuntu live disk and

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

                            Well - thanks again and I will work on this again Saturday.

                            Comment


                              #15
                              Re: Grub Error 18

                              Yes, that should work as well (from (sda5), as long as you have GRUB files there.
                              Then edit the /boot/grub/menu.lst (in sda5) to include a boot entry for Kubuntu in sda7. Yep. It shouldn't matter, really, as long as you have valid GRUB files (and instances of Kubuntu) in sda5 or sda7.
                              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