Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




Basic Linux Training

Lesson 3: Preparing Your Hard Disk


Table of Contents


How Much Hard Disk Space?

Ideally, you would install Linux on it's own hard disk. (In fact, you can buy a second hard disk with Linux pre-installed.) Most of us are not that lucky, so we'll have to create a partition on the hard disk we're using for DOS/Windows. Since the operating systems are contained on separate partitions, they can peacefully co-exist on the same computer. In fact, Linux can access all the files on a DOS/Windows partition, and through an emulation program, WINE, run Windows programs.

You'll need at least 150 MB of free space for a really useful Linux installation, and upwards of 450 MB if you intend to load most of the software - such as the compiler and programming tools, kernel source, and have a comfortable margin for additional programs later. (These numbers are higher than those given in the textbook, written when hard disk storage space and RAM were both much higher priced than they are today. Trying to squeeze Linux into as small a space as possible is no longer necessary.)

You'll need a swap partition if you have less than 16 MB RAM to act as virtual RAM. Unfortunately, the swap partition can be used only for swap space. The rule of thumb of adding swap space to total 16 MB including RAM is probably more like totaling 32 MB. If you have 32 MB RAM you may not need a swap partition; you can always add a swap file if you have a particular need, then delete it and continue as you were before.

You may want to set up more than one Linux partition. For example, /, /usr, /home. There are a number of advantages in doing this - you have better security because damage to one partition will be insulated from the others, other than damage to the MBR, of course; upgrades are much easier to do, especially with Slackware, and so are backups. Remember, though, that Intel limits you to 4 primary partitions, and that the numbering for logical partitions always begins with 5.

The bulk of your hard disk should be devoted to /usr, with most of your programs added there. Something like the following is practical for a 250 MB partition:

  • / - 60 MB
  • /usr - 180 MB
  • /home - 10 MB
That may or may not be practical for your situation, so read the HOWTOs and if you need to - repartition. (Mistakes are all part of the learning process. Questioning and revising is what science and technology are all about.)

Remember that the X Window System will run over 55 MB (in /usr/X11R6) and your kernel source code will run over 27 MB (in /usr/src), and that's just two.

If you have a print out of the Hardware Survey, you should have no problem. Just keep notes of everything you do - particularly the partition table when you run fdisk during the initial installation. If something should go wrong, write down the error messages. This will prove invaluable with getting help with troubleshooting.


Prune

If you plenty of hard disk space to devote to Linux you can skip most of these procedures, except the backup.

Prune your drive; delete programs you never use, all the shareware and zip files, old e-mail and newsgroups messages (or move them to floppies if you want to save them).


Backup

The executable programs on your computer should have installation floppies or CD-ROM, so, basically, you need to concentrate on backing up your configuration files (autoexec.bat, config.sys, win.ini, system.ini, etc.) and your data files (anything you have created), as well as any additional software that you have added and want to keep.


chkdsk/f

You need to make sure that the data stored in your Master Boot Record is in sync with where is actually located on your hard disk. There is a non-destructive DOS utility for this. (If you are prompted whether to save these lost chains to file, answer 'no' - otherwise your root directory will be cluttered with a lot of junk you'll end up deleting anyhow.)
        C:\>chkdsk/f
The /f switch fixes the lost chains.


defrag

As you edit files, the newly entered data will be stored in the next available space on your hard disk, and over time your hard disk will be fragmented - as opposed to being contiguous, part may be stored in one location and part in another. Then as files are deleted, your hard disk has gaps in it - sort of like Swiss cheese; this is fragmentation.

Before you run the DOS defragmentation utility, temporarily delete your Windows swap file also.

        C:\>defrag
The next time you start Windows, you'll be reminded that the swap file has been corrupted, and asked whether you want to delete the corrupted file - answer yes, and reset your swap file before you do anything else.


DOS format Five Floppies

Some distributions use more or less floppies for the installation, so make adjustments accordingly. However, you should have an Emergency DOS Boot disk, the disks for the installation, a disk for fips and a copy of your Master Boot Record (in case you need to restore it), and a Linux boot disk for your kernel image.
        C:\>format /u a:
This is an unconditional format; if you're using fresh, pre-formatted floppies, you can skip this step (or use /q instead of /u for a quick format just to be safe).


Create an Emergency DOS Boot Floppy

Make a DOS bootable floppy if you don't have one already; you'll also need to copy some additional DOS utilities to this disk; e.g. format, fdisk.com, system.com, restore.com, etc. (any DOS utility that you may need to work some quick fix in case your system goes down and you have to boot from a floppy). Label this first floppy Emergency DOS Boot, and date. (See bootable.txt in the archives for additional information.)


Create a BOOTDISK

You will use this floppy to boot your computer with the Linux operating system, rather than DOS, to install from the CD-ROM. There are a number of options depending on how you want to do your installation; for this example, we will be using a colorized installation program and installing from CD-ROM. rawrite the bootdisk on the second floppy. Label this diskette Bootdisk and date. (Some versions use rawrite2.)
        E:\install\fips*ft;rawrite color.gz a:
rawrite does a block by block transfer, you can NOT substitute DOS copy.


Create a ROOTDISK

There are a number of option, but for our example here we will be using the boot.i for IDE; you will have to use the one which is appropriate for your specific hardware. rawrite the rootdisk on the third floppy. Label this diskette Rootdisk and date.
        E:\install\fips>rawrite bare.i a:
Which boot disk to use depends on your CD-ROM; first go to the directory for the size of your floppy drive (1.2 or 1.44). All IDE boot disks (.i) support IDE hard drives and CD-ROM drive plus the additional drivers listed; all SCSI boot disks (.s) have full IDE support plus the additional drivers listed; choose the image with your CD-ROM and the least number of other drivers.

If you're confused by the listings, find one that has your CD-ROM listed and use the extension for whether your hard drive is IDE or SCSI.


Create a FIPS Floppy

Copy fips.exe and restorbb.exe from the CD-ROM (usually in E:/install/fips) on one floppy. You will copy your old MBR (Master Boot Record) to this floppy during the installation program, in case you ever need to restore it. (Things can and do occasionally go wrong and you're dead in the water unless you can restore your computer to the way it was before you started messing around with critical things like the MBR.) Label this diskette FIPS, and date.

A copy of the old MBR will be on your Linux partition as /boot/boot.0300 (for IDE drives), or /boot/boot.0800 (for SCSI drives). Copy this to the floppy disk, but do not delete the original on your hard disk.


Create an IMAGE Floppy

Reserve the fifth floppy for your zImage which will be copied to this diskette during the installation program. (You'll be prompted during the setup program.) Label this diskette vmlinuz and date.


Choose Disk Sets to Install

Choose the disk sets you want to install; just installing everything can cause problems and waste hard disk space. If you're not familiar with any of the programs and utilities, all the setup programs will have a default minimum preselected that will be adequate for the time being.

A few tips on selections: The bash shell is standard in Linux; the others pale in comparison, however if disk space is tight, you might try ash instead. There are a number of editors - you'll probably use emacs for the majority of your work; some variations you might like better are joe and jove; when you need a quick edit, vi is much smaller and much faster. You'll have to watch out for your X server, only load one.

The programs you need to connect to the Internet will be covered later.


Assignments

Textbook: Running Linux
  • Chapter 2: Preparing to Install Linux, p.46-51

Terms and Concepts:

Define and add these to your glossary:

  • cylinder
  • master boot record (MBR)
  • partition table
  • repartition
  • format
  • rawrite

Online:

NOTE: As you begin some extensive reading of the LDP HOWTOs and mini-HOWTOS, bear in mind that they were written by many different people with different writing styles and skills. Some of these documents are very easy to read and understand, others are not. There will necessarily be a lot of repetition, but the information you need is there. Some Linux documentation is cyrrently available in translation, and more will become available in the months ahead.

Depending on your distribution, you might also want to check the Linux Gazette archives for additions to the Installation and Getting Started Guide specific to that distribution:

http://www.ssc.com/lg/ - Linux Gazette.

Various LDP HOWTOs and mini-HOWTOs at:

http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html

Some of the most useful at this stage are:

and from the mini-HOWTOs: and the appropriate mini-HOWTOs, especially those with your operating system(s) in the title.
 
 

Go to Basic Linux Index


http://home1.gte.net/henryw/basic/basic03.htm.html

Date last revised: 11 May 1998


Copyright © 1997, 1998 Henry White. All Rights Reserved.
Reproduction or redistribution without prior written consent is prohibited.
Address reprint requests and other inquiries to henryw@gte.net.



With any suggestions or questions please feel free to contact us