Announcement

Collapse
No announcement yet.

Grub problem....???having 2 os one windows 7 and other kubuntu(solved)

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

    Grub problem....???having 2 os one windows 7 and other kubuntu(solved)

    OK im gonna explain my problem....i got to drives ok? one is my computer in wich i got my windows xp installed and the other one is my external drive in wich i installed kubuntu.

    Since i installed kubuntu on my external drive the grub loader boots froms the external drive of kubuntu, that means that if i take out my external drive and disconnect it it says grub loader error 21 and wont boot any OS not even windows xp......so my problem is that i want to install the grubloader in a partition on the computer drive.....so i followed this tut that appears over here...http://kubuntuforums.net/forums/index.php?topic=3081671.0


    I followed this steps..that appears in the tut
    Section 6
    Special Situations
    Two drives, a Windows drive and a Kubuntu drive, GRUB is in the Windows MBR,
    but sometimes you must remove the Kubuntu drive
    and Windows won’t boot when you do.

    Solution: Include a dedicated GRUB partition on the Windows drive.

    Assume Windows is on the first drive, BIOS is set to boot from the Windows drive, Kubuntu is on a second drive, GRUB from your Kubuntu is used as the bootloader and is installed to the MBR of the Windows drive, and so it boots both Windows and Kubuntu, but sometimes you need to remove the second drive from your PC. How to boot Windows then?

    If you remove the Kubuntu drive, you will get an error or a freeze because GRUB can’t find its boot menu, /boot/grub/menu.lst (its “Stage_2” files). A simple solution for this is to build a separate, small, dedicated GRUB partition on the Windows drive, and boot both Windows and Kubuntu from that partition. You need only 200 KB to hold the GRUB files (so, in practice, make it 1MB or the minimum allowed by FAT32 or ext2 format). If your Windows XP operating system takes up the whole drive, you must first shrink that partition to make room for the dedicated GRUB partition. You can use GParted to do that; however, you really should make a backup of your Windows partition, or at least your data there (My Documents, or Documents and Settings), and make sure your Windows distribution CD is available in case you mess up and have to re-install Windows.
    Reference: See SECTION 9 Separate, dedicated GRUB partition.
    SECTION 9
    SECTION 9 Separate GRUB Partition
    Making and using a separate GRUB partition

    A separate GRUB partition contains only one item: /boot/grub and the GRUB files (contained under the grub directory). The partition does not contain any other boot files under /boot; the kernel and initrd files are not present. (A full /boot partition contains the kernel(s) and initrd files. That is a different subject and is not covered here. Basically, it is the same, except you must maintain the up-to-date kernel list correctly and edit your groot= (hdx,y) statement in menu.lst)

    Advantages/uses of a separate GRUB partition:
    -- If you install a lot of OSs, it is easy to manage the multi-booting and boot menu using a separate GRUB partition.
    -- If you change the OSs on your partitions, it is easy to modify the boot menu if you use a separate GRUB partition (if you use configfile booting, you don't have to change anything).
    -- In the separate GRUB partition, you do not have to use specific kernel and initrd statements; nor do you have to use UUIDs (which is nice in case you repartition your hard drive(s), and thus there is no need to edit your main boot menu.

    Four steps: To build a separate GRUB partition and make your PC boot from it.
    Step 1: Use a partition editor to make a small partition (1 MB is plenty; FAT32) that will become the GRUB partition.
    Step 1: Make a /boot directory in the GRUB partition, and copy GRUB files into it so you have /boot/grub.
    Step 2: Using those GRUB files, install GRUB to the Master Boot Record of the first BIOS boot drive.
    Step 3: Edit the boot menu (/boot/grub/menu.lst) of the GRUB partition to suit your needs.

    Example
    Two SATA HDs, sda and sdb. Windows XP in sda1 = (hd0,0); Kubuntu 8.04 in (hd1,1); Kubuntu 8.10 in (hd1,2). The first BIOS boot drive is hd0, from which the PC boots. The GRUB that controls the booting is the GRUB in Kubuntu 8.04 (which is also the controlling boot menu, /boot/grub/menu.lst) (and so GRUB from (hd1,1) was installed to the MBR (hd0)).
    To do: Make a separate GRUB partition in sdb1 = (hd1,0) to control the booting.
    Note: In setting all this up, GParted Live CD (see REFERENCES) was used to do the partitioning, formatting, and then all OSs were installed as indicated.

    Outline/tips

    The partitioning is already done. The separate GRUB partition was created as sdb1 = (hd1,0), formatted FAT32 (or ext2 or ext3).
    Boot into Kubuntu 8.04. (This can also be done from Kubuntu 8.10 or from a Live Kubuntu CD).
    You can do this work in GUI (Konqueror or Dolphin) or CLI (Konsole, or a console).
    If you do it in Konsole, you may wish to open your file manager as root:
    in 8.10:
    kdesudo konqueror
    kdesudo dolphin
    in 8.04:
    kdesu konqueror
    kdesu dolphin

    While in Kubuntu 8.04, access the GRUB partition (hd1,0) (or sdb1). Make a directory called boot.
    (In GUI: right-click, Create New > Folder, name it boot; in CLI: sudo mkdir /boot).

    Copy grub and GRUB files into the GRUB /boot directory:
    Again, from Kubuntu 8.04, copy the grub directory and its contents into the /boot directory of the GRUB partition (hd1,0) (or sdb1). The result in the GRUB partition is /boot/grub (with all the GRUB files under grub).

    Set up GRUB:
    Open Konsole, and install GRUB to the MBR of the first BIOS boot drive (hd0) using the GRUB files in your GRUB partition:
    Konsole
    sudo grub
    grub>root (hd1,0)
    grub>setup (hd0)
    grub>quit
    $exit

    Edit menu.lst in the GRUB partition:
    Edit the menu.lst in the GRUB partition (hd1,0) (or sdb1) to include boot entries for XP and the Kubuntu OSs.
    You may open the menu.lst (in sdb1), as root, and delete everything (if you so wish). Then type the following:

    # menu.lst for separate GRUB partition.
    Default 0
    timeout 10

    title Windows XP in (hd0,0)
    chainloader (hd0,0)+1

    title Kubuntu 8.04 in (hd1,1)
    configfile (hd1,1)/boot/grub/menu.lst

    title Kubuntu 8.10 in (hd1,2)
    configfile (hd1,2)/boot/grub/menu.lst

    # End of menu.lst for the GRUB partition

    That's it – Your are done
    Re-boot to test it.


    CLI: Konsole details
    Here's the details at Konsole. The lines starting with # are comments.

    # First, use GParted to make and format a new partition, sdb1= (hd1,0).
    # Starting in the “main” Kubuntu in sdb2, at Konsole, proceed with:
    # make a new directory for mounting sdb1
    sudo mkdir /media/sdb1
    # mount partition sdb1 on /media/sdb1
    sudo mount /dev/sdb1 /media/sdb1
    # make a /boot subdirectory in sdb1
    sudo mkdir /media/sdb1/boot
    # The next statement automatically makes a /grub sub-directory; then -r copies recursively
    # all contents of the grub folder into the /boot/grub folder on sdb1
    sudo cp -r /boot/grub /media/sdb1/boot
    # open, as root, menu.lst on sdb1in text editor Kate
    # in 8.10, use kdesudo; in 8.04, use kdesu:
    kdesudo kate /media/sdb1/boot/grub/menu.lst
    # Edit this menu.lst (see the text above)
    # Then File>Save and File>Quit
    # get a GRUB prompt as root
    sudo grub
    # install GRUB to the MBR of the first BIOS boot drive (hd0) using the GRUB files in the GRUB partition (hd1,0) (= sdb1)
    grub>root (hd1,0)
    grub> setup (hd0)
    grub> quit
    # to restart and test the new boot menu from sdb1
    $ sudo shutdown -r now


    Notes:

    -- menu.lst: You may construct your menu.lst any way you wish, using kernel & initrd booting, chainloader booting, or configfile booting, or combinations thereof.
    Ok so following those steps i got unitl step nine and already done a fat32 partiton in the computer hd and already created the folders of grub and boot just by coping the ones that i got in my external drive to that partition.....but once i got to the
    step Step 2: Using those GRUB files, install GRUB to the Master Boot Record of the first BIOS boot drive.
    i got stuck....i dont understand how the #&%$ im going to instasll the grub to the master boot record of the bios got no idea im so lost


    Any ideas plz...?help

    #2
    Re: Grub problem....help needed plz...

    For GRUB Legacy,
    You use the
    grub>root (hdx,y)
    grub>setup (hdz)
    grub>quit
    commands (explained under Re-installing GRUB section).
    Now, if you are using GRUB 2, then it is the same, except see SECTION 3 of the GRUB 2 Guide (the command is different). Sorry, I have to leave the house now, but others here can help further.
    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 problem....help needed plz...

      im sorry to say this Qqmike but i got no idea of what u just said...can u explain it a bit slowly? plz or better thanks XD

      Comment


        #4
        Re: Grub problem....help needed plz...

        Note: Before resetting GRUB, first decide how/where you want to create your boot menu, /boot/grub/menu.lst (in the dedicated GRUB partition). If you want to do that work in Kubuntu, better do it now before you change GRUB: boot into Kubuntu and make the menu.lst; save it somewhere you can find it (like your Desktop).

        Boot from the Kubuntu Live CD.
        Start a live session (i.e., do not select the Install option).
        Open Konsole.
        Explore your drives:
        sudo grub
        then
        grub>geometry (hd0)
        grub>geometry (hd1)
        Identify which drive is your Windows drive (either hd0 or hd1). Let's say it is hdz.
        Identify the partition you made for GRUB. It will be (hdz,x), where x is the partition number. The first partition on drive z is 0 (so x=0); the second is partition 1 (so x=1); etc.
        Then install GRUB to MBR of drive hdz using the GRUB files in your dedicated GRUB partition (hdz,x):
        grub>root (hdz,x)
        grub>setup (hdz)
        grub>quit
        and then re-boot to test it.

        Then you have to make a menu.lst in your dedicated GRUB partition hd(z,x) (in /boot/grub of (hdz,x)), and menu.lst must contain boot entries for Windows and for Kubuntu.

        Create a text file and copy it into /boot/grub.
        You may have to work as root.
        You can do this from a Live CD, then copy menu.lst to your GRUB partition.
        Or, you could boot into Kubuntu and make and save menu.lst, then copy it into your deicated GRUB partition under /boot/grub.

        For /boot/grub/menu.lst, start with

        # This is my menu.lst etc. etc. whatever notes to yourself.
        # etc.

        default 0
        timeout 10

        Then:

        For Windows:

        title Windows
        root (hd0,0)
        chainloader +1

        For Kubuntu:

        title Kubuntu
        root (hd1,y)
        configfile /boot/grub/menu.lst

        where y is the partition Kubuntu is on. (Again, the first partition is y = 0, the second partition is y =1, etc.).

        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 problem....help needed plz...

          Im very thankfull Qqmike i really am i already got it to work its perfect i've couldnt done it with out you thanks a lot i really apreciate your help really.... Thanks for the time you took on explaining it so detailed and simple, your really a pro i just was so lost and u made it so easy thanks again XD

          Comment


            #6
            Re: Grub problem....help needed plz...

            Ha! Glad you are happy! I'd say you are pretty good yourself there, catching on to this and implementing it so fast so well!
            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 problem....help needed plz...

              lol Qqmike thanks for the compliment by the way....im so unlucky....XD i just got out of that problem and got into other one!!! XD so....here it comes....


              I just formated the partition in wich i had installed my windows xp ....to install the new windows 7 that i wanted to try....that honestly is pretty good...(still smells like vista XD) and now when my computer starts it will just boot up windows 7....wont even tell me wich OS start....so i think that i have to modify again the grub files...and change the xp loader for the windows 7 loader am i right? if so i think i know how to do it, (like before but just with windows 7 right) do i have to change or put some new commands??


              Thanks again and waiting for anyone to respond hopefully its you Qqmike cause u know the problem that i had before and u helped me out giving the best answer that anyone would look for.

              Comment


                #8
                Re: Grub problem....help needed plz...

                Yes, same as before.
                Your GRUB partition is already set up, and we know that it works because it worked.
                You even have a boot entry for Windows there (the chainloader thing).
                So, all you have to do now is re-install GRUB so that GRUB installs itself to the MBR of your first BIOS boot drive (which I think is sda = hd0).

                This stuff from above:
                Boot from the Kubuntu Live CD.
                Start a live session (i.e., do not select the Install option).
                Open Konsole.
                Explore your drives:
                sudo grub
                then
                grub>geometry (hd0)
                grub>geometry (hd1)
                Identify which drive is your Windows drive (either hd0 or hd1). Let's say it is hdz.
                Identify the partition you made for GRUB. It will be (hdz,x), where x is the partition number. The first partition on drive z is 0 (so x=0); the second is partition 1 (so x=1); etc.
                Then install GRUB to MBR of drive hdz using the GRUB files in your dedicated GRUB partition (hdz,x):
                grub>root (hdz,x)
                grub>setup (hdz)
                grub>quit
                and then re-boot to test it.

                (where (hdz,x) is the GRUB partition you made--same as last time.; and I'm pretty sure that hdz = hd0 in your case here)
                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 problem....help needed plz...

                  Haha thanks dude already did that cause i thought of that even before u told me...i now im confident that i know pretty much how it works but now look i did what u said, exactly the same as u said it but when i try to boot windows 7 says cant find bootmgr cant load....i saw that windows 7 made another partition on the when i installed the OS and there the OS put the bootmgr......so should i give intrucciones to the menu.lst to open bootmgr in bla bla partition or should i copy the content of bootmgr and all the partitions content to the grub folder


                  Thanks for ur time and your effort helping me out u sure are a nice.

                  Comment


                    #10
                    Re: Grub problem....help needed plz...

                    lol!!!!!!!!!!!!!!!!!!!!! im so dumb hahaha XD its logic....well i was wondering in my house thinking about a solution for my house when i thought about this....

                    menu.lst has 2 directions the one for kubuntu and the one where my windows 7 is installed....


                    bootmgr is a partition that have the direction to load windows 7 so.....


                    result if i write the direction on menu.lst of kubuntu and the bootmgr partition the bootmgr will load windows 7 obvious!!!!!!!!!!!!! that works now XD thanks 4 ur time either way i solved this already with ur help and the best thing is that i learned how to use it thanks a lot!!!!!

                    Comment


                      #11
                      Re: Grub problem....having 2 os one windows 7 and other kubuntu(solved)

                      Good show, again, kiraitachi!
                      You have the right attitude. Lots of folks setup all sorts of crazy things they have no clue about maintaining--dual boots, RAID, WUBI, on and on.

                      Nice work there.

                      For future reference, two more very useful guides:

                      *** The definitive dual-booting guide: Linux, Vista, 7, and XP step-by-step
                      http://apcmag.com/dualboot
                      Restore Various Bootloaders: XP/Vista/7
                      http://ubuntuforums.org/showthread.php?t=1014708

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

                      Comment


                        #12
                        Re: Grub problem....having 2 os one windows 7 and other kubuntu(solved)

                        afterthoughts ...

                        Strange that we've had Windows 7 cases here where we did NOT have to consider that special 7 "boot partition." That is, we were able to chainload right to the partition that 7 is in, paying no attention to 7's special partition.. And then, your 7 setup uses the special partition; it houses a bootloader; and GRUB can chainload to that bootloader. Interesting, a good user case. Obviously, I don't have 7, probably won't until it comes down to $15
                        Like you say, at least you are getting to know your setup very well.
                        Again, good show.
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #13
                          Re: Grub problem....having 2 os one windows 7 and other kubuntu(solved)

                          haha thanks Qqmike but remember that who gave me the starting point and all the help was u and i have to say that without ur teaching it would be almost impossible for me to do anything so i must thank u again

                          By the way yeah i ik what u mean with the prices of windows 7, although mine is AIO CRACKED.....is Windows ultimate 7 Aio cracked...its the same as windows 7 full and goes perfect i actually like it a lot....it works so fast i got a say this time that microsoft has worked well on this one one of the good things and that they learned from linux is that is not necessary to install the drivers they already come up with the OS and thats saves u a lot of time. If u want (between us) just private post me and i can upload the iso for u its awesome u wont regret it .

                          Cheers and thanks again a lot

                          Comment

                          Working...
                          X