1

Topic: XP Fails to Boot After Resize

Hi,

I have a Dell laptop. They come with a hidden EISA partition which I wanted to delete and amalamate into the main partition. I removed the hidden one and the resized the main partition. The process was due to take 3 hours 35 mins. It is a 100gb disk. 42 hours later the thing finally completed with no errors. I removed the disk from the CD an rebooted. Now XP won't boot. Any help would be really appreciated here.

The message I get when rebooting is

Windows could not start because of a computer disk hardware configuration problem.
Could not read from selected boot disk.
Check boot path and disk hardware
Please check the Windows documentation about hardware disk configuration and your hardware reference manuals for additional information


I have resized partitions before using gpartedlive cd and never had a problem. gparted didn't report a problem. Any ideas and suggestions would be greatly appreciated.

Thanks,

Lee

2

Re: XP Fails to Boot After Resize

Removing a partition changed the numbering of the other partitions. Most probably the MBR bootloader looks for the configuration file in the second partition, that became the first after these operations.
If you just reduced it to just 1 MB or a few 100s of KB, you wouldn't have this problem.

In this case, there are some commands that work from the mswindows "recovery console". Dell laptops start the recovery console by pressing a key during restart (I think F12, you can find it in the computer documentation). A problem would be if the recovery console doesn't start due to that partition renumbering.

The commands are:
fixboot (to fix the partition boot record)
fixmbr (to fix the mbr boot code)
bootcfg (to scan the disk for windows installation and fix the boot.ini file)

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: XP Fails to Boot After Resize

Hi,

Thanks for that. The partition that I removed is the hidden one that Dell put on the laptop which contains the diagnostics utils I suspect. I would have thought that gparted would have sorted this for me. In fact I've done this before on other harddrives and not had an issue. I have managed to mount the drive using knoppix and copied my data off. I will reinstall, which is a considerable pain in the neck. I managed to get testdisk running in knoppix and got it to try to rebuild the boot sector. Now gparted says to run chkdsk /f twice which is as amusing as it is ironic as I can't boot the machine to run chkdsk /f. Any more thoughts before I bite the bullet and go through the week of pain of reinstallation and tweaking? I will be doing a dual boot this time so I can at least run linux and get my stuff off.

Cheers,

Lee

4

Re: XP Fails to Boot After Resize

There is the command "ntfsfix", from the terminal (command line) on the GParted livecd, that can fix some ntfs errors. Could you try it, please?

If Knoppix reads and accesses the partition, it means that the filesystem isn't damaged. The usual way to make the installation working is from the recovery console. This is a special command line mode that gives you the means to restore the boot system (boot sectors and configuration). Dell uses a special keystroke on start phase, to enter that mode. If you can't enter the recovery mode, you could try this using just a windows installation cd from any friend, to boot from (you choose recovery on the main menu page).
I repeat this about the recovery console, because you didn't write if you tried it.

You can try to make your installation bootable again, before loosing hope and going to reinstall.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5

Re: XP Fails to Boot After Resize

Hi,

As it was a work machine I thought I'd just reinstall. I've gone for a dual boot Vista/Ubuntu install now although that has been problematic. I did try the Windows recovery tool but it didn't do much unfortunately. Just wish I knew what went wrong.

Cheer for your help and suggestions.

Lee

6 (edited by cmdr 2008-08-08 19:43:36)

Re: XP Fails to Boot After Resize

Hi,
I would solve your problem as follows ( goal is dualboot Vista / Ubuntu ; Ubuntu still working at the moment):

First of all you need an appropriate Hex-Editor for your HDD ; the best freeware for me is "HxD" (http://www.mh-nexus.de/hxd/).

1. Have a look at the MBR (Sector 0 of physical HDD) and store it as a file (only first 512 bytes).
In your case it is probably a Grub MBR or Dell stuff, which uses more than these first 512 bytes. You can ignore it, we keep the rest untouched, and Vista does not care about it.
2. For safety reasons do the same with each "Partition-" (or "Volume"-) Bootsector (PBR, Sector 0 of logical !!! drive with driveletter, 512 bytes) for reference and roll-back.
3. Look for a W2K or WinXP MBR (fixmbr or other machine would do). If you do it manually, store only the first 446 bytes of the sample sector (up to 0x1BD; thus keeping the partition table untouched) and transfer it to your machine.
4. Partition data:
Data of 1st partition : starting at byte 0x1BE ( value 0x80 here means "active" Win-bootable partition = Drive C:; might also be one [always single!] of the others. If you know this, its easy to change ! )
Data of 2nd partition: starting at 0x1CE ( all bytes 0x00 means: not used)
Data of 3rd partition : starting at 0x1DE
Data of 4th partition : starting at 0x1EE
I guess, Vista now recognizes the partitioning, provided partitions are not overlapping or otherwise scrambled. But lets have some further reflexions.

Doing the same for the PBR (exchanging it) is not that easy, because it depends much more on the used operation system ... and most of all the file system. For Linux, it is not necessary to have a (DOS) bootable PBR (isolinux, syslinux or Grub do the job). For Vista you should have a formatted, bootable empty partition (of a former version, FAT32 is necessary for our purpose; you can change this later). If it is not formatted yet (no driveletter !) , use a WinXP installation CD to format it (boot the CD) or mount the HDD into an external USB case to do it with another WinXP machine. You will soon see, what its good for. If you did not use an installation disk, you have to set it "active" manually ("gparted" generated FAT32 PBRs are never Win bootable, they are extremly short and do not contain a reference to any of the DOS startfiles !). Attention , this refers to FAT32 only, and be sure to find the "NTLDR" mark in the PBR ! Change byte 0x40 from 0x00 to 0x80 and store it. Now we download "Grub4DOS", newest version (http://download.gna.org/grub4dos/grub4d … -08-06.zip), extract only "GRLDR" and "menu.lst" to our new FAT32 drive and subsequently rename "GRLDR" to "NTLDR". Then you should test, that your system boots up to the yet inappropriate GRUB menu. UBUNTU has a "syslinux.cfg" file, which uses a similar but not the same script code as Grub4DOS; normal GRUB also has a bigger code . Its not hard to understand, however, what needs to be changed ( otherwise I can help ) to make Grub4DOS starting UBUNTU by "menu.lst". Be sure not to use a texteditor other than "notepad.exe" to change the menu under Windows or it will not work under Linux! I suggest you do it now, but its also possible to install Vista before. Why these actions, you ask ? Vista is clever enough to integrate "older Win versions" automatically in its new "bootmgr", which is not that simple to configure as it was "boot.ini", i.e. you install Vista and have access to GRUB/UBUNTU via Vista boot menu, which always is primary in dualboot configurations.
BTW, this is also a great way to make a USB stick bootable for Windows and Linux OSes at the same time, having an easy-to-adapt little menu (roll-back to Win alone at a finger snip) !

Wow, done!
cmdr