Announcement

Collapse
No announcement yet.

GRUB Error After Kubuntu 8.10 Install

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

    GRUB Error After Kubuntu 8.10 Install

    I am running Windows Vista on 3 SATA hdds configured in a RAID-0 array. I recently purchased a 4th SATA hdd that I installed Kubuntu on today. The installation appeared to successfully complete but upon reboot I received the following output:

    Code:
    GRUB Loading stage 1.5.
    
    GRUB Loading, please wait ...
    Error 21
    After doing some research online, I found the Super Grub Disk which sounded like it could resolve my issue. However, after trying a few of the options I was still unable to resolve the issue. I tried the following options from the Super Grub Disk menu:

    1.) "GRUB => MBR & !LINUX! (1) AUTO ;-)"
    I received the following output:
    Code:
    Booting 'Ubuntu 8.10, kernel 2.6.27-7-generic'
    kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=346c63b2-a854-44a0-9373-7296be01ef23 ro quiet splash
    Error 13: Invalid or unsupported executable format
    Press any key to continue ...
    2.) "!WIN! : ((("
    I received the following output:
    Code:
    Booting '!WIN! : ((('
    rootnoverify (hd0, 0)
    chainloader +1
    Error 13: Invalid or unsupported executable format
    Press any key to continue ...
    3.) "WIN => MBR & !WIN! : ((((((((((((((((((((("
    I received the following output:
    Code:
    Booting 'WIN => MBR & !WIN! : ((((((((((((((((((((('
    set aux_hd="hd0"
    dd (cd) /boot/sgd/brs/syslinux.bin (hd0) 0 0 300
    dd (cd) /boot/sgd/brs/syslinux.bin (hd0) 0x1fe 0x1fe 2
    rootnoverify (hd0, 0)
    makeactive
    chainloader +1
    Error 13: Invalid or unsupported executable format
    Press any key to continue ...
    I apologize if this post is a bit long but I wanted to include as much information as I could for those that might be able to help. I know a little about linux but I'm still pretty new to it and this is my first time installing it. From what I've gathered in my research of this issue I know I need modify the boot file to add an entry for windows so that I can choose which OS to boot when the computer starts up but I don't know how to do that and since I can't boot into either windows or linux I'm not sure how to go about resolving this issue.

    I'll be happy to provide any other necessary information about my setup if what I've provided above is insufficient. Thank you for any help you can provide.

    #2
    Re: GRUB Error After Kubuntu 8.10 Install

    RAID makes things a mess -- no experience with it, and I don't see mmany folks using it (for non-server use).
    Google is the key.
    What I know non-RAID-wise is here (and maybe knowing RAID you can use some techniques(s) from it to fix this):

    -- How To GRUB Methods - Toolkit
    http://kubuntuforums.net/forums/inde...opic=3081671.0
    GRUB ERRORS: See Reply #23

    (21: No such partition)

    Only tip I can think of that might be useful:
    Use the GRUB geometry command (see the how-to) to help you sort out the drives.

    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 After Kubuntu 8.10 Install

      Thanks for the link. It has a lot of info on GRUB so it's taking me a little while to read through it but hopefully I'll be able to find something in there that helps.
      Thanks again.

      Comment


        #4
        Re: GRUB Error After Kubuntu 8.10 Install

        UPDATE:
        In BIOS I switched the order that the hard drives are examined in at boot to put the hdd with Kubuntu first and the raid array with windows second. Now when the computer boots all I get is a flashing prompt, no errors, nothing. Not sure what that means.

        Comment


          #5
          Re: GRUB Error After Kubuntu 8.10 Install

          Using the how-to,

          I would reinstall GRUB to the MBR of the Kubuntu drive.

          Then see if Kubuntu will boot.

          Then use geometry to see how GRUB sees the Windows drive (i.e., which partition (hdx,y) Windows is on).

          Then edit menu.lst to reflect the proper drive for Windows.

          See the section about Windows on a non-first hard drive (editing menu.lst for Windows, using the map commands).

          That's how I'd approach this.
          Sounds like either there's a problem with the GRUB installation and/or GRUB can't find stage_2 and its boot menu (/boot/grub/menu.lst).


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

          Comment


            #6
            Re: GRUB Error After Kubuntu 8.10 Install

            From the Grub legacy manual:

            21 : Selected disk does not exist
            This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.
            It's very likely that the device names that the BIOS sees with the RAID0 plus the added SATA drive are not what Grub assumed to exist when Grub was installed. As Qqmike pointed out, RAID can be problematic. Now I don't have SATA on my old warrior, but I have read some threads here in KF where by changing some widget setting in the BIOS to AHCI (or some such) that some SATA weirdnesses are resolved. I don't know if that is the case here, but it may be a start.

            The SuperGRUB disk could probably help you by examining the geometry as reported by your BIOS and then finding and comparing what your Grub installation sees as the geometry. For instance if your BIOS sees the RAID0 array as one drive, but Grub sees it as three pieces of hardware, then the BIOS will never be able to talk boot-speak to Grub and Grub will never be able correctly interpret what the BIOS is saying. Manual intervention during setup or re-setup of GRUB might correct the problem.

            But it all goes back to the Grub error.
            The next brick house on the left
            Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



            Comment


              #7
              Re: GRUB Error After Kubuntu 8.10 Install

              I believe I have looked at how the BIOS sees the array as well as GRUB and if I remember correctly they did both see the 3 disks as a single drive in RAID although GRUB was unable to tell what kind of partition was on the RAID setup. One interesting thing I noticed was the difference in running GRUB on the live Kubuntu CD versus running it on the Super GRUB Disk. When I ran the geometry command in GRUB on the Super GRUB Disk it did see the 3 disks as one but when I ran the geometry command again in GRUB on the live Kubuntu CD it saw all 3 separate disks. I don't know if that means anything but I thought it was interesting.

              This morning I tried disconnecting the 4th drive that I installed Kubuntu to in the hopes that I would be able to boot up windows as I did before I installed the 4th drive. However, to my disappointment I got the same "Error 21". Does this mean that GRUB has been written to the MBR on the 3 disks that windows uses? If this is this case I'm not sure what I can do other than reinstall windows. I guess it might be possible to restore the bootmanager for windows but since windows is installed on a RAID array I have no idea if I can just use a normal windows bootmanager or if there's a special one that's configured for RAID. Which leads me to a question concerning bootmanagers. In a RAID array is the bootmanager also divided among the disks like all the other files or is it an exception and is just installed on the first disk in the array?

              I am also confused about another thing after windows would not boot even with the 4th drive disconnected. During the Kubuntu installation I told it to use the 4th drive for the install so it seems to me the installation should have only affected that drive but clearly something else has changed because removing the 4th drive still leads me to the same "Error 21". Does something change in the BIOS file as well when Kubuntu is installed? Or did I accidentally overwrite something on the windows drives when I used one of the Super GRUB Disk menu options I discussed in my first post? However, I don't think I did because when I first booted my computer after the Kubuntu install I got the "Error 21", so clearly Kubuntu changed somethiing or than the drive I installed it on. Or maybe I'm just confused because I'm pretty lost at this point.

              So to me it seems, if something has changed on one of the 3 disks used for windows, my only option is to reinstall windows but I'm hoping there is just some little setting or configuration file that I have to change and then everything will work correctly.

              Comment


                #8
                Re: GRUB Error After Kubuntu 8.10 Install

                Two things. First, the fact that you are getting a Grub error means that the Grub bootstrap loader is on the MBR of the first bootable device. Second, the fact that by disconnecting the 4th drive and still getting the Grub error confirms the first.

                So Grub is on the MBR. Next two things. First you can fix the MBR so that Windows will boot by booting to your Windows install disk and selecting the the recovery console (option "r"), then running
                Code:
                fixmbr or mbrfix
                , I've forgotten the exact name of the program -- I don't do Windows very often at home. Second, if you re-install your 4th hard drive, you can boot any Linux LiveCD, open a console find that 4th drive and go to /boot/grub/menu.lst file to see what drive should be mounted per the kernel. And if you refer to Qqmike's initial reply, there are various commands that you can run from
                Code:
                grub
                that will identify exactly where grub thinks the various stage files are. Also, grub can modify its bootstrap data on the MBR to look for the correct drive, at least in grub's own mind.

                I am still quite certain that with the RAID array thrown in the mix, grub is just confused between where it thinks the boot files should be and where they are in terms of the BIOS. It's fixable, but not necessarily intuitive.
                The next brick house on the left
                Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                Comment


                  #9
                  Re: GRUB Error After Kubuntu 8.10 Install

                  Hope it's not too late to chime-in. Just sharing from my own bit of experience. Did a dual-boot install of 8.10 alongside WinXP/sp3 and ran into the same error 21. :-X

                  The good news is... I ended up solving it!

                  Had two drives; one 160GB and the other 80GB. I've shuffled my data around so that all Windows partitions are on the 160GB drive, leaving the 80GB empty. I installed from LiveCD using the "guided - use entire disk" on the old 80GB. Everything seemed fine until that darn Grub error popped up.

                  The problem wasn't Windows or anything that Windows does.

                  The problem wasn't with GRUB... at least not entirely.

                  It seems the BIOS was re-arranging my devices; without changing any connections. The first hdd was always (hd0), but the next hdd was being moved around. (sometimes hd3, sometimes hd2, sometimes hd6)

                  Important note: I didn't find that out with the LiveCD. I ended-up having to use SuperGRUB to see what the BIOS was doing! My theory is that LiveCD is doing too much in the way of probing hardware and loading appropriate drivers to give an accurate survey of what GRUB would see at boot. Don't trust the LiveCD perspective on your system drives, it drove me batty because it would always show just the two hard drives. (hd0 and hd1)

                  I had to change my BIOS to remove all other boot options; switched off USB, superfloppy and other media that could be mistaken for /dev/sdX. Double-checked for 'phantom' drives, usually in Standard Settings; that means empty drive connections--which have no drive--are actually set as: Not Installed (leaving it as Auto may not be good enough)

                  ATAPI/SATA CD-ROM should not interfere, so you can leave them in the boot order if you like. I can't say the same for USB/external CD-ROM.

                  Eventually, I might find a way to open-up my alternate boot sources. All I know is, my Kubuntu AMD64 edition is now working perfectly!

                  As for your RAID situation... I suggest asking yourself why you use RAID in the first place? I can see the practical angle; merging three smaller drives into one, big drive. It seemed simple... but it doesn't seem simple anymore, does it? Considering the difficulty with installing Linux, the requirements for special drivers in Windows, and a nagging thought in the back of your head whenever something funny starts to happen... "Is that the RAID acting-up, or something else?" To me, RAID has always been for the enterprise sector... something for IT guys to worry about.

                  My point is... it's obviously not going to be as simple as "adding" Linux to your system when Windows resides on a three-drive RAID. Then again, nothing with your low-level configuration is going to be simple... not even with Windows alone, so long as that RAID is in effect. What I've noticed is, most RAID controllers are designed as if there are no other drives on the system; the 'extra' drive you are installing may be playing the role of the 'outcast' in the BIOS.

                  I noticed the errors you reported with SuperGRUB were all #13 "invalid executable". I once worked with a hard-drive utility developer, and I know my way around the typical PC BIOS bootstrap. GRUB is trying to 'jump' from the MBR into a valid partition, and it almost worked.

                  Since it was SuperGRUB, (booting from CD or floppy) the RAID controller BIOS may not have been behaving in the way GRUB expects. I presume that may be the fault of the RAID controller BIOS; they don't always load-up properly when you boot from floppy or CD-ROM.

                  WARNING: Serious geek content
                  If you're going the Int0x13 route (boot from hdd) then the RAID will perform as expected, but if you boot from Int0x12 (floppy) or USB (that interrupt will vary in each BIOS) the RAID may not translate the same way, if at all. I'm not asking anyone to learn this mad science... but I'm just trying to explain why it's so hard to get it to work.

                  Ubuntu has an option that might be a better fit for you: Install linux inside Windows. Seriously!

                  Just add the fourth drive and let Windows manage it; make a new partition on it.

                  While you're in Windows, insert the LiveCD and let it autostart. The second option that appears should be Install/Uninstall Ubuntu like an application. This way, you shouldn't have to wrangle a solution out of your BIOS or RAID.

                  This option will use Microsoft's own Boot Menu technology to boot into a 'nested' Linux partition. The disk speeds may slow down a bit compared to a native-built system, but it sure is easier than finding a workaround for the RAID.

                  Best of luck,
                  - Douglas
                  [hr]<br />System#1: Kubuntu 9.04 AMD64 (KDE 4.2)<br />AMD Athlon64-2x 4600+, 4GB DDR2-PC6400<br />nVidia GeForce 7300 / 512MB<br />System#2: Kubuntu 9.04 (KDE 4.2)<br />AMD Sempron 3300+, 2GB DDR-PC3200<br />

                  Comment


                    #10
                    Re: GRUB Error After Kubuntu 8.10 Install

                    Interesting.

                    What I know about RAID comes from (1) theory (the PC H/W books), and (2) hanging out at a hardware forum (hardwareguys.com) where the consensus there is clear: avoid RAID for most home/user systems; its best use is for servers.

                    I also know that it outrageously complicates GRUB configuration issues. (What was your first clue!)

                    As for non-RAID, "normal" setups, and getting the drives right, I have yet to see a case where the geometry command failed to get the drives right:
                    grub>geometry (hd<Press TAB key now>
                    should list your drives (hd0), (hd1), ... in a non-RAID system, and from anywhere, e.g., live CD.
                    (Of course, you always have to keep in mind a simple but important fact: when the system actually boots, then within that session, the drive from which BIOS actually booted will always be seen as hd0 (for that session).)
                    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