This article is more than 1 year old

The Reg guide to Linux, part 2: Preparing to dual-boot

Lining it all up

An old guideline when building a multi-boot PC is to manipulate partitions under their native OS where possible. The snag here is that XP doesn't have the functionality to shrink its own partitions. Vista and Windows 7 do, although sometimes not by as much as you might expect.

If you can, use Windows to shrink its own partitions. If not, boot the PC from your new live CD and use the partitioning tools on there. The setup program will walk you through partitioning, but it's arguably preferable to do it in your own time with the "Gparted" tool – a Linux equivalent of PartitionMagic. You'll find it under the System menu in Administration.

After you've shrunk the Windows volumes, check that Windows still boots OK. If not, you can use an XP, Vista or 7 install CD or the Windows 7 Recovery CD to repair it. Even if it comes back up fine, it's a good idea to run a CHKDSK again, just in case.

To avoid problems, don't try to put Linux first on the disk, followed by Windows. Linux expects to share; Windows doesn't. The same goes for putting Linux on your first hard disk and Windows on the second - just don't. The ideal simplest setup is Windows in a single primary partition, followed by an extended partition containing all the Linux partitions, or Windows alone on the first physical drive and Linux alone on the second.

If you've got multiple drives, it is possible to disable one in the BIOS, install on the other, then use the BIOS to switch between them – but if you get it wrong, this can be risky, it makes it harder to share data between OSs and in any case the Linux boot menu is painless and far easier. Linux will happily access and both read and write FAT, FAT32 and NTFS volumes, so you can get at your Windows files and documents while you're in Linux. Your Linux volumes will be invisible from within Windows, though, without additional software.

When creating the partitions, make sure that you create them in their on-disk order. If necessary, use a calculator – there is one on the live CD under Applications | Accessories – to work out the sizes, rather than creating the root partition first, then the swap partition on the end of the disk, then finally filling the remaining space with the home partition. Linux is perfectly happy with out-of-order disk partitions, but they can cause problems with Windows.

Some other gotchas to watch out for include RAID setups. There are basically three kinds of RAID – software, firmware and hardware. Unfortunately, the most common on Windows desktops is firmware RAID, where the disks are attached to motherboard controllers and the array is created in the BIOS and managed by a special driver under Windows. You can't partition such an array and share it with Linux. Proper hardware RAID, with the disks on a dedicated controller card, can be shared, but it's complex and not worth the effort. Don't bother; split the array up into standalone drives and dedicate some disks to Windows and some to Linux. True software RAID is only found in Server editions of Windows, which you probably wouldn't want to dual-boot anyway. Linux has its own excellent software RAID system, but it's not interoperable with others OS's implementations. In any event, RAID is primarily a server thing and dual-booting a desktop one; don't mix them.

Summary

So the preparatory steps are:

  1. Clean up your Windows drives.
  2. If you've got multiple partitions or drives, consolidate your stuff down onto as few as reasonably possible.
  3. Download an ISO of your choice of distro and burn it to an optical disc.
  4. Check the PC boots from it OK.
  5. If you're using Vista or Windows 7, use it to shrink your partitions down to make room for Linux. Otherwise, use the live CD to do it.
  6. Check Windows still boots OK.
  7. Create your new Linux partitions.

Once all this is done, you're ready to actually install the new OS and set it up – which we'll cover in tomorrow's article. ®

More about

TIP US OFF

Send us news


Other stories you might like