Tod Thomas wrote:
Mikkel L. Ellertson wrote:
> Tod Thomas wrote:
>
>> Thanks. I thought that recreating the partition using fdisk would have
>> accomplished the same thing - no? If not what does the fdisk process I
>> followed
>> do or not do?
>>
>>
>> Tod
>>
>>
> It will if you create a new partition table that reflects the new
> disk size, and do not copy the mbr from the larger disk. You will
> need to re-install the Windows boot loader to the mbr of the new
> drive, or install the Grub boot loader there, and use it to select
> Windows or Linux.
>
> Mikkel
>
Ok, I think I understand:
/dev/hda - spare 80GB drive
/dev/hdb - old 150GB xp drive (primary partition ntfsresized to 20GB)
dd if=/dev/zero of=/dev/hda
This will write zero's to the entire drive - a bit excessive, and
time consuming. Add count=1 to the command.
fdisk /dev/hda
- create new primary partition(hda1), bootable, type 7 (NTFS)
- this then creates the windows MBR?
It does not put the Windows boot loader one the drive, but it does
create a new MBR.
dd if=/dev/hdb1 of=/dev/hda1 bs=10000000 count=2000
- copies resized xp partition to new drive
If the partitions are the same size, you should be able to do:
dd if=/dev/sdb1 of=/dev/sda1
But I still like using parted instead of dd for this. It will handle
any differences between the partitions.
Reboot to new drive and all is well. Defragging is factored in
somewhere prior to this operation. I think upon reboot this will
trigger xp to perform a chkdisk.
Does this make sense?
I would defrag before shrinking the partition, but I guess you have
already shrunk it. You are also going to have to boot from the
windows CD, start the recovery console, and run fixmbr. (Or you can
do your Linux install, install Grub, and let it boot Windows/Linux.)
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!