I recently bought Kristin a new machine to play around with. As part of the upgrade process, I purchased a SATA 3G drive for cheaper than what I would have paid for an equivalent capacity IDE drive. I intended to hook up the SATA as a secondary hard drive, install Windows XP, and then copy the files from my IDE hard drive over to my SATA before removing the IDE drive to put in Kristin’s machine.
The installation went smoothly, and all of the files copied over from the IDE to the SATA hard drive without any issues. I then removed the IDE drive, put it in Kristin’s machine, and began installing a clean copy of Windows XP.
I then tried to boot my machine, only to be presented with an error stating that I had no boot device specified. I figured that it was just a matter of using the recovery mode from the Windows XP disc to rebuild the boot.ini file and I would be on my way. However, there was more to the story than that. In addition to the boot.ini file needing to be rebuilt, all of the files necessary to boot into Windows were on the IDE drive, which was now chugging along past the point of no return in Kristin’s desktop.
I did some quick research and formulated a plan:
- Download the utility “ntfs-config” and its dependencies. I would need to be able to write to the NTFS partition
- Get my USB thumb drive. It will serve as my transfer medium.
- Get the files necessary to boot from a working machine.
- Find my Ubuntu 6.10 disc so that I can live boot into an operating system.
Lets look at ntfs-config briefly. It is a front end for configuring the new ntfs-3g driver for Linux to allow read and write access to an NTFS partition. For the record, its in beta, but I have used it heavily for several months without a single hiccup. Its dependencies include the following packages: fuse-utils, libntfs-3g0, ntfs-3g. We will need to install these before ntfs-config to satisfy all of the dependencies.
Once you have downloaded these files, save them to a USB thumb drive. We can’t use a CD because the live CD effectively locks the CD drive. You could use one if you have a secondary optical drive in your machine.
Next, we need to get the files necessary for Windows to boot from a working Windows installation. If you are like me, this step isn’t really all that hard. We will need the following files: boot.ini, NTDETECT.COM, and the infamous NTLDR. Since we had two hard drives before and now only one, we will need to modify the boot.ini file to reflect this change. Check the section that reads:
default=multi(0)disk(0)rdisk(0)partition(2)WINDOWS
For me, I had two hard drives, so the partition is reading 2. We will need to change this to 1. After the change, the line should look like this:
default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS
This change is only for the default boot device. We still need to change the location of the installation itself. This is on the following line:
multi(0)disk(0)rdisk(0)partition(2)WINDOWS="Microsoft Windows XP Professional" /fastdetect
After the change, my file looks like this:
multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional" /fastdetect
If you don’t have access to another computer to get these files, do a quick Google search, they seem to be everywhere.
Ok, so save these files along with the ntfs-config packages to your thumb drive. Place your Ubuntu 6.10 CD in the drive of the confused machine, and boot into Ubuntu. Once you are on the desktop, plug in your thumb drive. After a few seconds, a folder should open displaying the files we saved earlier.
Now, lets install ntfs-config and mount the Windows hard drive with read/write access. Install the packages in the following order: fuse-utils, libntfs-3g0, ntfs-3g, ntfs-config. The order is not arbitrary. Each package is a dependency for the next package we installed.
Once the installation is completed, click on “Applications”, “System Tools”, “NTFS Configuration”. You will see a hard drive listed under detected devices. We will not be concerned with external devices, since this is beyond the scope of this situation. Place a check next to your hard drive and type a name for the mount point for the drive, i.e. “Windows”.
Once this completes, you can use the file manager, Nautilus to browse to the location “/media/Windows/”. This is the same location as “C:” inside Windows, but you can’t get there right now, I know.
Drop the files: boot.ini, ntldr, and NTDETECT.COM into this directory from the thumb drive. I made an empty file called “pagefile.sys”. I don’t know if its required, but it made me feel better.
Once the files are copied, click the red power button in the upper right corner, and choose reboot. The machine will ask you to remove the CD and hit enter. With a little luck, you will reboot right into the Windows partition that you left.
Note: Windows installs all of the drivers to the active partition. For me, this was the IDE drive, so I had to reinstall most of my drivers.
sounds like a bitch
LikeLike