Part 1: Before Linux Installation
by Peter, Stan, Barbara and Marie Klimas
Answers to Some Frequently Asked Linux Questions
Distributed under the General Public Licence http://www.gnu.org/copyleft/gpl.html.
Your feedback, comments, corrections, and improvements are appreciated.
Send them to either bklimas@magma.ca
or bw641@freenet.carleton.ca
Start: Linux Newbie Administrator Guide
Part 0: For the Undecided (Linux Benefits)
Part 1: >Before Linux Installation<
Part 2: Linux Resources, Help and Some Links
Part 3: Basic Operations FAQ
Part 4: Linux Newbie Administrator FAQ
Part 5: How to Upgrade the Kernel
Part 6: Linux Shortcuts and Commands
Part 7: Essential Linux applications (proprietary
or not)
Contents of this page:
1. Before Linux Installation
1.1 Which Linux distribution should I use?
1.2 What are the Linux hardware requirements?
1.3 Will my hardware work under Linux?
1.4 How do I download Linux?
1.5 How do I get a Linux CD?
1.6 I have RH5.2 CD but no install floppy. What do I do?
1.7 What do I need to read before installation?
1.8 Can I have MS Windows and Linux installed on the same computer?
1.9 How to I partition my hard drive?
1.10 The MS Windows partition occupies my whole harddrive. Can I shrink/split it without a re-install?
1.11 How do I start the installation?
1.12 Is the Linux installation difficult?
1.13 I finished the installation. How do I login for the very first time?
1. Before Linux Installation
1.1 Which Linux distribution should I use?
The differences between the distributions are minor: the setup program, choice of the default applications and the arrangement of things on the hard drive. Whichever distribution you decide to install, you will end up with essentially the same Linux.1.2 What are the Linux hardware requirements?The most popular distribution is the "Red Hat Linux" and I use this the most. RedHat comes with a relatively easy setup program. Also, all RedHat contributions to Linux are "open software" so it is really a safe choice to use RedHat. In short, as a newbie, you can safely bet on "Red Hat" unless you like something else or have specialized needs. The most recent RedHat release (April 1999) is version 5.2 (called RH5.2). Be sure to specify the most recent version if ordering your software from a dealer--many dealers like to clear their inventory by sending you an old version (this applies not only to Linux). The authors have no connection to RedHat (or any other Linux distributor) whatsoever.
Our recommending RedHat for newbies does not mean that other distributions don't have benefits or unique features which may surpass RedHat in specific areas. We tried Debian and we liked it very much. It was probably as easy as RedHat, but it seems less common. The benefit of Debian is that it is 100% non-commercial. We do believe that we benefited from an exposure to a different distribution because it helped us understand Linux better.
There are many other Linux distributions. Slackware seems to be favorite among "hackers" who like being close to the operating system, but we did not use it so this is a hearsay. There is also S.u.S.E and Caldera, the last one seems to be aiming at corporate users. Mandrake is a RedHat clone which is updated more often than the pedigree RedHat and contains the very popular KDE windows manager as a "standard". There are "localized" versions of Linux for specific countries or languages.
There are also "special purpose" distributions, e.g. the "real-time" edition of Linux (might be useful if you are in for automation, robotics, etc.), very small distros (for example, could be good for the next generation car CD player), etc. Here the differences might be larger, but these distributions are not meant to be "general purpose". (They surely show that Linux can runs on toys as well as clusters to make the currently fastest computer in the world.)
Your distribution is of course platform specific. This means that for your PC hardware you need the binary distribution called "Intel" or similar. [Unless you are prepared to do your own compilation of the Linux source code, which is not typical for a newbie :-)]
In short, although newbies get confused with the multiple Linux distributions, there are reasons to have different distros. They should be rather viewed as Linux strength than weakness.
This guide concentrates on RedHat 5.2 on the PC (Intel) platform. Many of the answers will work fine on other distributions or platforms, but we did not try them.
"Out-of-box" Linux will run on a 386SX-based PC with 8 MB of memory, but such a low-end computer is practical for text-only applications (no X-window). A 486 with 16 MB memory and 600 MB free (unpartitioned) hard drives will do for work with X-windows. My 586-90 MHz with 64 MB of memory flies under Linux. My Pentium-2 233 MHz with 64 MB of memory is a complete pleasure with an almost instantaneous response even when running many large applications concurrently. My 486-33 MHz with 8 MB memory and 1 GB hard drive has too little memory to run adequately stand-alone under GUI, but sufficient to be useful in my home network environment (a 486-class machine perform adequately also stand-alone if it has at least 16 MB of memory). My old portable 386-SX-20 MHz Toshiba with 9 MB memory and 120 MB hard drive runs "legacy applications" under Win 3.11 and connects to our Linux home network and is thus still useful. We tried Linux on this Toshiba too, and it run fine in text mode.1.3 Will my hardware work under Linux?If you are willing to jump a few extra hoops, you should be able to install and run Linux on 4 MB of memory, but this is probably not worth the effort for the general purpose home Linux machine. I would say: get at least 16 MB of memory, and if possible 32 or 64 MB --more memory can make a difference in performance when running concurrently several large GUI applications. Memory is cheap these days.
Networking is where Linux really shines so consider getting 10-base-T Ethernet cards--they are not very expensive and will be perfect to connect your two or more home computers together. Also, look around for old Ethernet cards which MS Windows deems obsolete--they can be bought for a really low price and they will work fine under Linux. To connect just two computers, a cross-over cable for direct Ethernet-card to Ethernet-card connection is sufficient. To connect more than 2 computers together, you need a hub (~$80) and normal cables. (If you have extra Ethernet cards, you may also consider installing more than 1 Ethernet card on a computer, use direct connections using the cross-over cables, and save the expense of a hub. ) The 10-base-T system uses "giant phone"-type connectors and all machines are connected to one box (called the hub). The hub has an extra connection (called "uplink") which you will use if you ever had a permanent connection to the outside world.
Here is another suggestion on setting up a different kind of network, older type, which uses coaxial cables. For this, no hub is necessary. Because this networking scheme is older, it can be assembled using cards and parts that are often available almost for free:
(edited for space) From: John.Edwards@brunel.ac.uk Subject: Linux Guide-a suggestionHi. Many older 10Mbps network cards (and some newer ones as well) have a BNC connector and you can usually pick up old co-axial cabling when companies upgrade to UTP. Add a T piece for each machine and a 50-ohm terminator at each end (about 1 pound or $1.50 each) and you have a home network that will happily support more machines than you probabily have room for. And most importantly--no expensive hub (or cheap hub that can cause trouble). There are other advantages to co-ax as well, it's tougher to break and more resistent to noise from other equipment.
Disadvantages: There is a limit of 185 metres per network segment of thin co-ax, 30 machines per network, and you're stuck at 10Mbps, but I don't see any small home network needing more than that. Also if one cable goes down then the whole network stops, this shouldn't happen often unless someone unplugs a cable section. You can disconnect the T piece from a PC without harming the rest though.
Quick diagram, T for a T piece and Term for a terminator:
Term-T-----T-----T-----T-Term
| | | |
PC PC PC PCThe various parts connect together using BNC connectors similar to TV & video connector but with a bayonet that secures the two sockets together.
For more detail see page 6 of the /usr/doc/HOWTO/Ethernet-HOWTO
Not every piece of PC hardware is supported under Linux, but most are, particularly the more standard, older, and popular ones. This applies to SCSI adapters, CDROMs, writable and rewritable CDs, video cards, mice, printers, modems, network cards, scanners, Iomega drives, etc.1.4 How do I download Linux?The most notable exceptions are the so-called Winmodems (=MS Windows modems). Avoid these like fire--they are maybe $5 less expensive than full modems, but they are crippled and there is little chance they will ever work under a normal operating system (they may not even work with the next version of MS Windows). External modems are never "MS Windows modems" so if in doubt, buy an external modem (they also don't drain your PC power supply, are easily portable between machines, they look better, and show modem activity).
Another area of potential problem is the video card. If you have a recent "cutting edge" or uncommon card, you may want to check its compatibility at http://www.Xfree86.org.
So the short answer is yes, in all likelihood your standard PC will run Linux with no problems. You don't invest much when trying Linux, so probably the easiest way to make sure is to attempt and installation on your existing hardware. There are Linux hardware compatibility lists at http://www.redhat.com/support/docs/hardware.html and http://metalab.unc.edu/LDP/HOWTO/Hardware-HOWTO.html if you want to check your newer or less popular hardware.
When purchasing new hardware, ask your supplier if the hardware is supported under Linux or consider a system with Linux pre-installed. Not too many major suppliers offer one yet (most plan to), but you can get one from a smaller vendor.
Do yourself a favor and do not download Linux, get a CD instead. Linux can be downloaded completely from the Internet, but it is a large and sophisticated operating system. The download will take hours or days of download time and you will probably encounter problems when trying to stitch the downloaded pieces together.1.5 How do I get a Linux CD?If you do have a speedy Internet connection (definitely not a 28.8-modem) and you are not a complete newbie, Linux download may be an option to you after all. Try: ftp://ftp.redhat.com/pub/ if it's not too busy today.
Many possible ways. (1) Buy the "Red Hat" CD from linuxmall (http://www.LinuxMall.com/), or cheapbytes (http://cart.cheapbytes.com/cgi-bin/cart )--last time I checked , "the unofficial" RH5.2 was US$1.89 and $1.99 respectively + shipping and handling. They will mail you a bare CD, you get no printed manual, no support, no boot diskette, but the price is right. (2) Buy the boxed "official Red Hat" from the same place on the Internet or from you favorite software supplier, prices start at around US$40--you will get the printed manual, telephone installation support (60 days?) and the boot diskette. (3) Copy the CD from your friend. This is perfectly legal and ok--Linux is free. If you have a Linux CD, don't be shy to loan it to your neighbor. (4) Check your library, local bookstore, or http:/www.amazon.com. Several Linux handbooks come with an attached CD containing a full Linux distribution. This is a good way to start with Linux! It is a good idea to have a nice handbook. With Linux countless utilities, you will likely need it. (5) Visit a Linux "installfest" when one is organized in a place near you. They will install Linux on your computer free (bring the computer) and you will likely be able to get a Linux CD too (why don't you bring 1 or more empty CD-W to the fest?). Check for the Linux User Group on the net to see when the nearest to you plans an installfest. Good way to meet other Linuxers too. (6) If you are really short on cash or are a Linux pioneer in one of these places in the world where US$2 goes a long way, try "linux exchange"--people loan or donate Linux CDs. If you live in a major city, you may even get lucky and somebody will help you with your first Linux installation / setup. If you can't find anything let me (bklimas@magma.ca) know, I'll try to arrange sending a copy of Linux CD to you (if you are not a joker). Once again, if you have a Linux CD, don't be shy to loan it to your neighbor.1.6 I have RH5.2 CD but no install floppy. What do I do?
If your computer can boot from the CD drive (most computers cannot), you don't need a boot diskette to install Linux. Have a look at your BIOS setup, the boot sequence can often be set up there. (My computer has the CD drive specified as the first boot device in the BIOS yet still cannot boot from the CD drive. So the BIOS setup does not necessary reflect the capability of your machine.)1.7 What do I need to read before installation?If your computer cannot boot from the CD drive, make an install boot diskette from under DOS or MS Windows DOS mode. (it has to be the real DOS mode, not just a DOS window). Use the program:
EZSTART.BAT
which is on your RH5.2 CD.
It is important that you have a perfectly good floppy (without even one bad cluster). The program that makes the diskette does not check if the floppy was written properly. Also don't count that the DOS "format" utility will find a faulty floppy--it probably won't. If I were you, I would make two or three boot floppies at once--you may be surprised how many diskettes have problems. For me, the third floppy worked! If your install diskette does not boot, make another one--it definitely should boot.
If you don't have the EZSTART.BAT, here are the essential command. To make the boot floppy:
F:\dosutils\rawrite.exe -f F:\images\boot.img -d a: -nTo make the supplemental (optional) diskette:
F:\dosutils\rawrite.exe -f F:\images\supp.img -d a: -nThis assumes your CDROM is the DOS "F:" drive, and your floppy is "A:".
You may find it easier to run rawrite without any argument--it will interactively prompt you for the input and output file.
From under Linux, you can make a boot disk by mounting the RH5.2 CDROM an typing the commands (as root):
cd /mnt/cdrom/images/
dd if=boot.img of=/dev/fd0[The ``dd'' command copies files. The above command specifies that the input file ("if") is ``boot.img'' and the output file ("of") is /dev/fd0 (if you want to write to your second floppy drive use /dev/fd1). ]
You may want to read the RedHat manual. If you don't have the printed copy, an html version is on your CD so you can read it using any browser, e.g. Netscape for Windows. Look here to see how to access this manual and some additional reading material.1. 8 Can I have MS Windows and Linux installed on the same computer?It is also helpful to get some UNIX orientation if you don't have any. Buy a good Linux manual or dust your old Unix handbook. Almost all basic Unix commands will run fine under Linux. Manuals for MS Windows are useless, but manuals for Linux/UNIX are typically great.
You may want to learn about your hardware: how many and how big hard drives you have, the number and order of partitions on each drive, where are your DOS/Windows partitions, which one is the DOS/Windows boot partition (if you plan to have dual boot), what type of mouse you have, what video card and with how much memory, what monitor (max synchronization frequencies), etc.
Go to BIOS setup to see the number and geometry of your hard drives. Run DOS fdisk to display your hard drive(s) partition table(s). Watch your system boot to learn about the type of your video card and the amount of video memory. Boot MS Windows, go to the control panel-devices and write down the sound card, modem, network card types and settings (name, type, IRQ, i/o address, DMA channel). Read the label underneath your mouse to see the type of mouse you have. (Next time you buy a mouse, get a Linux-ready 3-button Logitech or similar. Linux does a good use of all three buttons.) Dust your monitor manual to find out the maximum synchronization frequencies that your monitor supports.
Yes, you can. Linux comes with a simple boot manager called LILO which will let you choose at the boot time the operating system you boot. Install MS Windows first and Linux only afterwards or else MS Windows will disable your access to Linux. Have a Linux boot floppy ready if you need to re-install MS Windows--MS Windows will surely disable your access to Linux and you will have to boot Linux from the floppy and then re-run "lilo" to get back to business.1.9 How do I partition my hard drive?From under Linux, you will be able to read from and write to your MS Windows drive partitions so that data exchange between MS Windows- and Linux-based program is seamless. You will also be able to use your existing MS Windows-based resources: sound files, backgrounds, pictures, fonts, etc. (First check if it does not violate your license agreement :-) though. For products that are on rent to you from Microsoft, it probably does.)
If you plan a dual boot (Linux and MS Windows on the same computer), first use your DOS/Win utility fdisk to make the MS Windows partition(s). Leave a part of the hard drive(s) unpartitioned for Linux. You will make and format the Linux partitions during your RedHat installation. Make the MS Windows partition "primary" and "bootable". Install, configure, and test your MS Windows before Linux installation. If you plan to run Linux only, you need just clean hard drive (no partitions) to start with.1.10 The MS Windows partition occupies my whole harddrive. Can I shrink/split it without a re-install?It is possible to have only one Linux partition (plus one for MS Windows if you dual-boot). But it is better to have more partitions so you can keep users' data separate from the rest of the operating system. This way, if something ever goes wrong and you have to reformat and re-install the operating system, you don't lose the users' data. (You can however do a Linux re-install without losing the contents of /home directory if you skip the re-format option.)
During the Linux setup, you will be asked to partition the available space on your hard drive(s). There are many possible ways to partition, depending on your hard drive space, requirements, and taste. I like Linux hard drive partitions like this (for a total of 2 GB that I dedicated for Linux):
mount point type size
/ ext2 300 MB
/usr ext2 1200 MB
/home ext2 380 MB
swap swap 120 MBIn the above example, I dedicate 300 MB for the root partition that holds the base of the Linux operating system. I give 1200 MB for the user's programs (the programs that don't come with the base operating system and I install later, for example Word Perfect). I dedicate 380 MB for the directory that will contain the setting and data of all users on the machine. And I give 120 MB for a "raw" partition for the operating system to use as the virtual memory (swap). The swap partition cannot be larger than approximately 127 MB (this limit does not apply to kernel 2.2.x and higher) and the rule of thumb is that the swap should be about twice the amount of the physical memory. (127 MB is a lot and you should never need more. If you think that you may need more you can create more than one swap partition now or later or add a swap file(s) later).
2 GB is a lot of disk space and should be sufficient even for users who like having many applications. (This is because Linux applications tend to be slimmer than their MS Windows equivalents). However, if you try to install everything what's available for Linux on the Internet, you will still run out of disk space :-) .
If your space on the hard drive is more restricted, you may consider a two-partition setup like this:
mount point type size
/ ext2 600 MB
swap swap 50 MBIn this example, I dedicate 600 MB to contain the base of the operating system, applications, and user documents/data, and give 50 MB for the swap partition (for the operating system to use as the virtual memory). The 50-MB swap should be quite sufficient for medium duty operations, but the limitation of 600 MB for the operating system and applications means that you may have to be more selective as to which applications you install or else you risk running out of disk space. Try pressing F1 when installing the optional software that come on Red Hat CD--it will give you a short description what the software does so you could perhaps decide if you really need it. (Don't worry too much if you miss something you need, you can install the missing parts later). You can easily finish the RH5.2 installation with 200 MB free on your Linux partition (out of 600 MB used in this example) if you make reasonable choices. Please note that "bundling together" the root partition and the /home directory will likely save you some disk space, but it is not the safest solution.
It is possible to install Linux on even less disk space than in the example above, but you will have to be even more selective as to what you install.
Another consideration when setting up the partitions. Many older BIOSes have the restriction that the boot partition cannot extend beyond the 1024th cylinder on your first physical hard drive. To overcome this limitation, simply make the first (bootable) partition so that it ends before the cylinder number1023 (this will make this partition max approximately 512 MB in size, which is plenty for the "/" root partition). Once Linux boots, the BIOS restriction does not matter any more as Linux can also access the partition(s) beyond the cylinder number1023.
When installing and using Linux, your drives appear as devices with the following names: "hda1" means the first IDE hard drive (hd a), first partition (1); "hda2" is the first IDE hard drive, second partition; "hda3"--the first IDE hard drive, third partition; (and so on if you have more than 3 partitions on the first IDE hard drive); "hdb1"--second IDE hard drive, first partition (or just "hdb" if it is the CDROM installed as a slave on your first IDE interface). "hdc" is the third IDE drive, hdd is the fourth IDE drive (the names "hdc"and "hdd" will have a number appended to indicate the partition for hard drives). SCSI drives have analogous names but start with letters "sd", followed by the letter indicating the SCSI interface, followed by the number indicating the SCSI device id. For example, "sda4" means "first SCSI interface, id number 4". If you have an external zip drive attached to your parallel port, it will apear as a SCSI device "sda4" (it works in a SCSI-emulation mode) so during installation, answer 'yes' to the question "do you have any SCSI devices?"
Possibly. There is a utility called FIPS.EXE on your RH5.2 CD that does just that. Check the directory \dosutils\fipsdocs\ on your RH5.2 CD for documentation. If I were you, I would back-up my essential data before doing anything to the partition. There are also commercial utilities to change the partition size without destroying the content of the partition.1.11 How do I start the installation?
Put the installation boot diskette into you floppy drive, the RH5.2 CD to the CDROM, and reboot. If you boot from the CD, put the RH5.2 CD to your CDROM drive and reboot.1.12 Is the Linux installation difficult?You may also start the installation from DOS (or real DOS mode under MS Windows), by running the EZSTART.BAT which is on your RH5.2 CD.
It was not for me. It seems that for most newbies, it is fairly straight-forward and surprisingly painless. Depending on your hardware and choices, it may take 0.5 h to 2.0 hours. However, some newbies reported that the installation was a "total nightmare" to them (hardware problems?). If you encounter problems, my advice would be to install a plain-vanilla system, without struggling the fancy video card or whatever else bleeding-edge hardware you might have. Anything can be added/configured later, after you get more understanding of how things work on your system. Even a re-install is always an option for a newbie (it seems Linux gurus think it is a shame to re-install). It seems that many newbies have problems because the specify too high screen resolutions (which may be not supported or supported only with some extra tune-up). Again, it may not be wise to break your whole installation for support of a single device--the support can be added/tuned-up later.1.13 I finished the installation. How do I log-in for the very first time?
As root. "Root" is the only account that exists after the initial installation. Example login:my_machine_name login: root
Password: my_passwordIn the example above, I typed the word "root" at the login prompt. After that, I entered the password that I chose during the initial Linux installation. The password did not appear on the screen when I typed it (for security).
Go to part 2: Linux Resources,
Help and Some Links