1

Topic: XP not booting after resizing a partition.

Booting to GParted Live CD v0.3.4

My hard drive started out with 3 partitions - I don't remember exactly what the drive letters were at this point, but I know Windows XP was installed on C:

I wanted to create a new primary partition from free space on an existing partition to install Vista.  So, I resized a partition (not the Windows partition) and created a new partition in the free space.

Now, I can not boot to Windows XP - I haven't attempted installing Vista yet, I'd like to get this fixed first if possible.

From what I can tell, after creating the new partition, my drive letters got scrambled.  If I boot to a floppy and use FDisk to check out the partitions, what used to be the C: drive is now the E: drive.  And all drives are inactive.  I can't change the E: drive to be active, but this probably wouldn't help anyway unless I could change the drive letter to C: using FDisk.  (i am actually using xfdisk if that matters)

If I boot to GParted and set the Windows partition to boot, it either gets stuck at "Verifying DMI Pool Data...."  or gives me an error saying it can't locate hal.dll at <Windows Root>\Windows\System32 - this depends on how I have the lba and boot flags set.  The only other result I get is the generic boot error in all CAPS saying a boot disk could not be found please insert... bla bla bla.

I am not sure how to get a screenshot online (using my laptop to post and this problem is on my desktop), but I'll try to explain how GParted shows my current partitions:

/dev/hda1 - filesystem extended
      /dev/hda5 - Filesystem NTFS (this is the windows partition - no changes were made to this partition)
/dev/hda2 - Filesystem NTFS
/dev/hda4 - Filesystem NTFS (This is the new partition, created from free space in partition hda2)
/dev/hda3 - Filesystem NTFS (no changes were made to this partition)

So, I am guessing that originally hda5 WAS hda2 and after creating the new partition things got rearranged.

After creating the new partition the flags were set as such:
hda1 - lba
hda4 - boot

I've tried all different combinations I can think of as far as setting the flags go, but it doesn't seem to help.

Any ideas what I can do to resolve this?  It seems to me I need a utility I can boot to that will allow me to set drive letters, but I don't want to change anything based off of a guess.

Thanks for any help.

2

Re: XP not booting after resizing a partition.

I think the problem comes from the partition number changing.
So what you have to do is :
mount your XP partition using ntfs-3g
edit boot.ini and the three missing entries, so you will have to choose between four possibilities to boot off XP.

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

3

Re: XP not booting after resizing a partition.

If I edit the boot.ini, will this change the way the drive letters are mapped?

If it doesn't, Windows still won't load - all the registry settings in Windows are pointing to the C: drive. 

Just want to be sure before I do anything more...


If this does change the way the drive letters are mapped, is it possible to create a boot CD for ntfs-3g?  I checked out the ntfs-3g website, but didnt't see anything describing how to do this.

4

Re: XP not booting after resizing a partition.

dantes990 wrote:

If I edit the boot.ini, will this change the way the drive letters are mapped?

No it wont make this change. I think you could make this change in a second time, after it boots okay.

If this does change the way the drive letters are mapped, is it possible to create a boot CD for ntfs-3g?  I checked out the ntfs-3g website, but didnt't see anything describing how to do this.

ntfs-3g is on the gparted livecd.
open a terminal
search the number of the partition you wanna mount using fdisk :
fdisk -l
then type the following :
ntfs-3g /dev/hda2 /mnt/windows ### i assume the partition you wanna access is hda2
change to /mnt/windows
cd /mnt/windows
then use "vi" to edit or "mc" (midnight commander).

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

5

Re: XP not booting after resizing a partition.

No it wont make this change. I think you could make this change in a second time, after it boots okay.

Here's what I am afraid of:

It sounds like using ntfs-3g I can probably get it to point to the Windows XP partition to boot, and it will start to boot into Windows, but without changing the drive letters, Windows will bomb out once it starts to load the registry, because all the Windows system file entries in the registry will point to the C: drive, not the E: drive (right now the Windows partition is using the letter E:, according to FDisk).  I am pretty sure it will not boot into Windows unless I can somehow change the Windows partition drive letter to C: without using Windows.

I think this is all ready happening just by setting the boot flag for the windows partition using GParted Live.  With it set this way, I get the error:  <System Root>\Windows\System32\hal.dll  could not be found.  Normally if a Windows system file is corrupt or missing it says: C:\Windows\System32\hall.dll could not be found (assuming C: is the system drive).  That's what makes me believe it is an issue with the drive letter mapping.

My prediction is that if I modify the boot.ini, it will either point to the Windows partition (currently E: drive) and fail once the registry starts to load, because the registry is looking for files on C:, or if I point it to any other partition, I will get an error such as C:\Windows\System32\hall.dll could not be found, because there is no Windows install on what is currently the C: drive.

Does this make sense?

Maybe I can just install Vista to the new partition and use Vista to change drive letters around and get XP working afterward... but that seems kind of risky to me, I am not sure how Vista will effect booting and I'd really like to save the XP install first if possible?  I'd rather use a a utility that allows me to change drive letters outside of Windows, if one exists.

Thanks for the tip with ntfs-3g - I didn't realize it was on the GParted Live CD.

6

Re: XP not booting after resizing a partition.

http://support.microsoft.com/kb/307844
does it help ?

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

7

Re: XP not booting after resizing a partition.

Not really, because it requires being booted into Windows XP to use it.  I need to locate something like this that I can boot to from a CD... ideally, that seems like my best option.  Basically a glorified FDisk that allows you to change drive letters.  There is probably a utility out there, it is just a matter of locating it.

Or I may try the Vista route - I am sure there is a similar management tool in Vista.  I am just not sure how easy it is to enforce dual booting once Vista has been installed from scratch.  My initial plan was to install Vista while booted into XP (rather than booting to the Vista DVD), which supposedly sets up the dual boot mode for you.

If worse comes to worse I could just install XP to the new partition as I am familiar with dual booting two XP installs.  Then I could use the Disk Management utility you are referring to in the new install of XP to fix the drive letters and adjust the boot.ini for dual booting of the two XP installs.  Then boot to my original XP install and wipe out the new install of XP and install Vista.  Doesn't sound like much fun, but it is starting to look like my safest bet.

8

Re: XP not booting after resizing a partition.

afaik, windows can't bear windows. But i may be wrong wink

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

9

Re: XP not booting after resizing a partition.

I knew there would be a Windows joke coming smile

It appears there is a command line version of the Disk Management Console in XP called Diskpart.  So, I should be able to use this to unassign my current C and E drives and give them the proper drive letters then make C active.  Then I would expect pulling my boot CD and rebooting will take me right back to my XP install.... hopefully it's that easy.  I'll update my post after trying this tonight.

Thanks for the help!

10

Re: XP not booting after resizing a partition.

cross fingers wink

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

11

Re: XP not booting after resizing a partition.

Try popping in your windows xp disc.
Wait till its booted up.
Press R for recovery console.
Select your windows installation and type
/fixmbr
/fixboot

if that doesn't work try

fdisk /mbr