Loading...
 

Unix on Windows

Linux-NTFS Wiki - Linux-NTFS Project

Copying/Moving NTFS Partitions

About ntfsclone
Duplicating XPs with ntfsclone - Good discussion of booting issues when moving the NTFS partitions with linux utilities
http://winhlp.com/node/66 - Good discussion of booting issues when moving the NTFS partitions with windows utilities

Exploring the Partition Tables
- with ptedit

Configuring a Dual Boot System

Dual-Boot Linux and Windows 2000/Windows XP with GRUB HOWTO

Mounting Partitions

Mount an Ext2 or Ext3 partition in Windows

Commercial Partitioning Software

PowerSuite - $49.95; has tons of other utilities

The Diary


20080507 - The Plan
I really want to perform this entire procedure with Linux or the "built-in" windows utilities vs. purchasing some windows based product. To do so there are a number of steps that must be completed. I've been reading a bunch of help topics on the web and the primary problem I believe I will face is making windows boot after I ntfscopy the source disk to the new target disk. This page Move an entire Windows installation has a bunch of troubleshooting ideas but is completely disorganized. Using that page and my own knowledge of the tasks, I laid out the following plan. It will likely change as I attempt some of the tasks but this is where I am starting:
  • Copy / backup all data files just in case
Don't forget the contents of the "desktop"
  • Create a XP boot disk
This is needed "just-in-case". I don't have a floppy so this needs to be a CD or DVD.
  • Create a GParted LiveCD
  • Connect the new drive with the external USB adapter
  • Boot with the LiveCD
  • Create the partition table
    • 50MB partition for the Linux boot ext3
    • 60MB partition for Windows (primary and marked 'boot' a.k.a. active)
    • Remainder for Linux ext3
  • Copy the original drive to the new NTFS partition
  • Remove the old drive and replace with the new one
  • Boot into the recovery console from the Windows XP disk
  • Make the disk bootable
How?? FIXMBR? FIXBOOT? Could FORMAT /B but the partition must be copied again from the original disk.
  • Try to boot the new disk
  • Flail around on the floor because it didn't work and repeat from the top unless success
  • Now for the real hard part....
Figure out how to hack the IMX installation disk to install on this architecture

  • Other possibilities if this fails:
    • Use XP recovery console DISKPART for partitioning



20080508 - The best laid plans......
  • I did not create an XP simple boot disk because I don't have a floppy and making a boot CD looked overly complex. I might rethink this later but I'm moving on for now.
  • I could not boot into the recovery console because my IT department will not give me the Administrator password. So, I'll try some alternatives to making the disk bootable. More research..... How does Windows XP boot anyway? Understanding MultiBooting really helped me understand how Windows boots.
  • New plan for making the NTFS partition bootable
    • First make sure the boot.ini file is updated to point to the second partition by booting the GParted LiveCD and editing the boot.ini file. This is a good reference for this issue.


Success

The primary goal here is to use as few utilities as possible. There are hundreds of ways to do the same thing, probably quicker, but this is the best I could find that only requires the Windows install CD and the GParted LiveCD.

Phase I - Prepare NTFS partition

  • Attach the disk using USB adapter under windows
  • Start the windows disk management utility
  • Create the correct partitions
    • 50MB for linux boot (primary, no drive letter, no format)
    • 60GB for NTFS (primary, no drive letter, type: NTFS, volume label: Drive C)
    • remainder for linux (primary, no drive letter, no format)
  • Mark the new NTFS partition active
    • Right click on the NTFS partition
    • Choose mark partition as active
  • Shut down

Phase II - Make the new disk bootable

I use this order because I do not know the administrator password on my windows installation (IT departments don't give this out). If you know the administrator password, you can delay this step so that you only need to physically install the disk once. With the order presented here, I use the Recovery Console on a formatted but blank disk that does not require an administrator password.
  • Install the new disk as the primary boot device
  • Boot the Windows CD and enter the Recovery Console
  • Use diskpart to find the NTFS drive letter
    • Should be C:
  • Write the boot information
    • fixboot c:
    • fixmbr c:
  • exit recovery console
  • Power down
  • Reinstall the old disk

Phase III - Copy the partition

  • Boot the GParted LiveCD
  • Copy the NTFS partition from the original disk to the new NTFS partition
  • Shut down

Phase IV - Fix the boot.ini

  • Boot back into the original windows installation
  • Start the windows disk management utility
  • Assign a drive letter
    • Right click on the NTFS partition
    • Choose change drive letter and paths
    • Click add
  • Edit the boot.ini file
    • Use explorer to locate and edit the boot.ini file
    • Make sure you are not editing the one on Drive C
    • Change references like partition(1) to partition(2)
  • Shut down

Phase V - Install the new disk



Success - Try #2 (optimize)

The primary goal here is to use as few utilities as possible. There are hundreds of ways to do the same thing, probably quicker, but this is the best I could find that only requires the Windows install CD and the GParted LiveCD.

Phase I - Prepare NTFS partition

  • Attach the disk using USB adapter under windows
  • Start the windows disk management utility
  • Create the NTFS partition
    • 60GB for NTFS (primary, no drive letter, type: NTFS, volume label: Drive C)
    • Leave other space for Linux if you want
It is important to make the NTFS partition the first partition. This is because the original disk also uses partition 1 for NTFS (that's probably the only partition on the disk). If you change the NTFS partition then see my original "Success" entry above.
  • Mark the new NTFS partition active
    • Right click on the NTFS partition
    • Choose mark partition as active
  • Shut down

Phase II - Make the new disk bootable

I use this order because I do not know the administrator password on my windows installation (IT departments don't give this out). If you know the administrator password, you can delay this step so that you only need to physically install the disk once. With the order presented here, I use the Recovery Console on a formatted but blank disk that does not require an administrator password.
  • Install the new disk as the primary boot device
  • Boot the Windows CD and enter the Recovery Console
  • Use diskpart to find the NTFS drive letter
    • Should be C:
  • Write the boot information
    • fixboot c:
    • fixmbr c:
  • exit recovery console
  • Power down
  • Reinstall the old disk

Phase III - Copy the partition

  • Boot the GParted LiveCD
  • Copy the NTFS partition from the original disk to the new NTFS partition
  • (Optional) Create and format additional partitions for Linux
    • 2GB for Linux swap
    • Remainder for Linux root
  • Shut down

Phase IV - Fix the boot.ini

Skip this phase entirely if you used partition 1 for NTFS
  • Boot back into the original windows installation
  • Start the windows disk management utility
  • Assign a drive letter
    • Right click on the NTFS partition
    • Choose change drive letter and paths
    • Click add
  • Edit the boot.ini file
    • Use explorer to locate and edit the boot.ini file
    • Make sure you are not editing the one on Drive C
    • Change references like partition(1) to partition(2)
  • Shut down

Phase V - Install the new disk




20080509 - Final Solution for Debian Etch (4.0r3)
Today I suceeded in booting both Debian Etch and Windows XP. I ended up with a procedure much like Success - Try #1 above. It turns out that my BIOS and GRUB would not boot linux when I placed the /boot folder in the main linux partition which was located 60GB from the beginning of the drive. I received the following error when booting:
GRUB loading, please wait...
Error 18

This translates in the GRUB manual to "Selected cylinder exceeds maximum supported by BIOS"
I fell back to the structure in Try #1 where the first partition on the disk is a 50MB /boot partition for linux. Unfortunately this also means that the steps in Phase IV can not be skipped since the NTFS partition moves from partition 1 to partition 2. Oh, well.



Below is the "Final Process" that I used to build the new disk:

Final Process

The primary goal here is to use as few utilities as possible. There are hundreds of ways to do the same thing, probably quicker, but this is the best I could find that only requires the Windows install CD and the GParted LiveCD.

Phase I - Prepare NTFS partition

  • Attach the disk using USB adapter under windows
  • Start the windows disk management utility
  • Create the correct partitions
    • 50MB for linux boot (primary, no drive letter, no format)
    • 60GB for NTFS (primary, no drive letter, type: NTFS, volume label: Drive C)
    • 4GB for linux swap (primary, no drive letter, no format)
    • remainder for linux (primary, no drive letter, no format)
  • Mark the new NTFS partition active
    • Right click on the NTFS partition
    • Choose mark partition as active
  • Shut down

Phase II - Make the new disk bootable

I use this order because I do not know the administrator password on my windows installation (IT departments don't give this out). If you know the administrator password, you can delay this step so that you only need to physically install the disk once. With the order presented here, I use the Recovery Console on a formatted but blank disk that does not require an administrator password.
  • Install the new disk as the primary boot device
  • Boot the Windows CD and enter the Recovery Console
  • Use "map" to find the NTFS drive letter
    • Should be C:
  • Write the boot information
    • fixboot c:
    • fixmbr c:
  • exit recovery console
  • Power down
  • Reinstall the old disk

Phase III - Copy the partition

  • Boot the GParted LiveCD
  • Create and format additional partitions for Linux
    • 50MB for Linux /boot (ext2, /boot)
    • 60GB NTFS <-- don't touch
    • 2GB for Linux swap (swap, swap)
    • Remainder for Linux root (ext3, /)
  • Copy the NTFS partition from the original disk to the new NTFS partition
  • Shut down

Phase IV - Fix the boot.ini

  • Boot back into the original windows installation
  • Start the windows disk management utility
  • Assign a drive letter
    • Right click on the NTFS partition
    • Choose change drive letter and paths
    • Click add
  • Edit the boot.ini file
    • Use explorer to locate and edit the boot.ini file
    • Make sure you are not editing the one on Drive C
    • Change references like partition(1) to partition(2)
  • Shut down

Phase V - Install the new disk

  • Verify that Windows boots
    • chdsk will run; this is normal
    • I've had the login hang with just the desktop showing; hard power cycle (hold down the power switch for 10 seconds) was the only way to restart it; second try booted fine
    • I also had it fail to boot in my docking station on the very first boot; once it successfully booted un-docked, it would then boot in the dock just fine
  • Shutdown

Phase VI - Install Linux

I choose to install debian Etch the first time even though I ultimately intend to install Redhat. I choose debian because I know it's install very well.
  • Boot the Debian netinst CD
  • Run through the install as normal
  • For GRUB, select the default to install on the MBR
  • Restart w/o the CD
  • Let GRUB default to the linux boot
  • Shutdown
  • Verify that XP will boot when selected from the GRUB menu




Contributors to this page: michael .
Page last modified on Friday 09 of May, 2008 19:16:25 CDT by michael.