Announcement

Collapse
No announcement yet.

grub issues after 8.10 install

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

    grub issues after 8.10 install

    Hi

    I have a pc running kubuntu 7, and I just installed 8.10 in a separate partition, but I can only boot into K7. I had similar issues with grub when moving from 6 to 7, but I can't figure out what the problem is this time.

    My pc has two disks, a scsi (sdb) and an ide (sda), and the root of my problems is that the bios sees the scsi as the primary, but once kubuntu is booted, it thinks that the ide is the primary. Both kubuntu installs are on the scsi.

    I should, however, be able to force grub to install the new bootloader on the scsi, which is what I did before. This time it doesn't seem to work. The new root is sdb5 and the old is sdb6. Let's see what happens when I try to install mbrs on these partitions with grub:

    grub> geometry (hd1)
    drive 0x81: C/H/S = 30401/255/63, The number of sectors = 488397168, /dev/sdb
    Partition num: 0, Filesystem type is ext2fs, partition type 0x83
    Partition num: 2, Filesystem type unknown, partition type 0x82
    Partition num: 4, Filesystem type is ext2fs, partition type 0x83
    Partition num: 5, Filesystem type is ext2fs, partition type 0x83
    Partition num: 6, Filesystem type is ext2fs, partition type 0x83
    Partition num: 7, Filesystem type is ext2fs, partition type 0x83
    Partition num: 8, Filesystem type is ext2fs, partition type 0x83

    grub> root (hd1,4)

    grub> setup (hd1,4)
    Checking if "/boot/grub/stage1" exists... no
    Checking if "/grub/stage1" exists... no

    Error 2: Bad file or directory type

    grub> root (hd1,5)

    grub> setup (hd1,5)
    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 (hd1,5)"... failed (this is not fatal)
    Running "embed /boot/grub/e2fs_stage1_5 (hd1,5)"... failed (this is not fatal)
    Running "install /boot/grub/stage1 (hd1,5) /boot/grub/stage2 p /boot/grub/menu.ls
    t "... succeeded
    Done.

    grub> root (hd1,4)

    grub> cat /boot/grub/menu.lst

    Error 2: Bad file or directory type

    So grub refuses to read files from sdb5. However I can mount this file system, it looks perfectly ok. Any help with this would be much appreciated,

    cheers
    Barry

    #2
    Re: grub issues after 8.10 install

    Could this be the problem?
    http://www.linuxplanet.com/linuxplan...orials/6480/1/
    Any idea how to work around it?

    Comment


      #3
      Re: grub issues after 8.10 install

      The *buntu installer (and other Linux installers, btw) enumerate drives differently than the computer BIOS, in many cases where there is a mix of IDE and SATA drives. I have the same problem on my desktop system.

      In all likelihood, the Grub "hd(x)" number is one off, either higher or lower, than it needs to be. Use the "e" option on your boot menu, or just temporarily change it in /boot/grub/menu.lst, and try it one higher and also one lower, than what it presently is. One or the other will most likely work.

      Comment


        #4
        Re: grub issues after 8.10 install

        On the run here right now, but I noticed GRUB Error 2 w/8.10 in existingdual boot with previous Kubuntu?
        If so, please note this below -- FIRST check dibl's idea --

        (I posted this somewhere on this forum but don't have time to find it now):



        GRUB Error 2--8.10 Multiboot w HH or prior

        If you have an existing multiboot setup using HH or previous versions of Kubuntu, and if you install II 8.10 and wish to include 8.10 in your existing multiboot configuration, you may get GRUB error 2 upon reboot.

        There are three subcases:
        -- Booting your OSs from an existing HH (or previous) Kubuntu installation.
        -- Using a separate GRUB partition (that boots all OS's and from which the GRUB is installed to the MBR of the BIOS first boot drive).
        -- Using a full /boot partition that includes both /grub and the kernel & initrd files.

        My case is the first: separate GRUB partition.
        I've given enough references for you to deal with all cases. My solution here will work with all three cases, though ... (I think).


        FACT – Here's what appears to be the problem in II:

        “... the new Intrepid release defaults to using a 256 byte inode size for its ext3 file system rather than the older 128 bytes used in Hardy and in prior releases. Unfortunately the Grub version in Hardy and before can't handle the larger inode size, so you will typically get a Grub error 2 if you try to boot one of the newer ext3 partitions {using a GRUB from HH or prior] ...”
        Caljohnsmith:
        http://ge.ubuntuforums.com/showthrea...8b3cc&t=960714


        SOLUTION:
        See references.
        For my case, it was simple; here it is:

        sda1 Windows XP
        sdb1 Dedicated GRUB partition containing the grub files you find inside /boot/grub.
        I used this grub to install GRUB to the MBR of the BIOS boot drive hd0 = sda (root (hd1,0), setup (hd0))
        sdb2 HH 8.04
        sdb3 II 8.10 – the new installation.
        I included an entry for 8.10 in the existing sdb1 menu.lst: configfile (hd1,2)/boot/grub/menu.lst).

        Reboot: GRUB Error 2

        Solution:
        I simply replaced the grub files in sdb1 /boot/grub with the new 8.10 GRUB files in 8.10's /boot/grub.
        Then reset GRUB to the booting MBR: root (hd1,0), setup (hd0).
        => That fixed everything.

        NOTE:
        Various cases/options. See references. For example, you might try to install 8.10 to a 128-byte inode partition, pre-formatted, using the Alternate installer. However, the solution I used is simple and quick and unfettered with technicalities.

        - - - - - - - - - -

        http://ge.ubuntuforums.com/showthrea...8b3cc&t=960714
        http://ubuntuforums.org/showthread.php?t=968592
        http://pressf1.co.nz/showthread.php?p=723331
        https://bugs.launchpad.net/ubuntu/+s...ty/+bug/260001
        http://www.linuxplanet.com/linuxplan...orials/6480/1/

        Reference for dedicated GRUB partition:
        See my how-to:
        How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...opic=3081671.0
        Reply #10: How to make a separate “GRUB boot partition.” (Dedicated to the GRUB files and make your PC boot from those GRUB files.)

        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 issues after 8.10 install

          Hi Folks

          Thanks for the advice. The grub hd numbers *are* different from the bios (they're swapped) but I was able to work around this before by editing the menu.lst file. I think the main problem is the inode problem mentioned by ccmike - I checked the inode size using tune2fs last night and it is set to 256 on the new root. And I think the best solution, for now and hopefully for the future, is to follow qqmike and create a separate grub partition (with inode size set to 128, right?). I probably won't be able to look at it until Wednesday evening, but I'll let you know how it goes,

          cheers
          Barry

          Comment


            #6
            Re: grub issues after 8.10 install

            "And I think the best solution, for now and hopefully for the future, is to follow qqmike and create a separate grub partition (with inode size set to 128, right?). "

            No. You want the newer 256.

            Two choices:

            (1) Replace the GRUB in your existing Kubuntu 7 with the GRUB located in your new Kubuntu 8.10.
            (2) Build the separate GRUB partition using GRUB files from your new Kubuntu 8.10 (the 256).
            The 128 can't read the 256, but the 256 can read the 128.
            (Unless "they" fixed this, which it doesn't look like they have).

            You noticed this problem because you had an existing GRUB setup using the 128 and then added the new 8.10 (with 256), AND you wanted the old one (128) to boot the new one (256).


            When I say replace the GRUB with the new GRUB in Kubuntu 8.10, that means, simply and literally this:

            Go into 8.10, navigate to /boot. You'll see the grub subdirectory of /boot (/boot/grub). Grab that whole subdirectory grub and all its contents and COPY it (do NOT move it!) into Kubuntu 7 and replace the /boot/grub subdirectory in Kubuntu 7 with the /boot/grub from 8.10

            You have to do all this as root. You can copy the 8.10 /boot/grub without root, but to replace /boot/grub in Kubuntu 7, you must use root privileges.

            To open Konqueror or Dolphin as root in Kubuntu 7:
            kdesu konqueror
            kdesu dolphin
            (Or, you can work at Konsole and do it that way if you are comfortable with the command line.)
            (in 8.10, instead of kdesu, you should use kdesudo, for future reference)

            I hope I'm not sending you on a wild goose chase doing all this. Strange we don't see more posts like yours and mine about this GRUB 2 error. But you'd only notice it if you were using your old boot setup to boot the new 8.10. And, as you can see from the references, it's popped up elsewhere and seems to be a well known issue. It's the only thing that I could find to fix my GRUB 2 error after installing 8.10.

            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 issues after 8.10 install

              No. You want the newer 256.
              Why do I want 256? If I create a partition using 256 then it can only be mounted by the new grub. If I create a partition using 128 then it can be mounted by both new and old grub, which seems safer to me.

              Comment


                #8
                Re: grub issues after 8.10 install

                Ok, yes. We may be thinking the same, but saying it otherwise.
                It's the GRUB that has the issue (as I understand it).
                So, yes, the new GRUB can read 256 or 128. The old GRUB (with Kubuntu 7x) reads only 128.
                I guess I didn't confront it directly as you are, creating a new partition. I just replaced the old grub directory, using the new 8.10 grub copy everywhere. (My GRUB partition was old and existing, with the old GRUB in it before I overwrote the old GRUB with the new GRUB from 8.10).
                I think we are on the same page.
                I'm not an expert on this inode stuff.
                But I am an expert on dragging grub all over the place, sometimes even off the PC entirely...

                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 issues after 8.10 install

                  Hi Folks

                  So it all seems to be working now, it didn't exactly go as I intended, the result was good. The first thing I did was create a new partition for grub, however this changed the partition numbers and somehow I didn't edit menu.lst correctly and the system was unbootable. I decided to carry on with the K8 install, but after this was still unbootable. I then used the alternate CD to boot into rescue mode and selected the 'install grub' option. Using this I was able to write the new grub (from the K8 install) into the correct disk and now my system boots into both K8 and K7. Using the shell on the rescue disk was no good as running grub just gave me the "Error opening terminal: bterm." error. Also, I haven't fully set up the grub partition yet, but at this stage I'm not in a hurry to fiddle with a working system,

                  thanks for your help
                  Barry

                  Comment


                    #10
                    Re: grub issues after 8.10 install

                    Glad you got it fixed and working.

                    Any time you change a partition, it changes UUID numbers and so menu.lst and /etc/fstab need to be edited to reflect the new UUIDs.

                    Usually--not always--when a UUID has changed, the system may appear to be unbootable, but Control+D will get you past the impasse during boot and into Kubuntu where you can then change the "bad" UUIDs.

                    As for a separate GRUB partition -- no need for that right now at all. Some people never use one. . I use one because of all the experimenting I do with OSs: one GRUB partition and a very simple menu.lst (using configfile statements) boots all the OSs and is easy to maintain.

                    Again, good work, Barry. Kubuntu/Linux can always use a good Computer Science guy--so welcome again!
                    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