Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Moved XP partition with Gparted, bunch of boot/GRUB problems

  1. #1
    Join Date
    Oct 2011
    Beans
    71

    Exclamation Moved XP partition with Gparted, bunch of boot/GRUB problems

    Awhile ago, I cloned my HDD into a new SSD, but now decided to re-align my partitions. After a big mess, I managed to get GRUB, but if I select Windows (XP), I hit a black screen and nothing happens. I'm trying to get my WinXP back.

    Here's everything I think I did:

    • GParted found bad sectors (some "cloned over", some maybe came with SSD?) for the XP partition (sda1) and NTFS data partition (sda5); ubuntu partition A-OK
    • Took an external drive and backed up the affected partitions in the SSD -- I copied stuff from the data partition and used DD for the XP partition
      Code:
      sudo dd if=/dev/sda1 of=/media/USBiso/sda1.iso
    • Backed up the MBR just in case too
      Code:
      dd if=/dev/sda of=/media/USBiso/sda.boot.mbr  bs=512 count=1
    • Formatted both sda1 (XP) and sda5 (data), re-aligned partitions sda1 and sda5 with GParted, and began copying stuff back (decompressing files to sda5 and DD to sda1)
    • Reboot
    • Ubuntu works fine, but XP no longer boots (black screen)
    • I use the XP recovery disk and try to restore boot-order. I end up removing GRUB.
    • I reboot using Puppy Linux and restore the old MBR from my USBdrive using DD (big mistake) ...
    • ... I get GRUB back, but Ubuntu no longer recognizes sda1 and sda5; in fact, both Disk Manager and GParted no longer recognize the entire drive (Ubuntu partition included, but I can navigate it just fine)
    • I use TestDisk to recover the partition table (swap sector at the end of the drive needed to be reformatted before I could enable it)
    • So now.. I have GRUB working, I can log into Ubuntu, but logging into the XP option results in a black screen and the need to reboot

    Woo-woo! Fixed the boot-sector mismatch using TestDisk; launched the program and found that it could edit the boot record of the primary partition. Thanks to everyone who posted!

    As a side note, this is an old machine (1.5GHz Pentium-M, 2GB RAM) with a small harddrive (32GB) -- do I really need a Linux Swap file (256MB) considering my Ubuntu partition is ~6GB (5GB filled)?
    Last edited by pakopako; October 28th, 2012 at 07:37 AM. Reason: Solved!

  2. #2
    Join Date
    Oct 2012
    Location
    Belgium
    Beans
    84
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Did you try booting in recovery mode?

    Daniel
    If your question is solved, please mark it with [SOLVED]by using Thread Tools.

  3. #3
    Join Date
    Oct 2011
    Beans
    71

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Quote Originally Posted by danielbauwens View Post
    Did you try booting in recovery mode?
    Booting which in recovery mode?
    If you mean XP, XP won't boot at all -- no error message or anything, just a black screen if I select it on the GRUB menu.

    I could boot using the XP recovery CD. Not sure what I could do from there.

  4. #4
    Join Date
    Oct 2012
    Location
    Belgium
    Beans
    84
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Here: https://wiki.ubuntu.com/RecoveryMode
    Hope it helps

    Daniel
    If your question is solved, please mark it with [SOLVED]by using Thread Tools.

  5. #5
    Join Date
    Oct 2011
    Beans
    71

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Oh, Ubuntu's recovery mode.

    But, what do I do from there?

  6. #6
    Join Date
    Oct 2012
    Location
    Belgium
    Beans
    84
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Woops
    You might want to use this for windows: http://www.computerhope.com/issues/ch000627.htm
    If your question is solved, please mark it with [SOLVED]by using Thread Tools.

  7. #7
    Join Date
    Oct 2011
    Beans
    71

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Still don't have great confidence in using XP's recover console (from the CD) -- changing the MBR is what got me into this mess. Or is there a command I'm not thinking of?

  8. #8
    Join Date
    Aug 2006
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Try updating grub from Ubuntu with sudo update-grub. If XP still doesn't work after that, use the BootInfoScript and post its outpus here.

    PS: I see no point in using XP's recovery mode for now, and no, you don't need the swap.
    Last edited by mikewhatever; October 26th, 2012 at 10:10 AM.

  9. #9
    Join Date
    Oct 2011
    Beans
    71

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    Ran BootInfoScript. I think the attached TXT file says it better than I can, but here are some excerpts I thought could be problematic:

    Code:
    sda1:
        File system:       ntfs
        Boot sector type:  Windows XP: NTFS
        Boot sector info:  According to the info in the boot sector, sda1 starts 
                           at sector 63. But according to the info from fdisk, 
                           sda1 starts at sector 2048.
        Operating System:  Windows XP
        Boot files:        /grub.cfg /boot.ini /ntldr /NTDETECT.COM /wubildr /wubildr.mbr
    Code:
    sda3: 
        File system:       ext4
        Boot sector type:  -
        Boot sector info: 
        Operating System:  Ubuntu 11.04
        Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
    Code:
    =================== sda3: Location of files loaded by Grub: ====================
    
               GiB - GB             File                                 Fragment(s)
    
      27.603542328 = 29.639077888   boot/grub/core.img                             1
      23.685981750 = 25.432629248   boot/grub/grub.cfg                             1
      28.316383362 = 30.404485120   boot/initrd.img-2.6.38-15-generic             15
      29.570312500 = 31.750881280   boot/initrd.img-2.6.38-16-generic             110
      25.293716431 = 27.158921216   boot/vmlinuz-2.6.38-15-generic                 3
      28.189914703 = 30.268690432   boot/vmlinuz-2.6.38-16-generic                 7
      29.570312500 = 31.750881280   initrd.img                                    110
      28.316383362 = 30.404485120   initrd.img.old                                15
      28.189914703 = 30.268690432   vmlinuz                                        7
      25.293716431 = 27.158921216   vmlinuz.old                                    3
    
    =============================== StdErr Messages: ===============================
    
    xz: (stdin): Compressed data is corrupt
    Attached Files Attached Files

  10. #10
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Moved XP partition with Gparted, bunch of boot/GRUB problems

    I kept using XP for years just for one application, but with my new SSD I had to stop using XP. With SSD you have to turn on AHCI for trim to work and XP does not normally have drivers for that. Most suggestions were just to backup data and reinstall XP to add drivers during install.

    All NTFS partitions have in the PBR - partition boot sector info on the NTFS sector start and size that has to match what is in partition table. That is what boot script is telling you does not match. Normally running chkdsk will update that, but sometimes MFT interferes and reinstall is the only solution.

    I did run chkdsk from a Windows 7 repair USB. It worked better than the chkdsk from XP disk, but wrote a Windows 7 PBR. (Testdisk showed difference between backup & new PBR). I was able to reinstall a Windows XP PBR with the Windows 7 repair USB.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •