Pre-Installation steps

From ThinkWiki
Revision as of 18:25, 28 October 2005 by Wyrfel (Talk | contribs)
Jump to: navigation, search

Backup/Rescue CD Set

The preinstalled WinXP on most modern Thinkpads comes with a software to create rescue discs. It can be found in the "Access IBM" section of the Windows menu. I recommend to create a set of rescue discs before you repartition the drive. When you create the rescue discs, use a CD-R for the first volume (it's only 280 Megs) and then DVD-R. Otherwise you will end up with seven CD-Rs. (IBM is said to offer shipment of a pack of rescue disks if you call the support hotline.)

The copy of Windows that came with your machine cannot be legally transferred to any other machine. Leave the license sticker intact for when the machine is sold, or if you just have to dual boot.

Resizing your Windows Partition

If you want to keep your WinXP partition and you do not want to shell out lots of money for PartitionMagic, you can use ntfsresize. I recommend booting Kanotix or Knoppix, getting it online and using the latest version to be found at the ntfsresize link because the CD linuxes tend to come with slightly out-dated versions. Be sure not to forget to resize your Windows partition (e.g. with cfdisk) AFTER having resized ntfs and TAKE CARE not to make the partition smaller than you made the ntfs. If you like it safe and smooth you can also take a look at the program "qtparted" which reportedly takes care of ntfsresize and partition table changing in one go and allows you to adjust partition sizes in a GUI. But I have not tested this software personally.

Please be carefull before taking the following steps. I suggest that you should create rescue and product recovery CDs (6 CDS will be required) before going for the following so that if anything goes wrong you can go back to the factory setting using those CDs.

Moving the Recovery partition using a Linux rescue system

On newer models (i.e. the T43) the preinstalled HDD has two partitions; the first one containing the OS and second one having the rescue files used to boot the machine when Access IBM button is pressed before Windows XP takes control of the laptop. One can use his Linux distros boot CD (usually the first CD) to boot into rescue mode and shift the rescue partition from the end of the HDD to somewhere in between leaving required space for Windows. This can be done in following steps:

Creating a temporary rescue partition

  • Run # fdisk /dev/sda.
  • Delete the 1st partition (/dev/sda1).
  • Create a partion /dev/sda3 immediately before the rescue partition (/dev/sda2) with exactly the same number of cylinders as the rescue partition.
  • Save the partition table and quit fdisk. Reboot.
Hint:
To be on the safe side, reboot the machine everytime the partition table is modified and saved using fdisk from linux rescue mode.
  • rawcopy the contents of /dev/sda2 to /dev/sda3 with
# {{{1}}}

Creating the rescue partition in its final position

  • Run # fdisk /dev/sda.
  • Delete the rescue partiton /dev/sda2 (we just backed it up to /dev/sda3).
  • Create a partion /dev/sda2 immediately after the space you want to leave for Windows. Note that this new partition again should have exactly the same number of cylinders as the rescue partition (now /dev/sda3).
  • Save the partition table and quit fdisk. Reboot.
  • rawcopy the contents of /dev/sda3 to the newly created /dev/sda2:
# {{{1}}}
  • Run # fdisk /dev/sda.
  • Delete the temporary rescue partiton /dev/sda3 (we just copied it to /dev/sda2)
  • Save the partition table and quit fdisk.
  • Reboot the machine and press Access IBM Button to restore the Windows XP from the rescue partition. Windows XP will occupy only the space available before the new rescue partition.

Once Windows XP is recovered follow the standard mechanism for installing Linux in the available free space at the end of the HDD. If you have created Rescue and Product Recovery CDs, then the Rescue Partition also can be deleted at this stage to make more room for your Linux installation.