Announcement

Collapse
No announcement yet.

Dual boot and GRUB

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

    Dual boot and GRUB

    I hope someone can help with this.

    I have win/xp pro running on hd0.
    I installed Kubuntu 7.10 on a second new IDE HD.

    The install modified the boot on my hd0 and allows me to boot to kubuntu using GRUB.

    However what I would prefer is to make hd1 a separate bootable linux drive and not touch my hd0 with xp pro and allow me to choose the hd to boot from at startup.

    One of my problems was having GRUB default to KUBUNTU and driving my wife crazy. I was able to fix that by modifying menu.lst.

    I then tried to setup GRUB on HD1 using:
    grub> root (hd1,0)
    grub> setup (hd1)

    That does bring up a GRUB menu when selecting HD1 as the boot drive, however does not allow me to boot either KUBUNTU on WIN/XP.

    Am I correct that I need something beside GRUB setup on HD1?

    thanks for any help
    David<br />Chandler, AZ<br /><br />Kubuntu 7.10

    #2
    Re: Dual boot and GRUB

    Hey. Below is taken from my Menu file. Notice the Deafult = 4. That is because XP is fourth in the list (based on the fact that GRUB starts counting at 0). Don't copy all information here as it is specific to mine, but it should give an idea how to make XP boot by default with no interaction from your wife. Just let her know when that comes up it will already be at XP and will boot in 5 secs (timeout). You on the other hand will know to move the cursor up to the top choice and Kubuntu! Look for more from Qqmike, he has an excellent How TO for GRUB..

    Code:
    default		4
    timeout		5
    
    
    title		Ubuntu 7.10, kernel 2.6.22-14-generic
    root		(hd0,4)
    kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=535434535355345 ro quiet splash
    initrd		/boot/initrd.img-2.6.22-14-generic
    quiet
    
    title		Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
    root		(hd0,4)
    kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=34534534534534534 ro single
    initrd		/boot/initrd.img-2.6.22-14-generic
    
    title		Ubuntu 7.10, memtest86+
    root		(hd0,4)
    kernel		/boot/memtest86+.bin
    quiet
    
    title		Other operating systems:
    root
    
    title		M$ Window$ XP Media
    root		(hd0,1)
    savedefault
    makeactive
    chainloader	+1

    Comment


      #3
      Re: Dual boot and GRUB

      grub needs to be installed on the master boot record (MBR) of the first drive. Meaning the drive the computer will try to boot from first. The linux kernel and menu.lst will be installed on the drive with kubuntu on it. When the computer attempts to boot the first drive it should find grub installed on the MBR which will have directions to the menu.lst entry on the kubuntu drive. You have two options if I understand what you are trying to do.

      1. Change menu.lst to have winXP boot as default

      2. Install grub on the second drive and change the drive order in the BIOS to boot into kubuntu.

      Of course there is always 3.... erase winXP and have the wife make the switch. You can blame me when she gets mad... lol

      Mike
      http://monte48lowes.blogspot.com

      Comment


        #4
        Re: Dual boot and GRUB

        Originally posted by monte48lowes
        Of course there is always 3.... erase winXP and have the wife make the switch. You can blame me when she gets mad... lol

        Mike
        Can we all do that!

        Comment


          #5
          Re: Dual boot and GRUB

          That's what I did at my house... only I didn't have anyone else to blame. So yes it came back to me then.. why not!

          Mike
          http://monte48lowes.blogspot.com

          Comment


            #6
            Re: Dual boot and GRUB

            What if I wanted to remove the win/xp drive entirely? Or put the the linux drive in a different machine by itself? Can't I make the linux drive bootable on its own?
            David<br />Chandler, AZ<br /><br />Kubuntu 7.10

            Comment


              #7
              Re: Dual boot and GRUB

              You can certainly make your new hard drive a bootable Linux drive. You need to run "grub install" and point it at the mbr of the new drive. Check out Qqmike's Grub Toolkit for the ins and outs of Grub:

              http://kubuntuforums.net/forums/inde...opic=3081671.0

              or, if you want to do it cheap 'n sleazy like I would, just disconnect the first (old) hdd, leave the new hard drive connected, and install Kubuntu on it again, and finish by telling it to install Grub on the mbr of the "first hard drive".

              Of course, you realize that the video display on some other computer that we haven't identified at this point may or may not display the boot menu and login splash screen correctly .... :P It would probably be best to configure a VESA display using a non-challenging 1024 x 768 resolution or something like that, to make that hard drive as widely usable as possible.

              Comment


                #8
                Re: Dual boot and GRUB

                Hi dwneylonsr,

                You said at the start that:
                I then tried to setup GRUB on HD1 using:
                grub> root (hd1,0)
                grub> setup (hd1)
                That does bring up a GRUB menu when selecting HD1 as the boot drive, however does not allow me to boot either KUBUNTU on WIN/XP.
                Am I correct that I need something beside GRUB setup on HD1?

                Answer:
                You did it right. No you don't need something beside GRUB setup on HD1.

                - - - - -

                I'm not clear on what you are trying to do, but I have a feeling that you know.
                What you did above (root (hd1,0) and setup (hd1) did install GRUB to the MBR of that drive (hd1).
                You can boot Windows from that menu.lst by including a boot entry for Windows on the /boot/grub/menu.lst located on (hd1,0). It should look like this:

                title Windows booted from my Kubuntu drive
                map (hd0) (hd1) # Map hd1 to hd0
                map (hd1) (hd0)
                rootnoverify (hd1,0) # rootnoverify ensures no attempt is made to mount windows
                makeactive
                chainloader +1

                (Logic: when you boot from the Kubuntu drive, BIOS and GRUB sees that drive as hd0 (not hd1) – ANY boot drive that the PC boots from NOW is seen as hd0.
                So Windows looks like it is on hd1.
                But Windows likes to be on hd0.
                So we fool Windows into thinking it is on hd0 by doing that map dance.)

                NOW, this goes into the menu.lst on the Kubuntu drive.
                BUT if you boot normally from the regular Windows drive, and you want to choose Windows to boot into, you must use your old existing Windows boot stanza:

                title Windows booted as usual
                root (hd0,0)
                chainloader +1


                (Instead of all this, you can do as Moonrise said and just make Windows the default under your current setup.)

                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

                (See also Reply #12 for the map dance, if you are interested.)
                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: Dual boot and GRUB

                  and so, to be clear,

                  you have GRUB installed to two MBRs – one on each drive.
                  and each points at your Kubuntu menu.lst on the Kubuntu drive;
                  the /boot/grub/menu.lst on that Kubuntu drive will have two boot stanza entries for Windows—the two I listed above; one is used in case you boot from the Windows drive and wish to boot into Windows; the other is used to boot Windows in case you boot from the Kubuntu drive.
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #10
                    Re: Dual boot and GRUB

                    So as I understand the problem is now that the menu.lst is no longer correct to boot to either system since I've in effect swapped the drives.

                    Ok, think I'm getting the idea. So do I now need menu.lst entries for win/xp on hd0 and hd1? And the same for linux?
                    David<br />Chandler, AZ<br /><br />Kubuntu 7.10

                    Comment


                      #11
                      Re: Dual boot and GRUB

                      One thought I have with the configuration as Qqmike has suggested. If only the first drive is installed in the computer the computer will not boot. If the MBR of the first drive is looking for menu.lst on the second drive (which in this instance would be removed from the computer) grub errors will occur. It might be better then to use the grub super disk to remove grub from the MBR of drive number one. Then use the BIOS settings to change the drive order.

                      Mike
                      http://monte48lowes.blogspot.com

                      Comment


                        #12
                        Re: Dual boot and GRUB

                        You only need a menu.lst if grub is installed to the MBR of the windows drive. It must be installed on the kubuntu drive.

                        Mike
                        http://monte48lowes.blogspot.com

                        Comment


                          #13
                          Re: Dual boot and GRUB

                          Grub IS currently installed to the MBR of the windows drive. I haven't found unstall instructions for it though.

                          What happens if I don't use Grub at all? The linux drive should be bootable, right?
                          David<br />Chandler, AZ<br /><br />Kubuntu 7.10

                          Comment


                            #14
                            Re: Dual boot and GRUB

                            Yes, the Linux drive is bootable (if you set a boot flag on it, say by using GParted Live CD to do so).

                            I think the problem here is that we are not clear on what you want to happen exactly.
                            One thing for sure – what mike Monte48lowes said is right: the second drive must be connected if the GRUB in (Edit [the MBR of the Windows drive] points at the menu.lst on the Kubuntu drive!
                            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                            Comment


                              #15
                              Re: Dual boot and GRUB

                              To remove grub from the MBR of the windowsXP drive either the install CD for windows can be used

                              Code:
                              fdisk /mbr
                              or the grub super disk which can be found here:

                              http://supergrub.forjamari.linex.org/?section=download

                              it would be a good idea to have the grub super disk handy at all times, just in case.

                              Mike

                              PS. Here is some additional information regarding the super grub disk

                              http://www.linux.com/articles/57240
                              http://monte48lowes.blogspot.com

                              Comment

                              Working...
                              X