{"id":322,"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-29T18:14:31","modified_gmt":"2020-08-29T19:14:31","slug":"this-is-the-page-title-toplevel-157","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=322","title":{"rendered":"Finding Out About Your System"},"content":{"rendered":"\n<title>Finding Out About Your System<\/title>\n<p>\nOne challenging aspect of tech support is that before you talk to the\ncustomer,  you have no way of knowing what the problem will be. It can be\nanything from simple questions that are easily answered by reading the manual to\nlong, drawn-out system crashes.\n<\/p>\n<p>\nLate one Monday afternoon,\nwhen I had been idle the longest, my phone rang as the next customer came into\nthe <glossary>queue<\/glossary>.  The\ncustomer described the situation as simply that his computer would no longer\n<glossary>boot<\/glossary>.  For some reason, the system rebooted itself and now\nit would not <glossary>boot<\/glossary>.\n<\/p>\n<p>\nWhen I asked the customer how far the\nsystem got and what, if any, error messages were on the screen, his response\nindicated that the root file system was trashed. At that point, I knew it was\ngoing to be a five-minute call. In almost every case, there is no way to recover\nfrom this. On a few rare occasions, fsck can clean things up to be able to\n<glossary>boot<\/glossary>. Because the customer had already tried that, this\nwas not one of those occasions.\n<\/p>\n<p>\nWe began discussing the options, which were very limited. He could reinstall\nthe operating system and then the data, or he could send his hard disk to a data\nrecovery service. Because this was a county government office, they had the work\nof dozens of people on the machine. They had backups from the night before, but\nall of that days work would be lost.\n<\/p>\n<p>\nBecause no one else was waiting in the <glossary>queue<\/glossary>\nto talk to me, I decided to poke around a little longer. Maybe the\nmessages we saw might indicate to us a way to recover. We booted from the\nemergency boot\/root set again and started to look around. The <command>fdisk<\/command> utility\nreported the <glossary>partition<\/glossary> table as valid but it\nlooked as though just the root file system was trashed, which is bad enough.\n<\/p>\n<question id=\"332\" text=\"What file lists the filesystems on your system?\" \/>\n<p>\nI was about\nready to give up when the customer mentioned that the fdisk table didn&#8217;t look\nright. Three entries in the table had starting and ending blocks. This didn&#8217;t\nsound right because he only had two partitions: root and swap. So I checked\n<file type=\"\">\/etc\/fstab<file type=\"\"><\/file><\/file> and discovered that another file system was being mounted.\n<\/p>\n<p>\nBecause the data was probably already trashed, there was no harm in\ncontinuing, so we decided to try running <command>fsck<\/command> on it. Amazingly enough, fsck ran\nthough relatively quickly and reported just a few errors. We mounted the file\nsystem and, holding our breath, we did a listing of the directory. Lo and\nbehold, <em>there<\/em> was his data. All the files appeared to be intact.\nBecause this was all in a directory named <directory>\/data<\/directory>, he simply assumed that there\nwas no <directory>\/usr<\/directory> or <directory>\/home<\/directory> file system, which there wasn&#8217;t. However, there was a\n<em>second<\/em> file system.\n<\/p>\n<p>\nI suggested\nbacking up the data just to be safe. Because it was an additional file system,\nhowever, reinstalling the OS could preserve it. Within a couple of hours, he\ncould be up and running again. The lesson learned: Make sure you know the\nconfiguration of your system! If at all possible, keep data away from the root\nfile system and do a backup as often as you can afford to. The lesson for me was\nto have the customer read each entry one-by-one.\n<\/p>\n<p>\nBeing able to manage and administer your system\nrequires that you know something about how your system is defined and\nconfigured.  What values have been established for various parameters? What is\nthe base <glossary>address<\/glossary> of your <glossary>SCSI<\/glossary>\n<glossary>host<\/glossary>\nadapters? What\nis the maximum <glossary>UID<\/glossary>\nthat you can have on a system? All of these are questions that will eventually\ncrop up, if they haven&#8217;t already.\n<\/p>\n<p>\nThe nice thing is that the system can answer these\nquestions for you, if you know what to ask and where to ask it. In this section,\nwe are going to take a look at where the system keeps much of its important\nconfiguration information and what you can use to get at it.\n<\/p>\n<p>\nAs a user, much of the information that you can get will be useful only\nto satisfy your curiosity. Most files that I am going to talk about you can\nnormally read. However, you won&#8217;t be able to run a few of the utilities, such as\nfdisk. Therefore, what they have to say will be hidden from you.\n<\/p>\n<p>\nIf you are an <glossary>administrator<\/glossary>,\nthere are probably many nooks and\ncrannies of the system into which you never looked, many you probably never\nknew existed. After reading this section, I hope you will gain some new insight\ninto where information is stored. For the more advanced system\n<glossary>administrator<\/glossary>,  this may only serve as a refresher. Who\nknows? Maybe the gurus out there will learn a thing or two. Table 0-1 gives you\na good overview of the various files configuration files on your system.\n<\/p>\n<p>\nThe command <command>getconf<\/command> will display the maximum allow value of various system\nconfiguration parameters. It is useful if you run into problems and you  think\nyou might have reached some predefined limit.  For example, you might try to\ncreate a filename or username which is to long. The <command>getconf<\/command> command will show\nyou what the maximum is. For example:<\/p>\n<p>\n<commandexample command=\"getconf\"># getconf LOGNAME_MAX<\/commandexample>\n<\/p>\n<p>\nwill show you the maximum length of the user name.  This can also show  you to\nthings that are less meaningful to users, such as the size of a page in\nmemory.\n<\/p>\n<p>A list of the essential system files can be found\n<tutorial id=\"258\">here<\/tutorial>.\n","protected":false},"excerpt":{"rendered":"<p>Finding Out About Your System One challenging aspect of tech support is that before you talk to the customer, you have no way of knowing what the problem will be. It can be anything from simple questions that are easily &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=322\">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-322","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/322","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=322"}],"version-history":[{"count":3,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/322\/revisions"}],"predecessor-version":[{"id":1270,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/322\/revisions\/1270"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}