When you get a Linux distribution, you are really getting
more than just the Linux kernel (see the What's a Kernel sidebar below), you are getting an operating system, a desktop environment, and a large number of development and administration tools, and even some applications. This is quite a lot of software, and it's all packaged together in what's called a distribution. All of these pieces fit together to make your Linux machine both powerful and user-friendly. It's important to note, however, that these pieces don't have to go together. Each individual piece can be added or removed at any time. To make Linux usable for the largest number of people, these pieces are all packaged and distributed together, but you are free to customize your Linux system as much as you like, and each individual piece of the system can be independently upgraded.
A kernel is a special program that represents the “core” of an operating environment. It basically serves two functions: First, it provides a common interface that user applications can talk to. This greatly simplifies things for user applications, because they don’t ever need to know the details of the hardware they are running on. They just talk to the kernel and the kernel hides the messy details from them.
That brings us to the kernel’s second major function. The kernel is the only piece of software that is allowed to talk to the computer’s hardware. It knows all about the specifics of a machine’s hardware, and it knows how to configure and access all of those different pieces of hardware.
The kernel also orchestrates things so that many user programs can simultaneously share the computer’s hardware without stepping on each other’s toes. By completely restricting access to the machine’s hardware, the chance of a user program crashing the system is greatly reduced.
Although an operating system may consist of a number programs working together, the kernel is always at the “center” of all this activity. It sits on top of the hardware and all of the user programs run on top of it.
When you get a Linux distribution, you are really getting
more than just the Linux kernel (see the What’s a Kernel sidebar below), you are getting an operating system, a desktop environment, and a large number of development and administration tools, and even some applications. This is quite a lot of software, and it’s all packaged together in what’s called a distribution. All of these pieces fit together to make your Linux machine both powerful and user-friendly. It’s important to note, however, that these pieces don’t have to go together. Each individual piece can be added or removed at any time. To make Linux usable for the largest number of people, these pieces are all packaged and distributed together, but you are free to customize your Linux system as much as you like, and each individual piece of the system can be independently upgraded.
When I upgraded my Linux system to Red Hat 6.0 recently, I expected little more than a new kernel. Much to my surprise, I found significant improvements to many parts of the distribution, particularly in terms of the user interface. Red Hat 6.0 includes by default both the GNOME and KDE desktop environments. The look and feel of these graphical interfaces are quite different, but both make the system much easier to use, particularly for the novice user.
Upgrading Red Hat
Upgrading from Red Hat 5.2 to 6.0 is very simple. It’s not unlike installing the distribution, except that when you upgrade, you’re spared the finicky work involved with partitioning your hard drive and describing your hardware. That information was previously recorded by the version of Red Hat that is already on your system, and Red Hat 6.0 simply takes this information and reuses it. Begin by inserting the boot disk into the floppy drive and the Red Hat 6.0 CD #1 into the CD-ROM drive. Reboot your computer and it will boot from the floppy. You’ll see the same “welcome” screens you did when you installed Red Hat 5.2 and you’ll step through several of the same windows. The sequence can be seen in the chart on page 16.
Starting X Automatically
As you can see, the procedure for upgrading Red Hat is very similar to its installation. One thing has been added to Red Hat 6.0, however. Just before the upgrading process completes, you are asked if you want the X Window System to start automatically when the system is booted. This means that you will no longer be greeted by a black-and-white login screen, but rather by a graphical interface. If you know that X Windows already functions properly on your system and you want to try out the auto-start feature, by all means answer “yes” when prompted to do so. If you later decide that you really don’t want X to start automatically, it’s easy to change this option (see Starting Directly into X sidebar, pg. 18).
Now when the system starts you will get a “Welcome” window with “Login:” and “Password:” boxes to fill in. At the bottom right is an “Options?” button. Click on that button and you get a pulldown menu with three choices. “System” lets you reboot or halt the computer. “Languages” lets you choose the language you will be using. If you use English and your Italian roommate shares the computer, then there is no need to reboot the computer. The language can be selected before you log in. The third choice is “Sessions.” This lets you choose which desktop environment you will use. The two that come with Red Hat 6.0 are KDE (the K Desktop Environment) and GNOME (GNU Network Object Model Environment). I highly recommend that you try them both. GNOME is fairly new and may not be as stable as KDE, but I prefer it, and I’ve had no problems with GNOME so far. KDE, however, has more user-friendly configuration tools, and is designed to act very much like Windows 95.
|Figures 1 and 2: You can compare the KDE desktop (top) and GNOME desktop to decide which you prefer.|
You don’t need to select the “Session” or “Language” every time you log in. If you just log in then you will get either the default settings or whatever you selected last time. Figure 1 and Figure 2 show the GNOME and KDE desktops. They may look similar here but they do behave quite differently. Experiment with both and see which you like better. Both have excellent configuration screens that let you customize their behavior.
Also, when you log out now, there is no need to shut down X first. Regardless of which desktop environment you use, there is a “logout” selection in the main desktop menu. If you want to shut down the computer after you log out, press the “Options” button and select “System.”
Walking Through the Upgrade
||Selection and/or Response
||“What language should be used?”
||“What type of keyboard do you have?”
||“What type of media?”
||“Insert your Red Hat CD into your CD drive now”
||“Would you like to install? or upgrade?”
||Upgrade/enter (Be sure that you select “upgrade” rather than “install.”)
||“Do you have any SCSI adapters?”
||“Would you like to have the GNOME desktop installed?
||Yes/enter (GNOME is not required. It is one of two popular new window environments. I suggest you try it out.)
||“… would you like to customize … ?”
|| “a log of your upgrade will be saved in /tmp/upgrade.log”
||“Would you like to create a bootdisk?”
||“Insert a blank floppy in the first drive /dev/fd0″
||“Where do you want to install the bootloader?”
||select other boot partitions/enter
I encountered only one problem with my upgrade. Red Hat 5.2 allowed you to set up user accounts that did not have passwords, and so I had set up my personal login account without a password. Red Hat 6.0 seems to be more strict in this regard and requires user passwords. You can get around this, but not as easily as you could before. When my 6.0 upgrade was completed I found that I could no longer log in to my personal account. I logged in as root, reset my personal account password, and I was still not able to log in to my old personal account.
If you happen to run into this problem, there are a couple of ways to fix it. One way is to log in as root and then start linuxconf. Delete the user account but save all of its files first. Then create a new account with the same name and in the same home directory.
To do this using linuxconf, first select “Users Accounts->Normal-> User Accounts.” Highlight the account you wish to delete and press the “Del” button. In the window that comes up (Figure 3) select “Leave the account’s data in place” and press “Accept.”
|Figure 3: Leave an account’s data in place.|
|Figure 4: Adding an account.|
Now return to the “Users accounts” tab and press “Add” (Figure 4). Re-create the account using the same home directory.
Exit linuxconf by pressing the “Quit” button. Finally, while still logged in as root, go to the home directory of the user account you just re-created and at a shell prompt type:
You should now be able to log in to your non-root user account again, and all of your original files should be preserved. If you can, while you are logged in as root and before you start, it is never a bad idea to back-up your user account’s files, just in case. That way you’ll always be able to get yourself out of any trouble you might accidentally get yourself into.
Until next month, have fun!
Say that you’re running Red Hat 5.2 or some other distribution and you have no need or intention to upgrade. X is working for you. When you boot your computer you log in to the command line interface and manually start X with the startx command. You want to skip the command line and boot directly into X.
No problem. Open up the file /etc/inittab on your system, and in that file look for the line that reads: id:3:initdefault . Change the 3 to a 5 , so that you have id:5:initdefault . You can use any text editor to change the file. Be careful that you don’t change anything else. In fact, I recommend that you save a backup version of the /etc/inittab file somewhere before you alter anything. That way, if things go wrong, you can always revert to the old version of inittab.
The next time that you start your computer, X will start automatically. You no longer have to log in and start X from the command line.
Hal Moroff has been developing UNIX systems and applications for 20+ years. He’s new enough to Linux that he’s finding new things every day. He can be reached at email@example.com.