Summary: This documentation will
Give pointers on how to back up your hard drive.
Describe how to repartition your hard drive with Partition Magic.
Describe how to install Debian and configure it so that you can dual boot.
Give pointers on how to do all this without Partition Magic (but strongly advocate against such a procedure).
1. A computer that can boot from CD-ROM
We discovered during testing that some Compaqs cannot boot from CD-ROM. If your computer cannot boot from CD-ROM, then SIPB Debian is not for you. |
Here is one way to check that your computer can boot from CD-ROM. Drop the Debian CD into your CD tray, and reboot. You might need adjust the boot order (which devices to search for an operating system), which usually involves pressing a magic key such as F8 (your bootup screen will normally tell you.)
If you reach the "Welcome to Debian GNU/Linux 3.0" screen, you are fine. Remove the CD. (If you find you cannot remove the CD, you may have to play with your boot order in BIOS again to boot from hard drive instead of the Debian CD. Or you may have to cut the power to your machine and then eject the CD during the reboot.) Reboot back to Windows in order to back up your hard drive and run Partition Magic.
If your computer cannot boot from CD-ROM, then SIPB Debian is not for you.
2. Partition Magic
Partition Magic is a $70 piece of software that you can purchase at your favorite software vendor. Brick-and-mortar software vendors near MIT include the Best Buy at the CambridgeSide Galleria Mall, and the MicroCenter on Memorial Drive. You may also want to try online software vendors.
The Stingy People's Section below will grudgingly give suggestions on how to repartition without Partition Magic. However, we strongly advise that you just get Partition Magic and do it the easy way.
3. Two blank IBM formatted floppy diskettes (for the Partition Magic rescue diskettes)
4. If you are paranoid, a complete system backup utility such as PowerQuest Drive Image. (approx $70).
Partition Magic has been known (rarely) to render your hard drive unreadable. We recommend therefore that you back up your computer before running Partition Magic.
This section is a collection of notes (not a step-by-step guide) on how to back up your computer.
There are two broad classes of techniques to back up your computer. You may want to do both.
The first technique is a thorough complete backup of everything, done with some commercial backup software. We recommend PowerQuest Drive Image (approx $70) to do this; it is made by the same company as Partition Magic so ought to work correctly even after repartitioning.
The second technique is to selectively back up just your important files (such as documents, e-mail, media files, and source code). You may want to do this in conjunction with with the first technique mentioned above: you may not want to go through the hassle of a full restore. Or you may just want to do this second technique because you are too stingy to purchase a commercial backup utility.
If you have a CD-RW, you can purchase blank CDs at Best Buy or the MicroCenter mentioned above.
You may want to package the files that you want to back up into a ZIP archive, using a compression utility such as Winzip or Powerarchiver (available at www.winzip.com and www.powerarchiver.com respectively). Both create ZIP archives which compress data somewhat. They both have convenient drag-and-drop and right-click-to-compress features. You can test the file easily to make sure that no errors occurred during creation or transmission.
Note that you cannot write files with names longer than 64 characters onto CD-ROM (the typical culprit is MP3s). One way around it is to put the file into a ZIP archive and write the ZIP archive onto CD.
Trying to back up an entire Windows installation with a compression utility will not work. This is because (among other things) some important system files are locked and unreadable while the operating system is running.
It is difficult, if not impossible, to back up applications simply by making copies of the files. Applications frequently drop .INI files into the Windows directory and edit the Windows Registry. You usually want to just re-install applications instead of backing them up.
The recommended place to put your backup files (temporarily, while you do the Debian install) is "your friend's computer". To transfer files onto your friend's computer, you might use ICQ, setting up an FTP server on one of them, Windows networking, Microsoft Netmeeting, or a null modem cable.
There are other places to put your backup files, but they all get periodically erased automatically, so be careful. They are, the /tmp and /var/tmp directories of the dialup machines (athena.dialup.mit.edu), the lockers /mit/bitbucket and /mit/bitbucket2, and the /tmp and /var/tmp directories of any Athena cluster machine. You may need the Athena command access_on in order to be able to remotely access an Athena cluster machine. Please be careful not to transmit passwords over the clear.
Netscape Communicator (4.xx) seems to store its e-mail in C:\Program Files\Netscape\Users\username\Mail. Netscape (6.xx) seems store its e-mail in a hidden folder C:\Documents and Settings\me\Application Data\Mozilla\Profiles\username\random_string\Mail.
Microsoft Outlook Express stores e-mail in a proprietary format in a hidden folder in the C:\Documents and Settings directory (you can see it when you right click on a Local Folder name and select Properties). I suspect it cannot be backed up.
You should be able to get at least 300 kilobytes per second over MIT's internal network. If not, you should try going elsewhere (assuming you have a wireless card). The dorm networks (both wired and wireless) are known to occasionally suck.
We assume that most people will start with a computer with some version of Microsoft Windows on a single partition consuming your entire hard drive. In order to install Linux, you will need (at the very minimum) to repartition your hard drive to create a Linux Extended-2 partition. You will usually want to create a Linux Swap partition and a FAT32 partition as well.
The Linux Extended-2 partition will hold all your Linux files: the operating system files and your home directory.
The Linux Swap partition is virtual memory: hard drive space that is used as RAM for when you run out of RAM. A good rule of thumb is to set the size of your Swap partition to be twice the amount of physical RAM on your machine. (However, nothing prevents you from having no swap at all, if you want to conserve on hard drive space.)
The FAT32 partition is for transferring files between Linux and Windows. Most recent versions of Windows (namely XP, 2000, and NT 4.0, but not 95, 98, nor Me) use (by default) a filesystem known as NTFS. SIPB Debian Linux cannot read (nor write) files stored on a partition with an NTFS filesystem. Windows (all versions) cannot read (nor write) files stored on a Linux Extended-2 partition.
Fortunately, there is an intermediary filesystem type, called FAT32, which both operating systems can read and write. If your version of Windows uses NTFS, then you will probably want to create a FAT32 partition for files you want to be able to access from both operating systems. (The typical culprit is MP3s.)
You can check what filesystem Windows has by right-clicking on the drive in Explorer and selecting Properties.
Incidentally FAT32 is the default filesytem type of Windows 95, 98, and Me. If you already have a FAT32 partition, then you do not have to create another one. Also, if you are reading this documentation before purchasing your computer, sometimes you can ask your computer manufacturer to put Windows (whether it be XP, 2000, or NT) onto a FAT32 partition instead of the default NTFS.
Finally, if you have NTFS, Partition Magic can try to convert your NTFS into FAT32. We will not document that procedure here; you are on your own.
This section will explain the confusing world of primary, extended, and logical partitions.
A hard drive can have up to four primary partitions. This is a physical constraint of how hard drives are built. (Under Linux they are called /dev/hda1, /dev/hda2, /dev/hda3, and /dev/hda4.) Windows must live on one of them, typically /dev/hda1. Also, Windows can only ever read from one primary partition (which is, of course, its own). Therefore, if you want to read other partitions (like the extra FAT32 partition described above), they will have to go on logical partitions (described below).
In order to circumvent the four primary partition limit, logical partitions were invented. Logical partitions fit inside an extended partition, which is a special kind of primary partition. You can have at most one extended partition on a hard drive. Within that extended partition, you can put as many logical partitions as you want. (Linux calls logical partitions /dev/hda5, /dev/hda6, ...)
To summarize, and to provide an example, a hypothetical "maxed-out" system would have three primary partitions, an extended partition, and 42 trillion logical partitions within the extended partition.
This section will describe step-by-step how to run Partition Magic to repartition your hard drive. Note that the screenshots were taken on a Windows 98 system, so your experience might be slightly different. (In particular, your C: partition Type will probably read NTFS.)
First, install Partition Magic. Yes, you want to create rescue disks during the Partition Magic install. You will need two blank FORMATTED diskettes.
Start Partition Magic.
Single click on the C: on the left hand side of the window.
Operations menu, resize/move
Mouse to the rightmost side of the bar at the top of the dialog window, until the mouse cursor becomes a left-right arrow (as opposed to a left-right-up-down arrow).
Drag to make the partition smaller. We recommended keeping the partition larger than 8,040 MB. If you go smaller than that, Partition Magic will warn you to "back up your computer before performing this operation." (That is, you will likely erase your hard drive).
You can ignore the message "This partition crosses the 1024 cylinder boundary and may not be bootable", unless you have an old computer. What is old? Let's say, before 2001.
Hit OK
Single click on the grey Unallocated part of the bar on the upper right hand side.
Operations menu, create
Create as: Primary partition
Partition type: Linux Ext2
Label: (leave blank)
Size: at least 3,000 MB for all Linux files. Let's say, 6,000 MB.
Position: Beginning of unallocated space
Partition Magic will not create your partitions to exactly the size you request it. |
You could make the this Linux Extended-2 partition a Logical partition, if you want. There is no advantage either way. |
Ignore the message (again) "This partition crosses the 1024 cylinder boundary and may not be bootable".
OK
Single click on the grey Unallocated part of the bar on the upper right hand side.
Operations menu, create
Create as: Logical partition
Partition type: Linux Swap
Label: (leave blank)
Size: A good rule of thumb is to set your swap partition (virtual
memory) to twice the amount of physical memory. Let's say, 1,024 MB.
Position: Beginning of unallocated space
Single click on the grey Unallocated part of the bar on the upper right hand side.
Next we will create the FAT32 partition that will be visible to both Windows and Linux. From the Operations menu, create
Create as: Logical partition (Windows can't deal with more than one
primary partition. At least Win 98 can't.)
Partition type: FAT32
Label: You can put something informative here, if you want
Size: leave unchanged, this will fill the remainder of the disk.
Position: Beginning of unallocated space
in the end, you should have something that looks like this.
Apply changes
If Partition Magic asks about "Going to DOS mode", do so. Also, if it asks to run "Drive Mapper", do so as well. (This probably does not apply to most people.)
If you should get "Error 305: Less bytes were read from the file than desired. Most likely because the end of the file was encountered." we have found it to be ignoreable.
If Drive Mapper runs and recommends a reboot, do so.
Check to see that C: and D: are visible to windows. Also check to make sure your windows devices are working properly (CD-rom, Internal ZIP drives). Because the drive letters changed, something may have broken. (Although Drive Mapper should take care of that for you.)
Drop the SIPB Debian CD into your CD-ROM drive and reboot. You may need to hit some magic button (F2 or F7 or F12 or DEL) to go to BIOS and force your computer to boot from CD-ROM.
at the 'boot:' prompt, hit return
It may pause for a few minutes at "Detecting monitor..."
At the "Select Target Drive(s)" screen, choose "Custom".
You will be met with a disk partition screen that looks like this.
DO NOT mount the windows partition. DO NOT even try to edit it. (This will make the installer think it is no longer an NTFS partition.)
Mount your Linux partition as / (DO NOT select bootable!). Mount the transfer-files-between-windows-and-linux as /dos. Choose partition type of "swap" for the swap partition. In the end you should have something that looks like this.
Choose... install boot loader.
Ignore the message "Unable to align partition correctly..." if you get it.
For some of the larger packages (e.g., Mozilla, emacs) the installer may seem to freeze for a while (30-60 sec)
This section is a collection of suggestions for people who do not want to use Partition Magic. However, we strongly advise that you just get Partition Magic and do it the easy way described above.
If your Windows partition is FAT32, then there is a free software tool called PartEd that will do the same job as Partition Magic. Its home page is:
http://www.gnu.org/software/parted/
If you have NTFS, the only free way to do it is to reformat your hard drive and reinstall Windows. You will lose all your information stored on your hard drive. Before reinstalling Windows, make sure you have all of the following:
Windows CD, and product key.
All the drivers for your computer and all its peripherals. The most tricky ones are often the various drivers related to your motherboard.
All the software installers and product keys for them, if necessary.
Any passwords for automatic logins to websites or other services that you had stored (as cookies, perhaps).
A backup of any important information on your computer.
Your Windows CD is an interesting issue. If your computer came with a plain-old straight-from-Microsoft CD, then you will have to hunt down all your drivers like it says above. (In the worst case scenario, drivers may be proprietary software that are not publicly available.)
However, if your computer came with something resembling a "Windows Restore CD" (typically with your computer manufacturer's brand name imprinted on the CD), then the relevant drivers for your computer are typically already on that CD. However, many nightmares may await you from using it.
Sadly, what's on your Restore CD is typically different than what your computer came with. If fact, the Windows side of your computer may quite never operate right again if you restore from the Restore CD.
Restore CDs frequently repartition your hard drive (back to its single monolithic Windows partition) in the restoration process. If so, you are screwed: Go purchase Partition Magic.
There are two possible partitioning tools you can use if you are willing to reinstall Windows. They are the Windows installer partitioning tool, and the SIPB Debian installer partitioning tool. If you have a "Restore CD" then you may not have the Windows partitioning tool.
Whatever you do, you want to install Windows first, and SIPB Debian second. If you wrongly install Windows second, it will clobber your bootloader, making it difficult to boot your Linux side.
If you wish to use the Windows installer partitioning tool, the partitioning tool runs in the blue-screen text-mode initial part of the installation (for Windows 2000 and (probably) XP). You will want to create your Windows NTFS partition and your FAT32 partition here and leave extra empty space for Linux. You may have to format your FAT32 partition manually after installing and booting Windows. Proceed on to the SIPB Debian installer.
If you wish to use the SIPB Debian installer partitioning tool, it is a little tricky, since you want to install Windows "first". First (counterintuitively) run the SIPB Debian installer. Choose "Custom Install" and create the partitions. We recommend placing Windows in /dev/hda1 (primary partition). You will have to give some useless partition type for your Windows Partition (say FAT32). Create your other Linux partitions and FAT32 partition as well.
Continue the SIPB Debian installer until it begins installing packages. At this point, reboot, and install Windows. (You may have to hit CTRL-ALT-F1 first, then CTRL-ALT-DELETE.) If you have difficulty removing the SIPB Debian CD, you may have to cut power to your computer and eject during bootup, or jab a paperclip into the emergency CD eject hole (not all computers have this), or get a hold of some bootable floppy disk.
After reinstalling Windows (on to the first partition), again insert the SIPB Debian CD, and this time, go through with the installation.
$Id: dual-boot.xml,v 1.4 2002/10/01 01:39:13 kenta Exp $