{"id":360,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:40","modified_gmt":"2020-08-22T20:26:40","slug":"this-is-the-page-title-toplevel-193","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=360","title":{"rendered":"Upgrading an Existing System"},"content":{"rendered":"\n<title>Upgrading an Existing System<\/title>\n<p>\nThe fact that your computer contains an existing Linux installation\npresents its own set of problems. When I first started using Linux, none\nof the distributions did an upgrade in the sense that other OSs did\nthem. In every installation (at that point), the root file system was <b>overwritten<\/b>\n(during which all data is lost). If your data is on a different file\nsystem, it is &#8220;probably&#8221; safe. However, all the configurations that you\nhave done in the files on your root file system are gone.\n<\/p>\n<p>\nHowever, that was more of a design than a problem. If you wanted to upgrade\nthe <glossary>kernel<\/glossary>,\nthat&#8217;s all you had to do. Most programs did not (and still do not) depend on\nspecific releases of the kernel, so upgrading presented few problems for\nthem. Keep in mind that the newer kernel versions support\n<glossary>ELF<\/glossary> binaries. If you have an older program that is in\na.out format, it will still run on the newer kernels. However, newer ELF\nbinaries won&#8217;t run on older kernels.\n<\/p>\n<p>\nAlso, upgrades to the <glossary>kernel<\/glossary>\noccur at fairly frequent intervals. These upgrades are not full copies of\nthe newest kernel but rather patches  to an existing one. Even if you do\nreplace the entire kernel, you rarely have to do more than replace the \/usr\/src directory.\n<\/p>\n<p>\nWhen programs or sets of programs (packages) are updated, you only need to\nupgrade what you want.\nYou can find the latest versions of the packages in several places on the Internet. The most common\nformat is <glossary>RPM<\/glossary>,  so you can use the <command>rpm<\/command> program to install\nand upgrade your programs. Many distributions have <command>glint<\/command>, which is a graphical\nprogram with which you can remove and\ninstall each package.\n<\/p>\n<p>\nOne advantage of glint is that you can install sets of packages. For example, you have a\nset of editors,  such as <command>emacs<\/command> and <command>vi<\/command>. Rather than\nfirst installing emacs and then vi, you can install them both at once.\n<\/p>\n<p>\nSuSE uses YAST2, which is a very extensive administration tool and which\nyou to not only install the software, but it can check and resolve missing\ndependencies (packages which are needed to run the one you are trying to\ninstall.) Here you can see what it tooks like:\n<\/p>\n<p>\n<img decoding=\"async\" src=\"YAST_Packages.png\" border=0>\n<p>\nIf you don&#8217;t like YAST2, you can try Kpackage, which is specifically for the\nKDE environment. Here you can see what it looks like:\n<p>\n<img decoding=\"async\" src=\"Kpackage.png\" border=0>\n<p>\nIn both cases (YAST2 and Kpackage) you can display the packages group based\non their functionality, like editors or networking. In each case, you can\nsee what dependencies this application has, the version and so on.\n<\/p>\n<p>\nIf you don&#8217;t have any of these tools or simply don&#8217;t want to use\na graphically tool, running <command>rpm<\/command> from the\n<glossary>command line<\/glossary> is only slightly more complicated.\nAlthough there are a large number of options and arguments, it is\nfairly straightforward to install something.\n<\/p>\n<p>\nIf you have an older hard disk (read: smaller), you might run into problems\nwith some of the new distributions. My SuSE 8.2 contains 5 CDs (or two DVDs)\nand if you decided to install <i>everything<\/i> (one of the options), you\nmay find yourself running out of space. I created a 3 Gb partition for <command>\/opt<\/command>\non my 20 Gb drive (when 20 Gb was a <i>large<\/i> drive). After about a year of\nupdates and installation of invidual software I started running out\nof space on \/opt.\n<p>\nIf you are upgrading your system and find out you are running out of\nspace (or just through normal usage), there is hope. Obviously you will\nneed some place to put it, so we will assume that you have an additional\ndrive. Create partitions on the new drive and mount them to a directory that\nis not being used. A common place is \/mnt, but I often create a new direcotry\nthat is somehow related to what I am trying to move. For example, I might\ncreate a \/opt2 directory and mount the files system there.\n<p>\nOnce mount you can <b>copy<\/b> (not move) the files to the new filesystem.\nThe <command>cp<\/command> should have an option -R or -recursive with will\ncopy everything recursively (what else?). In the unlikely event your version\nof cp does not have a recursive option you can use\n<command>cpio<\/command>. Change into the old directory and run:\n<p>\n<commandexample command=\"find\">find . | cpio -pvdum \/new_directory<\/commandexample>\n<p>\nOnce the files are copied, you need to change the <file type=\"\">\/etc\/fstab<\/file> to reflect the\nnew filesystem. For example, assuming you want to put the <directory>\/opt<\/directory> directory on\na new disk (let&#8217;s say the first partition of the second hard disk),\nyour in <file type=\"\">\/etc\/fstab<\/file> might look like this:\n<\/p>\n<filecontents>\n\/dev\/hdb1   \/opt     xfs   defaults    1 2\n<\/filecontents>\n<\/p>\nNext, rename the old directory (i.e. \/opt.old) and then rename the new\ndirectory to the original name (i.e. mv \/opt2 \/opt). Now reboot.\n<p>.\nNote that I did <b>not<\/b> say to remove the old directory. You want to make\nsure this worked before destroying anything. When you reboot, the new\nfilesystem will be mounted onto the new \/opt directory (in this example).\nIf you run into problems, you can simply change the directory names back\nto the way they were and then reboot.\n<p>\nYou <i>could<\/i> also simply reboot with out renamed the original \/opt\ndirectory. This will mount the new filesystem over the top of the\noriginal directory. The files will still be intact, but they won&#8217;t be\naccessible.\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=360\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-360","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/360\/revisions"}],"predecessor-version":[{"id":773,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/360\/revisions\/773"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}