This document describes how to obtain and install Linux software.It is the first document which a new Linux user should read to getstarted.
Linux is a freely-distributable implementation of Unix forinexpensive personal machines (it was developed on 386s, and now supports486, 586, Pentium, PowerPC, Sun Sparc, ARM and DEC Alpha hardware, and eventhe IBM System 390 mainframe!). It supports a wide range of software,including X Windows, Emacs, TCP/IP networking (including SLIP), and manyapplications.
This document assumes that you have heard of and know about Linux,and now want to get it running. It focuses on the Intelbase version, which is the most popular, but much of the adviceapplies on Power PCs, Sparcs and Alphas as well.
This document has been translated to
If you are new to Linux, there are several sources of basicinformation about the system. The best place to find these is at the at
You should probably start by browsing the resources under GeneralLinux Information; the
The Linux Documentation Project is writing a set of manuals andbooks about Linux, all of which are freely distributable on thenet and available from the LDP home page.
The book
Finally, there is a rather technical
Please do not email me asking for installationhelp. Even if I had the time to handle such requests, troubleshooting bymail is much less efficient than asking help from your local Linux user'sgroup. You can find worldwide contact information for Linux user groups onthe
New versions of the Linux Installation HOWTO will be periodicallyposted to comp.os.linux.help and comp.os.linux.announce and news.answers.They will also be uploaded to various Linux WWW and FTP sites, includingthe LDP home page.
You can also view the latest version of this on the World Wide Webvia the URL
If you have questions or comments about this document, please feelfree to mail Eric S. Raymond, at
Please do not mail me questions about how tosolve hardware problems encountered during installation. Consult
Added the `Buy, Don't Build' section.
Added the material on booting from CD-ROM.
Linux has now matured enough that there are now system integratorswho will assemble a workstation for you, install and configure aLinux, and do an intensive burn-in to test it before it's shippedto you. If you have more money than time, or you have stringentreliability or performance requirements, these integrators providea valuable service by making sure you won't get hardware that'sflaky or dies two days out of the box.
For those of us without a champagne budget, the rest of thisHOWTO is about how to install Linux yourself.
Before you can install Linux, you'll need to be sure your machine isLinux-capable, and choose a Linux to install. The
What kind of system is needed to run Linux? This is a good question;the actual hardware requirements for the system change periodically. The
For the Intel versions, a hardware configuration that looks like thefollowing is required:
Any 80386,80486,Pentium or PentiumII processor will do.Non-Intel clones of the 80386 and up will generally work. You do not need amath coprocessor, although it is nice to have one.
The ISA,EISA, VESA LocalBus andPCI bus architectures aresupported. The MCA busarchitecture (found on IBM PS/2 machines) has been minimally supportedsince the 2.1.x kernels, but may not be ready for prime time yet.
You need at least 4 megabytes of memory in your machine. Technically,Linux will run with only 2 megs, but most installations and softwarerequire 4. The more memory you have, the happier you'll be. I suggest anabsolute minimum of 16 megabytes if you're planning to use X-Windows; 64 isbetter.
Of course, you'll need a hard drive and an AT-standard drivecontroller. All MFM,RLL, andIDE drives and controllersshould work. Many SCSI drives and adaptors are supported as well; theLinux SCSI-HOWTO contains more information on SCSI. If you are assemblinga system from scratch to run Linux, the small additional cost of SCSI iswell worth it for the extra performance and reliability it brings.
You'll want a CD-ROMdrive; effectively all Linux distributions are now CD-ROM based. If yourmachine was built in 1998 or later, you should be able to actually boot your Linux's installer right off the CD-ROM without using a bootfloppy.
If your CD-ROM is ATAPI,SCSI, or trueIDE you should have no problemmaking it work (but watch for cheap drives advertising "IDE" interfacesthat aren't true IDE). If your CD-ROM uses a proprietary interface card,it's possible the installation kernel you're going to boot from floppywon't be able to see it -- and an inaccessible CD-ROM is a installationshow-stopper. Also, CD-ROMs that attach to your parallel port won't workat all. If you're in doubt, consult the
If your CD-ROM isn't in your machine's boot sequence, you will need a3.5" floppy drive. While 5.25" floppies are supported underLinux, they are little-enough used that you should not count on disk imagesnecessarily fitting on them. (A stripped-down Linux can actually run on asingle floppy, but that's only useful for installation and certaintroubleshooting tasks.)
You also need an MDA,Hercules, CGA,EGA,VGA, or SuperVGA video card andmonitor. In general, if your video card and monitor work under MS-DOS orWindows then they should work under Linux. However, if you wish to run theX window system, there are other restrictions on the supported videohardware. The
If you're running on a box that uses one of the Motorola 68Kprocessors (including Amiga,Atari, orVMEbus machines), see the
You'll need free space for Linux on your hard drive. The amount ofspace needed depends on how much software you plan to install. Today mostinstallations require somewhere in the ballpark of a gigabyte of space.This includes space for the software, swap space (used as virtualRAM on your machine), and free space for users, and so on.
It's conceivable that you could run a minimal Linux system in 80 megsor less (this used to be common when Linux distributions were smaller), andit's conceivable that you could use two gigabytes or more for all of yourLinux software. The amount varies greatly depending on the amount ofsoftware you install and how much space you require. More about thislater.
Linux will co-exist with other operating systems, such as MS-DOS,Microsoft Windows, or OS/2, on your hard drive. (In fact you can evenaccess MS-DOS files and run some MS-DOS programs from Linux.) In otherwords, when partitioning your drive for Linux, MS-DOS or OS/2 live on theirown partitions, and Linux exists on its own. We'll go into more detailabout such ``dual-boot''systems later.
You do not need to be running MS-DOS, OS/2, orany other operating system to use Linux. Linux is a completelystand-alone operating system and does not rely on other OSs forinstallation and use.
In all, the minimal setup for Linux is not much more than isrequired for most MS-DOS or Windows 3.1 systems sold today (andit's a good deal less than the minimum for Windows 95!). If youhave a 386 or 486 with at least 4 megs of RAM, then you'll be happyrunning Linux. Linux does not require huge amounts of disk space,memory, or processor speed. Matt Welsh, the originator of thisHOWTO, used to run Linux on a 386/16 MHz (the slowest machine youcan get) with 4 megs of RAM, and was quite happy. The more you wantto do, the more memory (and faster processor) you'll need. In ourexperience a 486 with 16 megabytes of RAM running Linux outdoesseveral models of expensive workstations.
Start to finish, a modern Linux installation from CD-ROM can be expectedto take from ninety minutes to three hours.
Before you can install Linux, you need to decide on one of the``distributions'' of Linux which are available. There is no single,standard release of the Linux software---there are many suchreleases. Each release has its own documentation and installationinstructions. All distributions pretty much share the same underlyingcodebase, however.
Linux distributions are available both via anonymous FTP and via mailorder on diskette, tape, and CD-ROM. There are many checklists andcomparativereviews of Linux distributions out there. The
In the dim and ancient past when this HOWTO was first written(1992-93), most people got Linux by tortuous means involving longdownloads off the Internet or a BBS onto their DOS machines,followed by an elaborate procedure which transferred the downloadsonto multiple floppy disks. One of these disks would then bebooted and used to install the other dozen. With luck (and nomedia failures) you'd finish your installation many hours laterwith a working Linux. Or maybe not.
While this path is still possible (and you can download any one ofseveral distributions from
You can also buy anthology CD-ROMs such as the InfoMagic LinuxDeveloper's Resource set. These typically include several Linuxdistributions and a recent dump of major Linux archive sites, suchas metalab or tsx-11.
In the remainder of this HOWTO we will focus on the steps needed toinstall from an anthology CD-ROM, or one of the lower-endcommercial Linuxes that doesn't include a printed installationmanual. If your Linux includes a paper manual some of this HOWTO mayprovide useful background, but you should consult the manual fordetailed installation instructions.
It's wise to collect configuration information on your hardware before installing. Know the vendor and model number of each cardin your machine; collect the IRQs and DMA channel numbers. Youprobably won't need this information -- but if it turns out you do,you'll need it very badly.
If you want to run a "dual-boot" system (Linux and DOS or Windows orboth), rearrange (repartition) your disk to make room for Linux. If you'rewise, you'll back up everything first!.
If you have an EIDE/ATAPI CDROM (normal these days), check your machine'sBIOS settings to see if it has the capability to boot from CD-ROM. Mostmachines made after mid-1997 can do this.
If yours is among them, change the settings so that the CD-ROM is checkedfirst. This is often in a 'BIOS FEATURES' submenu of the BIOSconfiguration menus.
Then insert the installation CD-ROM. Reboot. You're started.
If you have a SCSI CDROM you can often still boot from it, but it getsa little more motherboard/BIOS dependent. Those who know enough tospend the extra dollars on a SCSI CDROM drive probably know enough tofigure it out.
Make installation floppies.
Boot an installation mini-Linux from the floppies in orderto get access to the CD-ROM.
Prepare the Linux filesystems. (If you didn't edit thedisk partition table earlier, you will at this stage.)
Install a basic production Linux from theCD-ROM.
Boot Linux from the hard drive.
(Optional) Install more packages from CD-ROM.
Here are the basic parts of an installable distribution:
The README and FAQ files. These will usually belocated in the top-level directory of your CD-ROM and be readableonce the CD-ROM has been mounted under Linux. (Depending on howthe CD-ROM was generated, they may even be visible underDOS/Windows.) It is a good idea to read these files as soon as youhave access to them, to become aware of important updates orchanges.
A number ofbootdisk images (often ina subdirectory). If your CD-ROM is not bootable, one of these is the filethat you will write to a floppy to create the boot disk. You'll selectone of the above bootdisk images, depending on thetype of hardware that you have in your system.
The issue here is that some hardware drivers conflict with eachother in strange ways, and instead of attempting to debug hardwareproblems on your system it's easier to use a boot floppy image withonly the drivers you need enabled. (This will have the nice sideeffect of making your kernel smaller.)
A rescue disk image. This is a disk containing a basickernel and tools for disaster recovery in case something trashesthe kernel or boot block of your hard disk.
RAWRITE.EXE. This is an MS-DOS program that will writethe contents of a file (such as a bootdisk image) directlyto a floppy, without regard to format.
You only need RAWRITE.EXE if you plan to create your boot androot floppies from an MS-DOS system. If you have access to a UNIXworkstation with a floppy drive instead, you can create thefloppies from there, using the `dd' command, or possibly avendor-provided build script. See the man page for dd(1) and askyour local UNIX gurus for assistance. There's a dd example laterin this document.
The CD-ROM itself. The purpose of the boot disk is to getyour machine ready to load the root or installation disks, which inturn are just devices for preparing your hard disk and copyingportions of the CD-ROM to it. If your CD-ROM is bootable, you can bootit and skip right to preparing your disk.
Linux makes more effective use of PC hardware than MS-DOS, Windowsor NT, and is accordingly less tolerant of misconfigured hardware.There are a few things you can do before you start that will lessenyour chances of being stopped by this kind of problem.
First, collect any manuals you have on your hardware -- motherboard,video card, monitor, modem, etc. -- and put them within easy reach.
Second, gather detailed information on your hardware configuration.One easy way to do this, if you're running MS-DOS 5.0, or up, is toprint a report from the Microsoft diagnostic utility msd.exe (youcan leave out the TSR, driver, memory-map, environment-strings andOS-version parts). Among other things, this will guarantee youfull and correct information on your video card and mouse type,which will be helpful in configuring X later on.
Third, check your machine for configuration problems withsupported hardware that could cause an un-recoverable lockupduring Linux installation.
It is possible for a DOS/Windows system using IDE harddrive(s) and CD ROM to be functional even with the master/slavejumpers on the drives incorrectly set. Linux won't fly this way.If in doubt, check your master-slave jumpers!
Is any of your peripheral hardware designed with neitherconfiguration jumpers nor non-volatile configuration memory? Ifso, it may require boot-time initialization via an MS-DOS utilityto start up, and may not be easily accessible from Linux. CD-ROMs,sound cards, Ethernet cards and low-end tape drives can have thisproblem. If so, you may be able to work around this with anargument to the boot prompt; see the
Some other operating systems will allow a bus mouse to share anIRQ with other devices. Linux doesn't support this; in fact, trying it maylock up your machine. If you are using a bus mouse, see the
If possible, get the telephone number of an experienced Linux useryou can call in case of emergency. Nine times out of ten you won'tneed it, but it's comforting to have.
Budget time for installation. That will be about one hour ona bare system or one being converted to all-Linux operation. Orup to three hours for a dual-boot system (they have a much higherincidence of false starts and hangups).
(This step is only needed if you can't boot from a CD-ROM.)
Your Linux CD-ROM may come with installation aids that will takeyou through the process of building boot, root, and rescue diskswith interactive prompts. These may be an MS-DOS installationprogram (such as the Red Hat
If you have such a program and can use it, you should read the restof this subsection for information only. Run the program to doactual installation -- its authors certainly knew more about thespecific distribution than I, and you'll avoid many error-pronehand-entry steps.
More detailed information on making bootdisks, see the
Your first step will be to select a boot-disk image to fit yourhardware. If you must do this by hand, you'll generally find that either(a) the bootdisk images on your CD-ROM are named in a way that will helpyou pick a correct one, or (b) there's an index file nearby describing eachimage.
Next, you must create floppies from the bootdisk image you selected,and optionally from the rescue disk images. This is where the MS-DOSprogram RAWRITE.EXE comes into play.
Next, you must have two or three high-densityMS-DOS formatted floppies. (They must be of the same type; that is, ifyour boot floppy drive is a 3.5" drive, both floppies must behigh-density 3.5" disks.) You will use RAWRITE.EXE to write thebootdisk images to the floppies.
Invoke it with no arguments, like this:
Answer the prompts for the name of the file to write and the floppyto write it to (such as A:). RAWRITE will copy the file, block-by-block,directly to the floppy. Also use RAWRITE for the root disk image (such asCOLOR144). When you're done, you'll have two floppies: one containing theboot disk, the other containing the root disk. Note that these two floppieswill no longer be readable by MS-DOS (they are ``Linux format'' floppies,in some sense).
You can use the dd(1) commands on a UNIX system to do the same job.(For this, you will need a UNIX workstation with a floppy drive, ofcourse.) For example, on a Sun workstation with the floppy drive on device
You must provide the appropriate output block size argument (the `obs'argument) on some workstations (e.g., Suns) or this will fail. Ifyou have problems the man page for dd(1) may be be instructive.
Be sure that you're using brand-new, error-free floppies. Thefloppies must have no bad blocks on them.
Note that you do not need to be running Linux or MS-DOS in order toinstall Linux. However, running Linux or MS-DOS makes it easier tocreate the boot and root floppies from your CD-ROM. If you don'thave an operating system on your machine, you can use someoneelse's Linux or MS-DOS just to create the floppies, and installfrom there.
On most used systems, the hard drive is already dedicated topartitions for MS-DOS, OS/2, and so on. You'll need to resizethese partitions in order to make space for Linux. If you're goingto run a dual-boot system, it's strongly recommended that you readone or more of the following mini-HOWTOS, which describe differentdual-boot configurations.
Even if they are not directly applicable to your system, they willhelp you understand the issues involved.
Some Linuxes will install to a directory on your MS-DOSpartition. (This is different than installing from anMS-DOS partition.) Instead, you use the ``UMSDOS filesystem'', which allowsyou to treat a directory of your MS-DOS partition as a Linux filesystem. Inthis way, you don't have to repartition your drive.
I only suggest using this method if your drive already has fourpartitions (the maximum supported by DOS) and repartitioning wouldbe more trouble than it's worth (it slows down your Linux due tofilename translation overhead). Or, if you want to try out Linuxbefore repartitioning, this is a good way to do so. But in mostcases you should re-partition, as described here. If you do plan touse UMSDOS, you are on your own -- it is not documented in detailhere. From now on, we assume that you are NOT using UMSDOS, andthat you will be repartitioning.
A
Partitions come in three flavors:
To put this another way, most people use only primary partitions.However, if you need more than four partitions on a drive, youcreate an extended partition. Logical partitions are then createdon top of the extended partition, and there you have it---more thanfour partitions per drive.
Note that you can easily install Linux on the second drive on yoursystem (known as D: to MS-DOS). You simply specify theappropriate device name when creating Linux partitions. This isdescribed in detail below.
Back to repartitioning your drive. It used to be that there was no way toresize partitions without destroying the data on them. Nowadays there arepartitioning utilities that can resize non-destructively; they know aboutthe structure of file systems, can find the free space on a file system,and can move file data around on the partition to move free space where itneeds to be in order for a resize to work properly. It's still suggestedthat you make a full backup before using one of these, in case of programor human error.
Under Linux
There is a non-destructive disk repartitioner available for MS-DOS,called
The older method of resizing a partition, if you don't have one of theseresizing partition editors available, is to delete the partition(s), andre-create them with smaller sizes. If you use this method, you absolutelymust make a backup in order to save any of your data.
The classic way to modify partitions is with the program
In short, you should do the following to resize MS-DOS partitionswith
Make a full backup of your system.
Create an MS-DOS bootable floppy, using a command such as Copy the files
Boot the MS-DOS system floppy.
Run
Use the FDISK menu options to delete the partitions whichyou wish to resize. This will destroy all data on the affectedpartitions.
Use the FDISK menu options to re-create those partitions,with smaller sizes.
Exit FDISK and re-format the new partitions with the
Restore the original files from backup.
Note that MS-DOS FDISK will give you an option to createa ``logical DOS drive''. A logical DOS drive is just a logicalpartition on your hard drive. You can install Linux on a logicalpartition, but you don't want to create that logical partitionwith MS-DOS fdisk. So, if you're currently using a logicalDOS drive, and want to install Linux in its place, you shoulddelete the logical drive with MS-DOS FDISK, and (later)create a logical partition for Linux in its place.
The mechanism used to repartition for OS/2 and other operating systems is similar. See the documentation for those operatingsystems for details.
After repartitioning your drive, you need to create partitions forLinux. Before describing how to do that, we'll talk aboutpartitions and filesystems under Linux.
Linux requires at least one partition, for the
You can think of a
Each filesystem requires its own partition. Therefore, if you'reusing both root and
In addition, most users create a
When using swap space, Linux moves unused pages of memory out todisk, allowing you to run more applications at once on your system.However, because swapping is often slow, it's no replacement forreal physical RAM. But applications that require a great deal ofmemory (such as the X window system) often rely on swap space ifyou don't have enough physical RAM.
Nearly all Linux users employ a swap partition. If you have 4megabytes of RAM or less, a swap partition is required to installthe software. It is strongly recommended that you have a swappartition anyway, unless you have a great amount of physical RAM.
The size of your swap partition depends on how much virtual memoryyou need. It's often suggested that you have at least 16 megabytesof virtual memory total. Therefore, if you have 8 megs of physicalRAM, you might want to create an 8-megabyte swap partition. Note thatthere are platform-dependent limits on the size of swap partitions;see the Partition-HOWTO if you want to create a swap partition largerthan 1GB.
You can find more on the theory of swap space layout and diskpartitioning in the Linux Partition mini-HOWTO (
Note: it is possible, though a bit tricky, to share swap partitionsbetween Linux and Windows 95 in a dual-boot system. For details, see the
Gotcha #1: If you have an EIDE drive with a partition that goesabove 504MB, your BIOS may not allow you to boot to a Linux installedthere. So keep your root partition below 504MB. This shouldn't be aproblem for SCSI drive controllers, which normally have their own driveBIOS firmware. For technical details, see the
Gotcha #2: Are you mixing IDE and SCSI drives? Then watch out.Your BIOS may not allow you to boot directly to a SCSI drive.
Besides your root and swap partitions, you'll want to set upone or more partitions to hold your software and home directories.
While, in theory, you could run everything off a single huge rootpartition, almost nobody does this. Having multiple partitionshas several advantages:
It often cuts down the time required for boot-time file-systemchecks.
Files can't grow across partition boundaries. Thereforeyou can use partition boundaries as firebreaks against programs(like Usenet news) that want to eat huge amounts of disk, toprevent them from crowding out file space needed by your kerneland the rest of your applications.
If you ever develop a bad spot on your disk, formattingand restoring a single partition is less painful than having toredo everything from scratch.
On today's large disks, a good basic setup is to have a small rootpartition (less than 80 meg), a medium-sized /usr partition (up to300 meg or so) to hold system software, and a /home partitionoccupying the rest of your available space for home directories.
You can get more elaborate. If you know you're going to runUsenet news, for example, you may want to give it a partitionof its own to control its maximum possible disk usage. Or createa /var partition for mail, news, and temporary files all together. But in today's regime of very cheap, very large hard disks thesecomplications seem less and less necessary for your first Linuxinstallation. For your first time, especially, keep it simple.
The first step is to boot the bootdisk you generated. Normallyyou'll be able to boot hands-off; the boot kernel prompt will fillitself in after 10 seconds. This is how you'll normally boot froman IDE disk.
What's actually happening here is this: the boot disk provides aminiature operating system which (because the hard drive isn'tprepared) uses a portion of your RAM as a virtual disk (called,logically enough, a `ramdisk').
The boot disk loads onto the ramdisk a small set of files andinstallation tools which you'll use to prepare your hard drive andinstall a production Linux on it from your CD-ROM.
(In times past this was a two-stage-process, involving a second diskcalled a `root disk'; this changed when kernel modules were introduced.)
By giving arguments after the kernel name, you can specify varioushardware parameters, such as your SCSI controller IRQ and address,or drive geometry, before booting the Linux kernel. This may benecessary if Linux does not detect your SCSI controller or harddrive geometry, for example.
In particular, many BIOS-less SCSI controllers require you tospecify the port address and IRQ at boot time. Likewise, IBM PS/1,ThinkPad, and ValuePoint machines do not store drive geometry inthe CMOS, and you must specify it at boot time. (Later on,you'll be able to configure your production system to supplysuch parameters itself.)
Watch the messages as the system boots. They will list and describethe hardware your installation Linux detects. In particular, if youhave a SCSI controller, you should see a listing of the SCSI hostsdetected. If you see the message
Then your SCSI controller was not detected, and you will have tofigure out how to tell the kernel where it is.
Also, the system will display information on the drive partitionsand devices detected. If any of this information is incorrect ormissing, you will have to force hardware detection.
On the other hand, if all goes well and your hardware seems to bedetected, you can skip to the following section, ``Loading theroot disk.''
To force hardware detection, you must enter the appropriateparameters at the boot prompt, using the following syntax:
There are a number of such parameters available; we list some ofthe most common below. Modern Linux boot disks will often giveyou the option to look at help screen describing kernel parametersbefore you boot.
hd=cylinders,heads,sectors Specify the drive geometry.Required for systems such as the IBM PS/1, ValuePoint, and ThinkPad.For example, if your drive has 683 cylinders, 16 heads, and 32 sectorsper track, enter
tmc8xx=memaddr,irq Specify address andIRQ for BIOS-less Future Domain TMC-8xx SCSI controller. Forexample,
Note that the 0x prefix must be used for allvalues given in hex. This is true for all of the followingoptions.
st0x=memaddr,irq Specify address andIRQ for BIOS-less Seagate ST02 controller.
t128=memaddr,irq Specify address andIRQ for BIOS-less Trantor T128B controller.
ncr5380=port,irq,dma Specify port,IRQ, and DMA channel for generic NCR5380 controller.
aha152x=port,irq,scsi_id,1 Specifyport, IRQ, and SCSI ID for BIOS-less AIC-6260 controllers. This includesAdaptec 1510, 152x, and Soundblaster-SCSI controllers.
If you have questions about these boot-time options, please read theLinux
After boot, all current Linuxes run a screen-oriented installationprogram which tries to interactively walk you through these steps, givinglots of help.
You will probably get the option to try to configure X right awayso the installation program can go graphical. If you choose thisroute, the installation program will quiz you about your mouse andmonitor type before getting to the installation proper. Once youget your production Linux installed, these settings will be savedfor you. You will be able to tune your monitor's performancelater, so at this stage it makes sense to settle for a basic640x480 SVGA mode.
X isn't necessary for installation, but (assuming you can getpast the mouse and monitor configuration) many people find thegraphical interface easier to use. And you're going to want tobring up X anyway, so trying it early makes some sense.
Just follow the prompts in the program. It will take you throughthe steps necessary to prepare your disk, create initial useraccounts, and install software packages off the CD-ROM.
In the following subsections we'll describe some of the trickyareas in the installation sequence as if you were doing themby hand. This should help you understand what the installationprogram is doing, and why.
Your first installation step once the root-disk Linux is bootedwill be to create or edit the partition tables on your disks.Even if you used FDISK to set up partitions earlier, you'llneed to go back to the partition table now and insert someLinux-specific information now.
To create or edit Linux partitions, we'll use the Linux version ofthe
Generally the installation program will look for a preexistingpartition table and offer to run
Therefore you may find (especially if you're installing on virginhardware) that you need to start with
A few notes apply to both
For example, to create Linux partitions on the first SCSI drive inyour system, you will use (or your installation program mightgenerate from a menu choice) the command:
If you use
To create Linux partitions on the second drive on your system,simply specify either
Your Linux partitions don't all have to be on the same drive. Youmight want to create your root filesystem partition on
In Linux, partitions are given a name based on the drive which theybelong to. For example, the first partition on the drive
You should not create or delete partitions for operatingsystems other than Linux with Linux
Here's an example of using
First, we use the ``
Next, we use the ``
Here we're being asked if we want to create an extended orprimary partition. In most cases you want to use primarypartitions, unless you need more than four partitions on adrive. See the section ``Repartitioning'', above, for moreinformation.
The first cylinder should be the cylinder AFTER where the lastpartition left off. In this case,
As you can see, if we use the notation ``+80M'', it specifies apartition of 80 megs in size. Likewise, the notation ``+80K'' would specify an 80 kilobyte partition, and ``+80'' would specify just an 80 byte partition.
If you see this warning, you can ignore it. It is left over from anold restriction that Linux filesystems could only be 64 megs insize. However, with newer filesystem types, that is no longer thecase... partitions can now be up to 4 terabytes in size.
Next, we create our 10 megabyte swap partition,
Again, we display the contents of the partition table. Besure to write down the information here, especially the size of each partition in blocks. You need this information later.
Note that the Linux swap partition (here,
If you use ``
To quit
After quitting
After you've edited the partition tables, your installation programshould look at them and offer to enable your swap partition foryou. Tell it yes.
(This is made a question, rather than done automatically, on the offchance that you're running a dual-boot system and one of yournon-Linux partitions might happen to look like a swap volume.)
Next the program will ask you to associate Linux filesystem names(such as /, /usr, /var, /tmp, /home, /home2, etc.) with each of thenon-swap partitions you're going to use.
There is only one hard and fast rule for this. There must be aroot filesystem, named /, and it must be bootable. You can nameyour other Linux partitions anything you like. But there are someconventions about how to name them which will probably simplifyyour life later on.
Earlier on I recommended a basic three-partition setup including asmall root, a medium-sized system-software partition, and a largehome-directory partition. Traditionally, these would be called /,/usr, and /home. The counterintuitive `/usr' name is a historicalcarryover from the days when (much smaller) Unix systems carriedsystem software and user home directories on a single non-rootpartition. Some software depends on it.
If you have more than one home-directory area, it's conventionalto name them /home, /home2, /home3, etc. This may come up if youhave two physical disks. On my personal system, for example, thelayout currently looks like this:
The second disk (sdb1) isn't really all /home2; the swappartitions on sda and sdb aren't shown in this display.But you can see that /home is the large free area on sdaand /home2 is the user area of sdb.
If you want to create an partition for scratch, spool, temporary,mail, and news files, call it /var. Otherwise you'll probablywant to create a /usr/var and create a symbolic link named/var that points back to it (the installation program mayoffer to do this for you).
Once you've gotten past preparing your partitions, the remainder ofthe installation should be almost automatic. Your installationprogram (whether EGA or X-based) will guide you through a series ofmenus which allow you to specify the CD-ROM to install from, thepartitions to use, and so forth.
Here we're not going to document many of the specifics of thisstage of installation. It's one of the parts that varies mostbetween Linux distributions (vendors traditionally compete to addvalue here), but also the simplest part. And the installationprograms are pretty much self-explanatory, with good on-screenhelp.
After installation is complete, and if all goes well, theinstallation program will walk you through a few options for configuring your system before its first boot from hard drive.
LILO (which stands for LInux LOader) is a program that will allowyou to boot Linux (as well as other operating systems, such asMS-DOS) from your hard drive.
You may be given the option of installing LILO on your hard drive.Unless you're running OS/2, answer `yes'. OS/2 has specialrequirements; see
Installing LILO as your primary loader makes a separate bootdiskette unnecessary; instead, you can tell LILO at each boot timewhich OS to boot.
You may also be given the chance to create a ``standard bootdisk'', which you can use to boot your newly-installed Linuxsystem. (This is an older and slightly less convenient methodwhich assumes that you will normally boot DOS, but use the bootdisk to start Linux.)
For this you will need a blank, high-density MS-DOS formatteddiskette of the type that you boot with on your system. Simplyinsert the disk when prompted and a boot diskette will be created.(This is not the same as an installation bootdisk, and you can'tsubstitute one for the other!)
The post-installation procedure may also take you through severalmenu items allowing you to configure your system. This includesspecifying your modem and mouse device, as well as your timezone. Follow the menu options.
It may also prompt you to create user accounts or put a passwordon the root (administration) account. This is not complicatedand you can usually just walk through the screen instructions.
If everything went as planned, you should now be able to boot Linuxfrom the hard drive using LILO. Alternatively, you should be able to bootyour Linux boot floppy (not the original bootdisk floppy, but the floppycreated after installing the software). After booting, login asroot. Congratulations! You have your very own Linuxsystem.
If you are booting using LILO, try holding downshift or control duringboot. This will present you with a boot prompt; presstab to see a list of options. In this way you can bootLinux, MS-DOS, or whatever directly from LILO.
You should now be looking at the login prompt of a new Linux,just booted from your hard drive. Congratulations!
The
Depending on how the installation phase went, you may need tocreate accounts, change your hostname, or (re)configure X at thisstage. There are many more things you could set up and configure,including backup devices, SLIP/PPP links to an Internet ServiceProvider, etc.
A good book on UNIX systems administration should help. (I suggest
LILO is a boot loader, which can be used to select either Linux,MS-DOS, or some other operating system at boot time. Chances areyour distribution automatically configured LILO for you during theinstallation phase (unless you're using OS/2, this is what youshould have done). If so, you can skip the rest of this section.
If you installed LILO as the primary bootloader, it will handle the first-stage booting process for all operatingsystems on your drive. This works well if MS-DOS is the only otheroperating system that you have installed. However, you might be runningOS/2, which has its own Boot Manager. In this case, you want OS/2's BootManager to be the primary boot loader, and use LILO just to boot Linux (asthe secondary boot loader).
An important gotcha for people using EIDE systems: due to a BIOSlimitation, your boot sectors for any OS have to live on one of thefirst two physical disks. Otherwise LILO will hang after writing"LI", no matter where you run it from.
If you have to configure LILO manually, this will involve editing thefile
Once you have edited the
Note how we use the append option in
You can now reboot your system from the hard drive. By default LILOwill boot the operating system listed first in the configuration file,which in this case is Linux. In order to bring up a boot menu, in order toselect another operating system, hold down shift orctrl while the system boots; you should see a promptsuch as
Here, enter either the name of the operating system to boot (given bythe label line in the configuration file; in thiscase, either linux or msdos), orpress tab to get a list.
Now let's say that you want to use LILO as the secondary bootloader; if you want to boot Linux from OS/2's Boot Manager, forexample. In order to boot a Linux partition from OS/2 BootManager, unfortunately, you must create the partition using OS/2's
In order to have LILO boot Linux from OS/2 Boot Manager, you onlywant to install LILO on your Linux root filesystem (in the aboveexample,
Note the change in the boot line. After running
This document is copyright 1998 by Eric S. Raymond. You may use,disseminate, and reproduce it freely, provided you:
Do not omit or alter this copyright notice (you may translate it)
Do not omit or alter or omit the version number and date.
Do not omit or alter the document's pointer to the current WWW version.
Clearly mark any condensed, or altered versions as such.
These restrictions are intended to protect potential readers fromstale or mangled versions. If you think you have a good case foran exception, ask me.
My grateful acknowledgement to Matt D. Welsh, who originatedthis HOWTO. I removed much of the Slackware-specific contentand refocused the remainder of the document on CD-ROMinstallation, but a substantial part of the content is still his.
The 4.1 version was substantially improved by some suggestions fromDavid Shao