Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents
Up to --> Linux Tutorial

· Installing and Upgrading
· Preparing for the Installation
· Doing the Installation
· Upgrading an Existing System
· Adding Hardware
· A Treasure Chest of Choices

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 63 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

Linux Tutorial - Installing and Upgrading - Upgrading an Existing System
  Installing the File System ---- Adding Hardware  

Upgrading an Existing System

The fact that your computer contains an existing Linux installation presents its own set of problems. When I first started using Linux, none of the distributions did an upgrade in the sense that other OSs did them. In every installation (at that point), the root file system was overwritten (during which all data is lost). If your data is on a different file system, it is "probably" safe. However, all the configurations that you have done in the files on your root file system are gone.

However, that was more of a design than a problem. If you wanted to upgrade the kernel, that's all you had to do. Most programs did not (and still do not) depend on specific releases of the kernel, so upgrading presented few problems for them. Keep in mind that the newer kernel versions support ELF binaries. If you have an older program that is in a.out format, it will still run on the newer kernels. However, newer ELF binaries won't run on older kernels.

Also, upgrades to the kernel occur at fairly frequent intervals. These upgrades are not full copies of the newest kernel but rather patches to an existing one. Even if you do replace the entire kernel, you rarely have to do more than replace the /usr/src directory.

When programs or sets of programs (packages) are updated, you only need to upgrade what you want. You can find the latest versions of the packages in several places on the Internet. The most common format is RPM, so you can use the rpm program to install and upgrade your programs. Many distributions have glint, which is a graphical program with which you can remove and install each package.

One advantage of glint is that you can install sets of packages. For example, you have a set of editors, such as emacs and vi. Rather than first installing emacs and then vi, you can install them both at once.

SuSE uses YAST2, which is a very extensive administration tool and which you to not only install the software, but it can check and resolve missing dependencies (packages which are needed to run the one you are trying to install.) Here you can see what it tooks like:

If you don't like YAST2, you can try Kpackage, which is specifically for the KDE environment. Here you can see what it looks like:

In both cases (YAST2 and Kpackage) you can display the packages group based on their functionality, like editors or networking. In each case, you can see what dependencies this application has, the version and so on.

If you don't have any of these tools or simply don't want to use a graphically tool, running rpm from the command line is only slightly more complicated. Although there are a large number of options and arguments, it is fairly straightforward to install something.

If you have an older hard disk (read: smaller), you might run into problems with some of the new distributions. My SuSE 8.2 contains 5 CDs (or two DVDs) and if you decided to install everything (one of the options), you may find yourself running out of space. I created a 3 Gb partition for /opt on my 20 Gb drive (when 20 Gb was a large drive). After about a year of updates and installation of invidual software I started running out of space on /opt.

If you are upgrading your system and find out you are running out of space (or just through normal usage), there is hope. Obviously you will need some place to put it, so we will assume that you have an additional drive. Create partitions on the new drive and mount them to a directory that is not being used. A common place is /mnt, but I often create a new direcotry that is somehow related to what I am trying to move. For example, I might create a /opt2 directory and mount the files system there.

Once mount you can copy (not move) the files to the new filesystem. The cp should have an option -R or -recursive with will copy everything recursively (what else?). In the unlikely event your version of cp does not have a recursive option you can use cpio. Change into the old directory and run:

find . | cpio -pvdum /new_directory

Once the files are copied, you need to change the /etc/fstab to reflect the new filesystem. For example, assuming you want to put the /opt directory on a new disk (let's say the first partition of the second hard disk), your in /etc/fstab might look like this:

/dev/hdb1 /opt xfs defaults 1 2

Next, rename the old directory (i.e. /opt.old) and then rename the new directory to the original name (i.e. mv /opt2 /opt). Now reboot.

. Note that I did not say to remove the old directory. You want to make sure this worked before destroying anything. When you reboot, the new filesystem will be mounted onto the new /opt directory (in this example). If you run into problems, you can simply change the directory names back to the way they were and then reboot.

You could also simply reboot with out renamed the original /opt directory. This will mount the new filesystem over the top of the original directory. The files will still be intact, but they won't be accessible.

 Previous Page
Installing the File System
  Back to Top
Table of Contents
Next Page 
Adding Hardware


Test Your Knowledge

User Comments:

You can only add comments if you are logged in.

Copyright 2002-2009 by James Mohr. Licensed under modified GNU Free Documentation License (Portions of this material originally published by Prentice Hall, Pearson Education, Inc). See here for details. All rights reserved.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.13 Seconds