Announcement

Collapse
No announcement yet.

Dual Boot with XP;can't figure what's wrong

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

    Dual Boot with XP;can't figure what's wrong

    Sorry to drag up a recurring subject, but I have spent the last 10 hours searching online & trying different things. I have edited menu.lst, device.map, fstab.
    Can't seem to get it right & I don't know why.

    Here's the story;
    I have installed XP & Gutsy on this PC on 2 separate drives, at 2 separate times.
    Now I want the 2 to work together as a Dual boot from grub.
    Here's my drive setup (all IDE);
    Primary Master - 10Gb - Kubuntu 7.10
    Primary Slave - 2.1Gb - Linux swap
    Secondary Master - LGGSA4167B DVD Burner
    Secondary Slave - 80Gb - Microsuck Windblows XP

    Bacause the installations were done separately I have to edit grub manually.
    I am trying to set XP as the default option in grub.
    Both XP & Kubuntu drives will boot iff I select the appropriate HDD from the BIOS.
    But when I boot Kubuntu drive (10Gb), I get a
    "error 21 selected disk does not exist" message.
    Then it dumps me on the grub menu & I can choose to boot Kubuntu
    (all Linux options on menu work).
    But if I try the XP option I just keep getting the "error 21" until I give up & pick a Linux option.
    I know my XP works. It starts up if I tell BIOS to boot directly from the 80GbHD.
    Neither OS is a problem to run, just can't get XP to boot from grub menu.
    So, I am convinced it is something I have done wrong or missed.

    Here is my output from: sudo fdisk -l
    ----------
    Disk /dev/hda: 10.2 GB, 10248118272 bytes
    255 heads, 63 sectors/track, 1245 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xf5c3826c

    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 1245 10000431 83 Linux

    Disk /dev/hdb: 2111 MB, 2111864832 bytes
    255 heads, 63 sectors/track, 256 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x1c599171

    Device Boot Start End Blocks Id System
    /dev/hdb1 * 1 256 2056288+ 82 Linux swap / Solaris

    Disk /dev/hdd: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xbb15bb15

    Device Boot Start End Blocks Id System
    /dev/hdd1 * 1 9729 78148161 7 HPFS/NTFS
    ----------

    Here is my fstab file:
    ----------
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/hda1
    UUID=f0f48319-398d-4606-aeec-482398578997 / ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
    # /dev/hdb1
    UUID=a0d353a7-fb42-43aa-bd2d-4aa69c068657 none swap sw 0 0
    /dev/hdc /media/cdrom0 udf,iso9660 user,atime,noauto,rw,dev,exec,suid 0 0
    /dev/fd0 /media/floppy0 auto user,atime,noauto,rw,dev,exec,suid 0 0
    /dev/hdd1 /media/XPdrive ntfs nls=utf8,unmask=0222,uid=0,gid=0,auto,rw,nouser 0 0
    ----------

    Here is my devices.map file:
    ----------
    (hd0) /dev/hda
    (hd1) /dev/hdb
    (hd3) /dev/hdd
    ----------

    And last, but not least, my menu.lst file:
    ----------
    title Windows XP Pro
    root (hd3,0)
    savedefault
    makeactive
    chainloader +1
    map (hd0) (hd3)
    map (hd3) (hd0)

    title Ubuntu 7.10, kernel 2.6.22-14-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=f0f48319-398d-4606-aeec-482398578997 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,0)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=f0f48319-398d-4606-aeec-482398578997 ro single
    initrd /boot/initrd.img-2.6.22-14-generic

    title Ubuntu 7.10, memtest86+
    root (hd0,0)
    kernel /boot/memtest86+.bin
    quiet
    ----------

    What have I done wrong ?

    #2
    Re: Dual Boot with XP;can't figure what's wrong

    Maybe try to re-install GRUB to the Master Boot Record of the Kubuntu drive (from the GRUB installed in your Kubuntu /boot/grub directory). Also, we better check to see how the BIOS (and therefore how GRUB) sees your drives. (Device.map is irrelevant for this as the native GRUB that boots your PC does NOT look at device.map—only the grub shell that runs within Kubuntu at a terminal ever looks at device.map: see Chapter 15 of the GRUB manual for this grub shell stuff).

    Boot your Kubuntu drive.
    When you see the boot menu, press “c” key to get a GRUB prompt, grub>
    Use the geometry command to explore your drives:
    grub> geometry (hd<press the TAB key now>
    (do not type the < and > signs, just type (hd then the TAB key)
    That returns your drives. Explore each one to be sure that what is on each is what you think is on each one:
    grub> geometry (hd0)
    grub> geometry (hd1)
    etc.

    Next, confirm that GRUB files are located where we think there are located (i.e., they should be in your Kubuntu partition at /boot/grub):
    grub> find /boot/grub/stage1
    That returns some (hdx,y) – Does that look right to you?

    Finally, let's re-install GRUB as I said at the start of this:

    grub> root (hdx,y)
    grub> setup (hdx)
    grub> quit
    and re-boot to test it
    (you can do that at a grub> using grub> reboot )

    In these commands:
    (hdx,y) is the output you got from that find command above;
    hdx SHOULD be the Kubuntu drive and (hdx) means the MBR of the Kubunt drive.

    Try that.

    BTW, your map commands look good in the XP boot stanza, assuming the drive “3” is right.
    (btw, are you a mathematician? the clue: iff)

    Here's my How-To:
    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: Dual Boot with XP;can't figure what's wrong

      OK, That will take me a little while.

      Comment


        #4
        Re: Dual Boot with XP;can't figure what's wrong

        OK, grub geometry gives me a hd0 hd1 hd2
        I would say for now that could be a problem.
        I just figured it would have called the Secondary Slave hd3, but it's apparently hd2.
        So I'll just change all that in my menu.lst & see how I go.

        Comment


          #5
          Re: Dual Boot with XP;can't figure what's wrong

          IT WORKED !!!

          I just changed all instances of hd3 to hd2 in both device.map & menu.lst
          I can't believe I had everything else completely right !
          I didn't know the 'hd' assignments would skip over the Secondary Slave just because there was a cd on there not a harddrive. Should have figured.

          Anyway, restarted after the edit, grub 1.5 came up then kicked onto XP.
          Now I'm looking at an ugly Windblows desktop on the other computer.
          At least it means everythings good now.

          Thanks for the advice, didn't know about the grub prompt or how to get the geometry.
          Knowing that before would have saved me a few hours and some guesswork.
          Thanks heaps.

          Comment


            #6
            Re: Dual Boot with XP;can't figure what's wrong

            larsenguitars, I would say you have done very well, my friend! And good job on tweaking this fix. Not uncommon to mis-name a drive or device. We all do it, all the time. The native GRUB prompt (by pressing “c” at the boot menu) and geometry are your best friends in these times. Worst case, you can use a live Kubuntu CD to get Konsole, then type sudo grub to get the grub>, and then proceed as we have here.
            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