Announcement

Collapse
No announcement yet.

[c]Can't boot XP after Kubuntu install

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

    [c]Can't boot XP after Kubuntu install

    Both XP installations shown on Grub menu. The first (the one I want) fails to start with missing or corrupt hal.dll message. I have found several posts (including sticky) mentioning this problem but none that tell me how to fix it. The other windows installation does start ok (slave HD).

    I have 2 HD, master had 2 partitions + free space before installing Kubuntu, 1st was windows, 2nd was swop for windows. Used the free space on master HD for root (created 1st) and swap (created 2nd). So master HD now has 4 partitions. The Kubuntu install works fine (posting from it now).

    The problem looks like grub thinks the windows is hd0,1 rather than hd0,0? I would have tried this but am new to this and don't know how to change it. Hope someone can help,
    Thanks
    Here is an extract from menu.lst...

    ## ## End Default Options ##

    title Ubuntu 7.10, kernel 2.6.22-14-generic
    root (hd0,2)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=3ae36350-9f4f-410d-8a02-1df236c87c8d 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,2)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=3ae36350-9f4f-410d-8a02-1df236c87c8d ro single
    initrd /boot/initrd.img-2.6.22-14-generic

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

    ### END DEBIAN AUTOMAGIC KERNELS LIST

    # This is a divider, added to separate the menu items below from the Debian
    # ones.
    title Other operating systems:
    root


    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/hda2
    title Microsoft Windows XP Home Edition
    root (hd0,1)
    savedefault
    makeactive
    chainloader +1


    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/hdb1
    title Microsoft Windows XP Home Edition
    root (hd1,0)
    savedefault
    makeactive
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1

    #2
    Re: [c]Can't boot XP after Kubuntu install

    "The problem looks like grub thinks the windows is hd0,1 rather than hd0,0? I would have tried this but am new to this and don't know how to change it."

    I won't hurt to try that.

    Make it look like this:

    title Microsoft Windows XP Home Edition
    #root (hd0,1)
    root (hd0,0)
    savedefault
    makeactive
    chainloader +1

    (So you still have the old version there, commented by the # sign.)

    Edit menu.lst as root to do so:
    Konqueror,
    /boot
    click grub
    right-click menu.lst
    Actions>Edit as root
    do the edit
    File>Save
    File>Quit
    re-boot to test it
    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: [c]Can't boot XP after Kubuntu install

      (Looks like GRUB grabbed the XP swap on (hd0,1) as the XP root.)
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        Re: [c]Can't boot XP after Kubuntu install

        Thanks, so that's how to edit as root!

        Trying the reboot now, back soon (unless the whole things broke)

        Comment


          #5
          Re: [c]Can't boot XP after Kubuntu install

          Sadly that did not work. New error ...

          error 12
          invalid device requested.

          I have no idea how I posted here by the way, should have been in 7.10

          Comment


            #6
            Re: [c]Can't boot XP after Kubuntu install

            Did you make a typo?

            root (hd0,0)

            (root then space then the two zeros are separated by a comma, not a period; and the zero is not the letter "o" and so on...)
            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: [c]Can't boot XP after Kubuntu install

              If it really is (hd0,0) and it booted ok before installing Kubuntu, then it must boot now (unless something inside XP did actually get damaged somehow...?).

              Either
              root (hd0,1)
              or
              root (hd0,0)

              must make it boot. Those are the only two device names for that XP in menu.st.

              (XP on hdb1 boots ok, right?)
              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: [c]Can't boot XP after Kubuntu install

                Here is the edited menu.lst

                # This entry automatically added by the Debian installer for a non-linux OS
                # on /dev/hda2
                title Microsoft Windows XP Home Edition
                root (hd0,0)
                savedefault
                makeactive
                chainloader +1

                Looks right to me (mind you my eyesights not what it was).

                Yes XP on the other hdd boots ok, and the one on this hdd did just before installing kubuntu. The file it complains about (hal.dll) is definitely ok because I have compared it with the other XP (and copied it anyway just to be sure).

                Does this info help?

                Disk /dev/hda: 80.0 GB, 80026361856 bytes
                255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
                Units = sectors of 1 * 512 = 512 bytes
                Disk identifier: 0xcdefed71

                Device Boot Start End Blocks Id System
                /dev/hda1 16065 77818859 38901397+ f W95 Ext'd (LBA)
                /dev/hda2 * 77818860 86012009 4096575 7 HPFS/NTFS
                /dev/hda3 93819600 156296384 31238392+ 83 Linux
                /dev/hda4 86012010 93819599 3903795 82 Linux swap / Solaris
                /dev/hda5 16128 77818859 38901366 7 HPFS/NTFS

                Partition table entries are not in disk order

                Disk /dev/hdb: 164.6 GB, 164696555520 bytes
                255 heads, 63 sectors/track, 20023 cylinders, total 321672960 sectors
                Units = sectors of 1 * 512 = 512 bytes
                Disk identifier: 0x97da97da

                Device Boot Start End Blocks Id System
                /dev/hdb1 * 63 40965749 20482843+ 7 HPFS/NTFS
                /dev/hdb2 122881185 245762369 61440592+ 7 HPFS/NTFS
                /dev/hdb3 245762370 278534969 16386300 f W95 Ext'd (LBA)
                /dev/hdb4 40965750 122881184 40957717+ 7 HPFS/NTFS
                /dev/hdb5 245762433 253955519 4096543+ 7 HPFS/NTFS
                /dev/hdb6 253955583 258052094 2048256 7 HPFS/NTFS
                /dev/hdb7 258052158 278534969 10241406 7 HPFS/NTFS

                Partition table entries are not in disk order

                I don't like the look of the fifth partition overlapping the first?

                Comment


                  #9
                  Re: [c]Can't boot XP after Kubuntu install

                  Oh dear, I've broken it even more now.
                  I rebooted and tried editing the commands from the Grub menu.
                  I tried rootnoverify and hide/unhide various partitions. I foolishly assumed this would not do anything permanent. Now Grub wont start at all, comes up with error 17 and hangs. I think that might be can't mount partition or some such.

                  I am now operating from the Kubuntu installation CD

                  Sounds like partition table all broken to me.
                  I think I might go to bed and start again tomorrow (well today, its 4:29 here).
                  Thanks for your help.

                  Comment


                    #10
                    Re: [c]Can't boot XP after Kubuntu install

                    Well, I think you’ll be back to where you were if you just restore your menu.lst back to the way it was.

                    You are correct that we might look at the hdb disk, but not now. That XP boots ok, so let’s look at disk hda first.

                    Now, I see something there that I’m not sure about:
                    Drive hda STARTS with an extended partition hda1 = (hd0,0).
                    I thought that was a no-no for Windows: that Windows doesn’t like booting from an Extended partition (Linux has no problems booting from such). More precisely, hda1 starts the Extended partition, then all the partitions that follow are called Logical and are contain in the Extended; and Windows doesn’t like being a Logical in the Extended. When we say (hd0,0), that means hda1 = the Extended partition! ((hd0,0) does not even contain an OS; it only contains a bunch of Logical partitions that follow.)

                    Sorry to say, but it looks * to me * that you need to edit that whole partition table!
                    Something like
                    Primary hda1 Windows Set the boot flag * on this one.
                    Primary hda2 Windows swap
                    Primary hda3 Linux—swap or root
                    Extended hda4 Extended Partition (starts here)
                    Logical hda5 Linux—swap or root
                    Logical hda6 Linux—home
                    Logical etc etc
                    You can have something like 11 or 15 partitions that Linux will see OK (GParted documentation has the specifics on that).

                    You can do all this in GParted. But it looks like a job.
                    I wonder how it was before Kubuntu, when it worked with just Windows?
                    Also, we better let others chime in here about Windows vs Logical partitions.

                    Remember, you can have only 4 Primary partitions, and the Extended partition counts as a primary; after that, you can have Logicals contained within the extended. (And, actually, a Logical partition "acts" like a primary and is used as such, but the rule for standard PC partition tables is a maximum of 4 primaries.)


                    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: [c]Can't boot XP after Kubuntu install

                      I thought that was a no-no for Windows: that Windows doesn’t like booting from an Extended partition
                      AFIK you are right. Windows will only "live" on a primary partition.

                      In gparted live you can change logical to primary aprtitions but be extremely carefull!!

                      You will have to have all your xp partitions (not data) primary and make the rest logical.

                      This will screw up your uuids in fstab and /boot/grub/menu.lst > but we can deal with that later
                      HP Pavilion dv6 core i7 (Main)
                      4 GB Ram
                      Kubuntu 18.10

                      Comment


                        #12
                        Re: [c]Can't boot XP after Kubuntu install

                        Yep, and the Windows primary partition has to be marked "bootable" as well.

                        Comment


                          #13
                          Re: [c]Can't boot XP after Kubuntu install

                          Good. That's what we need to know. And some help reorganizing those partitions! Oh boy...

                          btw, Philx, don't fret over the Error 17 -- it's normal to get that when GRUB is asked to mount things like Windows or weird, unidentified partitions, which we certainly have here!

                          The guys have confirmed that you have a serious partitioning problem.
                          You'll learn a lot here by working on this, but let's hope you don't lose any important data.
                          You can use your Live Kubuntu CD or Knoppix Live CD to access any Windows data you need and get it copied off somewhere (to a safe disk or to a thumb drive or CDs...?).

                          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: [c]Can't boot XP after Kubuntu install

                            I see what you mean about hda5 now – overlapping. Note that hda5 starts at the Extended 16065 + 63 sectors = 16128 sectors. Usually, the first 63 sectors of a drive are empty except for the first sector (1 sector = 512 bytes) where the MBR is; and some special purpose bootloader/programs may occupy some of the remaining 62 sectors (like GRUB, which put Stage 1.5 in the 15 sectors following the MBR).

                            Another pattern that may play into this, but it's not clear: Usually the very first Logical partition is named hda5, no matter what the Extended is named (hda1, hda2, whatever); and we see hda5 starting right at the Extended + a MBR space.

                            But, fact is, all this pattern recognition is moot because things are pretty twisted in that partition table. In theory, the tools are there in GParted Live CD to move, copy, re-size, add partitions. But you sure need to think through the logistics. Lots of folks would probably rather start from scratch (delete all partitions on hda, re-partiton, re-load the OSs, starting FIRST with Windows in (hd0,0)).
                            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: [c]Can't boot XP after Kubuntu install

                              Yeah looks pretty mixed uip.
                              Just one question:
                              Is your linux install fairly "virgin"?
                              If so you could backup all your data on /home and hda5 to hdb or somewhere (if you have the space). Then delete all partitions except the xp one (unless up have a xp setup/install disk and want to spend hours on reinstall ing windows), make that one primary and make new logical partitions for Linux, /home, swap and win data.
                              Then reinstall choosing manual partitioning at install and choose the /hoem and / partitions, format and install as usual.

                              I have a feeling with your partitions "messed" up the way they are you will encouter problems with changing to primary, moving etc.
                              HP Pavilion dv6 core i7 (Main)
                              4 GB Ram
                              Kubuntu 18.10

                              Comment

                              Working...
                              X