2. Procedure

2.1. Reference

  1. Backup your software and data

  2. Compile a catalog of hardware component models and software versions.

  3. Attach new disks.

  4. Compact the existing software and data.

  5. Repartition the disk.

  6. Format the new partitions.

  7. Load the new operating systems.

  8. Install the boot manager (uc).

  9. Cross mount the devices.

2.1.1. Backup

Installing linux on Nancy system will involve repartitioning. Any time you repartition a hard disk you run a significant risk of losing data on the disk. More precisely repartitioning does not actually cause data loss, but does tend to discover data that was lost piror.

Tom warned Nancy that she should backup everything before starting. Familiar with pluming repair, Tom knew that whey you shut off the water for 10min to replace a dripping faucet, you often find that the pipes in the floor were rusted and leaking. Nancy knew nothiing of plumbing, but she had a good book collection and had moved several times. She knew that bookshelves often break when you move them.

Since Lisa is buying a new computer, she has nothing yet to backup. When Oscar asked for the backups of the crashed computer he was met with the usual blank expressions. His job is essentially ot make a backup of the otherwise lost data.

This version of this HOWTO does not detail how to backup. If you wish to see more information on backing up or if you wish to provide information please contact the maintainer.

2.1.2. Catalog

During installation, the size of disks, and other accurate specifications will be necessary. Entry of slightly wrong values will result in subtle problems that may not show up immediately but will often be chronic, frustratingly difficult to diagnose, and maybe impossible to fix.

Windows and your linux distribution may not support the same hardware. You should see the Hardware Compatibility HOWTO for a list of what is known to be compatible or incompatible.

In general Windows is the more restrictive with exception of WinModems/WinPrinters/.... Any hardware supported by Windows will usually be supported by linux, though not necessarily included in your distribution. Much hardware, especially the old and the cutting edge, may be supported by linux but not by Windows. If not included in your distribution, you can usually download linux drivers and or modules from the Internet.

Winmodems, Winprinters, Winscanners, etc. are not supportable under linux. These devices are actually firmware that depend on proprietary Windows software. In the United States it is illegal to sell a linux distribution that supports these devices.

Lisa has dealt with software long enough to know the value of specifications. Even before purchasing a computer, Lisa has already created a log. For each computer being considered from each prospective vendor, Lisa has a list of each component, its model and capabilities.

Tom knows that one of the least expensive means to support reliability in any complex system (computer, airplane, car, etc.) is by keeping accurate maintenance records. Many (if not most) of the compatiblity problems reported by Tom's students would be prevented if accurate records were kept and consulted.

Tom usually recommends avoiding WinModems, etc. because their performance limitations are too severe for most people..

Oscar's company keeps records on the hardware components of each computer. Before trying to fix any problem, Oscar examines the log and often finds that intractible problems becomre easily solved when you know the model details.

2.1.3. Attach

One of the useful features of linux is the wide range of diagnostic and repair tools that it supports. The easy ability to write scripts also makes it easy to write worms and do other recovery operations.

Oscar has easy access to a spare hard drive. He checked the Hardware Compatibility HOWTO to select a hard drive model.

  • Oscar grounds himself with a wrist strap to avoid accidental electrostatic damage.

  • He opens the case according to the service manual.

  • He slides the disk into the secondary drive slot and attaches an IDE cable.

  • Oscar closes the case and ungrounds himself.

This version of this HOWTO does not detail how to attach new drives. If you wish to see more information on attaching or if you wish to provide information please contact the maintainer.

2.1.4. Compact

Most new computers preloaded with Windows are delivered with a single FAT32 partition that occupies the entire disk. Before loading a second operating system on a shared disk, it must be split into at least two partitions, since Windows and some linux distributions will not tolerate another operating system on the same partition.

Software is normally stored distributed across the disk partition. Before splitting a partition, all the data must be moved to the start of the partition, so that when the partition is split, the old software and data won't be lost. Tom warns Lisa, Nancy, and especially Oscar that compacting is not reversible. If the partition is error-free, no active files will be lost, but disconnected (deleted) files may be lost. If the partition has errors, tools exist that can often (but not always) recover disconnected files before compaction. After compacting , the disconnected files are probably unrecoverable.

The fips included in tomsrtbt-1.6.335 is 0.9e and Tom has used it directly with Windows 95. Windows98 requires fips-2.0 or later which (at press time) was not included in the archived tomsrtbt distributions.

Nancy is unafamiliar with open source code and the Internet, so Tom offers to create her fips disk.

  1. Download fips-2.0 and expand in the directory $FIPSROOT

    (This may require privelege depending on Tom's linux configuration)

    (The address will probably change by the time you read this.)

    bash> FIPSROOT=/opt/packages/fips-2.0
    bash> mkdir -p $FIPSROOT/original
    bash> cd $FIPSROOT/original
    bash> wget ftp://sunsite.icm.edu.pl/pub/Linux/sunsite.unc.edu/system/installl/fips-2.0.zip
    bash> cd $PIPSROOT
    bash> unzip -d oritinal/fips-2.0.zip
  2. Insert and mount the startup disk from Nancy.

    (This may require priveleges depending on Tom's linux configuration)

    bash> mkdir -p /floppy
    bash> mount -t vfat /dev/fd0 /floppy
  3. Follow the instructions for fips. At press time, this means copy 3 files to the startup disk.

    bash> cp restorrb.exe fips.exe errors.txt /floppy
  4. Unmoun the floppy and return it to Nancy.

    bash> umount /floppy

Nancy's new machine was delivered preloaded with Windows 98 on a single partition occupying the entire disk. The installation was already compact, but Nancy used scandisk and defrag anyway just to be safe. When splitting the partition with fips, it warns that the physical partition length does not equal the logical partitin length. Tom explains that this is expected since her disk has more than 1024 cylinders. Tom suggests that Nancy record the current partition info in case it is needed to recover from a disaster. Following Tom's suggestion, Nancy reduces the first partition to approximately 30% of the total disk size.

  1. Create a statup disk and give it to Tom.

    [Start][Settings...\Control Panel] [[Add/Remove Programs] [Startup Disk] [Create Disk ...]

  2. Verify that the disk has no detectible errors.

    (There may still be hiddent errors.)

    [My Computer] {(C:\)} [Properties ...] [Tools] [Error-checking status\Check now ...] [Type of test\Thorough] [Start]

  3. Fis any errors reported.

  4. Defragment the disk to remove blank areas and deleted files.

    [My computer] {(C:\)} [Properties ...] [Tools] [Defragmentation status\Defragment now ...]

  5. Insert the fips startup disk from Tom and restart the computer.

    [Start] [Shutdown...] [Restart] [OK]

  6. When the computer reboots, split the partition.

    A:\> fips
    Save current partition info: yes
    New partition start: 501

2.1.5. Repartition

A normal linux installation requires at least two partitions. It usually improves performance to more partitions. Most bioses support no more than 4 primary partitions.

Tom recommends that the disk be divided into 4 partitions.

  1. ~33% Windows bootable

    Windows requires residency on the first primary partition

  2. ~33% linux bootable

    On most computers, bootable partitions must reside entirely below 1024 cylinders.

  3. ~64M swap

    A filesystem optimized for memory caching improves performance.

  4. ~33% data

    The last partition may be used by either or both operating systems if is compartible.

The Windows bootable partition must be one of the filesystems supported by Windows. Likewise the linux bootable partition must be one of the filesystems supported by linux. The swap partition must have a filesystem supported by the operating system that will use it. The last partition will be used for data, and can have any filesystm.

At press time, the above division is safe for most computers.

Nancy is unfamiliar with open source and the Internet, so Tom lends her one of his diagnostic disks with tomsrtbt..

tomsrtbt is a small distribution of linux on a single floppy disk that loads into RAM. Since it does not occupy nor run on the hard disk it is superb for situations where the hard disk will be modified (e.g. repartitioning).

Tom stresses that repartitioning is simple but must be done with meticulous care, since everything else depends on it. Like ignoring a crack in the foundation of a house, partition table errors may not become apparent for a long time, when it will be difficult or impossible to correct.

Nancy will be using her system primarily with Windows, so Tom recommends that her data partition use FAT32 From the compoent catalog that Tom prepared for her computer, Nancy knows that her hard disk has 1661 cylinders.

  1. 0001-0501 Windows FAT32 bootable

  2. 0502-1002 linux ext2 bootable

  3. 1003-1011 linux swap

  4. 1012-1661 data FAT32

Lisa will be using her system primarily with linux, so her data partition will use ext2 The data partition will then be unavailable to Windows, but will be more easily used from linux. Lisa's hard disk has 787 cylinders.

  1. 0001-0262 Windows FAT32 bootable

  2. 0263-0525 linux ext2 bootable

  3. 0526-0779 linux swap

  4. 0780-0787 data ext2

Nancy uses the tomsrtbt disk provided by Tom and fdisk on it to edit her partition table.

  1. Insert the tomsrtbt disk and restart the computer.

  2. Read the fdisk instructions and list of known partition types

    bash> /bin/fdisk
    fdisk> m
    fdisk> l
  3. Read and record the partition table

    (After fips, her disk has two partitions.)

    fdisk> p
  4. Since her disk has more than 1024 cylinders, update the cylinder count known to fdisk with an advanced command

    fdisk> x
    fdisk expert> c 1661
    fdisk expert> r
  5. Delete the 2nd partition which was created by fips.

    fdisk> d
    ... partition[1-2]? 2
  6. Add the new 2nd partition for linux

    fdisk> n
    ... partition ...? 2
    ... extended ... primary ... type? p
    ... start ...? 502
    ... end ...? 1002
  7. Add the new 3rd partition for swap

    fdisk> n
    ... partition ...? 3
    ... extended ... primary ... type? p
    ... start ...? 1003
    ... end ...? 1011
  8. Add the new 4th partition for data

    fdisk> n
    ... partition ...? 4
    ... extended ... primary ... type? p
    ... start ...? 1012
    ... end ...? 1661
  9. Reprint the partition table and check carefully for errors.

    (delete and add the partitions if there are any errors)

    fdisk> p
  10. Set the type (filesystem to be used) on each partition.

    fdisk> t
    ... partition ...? 2
    ... type ...? 83
    fdisk> t
    ... partition ...? 3
    ... type ...? 82
    fdisk> t
    ... partition ...? 4
    ... type ...? 0c
  11. Record and repriint the partition table and check carefully for errors.

    If unsatisfied quit.

    fdisk> q
  12. If satisfied, write the partition table.

    fdisk> w

Nancy records the new partition table in her computer log.

Disk /dev/hda: 255 heads, 63 sectors, 1661 cylinders
Units = cylinders of 16085 * 512 bytes

   Drive  Boot  Start  End   Blocks  Id  System
/dev/hda1 *        1   501   402451+ 0c  Win95 FAT32 (LBA)
/dev/hda2        502  1002   402482  83  Linux Native
/dev/hda3       1003  1011    72292  82  Linux Swap
/dev/hda4       1012  1661  5221125  83  Linux Native

2.1.6. Format

In order to use any hard disk effectively, it must be formatted. After formating, whther successful or not, all the old data in that partition is lost (the cost of recovery goes up 10-100x).

Tom warns that Formatting is the only operation that is neither idempotent nor reversible. The tool provided by the intended operating system should be used to format the partitions intended for that partition. Use format under Windows to format FAT32 partitions. Use

Nancy formats the data partition under Windows.

  1. Restart the computer in Windows

  2. Format the partition

    [[My Computer]] {(D:)} [Format ...] [Format type\Full] [Start] Nancy uses the tomsrtbt disk provided by Tom to format the linux and swap partitions under linux.

  3. Insert the tomsrtbt disk and restart

  4. Check for bad blocks and format the linux partition.

    bash> mke2fs -c /dev/hda2
  5. Check the filesystem

    bash> e2fsck /dev/hda2
  6. Check for bad blocks and make the swap file system

    bash> mkswap -c /dev/hda3

(untested) Lisa formats only linux partitions using tomsrtbt in the same manner as Nancy.

  1. Insert the tomsrtbt disk and restart

  2. Check for bad blocks and format the linux partition.

    bash> mke2fs -c /dev/hda2
  3. Check the filesystem

    bash> e2fsck /dev/hda2
  4. Check for bad blocks and make the swap file system

    bash> mkswap -c /dev/hda3
  5. Check for bad blocks and make the data partition

    bash> mke2fs -c /dev/hda4
  6. Check the filesystem

    bash> e2fsck /dev/hda2

2.1.7. Initial Program Load

Now is when the operating system(s) becomes a part ot the computer. All prior steps laid the foundation. This is the first time when the detail and accuracy of the catalog will be especially useful. Follow the installation instructions provided with your distribution. This HOWTO does not detail how to load the distribution because the distribution instructions will provide the best instructions.

Though linux is available at no cost, Tom recommends purchasing a distribution with hardcopy instructions and support tools.. The price of a good distribution is well worth it. In Tom's opinion, asking friends is the best way to choose a linux distribution. A distribution that satisfies your friends with similar interests will probably satisfy you.

Tom knows that Nancy got a newly released graphics card with which he has no experience. He warns Nancy that the X configuration may not work. When she calls him, he uses the expert options of yast which tell him that though her card is not listed by manufacturer and model it used the mach64 X server. Now familiar with yast, Nancy installs the mach64 x server and removes the svga X server. Tom stays to talk Nancy through X installation. Nancy's monitor is not named in the configuration list, but with the model known from the catalog, a quick visit to the manufacturer's website provides the scan rate limits.

Tom knows that the configurability of linux frightens many new users and so he has often recommended RedHat to first-time users because of its commercial technical support and default configuration settings. He lets Nancy know that though she should try to consider each question before answering, she need fear a mistake because she can reverse almost any configuration decision later. Most packages managment tools offer to load and save configurations files (e.g. /etc/linuxrc).

  • Keep a list of the configuration questions and each answer to them.

  • When in doubt, add a package to linux, and note that it was in doubt.

  • A month after installation, go back and remove any packages that you haven't used, and log the removal.

  • Expect to discover some linux configuration errors by loss.

  • Change the linux configuration when you find that it is different from your desires.

  • When in doubt, do not add a package to Windows.

Tom knows that some differences between Windows and linux force some compromises.

  • Set the hardware clock to local time.

    Windows displays time, timestamps file operations, and synchronizes with the netowrk from the same clock.

    Linux uses separate clocks for each of these. On a linux only system, the hardware clock is usually set to UTC (Universal Time Coordinate), the network standard. The network and file operations clock are usually just views of the hardware clock by linux. For display, linux usually shifts the hardware clock according to the timezone and date.

    Since Windows supports only one clock, you must decide (unless you live in Greenwich England) whether to set the hardware clock to local time or UTC.

    If you use UTC, you will have to mentally convert the time displayed by Windows to local time.

    If you use local time, some network activity may become confused. International email problems are most commonly reported. Mail sent from Berlin at 1300 local time may be stored a second later in New York at 1200 UTC where it awaits a channel to its San Francisco destination. To save space, the New York host may delete mail that could not be sent in a reasonable time of 30min. If the Berlin mail was unclear that ti was sent at 1300 Berlin time, or if the New York host is unwilling to do the conversion, the email may be lost as undliverable after 1 hour (1300 - 1200).

Since Nancy is an accountant, Tom recommends that she use the SuSE distribution. SuSE comes with the ApplixWare suite of office software. Nancy has already read the installation chapters of the book that accompanied her SuSE distribution. yast from SuSE lets her store her configuration choices in a file which she includes in her computer log.

  1. Nancy makes sure she has the catalog (and Tom's phone number) handy.

  2. She inserts the SuSE CDROM and reboots the computer.

  3. She selects installation options (English, Color, ...)

  4. She examines the hardware detected for her system and confirms that it matches her own catalog.

    Both the hard disk and CD-RW were detected.

    Both the sound and graphics cards were detected.

    Both the PCI and USB buses were detected.

  5. Following the instructions from SuSE, she starts YaST, the system configuration tool.

  6. Already partitions, Nancy declines YaST's offer to repartition her disk.

  7. Already formatted by Windows, Nancy declines YaST's offer to format her Window's partitions.

  8. Though already formatted, Nancy accepts the offer to reformat her swap and linux partitions.

  9. Set the mount points for the partitions.

    /dev/hda1     no    vfat /WinC Win95 FAT32
    /dev/hda2 ... check ext2 /     Linux
    /dev/hda4     no    vfat /WinD Win95 FAT32
  10. Nancy now selects the packages she wants.

    Nancy includes the nonstandard packages that she knows she wants (e.g. CD writing).

    Nancy excludes the standard packages that she knows she doesn't want (e.g. tape drive support).

    Nancy selects packagas for her specific hardware (e.g. X server) using her catalog.

    She indicates that the hardware clock is set to local time.

    Nancy saves a copy of her configuration and puts in her log.

(This subsection of this HOWTO is not yet written.)

2.1.8. Boot Manager Load

If you have two or more operating systems on a computer, you must have a means of selecting which operating system is loaded.

Before installing a boot manager, Tom recommends that Nancy and Lisa make a boot disk (and master boot record backup). He also recommends that each test their boot disks before installing the boot manager. This is done so that the computer can be booted and the master boot record restored to the hard disk if the boot manager installation fails

Because of its configurability and robustness, Tom recommends lilo to most users.. Most linux distributions support multiple linux versions on the same partition. This means that you can install and test an upgrade to the operating system without the trouble of a lengthy reinstallation. When the upgrade is satisfactory (or not) you can remove versions no longer useful.

During installation, SuSE offers to make a boot disk, and master boot record backup, before installing lilo.

  1. Create a rescue floppy.

  2. Nancy write-protects the disk and puts in her log.

  3. Nancy installs lilo

    Windows /dev/hda1
    SuSE    /dev/hda2 /boot/vmlinuz

Windows installation overwrites the master boot record with one that loads Windows. After installing Windows, Lisa must reinstall lilo. To make this easier she uses loalin under Windows to load her existing linux and then uses linus to configure and install lilo..

2.1.9. Mount

(This subsection of this HOWTO is not yet written.)

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:57:58