[ltp] Installing XP from recovery discs?

Christopher Sawtell linux-thinkpad@linux-thinkpad.org
Mon, 08 Aug 2005 19:55:28 +1200


On Mon, 08 Aug 2005 18:15, Peter Lemken wrote:
> Hi,
>
> after receiving the full 8 CD set of recovery disks from IBM I wiped my
> R51's harddrive clean and partitioned it for exclusive Linux use.
>
> Now I need to have Windows installed and from reading the documentation I
> could not find a way to simply install XP Professional without losing my
> Linux partitions. What I saw was that you could either restore the original
> state of the HD from CD, losing all other partitions or start the rescue
> and recovery process from disk and have windows installed on C:\ without
> losing other partitions.
>
> Since I do not have anything left on the HD except Linux, the last option
> obviously doesn't work, does it? What other suggestions do you have to get
> XP Pro onto the HD other than buying a new copy?
You do not have to buy a new copy.
After a lot of fooling and futzing around, this is what I did when I had to do 
a Windoze restore which could be dual booted.

Backup everything. I was lucky, I had another machine with enough space. 
Hopefully you won't need it but things do have a nasty habit of going wrong 
at the worst moment. I needed the backup.

Now move files around on your existing partitions so you can make a partition 
of about 3.5Gb ( The a convenient minimum for XP! i.e. almost no space for 
data files ) There is a utility called parted which can alter the partition 
sizes on the fly. Take great care to ensure you have a full battery and a 
good mains supply, because a crash halfway through will in all probability 
destroy your filesystem. Create this new partition at the start fo the disk 
using fdisk and set its type to WIN95 type number c. 
Print the partition table out onto paper and take great care not to lose it!
Delete the linux partitions from the table. ( remember deleting the partition 
only removes the meta-data in the partition table about the partition itself, 
not the actual data. )
Create another WIN95 partiton to 'cover' your Linux partitions, otherwise the 
XP install process will attempt to sabotage them by changing the sizes by a 
cylinder.
Install XP into the first ( C: ) partition. DO NOT allow it to alter or format 
the other ( D: ) one. ( You may get a message about incorrect geometry or 
some such. Ignore it. i.e. do not let the XP installer change things. I 
allowed XP to do so and lost all the linux data at this point. )
Boot up your linux recover disk, and delete the second WIN95 Partition ( D: ) 
and then recreate the linux partitons as they were before you installed XP. 
using the data from the printout.

Re-install grub or Lilo as the case may be, changing the config files as 
necessary. Don't forget to change the /etc/fstab file to reflect the new disk 
setup.

Sorry it's a bit long, but it's easier done than said.

-- 
CS