Announcement

Collapse
No announcement yet.

GRUB 2: A Guide for Users

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

    #61
    Re: GRUB 2: A Guide for Users

    Yes, it is working.
    Here is a snippet from my gurb.cfg

    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Microsoft Windows XP Home Edition (on /dev/sdb1)" {
    insmod ntfs
    set root=(hd1,1)
    search --no-floppy --fs-uuid --set d2a4d8bba4d8a2f1
    drivemap -s (hd0) ${root}
    chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###

    grub-install /dev/sda did not detect the Widows partition the first time , using the --recheck option did.

    Comment


      #62
      Re: GRUB 2: What?

      Just when you think you have it made in the shade ...

      Two HDDs, GRUB 2 runs the show from 9.10 OS on the 2nd HD.
      Various OSs on both HDDs.
      => Typical (or, at least, not atypical) setup.

      With GParted Live CD, just now doing routine partition work:
      simply created a FAT32, 40 GB DATA partition from unallocated space on sda.

      Rebooted. Up comes my very slow-to-boot GRUB 2 (because there's a known GRUB 2 bug with 2 HDD dual boot--see posts above).
      OK, no big deal, sitting there reading "GRUB Loading."
      But then ... instead of eventually booting me to a GRUB 2 boot menu ...
      "No such disk."
      grub rescue>

      Boom.

      I tried everything at that GRUB 2 rescue prompt, nothing worked, all got "Unknown command."
      Not even help or reboot or quit or exit or normal (mode). Nada, nothing worked.

      Well, needless to say, very much needing to get into my OS to finish some work, I did a hard reset of the PC and rebooted into 8.04 Live CD session, where I re-installed GRUB Legacy (read: Good Old GRUB) to run the boot show for awhile.

      Damn. Nothing felt better than to be in 8.04.3 with GRUB legacy and trusty Konqueror file manager that knows how to identify my partitions and get them mounted as needed.

      I can't recall a situation where GRUB Legacy ever once failed to boot after creating a simple, independent data partition. GRUB Legacy doesn't care what's in your fstab or not, or on your disks, as long as you've installed some boot machinery and _something_ to boot into (or for that matter, nothing to boot into).

      Normally I'd say, "Of course this is easy to fix." But then, WHAT broke?! GRUB 2 shouldn't care about my partitions; it should just probe them. The only possible fix I can think of would be to re-install GRUB 2. When I have time to play around, I'll try that. (Conjecture: something in GRUB 2 about UUID is broken ... ? )

      This is a sloppy way to release a new bootloader, and with no official documentation (i.e., guidance on the workings). But when these things happen, there is GRUB Legacy as another choice. And the bug reporting system seems responsive.

      Just gotta bear in mind for now that GRUB 2 is not yet ready for general use and is, in fact, still in testing.

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

      Comment


        #63
        Re: GRUB 2: A Guide for Users

        Up comes my very slow-to-boot GRUB 2 (because there's a known GRUB 2 bug with 2 HDD dual boot--see posts above).
        That explains why I've seen that on the AMD system I'm testing at work that has two HDs. 1st one with XP and the second with Kubuntu . Oddly enough it does not do that on my desktop here at home but then again the 1st HD is Kubuntu and the second one is XP. Maybe a pattern there?

        Comment


          #64
          Re: GRUB 2: A Guide for Users

          Yes, a pattern.

          #43 by Felix Z here:
          https://bugs.launchpad.net/ubuntu/+s...b2/+bug/420933

          One workaround is to set BIOS to boot first from the non-XP drive. That works for some people, doesn't work for others. The (devs) are working to fix this. My delay is 70 seconds, quite a long time; some folks are at 3-4 minutes.

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

          Comment


            #65
            Re: GRUB 2: A Guide for Users

            I clocked my between 100 to 120 secs. Still worth getting into Kubuntu though. Believe it or not, XP boots a lot quicker with GRUB2. Haven't figured that one out, not that I'm complaining. Just not used to it.

            Comment


              #66
              Re: GRUB 2: A Guide for Users

              My experimentation with grub2 and a new Intel mac is not going so well. It's compounded by the fact EFI is a lot different than the classic MBR approach I'm used to. I have a native install of Karmic with grub2-pc installed in the MBR of the partition itself.

              I compiled the latest grub2 from subversion with EFI support. It displays 1.97 in the grub shell when I boot it from USB. I ran grub-mkimage to create a grub.efi boot image file and copied it to a USB drive and blessed it. Blessing volumes was new to me until I started this experiment. It basically does on a Mac what grub-install does on a PC. I had some initial problems with the image I created missing some modules but I'm pretty sure I have everything I need now.

              I can get to the grub shell and run commands. I don't think it reads the grub.cfg file I created in the blessed directory on my USB. I can see my linux and OS X partitions but so far I can't get grub2-efi to boot either one. I have tried to chain load OS X and get a read error. I also tried to start Karmic and it locks up after boot. I might need to issue some additional commands or add some options and maybe it will work. Below is what I tried and nothing happens after I type boot. It hangs.

              Code:
              grub-sh>set root=(hd2,3)
              grub-sh>linux /boot/vmlinuz-2.6.31-14-generic
              grub-sh>initrd /boot/initrd.img-2.6.31-14-generic
              grub-sh>boot
              I found out from devs on IRC grub-efi can only chain load other efi files so it can't handle the grub in my Linux partition. They said something about appleloader but I can't find a whole lot of information on it. If I get this working it will likely be from the grub shell. I'm not sure the config file is found even though it's there I'm never presented a menu.
              linux && bash = "the future"

              Comment


                #67
                Re: GRUB 2: A Guide for Users

                Well, you're beyond me. My experiments with GPT were quite limited and quick w/GRUB 2, and no experience with EFI.

                I did notice
                grub-sh>linux /boot/vmlinuz-2.6.31-14-generic

                Do you not have to pass to the kernel the location of the root file system (of the OS)?

                grub-sh>set root=(hd2,3)
                is a message to GRUB 2 (telling it where the controlling GRUB 2 files are).
                That's different from telling the kernel where the OS root filesystem is.

                Something like:

                grub-sh>set root=(hd2,3)
                grub-sh>linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sdXn
                grub-sh>initrd /boot/initrd.img-2.6.31-14-generic
                grub-sh>boot

                For example, if the Kubuntu root filesystem is also on (hd2,3), and if (hd2,3) = sdc3, then you'd have
                grub-sh>linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sdc3 ro
                as an example (ro = the kernel is to mount sdc3 read only, which I think is the default anyway).


                And, of course, you know the list command
                grub>ls
                which helps you make sure you have the right kernel files and such.
                (my how-to in OP talks about ls, I think under SECTION 3).

                Let us know how you do with this, if you wish.

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

                Comment


                  #68
                  Re: GRUB 2: A Guide for Users

                  Thanks Qqmike, I'll give that a shot in the morning. I'll keep this thread updated on my EFI progress.
                  linux && bash = "the future"

                  Comment


                    #69
                    Re: GRUB 2: A Guide for Users

                    Good.

                    We can use someone following the EFI/GPT end of this business, esp with MAC and with the upcoming large HDDs exceeding 2 TB. The existing, standard MSDOS MBR scheme is only going to carry us up to 2 TB disks, then it's a new game (EFI BIOS; GPT partition table). I touched on this in reply #1 of the how-to. Personally, I do not see myself buying a 2 TB disk in the foreseeable. I'm not a data rat pack

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

                    Comment


                      #70
                      Re: GRUB 2: A Guide for Users

                      I created an image with the following modules: part_gpt, hfsplus, fat, ext2, normal, sh, chain, boot, configfile, linux and appleldr. According to the devs on IRC you need the normal and sh modules for grub.cfg file support. I have those included but still no luck displaying the boot menu. I have the grub.cfg file in my blessed directory (/efi/grub on my USB as suggested on the WIKI).

                      I still can't get past the grub shell. Initially I'd settle for the grub.cfg file being read and the menu presented instead of going directly to the shell. I'm always presented with "sh:grub>6_" when I boot. I'm also not sure how to interpret my drive geometry in grub. It sees it as (hd0) (hd1) (hd2,1), (hd2,2) and (hd2,3). My laptop boot drive is seen as the third hard drive. My USB is formatted HPS+ with one partition. I expected to see (hd0,1), (hd1,1), (hd1,2) and (hd1,3) or maybe the USB with two partitions but not (hd0), (hd1) and (hd2,...). I'm still confused by that result.

                      I'm not able to browse (hd0) or (hd1) from the grub shell and no partitions are shown. I can browse (hd2) no problem, all my Karmic files are on (hd2,3) and I can see them from the grub shell. I tried root=/dev/sda3, root=/dev/sdb3 and root=/dev/sdc3 for good measure and it always hang on boot. That's where I'm at as of today. I might just create a bloated image with all the modules. I counted 99 mod files in my grub build directory.



                      linux && bash = "the future"

                      Comment


                        #71
                        Re: GRUB 2: A Guide for Users

                        Well, as you know, I have no clue about the EFI business. Nor why the geometry came out so weird. Certainly, as an extreme-case test scenario, I would load all the modules just to see if it will go right (and then tracing down the helpful module(s) might be fun). Those 99 files don't take up a whole lot of space (I'm forgetting the MBs and am not in that system right now to check, was it 10 MB or 30 MB?).


                        *****************EDIT
                        Just one note:
                        The boot drive is always seen as hd0, right? That is, the drive you actually boot the PC from for the current session will be seen by BIOS as hd0 (and seen also by GRUB as hd0).

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

                        Comment


                          #72
                          Re: GRUB 2: A Guide for Users

                          yeah, that's what I thought too, the boot drive is hd0. More testing to come. I'm definitely going to add the xnu module and try to boot the OS X kernel directly instead of chain loading which has not worked so far.
                          linux && bash = "the future"

                          Comment


                            #73
                            Re: GRUB 2: A Guide for Users

                            Are we in the twilight zone, or just plain confused, or lost?

                            Dual booting OSs on two or more hard drives using the FINAL Kubuntu Live CD Desktop installer.
                            I have no problems doing it. The final step (Summary) of the Manual partitioning option allows for placement of GRUB 2 in any MBR or in any partition of my system. No problem on my system.

                            However, Vinny has tested it on his system and found (using the Advanced button in the Summary step) that he did not have the option of putting GRUB 2 on sda--only option was on sdb (of a 2-HD system).
                            Reply #87:
                            http://kubuntuforums.net/forums/inde...seen#msg209236


                            Even more confusing, the kubunuguide says this:

                            Installing multiple OS on a single computer

                            Warning: Kubuntu Desktop edition installer no longer allows a custom installation of GRUB, and it now uses GRUB2, which allows very little customization. DO NOT USE the Karmic Koala Desktop edition if you use a boot partition, use multiple OS (more than 2), or chainload bootloaders. The Kubuntu installer will overwrite your Master Boot Record and you will later be forced to recreate it. This is a serious flaw in Karmic Koala. Use the Ubuntu Server edition instead (and then later add the kubuntu-desktop).
                            If you want to install more than 2 operating systems on a single computer, check out these tips.
                            [End quote]
                            http://kubuntuguide.org/Karmic#Dual-...ws_and_Kubuntu
                            "These tips" are here:
                            http://kubuntuguide.org/Multiple_OS_Installation

                            -> -> Yet, again, I have no problems doing what it says can't be done.

                            I have no clue what's going on. But I do believe that some users are experiencing various issues like the above. Are these problems specific to Kubuntu? (and not to Ubuntu?) I don't know--again, my time to test and troubleshoot and investigate is limited.


                            - - - - - - - - - - - - - - - - - - - -

                            Another bug is supposed to be fixed now (again, sorry, I haven't had time to test the fix):
                            Current grub-pc takes several minutes to show menu
                            https://bugs.launchpad.net/ubuntu/+s...b2/+bug/420933
                            Applies again to a dual-boot/multi-disk setup.

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

                            Comment


                              #74
                              Re: GRUB 2: A Guide for Users

                              That is Odd. You know of the issue I had where it seemed to be using GRUB but was actually suing GRUB2, but didn't have any of the GRUB2 tools. Since rectified that and I do dual boot Linux on primary HD and WinXP on secondary HD and all operate beautifully and was auto configed by GRUB.

                              Comment


                                #75
                                Re: GRUB 2: A Guide for Users

                                (This has been added to References at the end of the OP.)

                                GRUB 2 Bugs and Questions

                                “grub2” package in Ubuntu
                                https://launchpad.net/ubuntu/+source/grub2
                                Bugs:
                                https://bugs.launchpad.net/ubuntu/+s...tatus:list=NEW
                                Questions, Open Questions
                                https://answers.launchpad.net/ubuntu...ld.status=OPEN


                                - - - - - - - - - -
                                Fixed:

                                Current grub-pc takes several minutes to show menu
                                (slow boot times with multiboot, mutlidisk)
                                Fixed (in PPA):
                                https://bugs.launchpad.net/ubuntu/+s...b2/+bug/420933
                                See #77 & #80
                                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