Announcement

Collapse
No announcement yet.

Boot 7.10 and 6.06 with lilo

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

    #16
    Re: Boot 7.10 and 6.06 with lilo

    And from what you said, I'm assuming that when you turn the PC on, you *do* get a GRUB boot menu--that is, you see a boot menu from GRUB--but if you select something, it doesn't work (e.g., Error 15).
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #17
      Re: Boot 7.10 and 6.06 with lilo

      Here's where this is going:

      OK, so you turn on the PC and it boots from the Kubuntu drive, and you do see a GRUB boot menu but it doesn't work, right? If the answer is Yes, then:
      At the boot menu, let's try to find out/confirm where things are using the geometry command as follows:
      When you see the boot menu, press the "c" key to get a GRUB prompt, grub>.
      Now type, at the prompt,
      grub> geometry (hd0)
      then
      geometry (hd1)

      What do you see? Can you tell for sure that the drive hd0 contains Kubuntu & Windows, and that hd1 had Mandriva?
      If the answer is yes, then I'll go with that in what I say next.
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #18
        Re: Boot 7.10 and 6.06 with lilo

        I should add that i did not create the windows entry. It was created by the kubuntu 7 installer.

        Just saw your latest updates - cheers! - at the moment I have lilo on the kubuntu drive, because it lets me boot to 6.06, however when I try to put grub on that drive, it produces the behaviour that you describe. That is to say, I get the grub boot menu, but all the linux options just give me the 'file not found' error. Another interesting piece of evidence is that when I tried windows from the grub menu it gave some kind of Dell diagnostics tool. Now windows is currently installed on the kubuntu drive, but the mandriva drive was the original drive, which contains a very small windows partition at the start of the drive which is presumably the dell diagnostics tool. So it looks like grub is trying to load windows from that partition.

        When I get home this evening I'll put grub back onto the kubuntu drive and try the geometry commands.

        Comment


          #19
          Re: Boot 7.10 and 6.06 with lilo

          NOTE : Just in case, I have been unable to get in here! I kept getting some Access Violation PHP or something? It took many tries to log in and access this thread to post this just now (like 15 minutes of trying).

          OK, so, let's say we are sure the PC is booting from the Kubuntu drive.

          "I have two disks on my system, which 6.06 labels as hda and sda, but 7.10 has changed the labels to sda and sdb. I assume this may be related to my problem,"

          This is OK, and probably NOT causing the problem as long as you also use the new sdx notation. Starting in 7.10, you'll see two new things: the hdx --> sdx (for technical reasons) and the appearance of UUIDs (long, unique, identifying numbers for your drives).
          ***There MAY be one small item affected, though. That's your /boot/grub/device.map in Kubuntu 7.10. If this works the way I think it should, that device.map should show
          (hd0) /dev/sda
          and
          (hd1) /dev/sdb
          Device.map will NOT mess up GRUB when GRUB actually boots your PC, but device.map may be entering the picture in other subtle ways (e.g., in the kernel statements where you see root=/dev/dsx).

          Assuming geometry shows that Kubuntu and Windows are on hd0, and Mandriva is on hd1, then, here's what to do:

          Step 1: First, to be safe, let's re-install GRUB (from the root 7.10 files) as follows.
          Assuming Kubuntu 7.10 is on (hd0,5):

          Turn on the PC, when you see the GRUB boot menu, press the "c" key to get a GRUB prompt, grub>, and type the following commands at the prompt:

          grub> root (hd0,5)
          grub> setup (hd0)
          grub> reboot
          to test it and be sure it comes up OK (but it still will not work when you make a selection).

          Step 2: Next step, let's edit the boot menu to correct the device references (hdx,y)'s.
          The end results we want are the following:
          -- For Kubuntu 7.10, change the root references so they read root (hd0,5)
          -- For 6.06, it should read (hd0,4)
          -- Mandriva should be root (hd1,4)
          -- Windows should be simply:
          title Microsoft Windows XP Home Edition
          root (hd0,0)
          chainloader +1
          -- UUIDs: you may have to check the UUIDs! In fact, you may have to check all the kernel statements, as follows:

          In 7.10, you have:
          kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=20db22db-90b7-4ef3-b72c-5dff8999708c ro quiet splash
          and you must make sure the UUID is correct and points to the drive where Kubuntu 7.10 is.

          In Mandriva, you have:
          kernel /boot/vmlinuz root=/dev/hda5 splash=silent vga=788
          and you must make sure the root=/dev/hda5 is correct for Mandriva.
          It MAY be root=/dev/sdb5.

          In Kubuntu 6.06 you have:
          kernel /boot/vmlinuz-2.6.15-29-386 root=/dev/sda5 ro quiet splash
          and, again, make sure the root=/dev/sda5 is correct.

          >>> See Notes below on how to check the UUID.

          Result: This should fix it.
          It is what you suggested from the start! The reason, I think, you had problems is because you have a mixture of drive types; one is IDE and one is SATA. That seems to cause problems for the Kubuntu installer. However, afterwards, what counts is what we did here: After the installation, get in there with the GRUB geometry command and explore the drives to straighten out the naming of the hdx's. In fact, you can do this before running the Kubuntu installer so you'll be ready with the correct hdx's (for installing GRUB, e.g., in Step 6 of the Live CD).
          The good news is that after you fix all this, it will be fixed for the future changes you might make or for any further OSs you put on these disks.

          Notes
          EDIT: I just read your latest post. If you can boot into 6.06 to do any/all of this, then great! (I'm assuming that in 6.06 you would see the Kubuntu 7.10 partition, mounted for you, or that you could get it mounted,)

          1 To see how Linux sees the sdx's, you can try the command
          sudo fdisk -lu
          at Konsole (K > System > Konsole; you can do this from Live CD, too)
          (where "-lu" is "l" as in "list" and "u" as in "units"; space after fdisk)

          2 To see your UUIDs, use these Konsole commands
          From Live CD or hard drive: ls /dev/disk/by-uuid/ -alh
          From hard drive: blkid

          3 Editing menu.lst: the file /boot/grub/menu.lst in Kubuntu 7.10
          The How-To I referenced here tells how.
          However you choose to do the edits, you must do so as root, and afterwards, remember to File > Save and finally File > Quit.
          If you have Super Grub Disk Live CD, you can use it to boot into Kubuntu 7.10 and do the edits.
          Or, since you can't boot into Kubuntu 7.10, you can do the edits using the Live Kubuntu CD (or, if you can boot into 6.06, you could do the edits from 6.06).

          Case 1 If you can boot into Kubuntu 7.10 (or 6.06 at access Storage media > Kubuntu 7.10), open Konqueror, and enter in the location window at the top /boot; then click on grub; then right-click on menu.lst; select Actions > Edit as root; and menu.lst will open in a text editor (KWrite or Kate); then make the edits, then File > Save, File > Quit.

          Case 2: Live Kubuntu CD method: Use this if you are not able to boot into any of your Linux OSs to access the menu.lst in K 7.10. Boot the Live Kubuntu CD, open Konsole, then as root make a directory, mount the filesystem containing the menu.lst you need to edit, open menu.lst as root, edit it, save, quit, unmount the filesystem, exit.
          Example, if the menu.lst you need is on sda6 (=(hd0,5)). At Konsole (from the Live CD), it would go:

          sudo mkdir /media/sda6 # make a directory called /media/sda6
          sudo mount /dev/sda6 /media/sda6 # mount device sda6 on directory /media/sda6
          cd /media/sda6 # change to this directory
          kdesu kate /boot/grub/menu.lst # in text editor Kate, open menu.lst file, as root
          # Then edit menu.lst; and when you are done, File - Save, then File - Quit
          sudo umount /media/sda6 # unmount the directory; note the spelling of umount
          exit

          Re-boot to test it.
          (K > Log Out > Restart, and when prompted, remove the Live CD from the tray, close the tray, hit Enter, and let the PC re-boot to test all this.)


          EDIT added:
          If you have problems in the kernel statements when you use root=/dev/sdx, first you can try making the changes suggested (try switching sda and sdb); second, you can change the /boot/grub/device.map as suggested; third (and maybe the best), you can use the UUIDs for the drives instead of sda and sdb--the same way Kubuntu 7.10 menu.lst did for the kernel statement.

          (I'll check back here from time to time today.)

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

          Comment


            #20
            Re: Boot 7.10 and 6.06 with lilo

            OK, things are looking much better now - thanks for all your help qqmike.

            In the end the solution was simple. I booted into 6.06 and edited the 7.10 menu.lst file, changing all the hd1 entries to hd0 and vice-versa. Then in the grub shell I used the following commands:
            root (hd1,5)
            setup (hd1)
            When I rebooted it went into grub, and all OSs booted! The only slight glitch was mandriva, where I had to change 'root=sda5' to 'root=hda5' and sort out the fstab.

            Comment


              #21
              Re: Boot 7.10 and 6.06 with lilo

              Very Good!

              Just a couple questions, if I may.

              You said:
              root (hd1,5)
              setup (hd1)

              That's the part that doesn't make sense here.
              If, in fact, the Kubuntu drive is hd0, and if BIOS boots from the Kubuntu drive (which is what we think, right?), then, GRUB must be set up in the MBR of the hd0 drive!
              No compromise about that, but ...

              Now, what may have happened is that during all this editing and installing and what-not, GRUB probably already did get installed to hd0 (if even by accident or by experiment). The fact that this works with hd0 being the Kubuntu and Windows drive tells us that, indeed, GRUB is in the MBR of the Kubuntu drive; i.e., GRUB is in (hd0).

              "The only slight glitch was mandriva, where I had to change 'root=sda5' to 'root=hda5' and sort out the fstab."
              That's not surprising actually, because Mandirva may not be all compliant with Kubuntu 7.10's new view of things (ie, all hdx's becoming sdx's now).

              Finally, just to confirm something, the modified Windows entry did work, right? That is:
              title Microsoft Windows XP Home Edition
              root (hd0,0)
              chainloader +1

              is the one that works? (i.e., no need for the map commands.)
              Because, again, that tells us clearly that the Kubuntu drive is the bootable drive and is hd0.
              I'm just curious to learn about this because we have all had so many issues when dealing with a mixture of IDE and SATA drives, and I'm not real sure that all the patterns are yet clear.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #22
                Re: Boot 7.10 and 6.06 with lilo

                I meant to post my updated menu.lst (see below). You can see that I changed the windows entry to remove the drive swapping.

                At the grub prompt, I definitely entered:

                root (hd1,5)
                setup (hd1)

                and those commands wrote the grub bootloader into the kubuntu drive, which is the boot drive. When the os boots, however, the kubuntu drive has become hd0, which means that the menu.lst must specify that kubuntu is on hd0. Perhaps grub is confused because of the device,map file?

                (hd0) /dev/sda
                (hd1) /dev/sdb

                Relevant contents of menu.lst:

                title Kubuntu 7.10, kernel 2.6.22-14-generic
                root (hd0,5)
                kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=20db22db-90b7-4ef3-b72c-5dff8999708c ro quiet splash
                initrd /boot/initrd.img-2.6.22-14-generic
                quiet

                title Kubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
                root (hd0,5)
                kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=20db22db-90b7-4ef3-b72c-5dff8999708c ro single
                initrd /boot/initrd.img-2.6.22-14-generic

                title Kubuntu 7.10, memtest86+
                root (hd0,5)
                kernel /boot/memtest86+.bin
                quiet

                # This entry automatically added by the Debian installer for an existing
                # linux installation on /dev/sdb5.
                title Kubuntu 6.06 kernel 2.6.15-29-386 (on /dev/sdb5)
                root (hd0,4)
                kernel /boot/vmlinuz-2.6.15-29-386 root=/dev/sda5 ro quiet splash
                initrd /boot/initrd.img-2.6.15-29-386
                savedefault
                boot

                ### 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 an existing
                # linux installation on /dev/sda5.
                title Mandriva Linux release 2006.0 (Official) for i586 (on /dev/sda5)
                root (hd1,4)
                kernel /boot/vmlinuz-2.6.12-12mdk root=/dev/hda5
                savedefault
                boot


                # This entry automatically added by the Debian installer for a non-linux OS
                # on /dev/sdb1
                title Microsoft Windows XP Home Edition
                root (hd0,0)
                chainloader +1

                Comment


                  #23
                  Re: Boot 7.10 and 6.06 with lilo

                  Thanks much for this excellent feedback. We wish everyone would do the same here!

                  OK, it's as we know it should be.

                  And you know I'll have a "but" . . .

                  Going back to your installs, at one point, you tried various places for GRUB, including hd0 and hd1. That's where it got installed. Fact is, GRUB's IPL (Stage_1) MUST be in the MBR or this would not boot -- there is no way it could.

                  Now, had we used LILO in the partitions (hd0,4), (hd0,5), and (hd1,4), we could bootload the OSs by installing GRUB to the MBR as IPL and chainload LILO. But not the other way around -- LILO can't chainload GRUB. So, it has to be GRUB that is running this boot show.

                  So, trust me, GRUB is installed to the MBR (i.e., its 446 Bytes of Stage_1 IPL, and I'm pretty sure its 15 sectors of Stage_1.5 are in the 1st cylinder prior to the first partition (hd0,0) on that drive hd0).

                  There is no reason to put GRUB in the MBR of hd1, except, I always recommend it! That way, you can always swap drives, or remove hd0, and have GRUB set up in the MBR of the boot drive. Same goes for installing GRUB to *all* Linux root partitions--that way you can always chainload that partition to boot it, just in case you might need to.

                  I could dig up the dd command for you to see a hex dump of your MBR (hd0) and you'll see GRUB there.

                  I'm (pleasantly) surprised that the installer automatically generated that Windows map-dance. Usually, we have to catch this, diagnose it, and do it manually. I wonder if that's new for 7.10, as previous versions have not seemed so smart. (Windows does not like to be on a non-first drive; the map-dance fools it.) Sorry it took me awhile to see what you were saying.

                  Your original diagnosis, bhaddow, was correct, as was your intuition about what the heck was going on here. Again, good job, and thanks for your feedback (...though I know you may question my claim about hd0 & GRUB ... )

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

                  Comment


                    #24
                    Re: Boot 7.10 and 6.06 with lilo

                    > I could dig up the dd command for you to see a hex dump of your MBR (hd0) and you'll see GRUB there.

                    Let me know if you want me to run a dd on the MBRs.

                    Thanks for the help with grub - my understanding of it has definitely improved over the last few days, hopefully I'll remember everything when it comes to my next upgrade!

                    Comment


                      #25
                      Re: Boot 7.10 and 6.06 with lilo

                      Hi, bhaddow.
                      A few loose ends and something you can try quickly and easily - -

                      device.map is clueless
                      You device.map has nothing to do with what happens at boot time. That is, GRUB does not look at it. GRUB goes by what BIOS sees, and GRUB always gets that right! Whereas, device.map, may be wrong -- it is only used by the so-called grub shell (emulator) that is run from within Kubuntu/Linux, and it may give you wrong results! It is the stuff of Chapter 15 of the GRUB manual:
                      GRUB, GNU GRUB Manual 0.97 at: http://www.gnu.org/software/grub/manual/

                      See Reply #20 for a lengthy discussion of device.map (and a reference) in:
                      How To GRUB Methods - Toolkit
                      http://kubuntuforums.net/forums/inde...opic=3081671.0

                      To see the MBR:
                      I realized the MBR may not make much sense! I use a reference to sorta interpret what one sees there, but it's gibberish (unless you are a programmer). Here's the command, at Konsole, to see the MBR of drive sda:
                      To see the MBR (first 1 sector = 512 bytes) on sda:
                      sudo dd if=/dev/sda count=1 | hexdump -C
                      You'll see GRUB mentioned toward the end of it in some text, preceding the 64 Byte partition table area.
                      MBR GRUB, dd printout, understanding: http://www.geocities.com/thestarman3/asm/mbr/GRUB.htm

                      >>> To see if GRUB is in (hd0) -- an easy way.

                      Here's a better, quick and easy way to see if GRUB is in the MBR (hd0):
                      If GRUB is in the MBR of hd0, then we should be able to chainload that drive from its MBR.
                      So, it's easy and quick:
                      Turn on the PC (or re-start it).
                      When the boot menu comes up, quickly press the "c" key to get a grub> prompt.
                      Type
                      grub> chainloader (hd0)+1
                      grub> boot

                      (space after "chainloader," no spaces in (hd0)+1)

                      That's to see if GRUB can chainload from the first sector (512 Bytes) of the hd0 drive.
                      If so, GRUB is there.
                      If it works, you'll be given your regular boot menu which is pointed "at" from the MBR (hd0), from which you can select your OSs to boot as usual.


                      "Is this as good as it gets?"
                      What a great way to wake up this morning. Green tea and GRUB. Thinking of Jack Nicholson's movie, this is about as good as it gets. Well, maybe not ...

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

                      Comment


                        #26
                        Re: Boot 7.10 and 6.06 with lilo

                        I looked at the MBRs on both disks, and as you predicted they don't tell me much. I can't read machine code. Although curiously enough they both include the strings 'GRUB' and 'LILO' - probably due to partial overwriting.

                        Running the chainloader test also works as you predicted, it just bounces me back to the same bootloader menu.

                        I also tried the bios bootloader to see how it looked. It has several options including:
                        2. SATA Primary Drive
                        3. Primary Master Drive
                        It's probably not healthy to have two disks as primary. When I choose option 3 it just prints a load of 99s on the screen and freezes. Choosing 2 brings me to grub as normal.

                        I still think there's a difference between what grub sees when the OS is running, compared to what it sees at boot. In the grub shell when the OS is loaded, the command "geometry (hd0)" shows me the geometry of the IDE (mandriva) drive. However, when I drop into the grub shell at boot time, the same command shows me the geometry of the SATA (kubuntu) drive. So it looks like a hardware misconfiguration issue (on my part!) has confused grub.

                        Comment


                          #27
                          Re: Boot 7.10 and 6.06 with lilo

                          Interesting about what you are seeing with GRUB. You could be right about this. I do know that what GRUB sees (hd0, hd1, ...) may differ from what Linux sees (sda, sdb, etc.). And what I said about device.map and the Linux emulator grub shell. But you are saying something beyond that.

                          And you said: "Running the chainloader test also works as you predicted, it just bounces me back to the same bootloader menu."
                          I win that one -- GRUB is installed to your MBR!

                          As for hardware, I'm not real good on that, except I read that it is best to fill up Controller 1 (with Master and Slave) before using Controller 2 (with its Master & Slave connectors).
                          I am unable to experiment here because I do not have an IDE drive, and only have the one IDE controller (e.g., my ATAPI DVD drive is connected to it; my hard drives are SATA, the motherboard has 4 SATA connectors).

                          Well, interesting, and thanks for your good feedback.

                          The GRUB manual is at:
                          GRUB, GNU GRUB Manual 0.97 at: http://www.gnu.org/software/grub/manual/

                          Herman's bigpond site is another good GRUB source:
                          Bigpond, home: http://users.bigpond.net.au/hermanzone/

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

                          Comment


                            #28
                            Re: Boot 7.10 and 6.06 with lilo

                            You need to watch the "boot" flags too. I noticed on my new Intel BIOS that it makes a difference -- apparently on some BIOS's it does NOT make a difference, regarding booting Linux. Of course Windows requires the boot flag to be set or it won't boot.

                            Comment


                              #29
                              Re: Boot 7.10 and 6.06 with lilo

                              That would be something one could experiment with.
                              Use GParted Live CD.
                              Select your disk/partiiton from the drop-down list on the upper right.
                              To set a boot flag:
                              Partition > Manage Flags > boot.

                              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