How to setup your first Linux-based computer
George Lewis (schvin@bigfoot.com),
portico.org
The purpose of this document is to provide a detailed description of how to go about setting up one's very first Linux computer. If you see something that doesn't make sense or you haven't heard of before, please keep reading as perhaps it will be more clearly explained later, or it will come together better. If you have questions, please email the author, schvin@bigfoot.com.
Hardware
To run Linux nicely, you are going to want to have a computer that has at least a 386
processor and 8 megabytes of RAM. Linux has been ported to other platforms, such as the
Macintosh, but for this article we are going to stick with Intel-based platforms.
Depending on what you want to do with your Linux workstation, you can run it off just a floppy drive, or a bigger hard drive. You can even run it completely over a network if you have one. To setup a basic Linux workstation or server, however, you will want to have a hard drive that is at least 500 MBs. And the installation process will require a floppy drive or unless you have a Boot-ROM chip on your Ethernet card and a server set up to configure it.
You will probably also want a CD-ROM drive, but it is not necessary. It is also nice to have other cards such as sound and Ethernet, but you don't have to have them to run Linux. You will, however, need a video card and monitor, as well as keyboard to run Linux. A mouse is not necessary if you don't want to run X-Windows (the graphical interface for Linux and other Unix platforms), but is useful anyway.
Once you have those things collected and hooked all together you should be well on your way to having a Linux box. This, of course, is assuming that you are familiar with computer hardware enough to put it all together. That is another article that needs to be written!
Getting the software
Okay ... perhaps you've heard of various Linux "distributions" -- collections of
Linux software. There are many popular ones out there, including Caldera, Debian, Red Hat, and Slackware.
You can order these distributions for next to nothing from CheapBytes, or, if you have a speedy connection to the Internet, you can download it from places like UNC's MetaLab or Walnut Creek. If you opt to download Linux, please make sure that you put it on a different hard drive than the one that you want to install Linux on.
I personally really like Slackware, mainly because it is what I started with, and have enjoyed it ever since. I have been playing with Red Hat lately though, and it is very nice also. I really like RPM, a package-management system that comes with Red Hat. It is very handy for keeping track of what you have installed and where. So for this article, we're going to discuss how to install Red Hat for the first time. The current version is 5.1, so we'll focus on that.
Making your boot disks
I'm going to assume that you are running DOS/Windows, and that you have your Red Hat
CD-ROM as drive D. I don't know of a way to make these disks if you are running Windows
NT, sorry. If you downloaded the software off of the net, I'm going to assume also that
you downloaded is straight into the root of drive D. You figure out where it's at.
Assuming that, you need two formatted 1.44 MB floppy disks.
d:cd \dosutilsrawriteEnter disk image source file name:, input d:\images\boot.imgA or B
depending on which one you put the first 1.44 MB floppy into--it will make the first disk
when you are readyd:\images\supp.img instead of d:\images\boot.imgYou should now be ready to roll with your boot disks!
Installing Red Hat 5.1
You will want to insert your boot.img floppy into your computer, and turn it on. It'll
come up with a screen describing the boot disks to you, and waits for your prompt. If
you're not in a special situation, it's okay to just hit enter.
The boot disk will load some things, and will eventually stop at the "Welcome to Red Hat Linux!" sign, where you can go ahead and hit enter. Red Hat uses a simple menu system throughout their install process. It is based on the arrow keys, space, and the tab key. Note that it is also described at the bottom of the screen.
You can now choose a language, I'm going to stick with English. And then I'm going to keep the standard "us" keyboard format.
Now you need to tell Red Hat (RH) how you are going to install it. I am going to install it via FTP from one of my other computers here at home. However, if you are going to install it off of a CD, you should choose the "Local CDROM" option, and it will prompt you to insert your RH CD, and it will look for your CDROM drive. It may also ask you what type of CDROM you have, depending on your computer's configuration. Note that if you make a mistake you may tab to the "Back" button and go back to wherever you would like to change an option.
Now, I will be installing it via anonymous FTP, and here are the steps necessary for that. Back at the "Installation Method" screen, I'm going to select "FTP" and it will prompt me for my Supplementary boot disk (the supp.img) one. It'll bring up a bar that fills as it is loading the information off of the floppy.
Okay, it's just finished loading the disk, and it is interested in knowing whether I'll be upgrading or installing a whole new system. In this circumstance, we'll be installing a whole fresh new system.
And no, I don't have any SCSI adapters in this computer. If you do, it will go out and check for them, and perhaps ask you a few relevant questions concerning your adapter. Most people don't have SCSI, as most PCs these days only come with IDE, and inferior technology. SCSI and IDE are interfaces to your storage media, such as hard disks, CD-ROM drives, and tape drives. SCSI has better performance, is pickier about cabling and such, and costs more, but is nonetheless a beautiful thing. For more information, check out our All about SCSI article.
Now comes the fun part, partitioning your hard drive. Let's go ahead and use Disk Druid to partition our drive. On my computer here, I currently have no partitions on my 1.2 GB drive. If you have some already that are from previous operating systems, you need to select them (Tab will move you between the sections, and note the function keys listed at the bottom), and delete them.
You need two partitions (at least) to run Linux. You want a swap partition, which is used similarly to Windows' virtual memory. As a general rule, it is usually a good idea to make your swap partition about twice the size of your RAM. So in my case, I'm going to make my swap partition 32 megabytes. Then I am going to use the rest of the drive as my main partition, that will have the OS and all of the data on it.
I'm going to choose add to go ahead and create my swap partition. Swap partitions don't get a mount point, so just leave that field blank. It is necessary to tab to the size, and fill that in, and to change the type to "Linux Swap." Now, I've selected ok, and voila, there is now a swap partition listed.
Next we need to create the root partition, the one where everything will be stored. Note how much space is left on your drive after the swap partition, this is listed at the bottom of the screen, in my case it is 1190 megabytes. This one does have a mount point, and it is "/" without the quotes. That is pronounced root, and it is the base of your entire system. Unlike the DOS/Windows environment you may be accustomed to, there are no drive letters, everthing will be "mounted" under this root partition. The root partition itself will be a hard drive partition, and your CD-ROM drive may be mounted as something like "/cdrom" -- and the same for your floppy or other hard drives.
Okay, so my partitions are all setup, and we're ready to continue. RH wants to go ahead and activate my swap space, this will take a few minutes, but go ahead.
Since I'm installing Red Hat via FTP, it wants to know what kind of network card I have so that it can load the network drivers. I have an NE2000 compatible card in this computer. Next it will ask for options, and I will tell it to autoprobe the card, and hopefully it will pick it up. If you are installing in a similar way, you may have to specify the I/O or IRQ for your card, but chances are that it will pick it up automatically with the autoprobe option.
It picked up my card, and now it is ready for the IP information. This section is only really pertinent if you are installing via a network as well, if you're installing via a CDROM, this isn't too important, don't worry about it. I'm filling in the parameters for my network, if you don't know what your ip address and things are on your network, ask your administrator. My IP address is 192.168.42.85, and my netmask is 255.255.255.0. My gateway is 192.168.42.1, and my primary nameserver is 12.4.36.3.
RH will attempt to determine your host name and domain. Depending on your netkwork's configuration, this may work. In my case, I don't have my network setup for that. So I'm going to just manually type in the info. I use the fictitious domain nexus.org for my local intranet at home, and the hostname for this PC will be virgil.nexus.org. I am also using 12.4.36.7 as my secondary nameserver.
Now for the FTP information (please hang on, CDROM people). The computer that has the Red Hat install files shared via FTP is 192.168.42.1 in my case. And the RH files are at /pub/linux/redhat-5.1. If you cannot access them in your setup by anonymous logon, you will need to select the option "Use non-anonymous ftp or a proxy server" and it will ask you some more questions later.
You can now choose whether or not to format your new root partition, which isn't a bad idea. Once you've set that, it will move on to letting you choose what components you want, and it will actually do the format later on. My favorite option in the components menu is "Everything" at the very bottom, but you may want a more customized setup, especially for those of you who are tight on disk space. I believe a full install requires 600+ megabytes.
Moving on, virgil.nexus.org is now ready to install, and has informed me that it will record a log file of everything in my future /tmp/install.log file. Now it will go ahead and format the drive since I told it to do that, and then after that is done, it's going to install everything!
When it is all finished, you will be able to reboot your system, and you've got your first Linux box!