|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Tuesday, 6 March 2001||Author: Jerry Kilpatrick|
|Published to: daily_feature/Linux.com Feature Story||Page: 1/1 - [Std View]|
Linux for Beginners Part 1 : A Linux Install Made Easy
In the first of a series of articles Jerry Kilpatrick steps through a Linux installation for beginners.
Linux intimidates many beginners. There's no graphical screen to hide all of the information about what the kernel is doing, many commands must be typed out instead of clicking on an icon. To not be overwhelming when installing Linux, you must think of the process as being made from many small parts, instead of one big whole. Partitioning your drive is the first thing you have to do when installing Linux, and one of the scariest things.
Partitioning is much like cutting up a pie. Your hard drive needs to be cut into smaller parts so it can be used for more than one thing. For example, you could partition with one piece for Windows, one piece for Linux, and another for swap. We will touch on swap in a moment. Swap is a way for the computer to use your hard drive as RAM (Random Access Memory).
A hard drive can be cut into 4 "primary partitions" one of which can be an "extended partition." An extended partition can be cut again into other parts. Don't worry if you want to go crazy and slice up that hard drive into a bunch of tiny parts, though I wouldn't recommend it. Multiple partitions for Linux are used more for servers than for personal use.
To keep from being complicated let's just say that it is best to keep Microsoft Windows on one of the first four primary partitions because Windows really does not like being on an extended partition. Now for Linux, it is best to keep your main Linux partition near the beginning of the drive because some of the older boot programs for Linux don't like it further down the drive. The size of your partitions is completely up to you. Keep in mind that a Windows partition is going to have to be big because the base install of Windows is now nearly a gigabyte, if not more. As for Linux, if you are just planning on playing around with Linux, 2 Gigs should be more than enough. You will need somewhere between 64 and 128 Megs for your swap partition. Now that we have covered what partitioning is all about, I would like to touch on the swap space so it makes a little more sense.
The swap partition is a space on your hard drive that Linux uses as, let's say, "backup memory". When your RAM starts to run low the operating system will start using the hard drive as operational memory. The hard drive is quite a bit slower than RAM, but it allows your computer to get through a crunch when your system is in heavy use.
Windows and even the Macintosh do similar things with space on the hard drive, they just keep it hidden; one more reason why Windows is less intimidating than Linux.
As for the distribution of Linux you are choosing to put on your computer, I have a few things to say about that. Keep in mind that these are my own personal views.
If you are brand new to Linux, you are definitely going to want to use a very user-friendly Linux such as RedHat or Mandrake. Distributions such as Slackware and Debian are better for advanced users who need a server that they can quickly shape to do what they want. Not to say that you cannot use those, I personally started with Slackware and I am glad I did. It forced me to learn Linux a lot faster than RedHat would have. But I was in a constant state of confusion for quite a while as I was getting adjusted to relying on man pages. (I will cover man pages in a bit.) Once you have decided which distribution to use, and, obviously, you have gotten a copy, you will be at the point of installation. I can't express enough that you should start with a more user friendly Linux. I would highly recommend RedHat or Mandrake.
I cannot explain each specific installation for every distribution, but I can give you general pointers as to what you will encounter and how to handle it.
The first stage is to tell your computer what type of mouse and keyboard you have. Usually the defaults are correct, though possibly not if you are outside the United States. If it asks if you have a PS/2 or a Serial mouse, the easy way to tell is by looking at the connector that plugs into the back of your computer. If the connecter is a small round one, it is PS/2. If it is trapezoidal and has about 9 holes in it then it is Serial. The keyboard question is usually how many keys your keyboard has. You almost certainly have a 101 key keyboard, most people do, but if you know otherwise choose the correct one.
The normal next stage of an installation is partitioning the drive. Now you may find the concept of "drives" odd. Instead of Windows calling them C: and D:, Linux calls them by device names. Example: /dev/hda /dev/hdb. Understanding why is a little tougher to explain. The easiest way I can explain this is that everything in Linux is a file. The file '/dev/hda' is actually your hard drive. Learning which letter is which is often easier when you know the internal workings of the computer. However, if you don't know the internal workings of a computer just skip to the next section.
Normally a computer that runs IDE Hard drives has two IDE chains. (Most computers run IDE unless you specifically want the other type of hard drives that are called SCSI drives.) Each IDE Chain is a wire that allows two hard drives to be hooked to it. There is the 'primary chain' and the 'secondary chain'. For each chain the first hard drive that the computer detects on that chain is called the 'master' and the second hard drive detected is called the 'slave'. This gives you the possibility of four hard drives all together. /dev/hda is the master on your primary (first) IDE chain. /dev/hdb is the secondary drive on the primary IDE chain. /dev/hdc is the master on the secondary IDE chain, and /dev/hdd is the secondary on the secondary chain.
Now if you understood that, good, if not just remember '/dev/hda' is the first drive, '/dev/hdb' is the second and so on and so forth. When you see a number after that, as in /dev/hda1, that means the first hard drive, partition #1. You will have #1 #2 #3 and #4. If you have an extended partition then the smaller parts of the extended partition will start at #5 then #6 etc. Again, it seems to me that this is the scariest part of installing Linux for most people, and you just have to look at it as if it is not a big deal. In all reality it is not a big deal, just different than you are used to.
After you get your hard drive partitioned the way you want it, Linux is going to ask for mount points. A mount point is the directory a given partition is going to use as its origin. This is another thing that is confusing if you are used to having a C: and a D: prompt. Linux needs a drive to be mounted to /. That is called the root directory, the very base of your Linux drive. It is what you may call the equivalent of C:\. Now for simplicity's sake, I am going to suggest that you only make one Linux partition until you are comfortable with how this all works. In a server setting there is actually a reason to make smaller partitions for different parts of Linux, but for you, the beginner, one is enough. Once you make your one partition and tell the install program that it will be mounted to / the installer will most likely ask you what packages you want to install.
This is a simple one to answer. Do not try to go through each list of packages and try to find out which ones you need. There is normally a setting for a standard install. If you have a choice between 'Workstation' and 'Server' pick 'Workstation'. If you pick one of the distributions I recommend it should be mainly clicking 'next' until you are done. However one small thing you may run into is something called LILO.
LILO is called the 'Linux Loader'. This is what allows Linux to boot, and it is also what allows you to boot both Windows and Linux on the same machine. Most of the latest distributions do a very good job guessing exactly what you want your LILO to do and the default is usually fine. You will normally want it to be on the Master Boot Record (MBR). The MBR is the part of your disk that your computer looks to for boot information when the computer starts up. You will either set Windows or Linux to be the first one to boot, depending on what OS (Operating System) you want as a default. Once you are all done LILO will reboot the machine and you will be able to boot Linux.
How do you tell if it's working properly? Well, when the computer reboots it will say LILO and wait for a second, if so, type 'linux' if you did not make Linux your default operating system and hit Enter.
When Linux comes up it will display a bunch of text that is going to look very complex and confusing. For the most part, ignore the text unless you see a lot of ERROR or FAILED's coming up on the screen. If you do not have error messages galore, everything is working just fine. If you do see a lot of errors, you should first read a book about your specific distribution, or search the Web for people that have had the same problems. Regardless, if re-installing doesn't fix the problem, you can contact email@example.com and we can help you. Hopefully/Usually it will boot into X11 the first time. X11 is Linux's GUI (Graphical User Interface), like Microsoft Windows is a GUI. From there it is simply up to you to start doing stuff. It is a good idea to buy a book about the specific distribution that you bought. The most important command you will ever learn is "man."
If you are having a problem running a program or want to learn more about what you can do with a certain command, just type 'man command' in a terminal window and Linux will almost always come up with a description of how to use that command. At first it may seem like the man pages are written in a different language, but after you read a few of them you tend to start understanding more and more until it is second nature to just scan through a man page and find exactly what you are looking for.
At this point you are well on your way to becoming a geek. (This is a good thing.) One final note, if by some odd chance your computer boots, and it only says LI without the LO and hangs; DO NOT PANIC! First you should try to re-install Linux. If that does not work and you have Windows on your machine, pull out your handy-dandy Windows boot disk and when it boots up and you are at the A:\ prompt type 'fdisk /MBR' and hit enter, then reboot your computer. That should do it.
Never expect that you have somehow erased your Windows and need to re-install it. 9 times out of 10 Windows is easily recoverable and if you have important information that you think you have lost, firstname.lastname@example.org can most likely give you some tips about how to get it back.
Have fun and remember: it's not as scary as it looks.
Keep an eye on Linux.com for more easy guides to becoming a Linux Geek. Next to come: "Simple Configuration of Network Services."