Announcement

Collapse
No announcement yet.

[SOLVED] Dedicated GRUB Boot Partition

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

    [SOLVED] Dedicated GRUB Boot Partition

    I have my boot disk partitoned and test alternate distros on the second partion. Unfortunately the installers keep clobbering my boot menu Currently I'm using the ubuntu menu on the second partition to boot my primary kubuntu setup I can restore the kubuntu setup but it will just get clobbered again when I next get the urge to break my PC (Jaunty Alpha 2 must be close ...)

    If I setup a dedicated GRUB boot partition as described here will that stop installers overiting my MBR?

    Thanks - Lindsay

    #2
    Re: Dedicated GRUb Boot Partition

    Or mine right here at home:
    How To GRUB Methods - Toolkit
    http://kubuntuforums.net/forums/inde...opic=3081671.0
    --- How to make a separate “GRUB boot partition.” (Dedicated to the GRUB files and make your PC boot from those GRUB files.) Reply #10


    "If I setup a dedicated GRUB boot partition as described here will that stop installers overiting my MBR?"

    Yes, kind of, but not really. (it only helps you keep the booting simple; esp if you install experimental OSs all the time; I always keep a separate GRUB partition--two, in fact)

    Solution:
    During the install of Kubuntu, you must have the installer put GRUB into the same partition as you put Kubuntu, NOT into any MBR. If Kubuntu goes into partition (hdx,y), then so does GRUB. (GRUB, then will go into the boot sector = sector 1 of (hdx,y), which is fine; in fact, it's useful--you can then chainload to boot that Kubuntu OS by: grub> chainloader (hdx,y)+1 and then the command grub>boot).

    Example:
    Live Kubuntu installer CD.
    Step 4: Specify Manual partitioning method.
    Step6: Advanced button at lower right; there, you specify where to put GRUB. The default is (hd0) = the MBR of the first-BIOS HDD; but you don't want that; you want (hdx,y)--as we discussed above; so you type (hdx,y) in place of the default (hd0).
    Done
    Click Finish and install proceeds.


    ******Added
    How To GRUB Methods - Toolkit
    http://kubuntuforums.net/forums/inde...opic=3081671.0


    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: Dedicated GRUb Boot Partition

      Cripes Mike, that's an impressive guide, thank you so much for creating it, very informative and helpful. I've had a good browse and am now reading it closely - all new ways to hose my system


      I primarily boot Kubuntu and occasionally trial new systems - usually alphas and betas.

      From your reply and the guide I'm guessing I'd be best off restoring the Kubuntu bootloader to the MBR and when I install new systems install grub to their partition, and then chain boot them from the Kubuntu grub menu.

      Thanks - Lindsay

      Comment


        #4
        Re: Dedicated GRUb Boot Partition

        Yes, but, configfile is also OK, instead of chainload ...

        Let's say GRUB is in your dedicated GRUB partition.
        And you install some Linux OS in (hdx,y) (for any x and any y, x = the hard drive, y = the partition).
        In the GRUB partition, you have a /boot/grub/menu.lst -- the boot menu for all OSs controlled by your GRUB partition.
        Then the boot entry (in the menu.lst in the dedicated GRUB partition) for the OS you put in (hdx,y) can be simply this:

        title OS in (hdx,y) or whatever you wish to say here
        configfile (hdx,y)/boot/grub/menu.lst

        That's it!

        When the boot menu comes up and you select that OS to boot to, you will then see it's menu.lst come up -- so you see two boot menus, one from the GRUB partition, one from (hdx,y). Then you select the OS again from that 2nd boot menu and off you go booting into (hdx,y).
        To speed this up, go into (hdx,y) and edit its menu.lst so the timeout is quicker--BUT NOT ZERO, like:
        timeout=2
        (2 seconds or 3 seconds--that gives you time to intervene and hit the "c" key if you have to or to select Recovery kernel to boot into).
        Also, set the default OS in the (hdx,y) menu.lst to be the OS you installed there. That way, you can walk away from the PC and it will automatically boot into the OS in (hdx,y) in just 2 seconds.

        Now, let's say that the OS in (hdx,y) gets a kernel update.
        It will appear in the menu.lst in (hdx,y).
        But it does NOT appear in the menu.lst in the GRUB partition.
        But it's still OK--
        when you re-boot the PC, you'll see the boot menu from the GRUB partition, and you'll still select the same OS (in (hdx,y)) to boot into. Because of the configfile statement, there is no need to have to edit the boot menu in the GRUB partition!
        configfile (hdx,y)/boot/grub/menu.lst
        says this:
        show me the menu.lst in (hdx,y), WHATEVER it is!

        => configfile is easy to maintain => there is no maintenance!

        Now, after a kernel update in (hdx,y), you may wish to edit the menu.lst in (hdx,y) and change the default OS to be the new kernel.

        See Reply #1 in that how-to for editing menu.lst:
        How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...opic=3081671.0

        --- HOW To: Change the Default Operating System (Also: Changing the timeout, boot menu, and other tips) Reply #1


        As for chainloading, you CAN also use that instead of configfile, but I prefer configfile (a little less quirky at times).
        However, in an emergency, where your boot menu(s) are not getting you into the OS, sometimes you can do this:
        You see the boot menu.
        Hit the "c" key
        Get a GRUB prompt, like this: grub>
        Do this:
        grub>chainloader (hdx,y)+!
        grub>boot

        and usually you will go right into the OS in (hdx,y).

        BUT, for chainloader to work, GRUB must have already been installed in the boot sector of (hdx,y). If you haven't done that, you can do it during the emergency:
        See the boot menu and hit "c" key.
        grub>root (hdx,y)
        grub>setup (hdx,y)
        # now GRUB is installed to the boot sector of (hdx,y), so proceed:
        grub>chainloader (hdx,y)+1
        grub>boot

        Carry on blackpaw, and Good luck.
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          [SOLVED] Re: Dedicated GRUb Boot Partition

          Have got it setup and working smoothly now

          Thanks Mike, much appreciated!

          Comment


            #6
            Re: [SOLVED] Dedicated GRUb Boot Partition

            Just for general laughs - I had a separate /boot partition for some time and by mistake had my latest kubuntu format the partition. All my kernels were blown away...
            Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

            Comment


              #7
              Re: [SOLVED] Dedicated GRUb Boot Partition

              That was quick!
              Good work on your end there!

              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: [SOLVED] Dedicated GRUb Boot Partition

                @blackpaw re toad --
                toad is using something different, a full, real /boot partition that contains /grub but also contains all the kernels, intird's, etc. More advanced, and in some ways, requires a little more attention now and then (like the groot= statement in menu.lst). But then, toad is generally more advanced!

                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: [SOLVED] Dedicated GRUb Boot Partition

                  More advanced in screwing things up, certainly.

                  Which route did you take now, blackpaw? I am interested so that I don't hose all my systems on my machine again!
                  Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                  Comment


                    #10
                    Re: [SOLVED] Dedicated GRUb Boot Partition

                    Originally posted by toad
                    More advanced in screwing things up, certainly.

                    Which route did you take now, blackpaw? I am interested so that I don't hose all my systems on my machine again!
                    Late reply ... work commitments, crazy this near the end of the year.

                    I didn't do a dedicated grub partition in the end, after Mikes explanation there didn't seem much sense.

                    I double checked the partitions from grub with the find command:

                    Code:
                    sudo grub
                    grub> find /boot/grub/menu.lst
                     (hd0,0)
                     (hd0,5)
                    (hd0,5) is my primary, (hd0,5) is my test partition. I might further split that in the future.


                    I restored my primary Kubuntu partitions grub loader to the MBR.
                    Code:
                    grub> root (hd0,0)
                    grub> setup (hd0)
                    Then I added a configfile entry to my grub menu (/boot/grub/menu.lst) for the other partitions.

                    Code:
                    title Ubuntu 8.10
                    configfile (hd0,5)/boot/grub/menu.lst
                    Now when I boot I have a grub menu of:
                    Code:
                    title Kubuntu 8.10, kernel 2.6.27-9-generic
                    title Kubuntu 8.10, kernel 2.6.27-9-generic (recovery mode)
                    title Kubuntu 8.10, memtest86+
                    title Ubuntu 8.10
                    The last option (Ubuntu 8.10) takes me into the grub menu for (hd0,5)

                    Thanks for all the help guys, I understand the process much better now, and future installs will be a lot less of a worry/hassle.

                    When I next add a test system I'll install its boot loader in the partition rather than the MBR.

                    Comment


                      #11
                      Re: [SOLVED] Dedicated GRUB Boot Partition

                      blackpaw -- Yes, exactly as you said it. Same principles as a dedicated GRUB partition.

                      If you ever change the OS in (hd0,0), you'll have to rebuild the menu.lst (in (hd0,0)) to include configfile(s) for the other OS(s), but that's trivial. In the meantime, before you get a chance to do such edits, you can always boot into, say, (hd0,5), manually:
                      when the grub menu comes up for your new (hd0,0) OS install, hit "c" key and:
                      grub> configfile (hd0,5)/boot/grub/menu.lst
                      and you are in.
                      Or
                      grub>chainloader (hd0,5)+!
                      grub>boot
                      and you are in (hd0,5) (this works since you put GRUB in the boot sector of (hd0,5)).

                      Nice work, blackpaw.

                      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