Operating Systems and Systems Integration

Assignment 2: tomsrtbt Diagnostic Tool

Due day: your laboratory period in week 25 (Changed due to vigorous lobbying by a large part of group Y.)

What you need to hand in: You need to hand in two things:

• Your floppy disk, clearly labelled with your name, and your group letter (V,…,Z)

• A printout of the section of rc.custom.gz that you wrote, also clearly labelled with your name and group letter. Do not hand in a long printout of material written by anyone else (such as by Tom).

You are required to create a diagnostic boot floppy disk that a customer can:

• put into their server

• turn on the server and go away for ten minutes

• come back, remove the disk and bring back to you.

Note that for the user, the operation of this system must be totally automatic. The disk should also automatically shut down the computer.

For you, the disk should contain reports that you can read from the disk under Linux, and can copy to your machine, allowing you to diagnose problems with the user’s server. These reports are the same reports as those created by the script report that is available

from the web pages for this subject: http://CSAlinux.tycm.vtc.edu.hk/ossi/ and
http://nicku.thebbs.org/ossi/.

Minimum requirements: You demonstrate during the lab session the following, then hand in your disk.

• You are shown a computer that can boot Windows, but cannot boot Linux, even though Linux is installed on the computer.

• You can boot this computer using your disk, then, with no other intervention, the computer shuts down.

• You remove the disk from the first computer, then use your own computer to view the reports on the disk.

• You are able to talk sensibly about some of the report files that you show from your disk, and can use the report files to explain what steps are necessary to allow the computer to boot Linux as well as Windows.

Assignment 2: tomsrtbt Diagnostic Tool Operating Systems and Systems Integration

2

For more marks: You can do the following using your modified tomsrtbt disk:

• Cope gracefully with the floppy disk filling up, and cope well with unusual or error conditions.

• Provide an option for the user to press a key within a timeout period to prevent the system from shutting down.

• Explain a greater percentage of the reports.

• Get configuration information from Windows partitions (including ntfs if those are present)

• Provide any other useful features

Some hints The worksheet for tomsrtbt contains a number of hints, but some students have asked for more.

• If you are using tomsrtbt-1.7.212.tar.gz or later, you (probably) do not need to install the libc5 packages from Red Hat 6.2

• Simply download the latest tomsrtbt from http://www.toms.net/rb/

• You do not need to modify the script report.

• If you have negative sectors reported when running sudo 2/usr/doc/bulidit.s, then you need to delete something to make space.

• You can see which files take the most space in a directory using ls -lSr

• Many files in 2/usr/bin are hard links to each other. The file still takes the same space until you have deleted all the links to that file.

• Please think what it means if you do the following:

mount /dev/fdou1722 /fl
tar cf /fl/reports.tar /tmp/reports
bzip2 -9 /fl/reports.tar

There is no point in over filling the floppy, then trying to compress the data afterwords.

• To decompress a tarball under Red Hat Linux, you can simply do this:

$ tar xvIf ~/reports.tar.bz2

If you are working within tomsrtbt, it is still simple to combine the tar and compress operations in one pipeline:

$ tar cf - /tmp/reports | bzip2 -9 > reports.tar.bz2

will compress it; you can extract the tarball with:

$ bzip2 -d reports.tar.bz2 | tar xvf -

• You do not need to worry about trying to log in; this is handled by the init process after the computer finishes executing rc.custom.gz

• Use tomsrtbt.FAQ as a guide, particularly under the section Customisation.

Assignment 2: tomsrtbt Diagnostic Tool Operating Systems and Systems Integration

3

• It is useful to use echo to show what is happening.

• You may wish to use the command mount in your startup script to see what is going on.

• You may wish to select the video resolution of 50 × 60 characters, so that you can see what your script is doing.

About the configuration files in the reports: Note that this is the most important part of the homework. You need to be able to interpret the results. There is no point in being able to get a lot of information about a computer if you cannot understand or use that information to solve problems!

• For more information about the configuration files that are copied by report, read Module ?? on page ?? of the Linux Training Materials. Here is a list of configuration files and the location of their description in that module:

∘ /etc/modules.conf: see section ?? on page ??

∘ /etc/fstab: see section ?? on page ??

∘ For information about the runlevels, see section ?? on page ?? to ??. Runlevels are important for you to make sense of the contents of the directories

    /etc/rc.d/rc0.d. . . /etc/rc.d/rc6.d which are in the tarball rc-d.tar.bz2

created by report.

∘ For information about the directory /etc/rc.d and below, stored in the tarball rc-d.tar.bz2 by report, see section ?? on page ?? to section ??.

• For information about inittab, do man inittab

• For information about /etc/lilo.conf, read the other material written by me, and also man lilo.conf. For a manual about lilo, do:

$ cd /usr/share/doc/lilo[figure: Tab]doc
$ gv User_Guide.ps &

• Do man issue for information about the /etc/issue file

• Do man resolv.conf for information about /etc/resolv.conf

• Chapter 2 of the Red Hat Linux Reference Guide covers a lot of information about many of these things. Install it from the documentation cdrom, or read it online at

http://nicku.thebbs.org/doc/rhl-rg-en-7.0/ch-sysadmin.html or http://CSAlinux.tycm.vtc.edu.hk/doc/rhl-rg-en-7.0/ch-sysadmin.html
• The section Sysconfig Information in http://nicku.thebbs.org/doc/rhl-rg-en-7.0/s1-sysadmin-boot.html

has plenty of readable information about the important files under /etc/sysconfig, which report puts in a tarball called sysconfig.tar.bz2.

• Information about the /proc filesystem is available from the kernel documentation; you can find it by:

$ cd /usr/share/doc/kernel-doc[figure: Tab]
$ less proc.txt