| news - about me - my system - columns - blackbox styles - projects - licenses - the curse - contact | |||
|
Installing Red Hat 7.1 |
|
||
|
path xlife columns 20011123 |
|||
Installing Red Hat 7.1Xlife column for November 23, 2001:Summary:
Please remember I set this system up for my own needs. I use it to run multimedia applications (watch movies and listen to music); I connect to the Internet by dial-up only and I need some Internet applications (file download, e-mail, browsing); I set up a development environment, including some web and database servers, text editors and CVS. I won't tell you how to set all of these up in this column, but maybe I will in future ones. Also, please pay attention to issues specific to my hardware and preferences, since stuff that could be important to you will be overlooked or specifically kicked out if you do things my way. 1 Where to get Red Hat fromThe most usual way to get your hands on a Red Hat system these days is to download two or three CD images (ISO's) and make CD's out of them. You'll need a CD-writer and blank CD's. 640 MB regular blanks will do just fine, you don't need 700 MB. You can get the ISO's here or at the official Red Hat site. There are lots of people mirroring the ISO's on servers that are probably closer to your location, so check around first. How exactly you do the downloading and the writing of the disks is your problem. Just consider it a starting exercise in the "manage it" spirit of Linux. If you're lucky, you'll find a knowledgeable friend willing to help you out (maybe he's already got the CD's and he's willing to make copies for you). You can always pay Red Hat to send you a full package with all kinds of goodies included. Please note that the standard Red Hat distribution actually consists of several CD's. Some of them are essential; other will contain documentation, the powertools (a large collection of additional applications -- as in, not crucial) and source RPM's (source code). 2 Getting startedI'll assume you have the Red Hat CD's in front of you, and you're ready to start installing Red Hat Linux on your computer. Well, not so fast. We'll have to do some other stuff first. First of all, let's see how Linux will fit together with what else you've got on your machine. I for one will also be running Windows 98SE and we need a way to split the hard-disk between the two of them, as well as a nice confortable way of switching between them. Secondly, you'll need a way to start the install operation. If you can boot from CD it's great, if not there's a way to do it using floppy disks. 3 What are partitions?Splitting the disk is done by partitioning it. Disk partitions are slices which are treated as different parts of the disk by the operating system, thus enabling you to set them up for different things. Here's how I set them up on my system:
(In case you're wondering why I set up things like this; I separate the Windows basic stuff on C: from everything else on D: because if something goes wrong (system crash, viruses) and I need to reinstall the system, I can go ahead and format C:, then reinstall without losing anything important. As for the two Linux partitions, they need to be set up like this, it's the absolute minimum requirement.) 4 Setting up the hard-disk partitionsLet's go about some common scenarios of setting up partitions.
5 Starting the Red Hat Linux installationIf your computer can boot from CD it's great. You'll just have to go into the BIOS setup and tell it to do so, or maybe it's already set up to do this. Put in the first Red Hat CD, reboot and you're on your way. If you can't use the CD-ROM to boot you'll have to go a different way. On the first Red Hat CD there's an utility called rawrite which can fill floppy disks with stuff from a pre-existing disk image. The images are also provided on the CD, so go ahead and make yourself a floppy disk, read the Readme file on the CD to find out how. When you're done make sure you boot from the floppy disk you've just made, and that the first install CD is in the CD-ROM drive. The booting sequence will know how to transfer you to the CD and start installation. 6 Actually installing Red Hat LinuxWhether you boot from CD or floppy disk, you'll end up in front of a text screen with a prompt at the bottom. Type in "text" and press Enter. You've just told the install program you want a text based GUI for the installation, since it's the most reliable. Don't worry, it's not some cryptic command line installation process, it actually looks very pretty. 6.1 General optionsSome quick walkthrough for a bunch of simple options you'll encounter:
6.2 Partition setupNow you've reached the partition setup. Choose "disk druid" as the tool for the job. "fdisk" is actually the Linux fdisk, not the DOS/Windows version, so take care. Disk Druid will present you with the existing partitions and ask you to choose which one will be the main Linux partition. You can create, delete and modify partitions. On my system I am presented with four partitions: two DOS (FAT32) ones, one of type "Linux native" and one "Linux swap". I don't need to worry about the swap, Linux knows how to use it without any special intervention. What I need to do is tell it that the Linux native partition should be used as the main installation point, and I do this by editing it and specifying "/" (slash, without the quotes) as the "mount point". After which I'm done, I move on (OK or F12). If you only see FAT32 partitions you will need to create Linux partitions. You must have enough free space as discussed before (at least 1 GB + 128 MB). Unlike Partition Magic, Disk Druid works with the existing space, it's not capable of resizing. So if you have the space go ahead and create a Linux native partition with a "/" mount point, plus a Linux swap. Otherwise, reboot into Windows and use Partition Magic. Quick note (so you'll be smarter than the average Linux beginner): under Linux, you don't have "drives" like under DOS/Windows. What you have instead is directories, all grouped under the root directory, called, you've guessed it, "/". The simplest way to set up the disk is to have a partition for / and a swap, end of story. However, some people prefer to set up some directories on the Linux system to be on their own partition. For example, /tmp is a directory used by all the applications for holding temporary runtime files and data. If you put /tmp on a separate partition you can accomplish several useful things: for example, you can later convert it to a ReiserFS file system which is better for the kind of disk usage /tmp needs; or, in case of a remote attack which attempts to fill up your entire disk, it only fills up /tmp. The same goes for some other standard Linux directories, such as /home, the place where users keep their individual files (how about making sure your little brother won't have any chance to go over a fixed disk space?). If you wan't to set directories to use different partitions, ask a friends who knows this stuff to help you decide how much space you should set for each important directory. Once you've settled to a scheme you just create partitions inside Disk Druid and use mount points other than / for them (/tmp, /var/spool, /home, etc.). 6.3 "Drives" naming under LinuxAs I said, there are no drives under Linux. All hard-disk partitions and other devices that are considered disk space (floppy disks, CD's) are hooked into the root directory tree under certain directories and used like that. Need to read from CD? You "mount" it under /mnt/cdrom, which was previously empty, but now you find the root of the CD in there. We'll discuss this later. What could be of interest right now is knowing what Linux calls the hard-disk drives. You may know that an usual main board has two IDE controllers, each capable of holding up to two storage devices, such as hard-drives or CD-ROM's. You have a primary controller and a secondary controller. The deviced on each are separated into "master" and "slave". So you have masters and slaves, primary and secondary controller; four combinations altogether. Linux will call these "devices", and name them hd?, where the question mark will be a letter from a to d.
In my computer I have the hard-drive set up as hda, and the CD-writer as hdc. From the above you can deduce what controller and device type they use. Furthermore, unlike CD's and floppy disks, hard-disks have partitions. We have to call them something as well. Since Linux uses the partitioning schema used by early MS-DOS, you'll get four "main" partitions on each separate hard-disk, named hda1 through hda4. You may think C: is hda1, D: is hda2, Linux main is hda3 and Linux swap is hda4. Not necessarily, and most likely not. hda1 through hda4 are "main" partitions, also called primary partitions. C: is definitely such a partition, but not the rest too. Actually, it's a common procedure to set up an "extended" partition as the second primary partition (an extended partition is not really a partition, but a holder for any number of actual partitions); you didn't think we'd end up limited at just four partitions on a hard-disk, did you? No, this trick allows us to have an (almost) unlimited number. So, the other three partitions are actually "virtual" partitions inside the second primary partition (hda2). There are no other "main" partitions (no hda3 and hda4). What are the virtual ones called then? Simple: they are assigned numbers from 5 on, in ascending order, as they are placed on disk. So D: is actually hda5, Linux main is hda6, and swap is hda7. There you go. Of course, maybe you didn't set your partitions up like this. In any case, the rules still apply. 6.4 The LILO 1024 cylinder warningAfter completing Disk Druid you may get a warning saying your root Linux partition is outside of the 1024 range. What it means is the program that usually loads Linux at boot time, called LILO, can't function if the Linux partition is too far away from the beginning of the disk. Well, I don't use LILO anyway, so I don't care about this. Tough luck. 6.5 Some more general optionsSome more things will take place next. The two (or more) Linux partitions will be checked and formatted. You'll also need to specify some configuration options for LILO (use the defaults, it doesn't matter). Next you'll have to pick up a hostname for your computer. Something to identify it by. I use "xxx". You can use "shockspace", "undertaker", "gonzo" or whatever you want. It's case insensitive. It won't matter once you actually connect to a network (by dial-up or LAN) since you'll be assigned a certain (different) name. Don't set any firewall. You'll need one, yes, but it's better you set it up manually, setting it up here it's more trouble than it's worth. Chose your mouse type. I for one have a three button serial mouse on COM1, so I go with "generic 3 button serial mouse". You may have two buttons, or a PS/2 mouse instead of serial; if you have a scroll wheel and it clicks it counts as a third button. If it is serial, make sure you specify COM1 (ttyS0) when asked where it's plugged in. You'll also notice a checkbox called "emulate three buttons"; it means that two button mice can emulate clicking the third button by clicking the two existent buttons at the same time. Choose some languages to install. I only use English. These languages will be used all around the system, in applications and logs for example, of you choose to. I don't really think anything except English is appropriate (however good, the other translations are just weird, unfamiliar, and can lead to confusion), so I stick to it alone. Set up your clock next. Just parse the list and choose your country capital or state. An important step comes next, choosing a root password. The "root" user is the superuser, the one that can do anything it wants on the system. You must have at least the root user set up, so go ahead and pick a (good) password. You'll also be asked to create other users, and you should, just not now. We'll do it later. The authentication config is important, the default has MD5 and Shadow passwords checked, leave it at that. It means that the file where the user passwords are stored will be protected by first encrypting passwords with MD5, and second by actually using a separate, more protected file to actually store passwords, a so called "shadow", while leaving the main file just so applications know what users exist. 6.6 Package selectionYou're in for some really fun stuff next. Since you said you want a "custom system" earlier, you'll get a chance to go through all the individual packages available and select what you need only. The main selection screen will present you with ready-made categories (such as "printing") which imply a certain selection of packages. The easiest way to go about it is to UNCHECK them all; check "select individual packages" below; and press OK. Now you'll see another list, with one-level expandable categories, and a big list of actual packages. Go through all of it and below I'll tell you which packages to install. (Keep in mind however that I am setting up a system for my own needs, as I mentioned at the beginning of this page.) OK, here we go:
There are a LOT of packages in the Red Hat distribution and you made it off with just a few; you may think you're done. Thruth is the Red Hat packages (RPM's) have an interdependance system which tells them if they need another package to work (for example, an application written in Tcl/Tk will also need Tcl/Tk installed). So after you've selected the above packages and hit OK, the install program will check dependencies and will most likely find out you need some additional packages installed. It will be kind to you and present you with a lst, so you can choose to install whatever else is needed and get it over with. This could happen two or three times, since the additional packages may need additional packages. There are also some crucial packages that must be installed no matter what, and you won't be given a chance to choose as far as they are concerned. Doing it this way you can get a minimal installation of about 500 MB. However, keep in mind we didn't yet install Internet utilities like Netscape, or a fully functional X Windows System, because I intend to use newer packages, which are not included in the distribution. Installing them from the CD would take your installation up to maybe 800 MB. Now you understand why you need at least 1 GB. 6.7 Preparing the systemYou'll be presented with a video card which the install program has detected. Right or wrong, just accept it for now. The actual installation begins, there will be roughly 230 packages installed in 550 MB, over about 5 minutes. Sometime during the installation you'll be asked to put the second CD in. 6.8 Important! The boot diskDue to that LILO problem we discussed earlier, you won't be able to use LILO to boot into Linux. So first of all ignore the error/warning message you get about this, and then DO ACCEPT the install program to make you a boot floppy-disk which you'll need if you ever wanna actually start Linux. Just make sure it's a good disk, no damage and stuff. 6.9 Setting up X WindowsLinux is not all command line, it has a Windows of its own, called X Windows. The final part of the install process will try to set up a working configuration for it. It doesn't really matter if you suceed or not, since even if you do set up the graphical capabilities right, the package selection I did earlier has left you with a non-working X Windows system <grin>. Enter here to get it working. 7 You're done!The install program will reboot the computer when you're done. Make sure you have the boot disk in the floppy-drive and boot from it instead of the hard drive. You'll see Linux starting up and after some delightful screenfuls of messages you'll find yourself sitting in from of a screen saying "login >". Type in user "root" and whatever password you chose for yourself and you're in control! If you don't know what to do next, read some other articles on this site or look for documentation of your own. Important thing is that you have a working Linux installed on your computer. (OK, so I don't let you completely hanging: type "reboot [ENTER]" to reboot the computer or "halt [ENTER]" to shut it down. Important! NEVER just turn off the computer once Linux has started! Use commands like reboot or halt to stop it, or if you don't have root prompt press Control-Alt-Del to reboot. Just like Windows, simply stopping the computer without proper shutdown can damage the file systems! (the ones on the Linux partitions.) The latest Linux distributions have switched to journaled filesystems like ext3 which don't take damage in case of improper shutdown. There are still things that could go wrong, so better use the standard approach towards power-off. < Back to the top | Read other columns | Choose what column I should write next! > |
|||
|
Xlife ©2001-2008 Zuavra. All rights reserved. You are welcome to link to this site's text pages, but you must get explicit permission before you may reproduce or quote their contents. You may not link directly to binary files, such as images or tarballs. I do keep logs, you know, and offending sites will get their links redirected to shameful error messages. |
|||