Announcement

Collapse
No announcement yet.

Add kubuntu to XP's boot.ini

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

    Add kubuntu to XP's boot.ini

    Hi!

    Just installed kubuntu 7.10 on my computers 2nd (sdb) harddrive while windows XP64 is installed on the 1st (sda) one. Getting the installation to work took some time. Appearantly I needed to add the "acpi=off" "noapic" and "1600*1200*16" options to be able to boot the installation-/live-dvd....

    Anyway... I've chosen to install grub on the 2nd harddrive since I wanted to add kubuntu to XP's boot.ini file. Well... That's not going to well.

    I've added kubuntu to the boot.ini as followed:
    Immediately after installing kubuntu I ran the "dd if=/dev/sdb1 of=/bootsect.lnx bs=512 count=1" command and copied the created file to a floppy. Then I booted windows, copied that file to the root of the harddrive and then I added this line at the end of the boot.ini file: "c:\bootsect.lnx=”kubuntu 7.10”
    Then I did a restart.

    Now the problem:
    When I select kubuntu in the boot.ini menu and hit ENTER I see a blinking _ on the monitor and thats it. No kubuntu, no grub, nothing!

    If I hit F12, for the BIOS-bootmenu, and select the 2nd harddrive, grub loads normal bút I have to change the hd1.0 to hd0.0 to be able of starting kubuntu. Otherwise it gives this error: "error 17: cannot mount selected partition"

    Anyone got an idea what's wrong here?

    With regards,

    Bart Grefte

    Computer specs:
    Intel Q6600 G0
    2GB (2x 1GB) DDR2 PC2-8500 (DDR2-1066), 5 (OCZ OCZ2N1066SR2GK)
    Gigabyte GA-X38-DQ6, BIOS F7
    2x Hitachi Deskstar T7K500, 320GB (7200RPM, SATA II, 16MB, NCQ, RoHS)
    Asus GeForce 6200 TC 256MB (saving money for a 3870x2 )
    Plextor PX-800A
    NEC AD-5170
    Tagan TG900-U33 ITZ 900 Watt
    All other specs: http://tweakers.net/gallery/sys/15529

    #2
    Re: Add kubuntu to XP's boot.ini

    You might want to review The definitive dual-booting guide: Linux, Vista and XP step-by-step
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Add kubuntu to XP's boot.ini

      I am not an expert but I will forward a suspicion:
      when you boot from the bios, (boot sequence changed to sdb) grub (on sdb) will "think" it is on sda thus the hd0.0.

      Another question:
      Is you kubuntu on a primary partion of sdb?

      Can you go into /etc/fstab and see your partitioning table, and post it here?

      The easiest procedure would be to use the grub bootloader. It likes linux in contrast to most (all) win bootloaders

      For some more reading:
      http://kubuntuforums.net/forums/inde...cseen#msg80863
      HP Pavilion dv6 core i7 (Main)
      4 GB Ram
      Kubuntu 18.10

      Comment


        #4
        Re: Add kubuntu to XP's boot.ini

        “If I hit F12, for the BIOS-bootmenu, and select the 2nd harddrive, grub loads normal bút I have to change the hd1.0 to hd0.0 to be able of starting kubuntu. Otherwise it gives this error: 'error 17: cannot mount selected partition'”

        What Fintan said explains that part of this (i.e., the actual boot drive AT THE TIME is seen by BIOS & GRUB as drive hd0).


        “Now the problem:
        When I select kubuntu in the boot.ini menu and hit ENTER I see a blinking _ on the monitor and thats it. No kubuntu, no grub, nothing!”

        As for this part of the problem, I've studied it in the past, never did it (i.e., never used XP to boot Kubuntu), and forgot it. The question is, How does one use the NTLDR to boot Kubuntu? (You are the expert on that one! ).



        I found stuff this in my notes, and maybe something there will help:

        Boot Linux from Windows
        http://www.vsubhash.com/writeups/multiboot_os.asp
        He’s a Windows guy, getting NTLDR to load Linux; if you dump Linux, easy to reverse.
        Moral Volcano: Multi-boot OSs.

        http://users.bigpond.net.au/hermanzone/p9.html
        “This webpage is to explain how I set up boot.ini in Windows and install WinGrub to boot either Windows via its own bootloader NTLDR or Linux via WinGrub, without touching the MBR.”

        Ed’s Software Guide on Linux:
        http://www.geocities.com/epark/linux...w2k-HOWTO.html

        Technique is clearly described in Chapter 4 of Linux in a Nutshell.
        Chapter 4 happens to be the freely downloadable sample chapter.
        (O'Reilly on-line)
        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: Add kubuntu to XP's boot.ini

          “I've added kubuntu to the boot.ini as followed:
          Immediately after installing kubuntu I ran the "dd if=/dev/sdb1 of=/bootsect.lnx bs=512 count=1" command and copied the created file to a floppy. Then I booted windows, copied that file to the root of the harddrive and then I added this line at the end of the boot.ini file: "c:\bootsect.lnx=”kubuntu 7.10””


          I can tell you this: You copied the first 512 bytes or the MBR of the Kubuntu drive.
          Now keep in mind that when you install Kubuntu, you must tell the installer * where * to install GRUB. Your Kubuntu root partition DOES have the basic GRUB files in it (located at /boot/grub), BUT you must do something with those files before GRUB will be “installed” and operative as a bootloader.

          For example, you can use those files to install GRUB to the boot sector of the Kubuntu partition (sdb1).
          Or, you can use those files to install GRUB to the MBR of a hard drive (any hard drive, in fact; e.g., to sdb).

          So, if you did not install or have installed GRUB to that MBR, then there would be operative (initial program loader ) GRUB there.

          Ooops ... everything I said here is true, except I just noticed that you did NOT copy the MBR but the boot sector of the Kubuntu partition, yes, OK. So everything I said here is true, and now we are looking at the possibility that GRUB was NOT installed to that boot sector (of sdb1), even though there are valid GRUB files sitting at /boot/grub waiting to be used.

          So, did you install GRUB to the boot sector of sdb1? That's the question then.
          If you did not do so, you still can.
          Use the Kubuntu Live CD, open Konsole, type
          sudo grub
          grub> find /boot/grub/stage1
          That will return some value (hdx,y). Put that here:
          grub> root (hdx,y)
          grub> setup (hdx,y)
          grub> quit
          exit out and reboot and do your Windows boot.ini thing.
          The statement setup (hdx,y) installs GRUB to the boot sector of partition (hdx,y) using the GRUB files located at the root statement (root (hdx,y)); i.e., the GRUB files in partition (hdx,y).
          If you want to install GRUB to the MBR of that drive,
          then do root (hdx,y), setup (hdx), and quit.
          You can install GRUB to as many places as you want, all at the same time.

          BTW, GRUB counts hard drives hdx and partitions y starting from zero.
          First hard drive is hd0, second HD is hd1, etc.
          First partition is partition 0, second partition is partition 1, etc.

          Please excuse any typos -- I'm on the run here, out the door.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Add kubuntu to XP's boot.ini

            So, what I'm suggesting is that if you fix the GRUB using Reply #4, then re-boot, your method might work; as it is now, your method might be using boot.ini to reference an un-installed bootloader.
            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: Add kubuntu to XP's boot.ini

              Originally posted by Fintan
              I am not an expert but I will forward a suspicion:
              when you boot from the bios, (boot sequence changed to sdb) grub (on sdb) will "think" it is on sda thus the hd0.0.
              Hmm, makes scence. Haven't thought that could happen.


              Originally posted by Fintan
              Another question:
              Is you kubuntu on a primary partion of sdb?

              Can you go into /etc/fstab and see your partitioning table, and post it here?
              Primary? Don't know. I've let the installation take care of that. I just selected sdb and "use intire harddrive".

              /etc/fstab :
              # /etc/fstab: static file system information.
              #
              # <file system> <mount point> <type> <options> <dump> <pass>
              proc /proc proc defaults 0 0
              # /dev/sdb1
              UUID=2434762e-f718-46bf-b446-788aa9d2b4f3 / ext3 defaults,errors=remount-ro 0 1
              # /dev/sdb5
              UUID=b8f55966-c9f6-4030-8c93-1fe24656a80f none swap sw 0 0
              /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
              /dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec 0 0
              /dev/sdc /media/floppy0 auto rw,user,noauto,exec 0 0



              Originally posted by Qqmike
              So, did you install GRUB to the boot sector of sdb1? That's the question then.
              If you did not do so, you still can.
              Use the Kubuntu Live CD, open Konsole, type
              sudo grub
              grub> find /boot/grub/stage1
              That will return some value (hdx,y). Put that here:
              grub> root (hdx,y)
              grub> setup (hdx,y)
              grub> quit
              exit out and reboot and do your Windows boot.ini thing.
              The statement setup (hdx,y) installs GRUB to the boot sector of partition (hdx,y) using the GRUB files located at the root statement (root (hdx,y)); i.e., the GRUB files in partition (hdx,y).
              If you want to install GRUB to the MBR of that drive,
              then do root (hdx,y), setup (hdx), and quit.
              You can install GRUB to as many places as you want, all at the same time.

              BTW, GRUB counts hard drives hdx and partitions y starting from zero.
              First hard drive is hd0, second HD is hd1, etc.
              First partition is partition 0, second partition is partition 1, etc.

              Please excuse any typos -- I'm on the run here, out the door.
              Believe it or not, but I don't know where grub is installed. When I clicked on install and followed the 6 steps, before the actual installation of kubuntu started, I went to advanced at step 6 and selected hd1 for grub. Could't select where to install, just the harddrive it must be installed on... Then everything went automatic.
              Now I do know grub is installed and working, since it starts up after selecting sdb at the BIOS-bootmenu, it just won't start from the boot.ini.

              I'll try you're method later today, kinda busy at the moment. I do have one question though. Would you're method work even when Kubuntu is started from the bios? So when it's hd0 instead of hd1?

              Comment


                #8
                Re: Add kubuntu to XP's boot.ini

                (I addressed your question directly at the end of this Reply)

                I'm not sure how your drives are called, hd0, hd1, etc. The BIOS first-boot drive is hd0.
                Nonetheless, here's the scoop:

                To find where the GRUB files are, using Live Kubuntu CD, at Konsole, type
                sudo grub
                grub> find /boot/grub/stage1
                That returns some value (hdx,y).

                Now, you can use that (hdx,y) to install GRUB to other places.

                To install GRUB to the Kubuntu boot sector SO YOU CAN USE IT IN boot.ini as you have indicated you'd like to, that's the part with:
                root (hdx,y)
                setup (hdx,y)

                (you've called it the first 512 bytes of sdb1)

                OK, now, also, if you wish for the Kubuntu drive to be bootable (by entering BIOS at boot time and selecting the Kubuntu drive), then install GRUB to the MBR of the Kubuntu drive, and that will be some (hdx) (where the x is the same x as came form your find statement where you got (hdx,y) returned).

                In a live Kubuntu session, do both at once:
                Konsole
                sudo grub
                grub> find /boot/grub/stage1
                returns some value (hdx,y)
                grub> root (hdx,y)
                grub> setup (hdx,y)
                grub> setup (hdx)
                grub> quit
                exit & exit-out to test stuff and/or check you boot.ini setup.

                Setup (hdx,y) sets up GRUB in the Kubuntu boot sector (what you have called sdb1).
                Setup (hdx) sets up GRUb in the MBR of the Kubuntu hard drive.
                We think x=1 here; that is, the Kubuntu drive is seen as the second drive hd1; the Windows drive, first BIOS boot drive, is seen as the first hard drive hd0. y will be the partition number of Kubuntu (counting starts at zero).


                Q “Would you're method work even when Kubuntu is started from the bios? So when it's hd0 instead of hd1?”

                Yes, but you need to edit the boot menu because the boot menu will refer to Kubuntu as being on hd1. You can do this a boot time by pressing the “e” key when you see the boot menu highlighting Kubuntu, and editing the root (hd1,y) statement to read (hd0,y).
                Or, perhaps more convenient, edit the boot menu, /boot/grub/menu.lst in Kubuntu, to include another boot entry for Kubuntu that would read:


                title Kubuntu => Booted from BIOS!
                # So Kubuntu is now seen as being on drive hd0, not hd1
                root (hd0,y)
                kernel /boot/vmlinux etc etc same as your other kernel statement
                initrd /boot/initrd.img etc etc same as your other initrd statement

                The # line is a comment line and is ignored by GRUB but handy for you to make reminder comments to yourself. Edit the menu.lst as root, from the Live CD and File > save and File > Quit afterwards. See the Reply#1 to the how-to.
                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: Add kubuntu to XP's boot.ini

                  Running the installed linux, not the dvd...

                  Originally posted by Qqmike
                  (I addressed your question directly at the end of this Reply)

                  I'm not sure how your drives are called, hd0, hd1, etc. The BIOS first-boot drive is hd0.
                  Nonetheless, here's the scoop:

                  To find where the GRUB files are, using Live Kubuntu CD, at Konsole, type
                  sudo grub
                  grub> find /boot/grub/stage1
                  That returns some value (hdx,y).

                  Now, you can use that (hdx,y) to install GRUB to other places.

                  To install GRUB to the Kubuntu boot sector SO YOU CAN USE IT IN boot.ini as you have indicated you'd like to, that's the part with:
                  root (hdx,y)
                  setup (hdx,y)
                  Gives this:
                  grub> find /boot/grub/stage1
                  find /boot/grub/stage1
                  (hd1,0)
                  grub> root (hd1,0)
                  root (hd1,0)
                  grub> setup (hd1,0)
                  setup (hd1,0)
                  Checking if "/boot/grub/stage1" exists... yes
                  Checking if "/boot/grub/stage2" exists... yes
                  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
                  Running "embed /boot/grub/e2fs_stage1_5 (hd1,0)"... failed (this is not fatal)
                  Running "embed /boot/grub/e2fs_stage1_5 (hd1,0)"... failed (this is not fatal)
                  Running "install /boot/grub/stage1 (hd1,0) /boot/grub/stage2 p /boot/grub/menu. lst "... succeeded
                  Done.
                  grub>
                  The failed part... is that a bad thing?

                  In the meanwhile I'll run the "dd if=/dev/hd1,0 of=/bootsect.lnx bs=512 count=1" command again and copy the file to the windows drive. Let's see if it now works.

                  edit: /dev/hd1,0 doesn't exist, hd1 doesn't either. sdb does. Let's try the boot.ini now... be right back

                  edit2: now I see GRUB _ instead of just a _
                  So there's still something wrong.

                  Grub still works though when I select the linux hd in the BIOS bootmenu. Just have to change the hd1 to hd0. Grub looks thesame. Nothing different. Don't now if I should see anything different after the root and setup command.

                  If useful, have kubuntu-7.10-alternate-amd64.iso lying around here.

                  Comment


                    #10
                    Re: Add kubuntu to XP's boot.ini

                    "The failed part... is that a bad thing?"

                    That's OK & normal: You successfully installed GRUB to the boot sector of Kubuntu (hd1,0). (The "failed' part of the message refers to NOT embedding Stage_1.5 of GRUB, which is OK since we do not want Stage_1.5 embedded this time; Stage_1.5 is only used when installing GRUB to a MBR (not to a boot sector as we did here).)

                    As for the failure of XP's boot.ini to boot GRUB, that part I'm not at all familiar with (never booted Kubuntu using XP, although I've seen folks do it and the references I gave above). We HAVE installed GRUB to (hd1,0) = sdb1 though!

                    (I apologize for not looking into boot.ini for you, but it's not something I really have time to do and I never use the XP bootloader. -- Check the bigpond ref to see if Herman has a quick cookbook answer to the boot.ini configuration).

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

                    Comment


                      #11
                      Re: Add kubuntu to XP's boot.ini

                      http://www.vsubhash.com/writeups/multiboot_os.asp

                      I just scanned that reference -- looks good; looks easy, about what you have done -- check your details again; see that ref, scroll down to where he boots Linux (using Mandriva as an example).
                      You have already installed GRUB to the boot sector, so that's done. Follow the rest of what he says; check your dd command. Check that stuff about making the file writable etc.
                      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: Add kubuntu to XP's boot.ini

                        Well... I can start all over. Kubuntu won't boot anymore after the grub root/setup commands I did.

                        After I change the HD1 to 0 as usual and boot... nothing happens. Just a blinking _
                        HD1 still gives the same error.

                        I'm burning the kubuntu-7.10-alternate-amd64.iso disc now, see if that one can restore grub correctly.

                        Comment


                          #13
                          Re: Add kubuntu to XP's boot.ini

                          Booting from the Live CD (booting from the Windows drive, so Kubuntu is hd1 this time), you could probably fix it easily by running
                          root (hd1,0)
                          setup (hd1)
                          quit

                          to make sure GRUB is in the hd1 MBR.

                          (Hard to tell from here what's going on.)
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            Re: Add kubuntu to XP's boot.ini

                            just fyi & by way of comparison
                            To have GRUB do all the booting, set the BIOS to boot from Windows, then install GRUB to the Windows hd0 drive:
                            root (hd1,0)
                            setup (hd0)
                            quit
                            and that's it.
                            (Not suggesting you do that as I'd hate to be responsible for some quirky thing that may be going on here, but this general situation is fairly standard from a GRUB standpoint we all do it here all the time. You can also boot from the Kubuntu drive and adjust menu.lst to boot Windows “on a non-first” hard drive. Of course, this is also supposed to be fairly straight using boot.ini, but I keep seeing hang-ups on that end of things.)
                            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: Add kubuntu to XP's boot.ini

                              Originally posted by Qqmike
                              Booting from the Live CD (booting from the Windows drive, so Kubuntu is hd1 this time), you could probably fix it easily by running
                              root (hd1,0)
                              setup (hd1)
                              quit

                              to make sure GRUB is in the hd1 MBR.

                              (Hard to tell from here what's going on.)
                              Just booted the Live-dvd, starts with giving an error after bootup:
                              Could not start process Unable to create io-slave:
                              klauncher said: .

                              Anyway, did the root & setup again --> grub starts up again after selecting the second harddrive in the bios-bootmenu. Still have to change hd1 to hd0, but I can boot linux again
                              The boot.ini however... Still "GRUB" + flashing "_"
                              Whats weird, when I started today it was ónly a flashing "_", without the GRUB next to it. Don't know if it means something.

                              Trying the dd again... With sdb1 this time, like you said a few posts above, Reply #9.
                              Edit: still "GRUB" with a flashing "_" ......

                              Comment

                              Working...
                              X