home *** CD-ROM | disk | FTP | other *** search
- Chapter 16
- Special Features of SuSE Linux
-
- 16.1 Filesystem Hierarchy Standard (FHS) and Linux
- Standard Base (LSB)
- SuSE Linux strives as far as possible to conform to the filesystem-standard
- (FSSTD) and to its successor, the Filesystem Hierarchy Standard (FHS, pack-
- age fhs, series doc; see also http://www.pathname.com/fhs/).
- For this reason it is sometimes necessary to move files or directories to their
- "correct" places in the filesystem.
- SuSE supports the Linux Standard Base project; current information on this
- can be found at: http://www.linuxbase.org.
-
- 16.1.1 Example Environments for FTP and HTTP
-
- For FTP
- To make it easier to set up an FTP server, the package ftpdir package
- includes an example environment. This is installed in /usr/local/ftp.
-
- For HTTP
- Apache is the standard web server in SuSE Linux; together with the instal-
- lation of Apache some example documents are made available in /usr/
- local/httpd. If you want to set up your own web server, it is rec-
- ommended that you enter your own DocumentRoot in /etc/httpd/
- httpd.conf.
-
- 16.1.2 teTeX ¡ TEX in SuSE Linux
- teTeX is put together according to the TEX Directory Structure (TDS) (see
- ftp://ftp.dante.de/tex-archive/tds/), without compromis-
- ing the FHS.
-
- 16.2 Booting with the "initial ramdisk"
-
- Describing the Problem
- As soon as the Linux kernel has been booted and the root filesystem (/)
- mounted, programs can be run and further kernel modules can be integrated,
- providing additional functions.
-
- 377
-
-
-
- 16. Special Features of SuSE Linux
-
- But to be able to mount the root filesystem in the first place, certain conditions
- must be met. The kernel needs the corresponding drivers to be able to access
- the device on which the root filesystem is located (especially SCSI drivers).
- The kernel must also contain the code which is needed in order to be able to
- read the filesystem(ext2, reiserfs, romfs etc.). It is also conceivable
- that the root filesystem is already encrypted; in this case a password is needed
- to mount the filesystem.
- If you just take a look at the problem of SCSI drivers, then a number of dif-
- ferent solutions are possible: the kernel could contain all imaginable drivers.
- This might be a problem, because different drivers could conflict with each
- other; also the kernel will become very large because of this. Another possi-
- bility is to provide different kernels, each of one containing just one or a few
- SCSI drivers. This method also has the problem that a large number of differ-
- ent kernels are required. A problem which is then increased by the differently
- optimized kernels (Pentium optimization, SMP).
- The idea of loading the SCSI driver as a module leads to the general question
- which is answered by the concept of an initial ramdisk: creating a way of
- being able to perform userspace-programs even before the root filesystem is
- mounted.
-
- 16.2.1 Concept of the Initial Ramdisk
- The initial ramdisk (also called "initdisk" or "initrd") solves precisely the
- problems described above. The Linux kernel provides an option of having
- a small filesystem loaded to a RAM disk and running programs there before
- the actual root filesystem is mounted. The loading of initrd taken over by
- the boot loader (LILO, loadlin etc.); all these boot loaders only need BIOS
- routines to load data from the boot medium. If the boot loader is able to load
- the kernel, then it can also load the initial ramdisk. Special drivers are thus
- not required.
-
- 16.2.2 The Order of the Booting Process with initrd
- The bootloader loads the kernel and the initrd to memory and starts the
- kernel, whereby the boot loader informs the kernel that an initrd exists
- and where it is located in memory.
- If the initrd was compressed (which is typically the case), then the kernel
- de-compresses the initrd and mounts it as a temporary root filesystem. A
- program called linuxrc is started on this in the initrd. This program can
- now do all the things necessary to be able to mount the proper root filesys-
- tem. As soon as linuxrc finishes, the (temporary) initrd is unmounted and
- the boot process continues as normal, with the mounting of the proper root
- filesystem. Mounting the initrd and running linuxrc can thus be seen as a
- short interlude during a normal boot process.
- If the initrd cannot be unmounted (which is normally to be regarded as
- an error) then the kernel will try and re-mount initrd to the directory
- /initrd. If the mount point /initrd does not exist, an error message will
- be displayed. In such a case the system is fully functional, but the memory
- occupied by initrd cannot be released at all, and is thus no longer available.
-
- 378
-
-
-
- 16.2. Booting with the "initial ramdisk"
-
- linuxrc
-
- These are the only requirements for the program linuxrc in the initrd;
- it must have the special name linuxrc and it must be located in the root
- directory of the initrd. Apart from this, it only needs to be executable by
- the kernel. This means that linuxrc may be dynamically linked; in this case,
- the "shared libraries" in /lib must be completely available in initrd.
- linuxrc can also be a shell script. For this to work, a Shell must exist
- in /bin. In short, initrd must contain a minimal Linux system, which
- allows the program linuxrc to be carried out. When SuSE Linux is installed
- a statically linked linuxrc is used, to be able to keep initrd as small as
- possible (space on boot disks is very limited). linuxrc is carried out with
- `root' permissions.
-
- The Real Root Filesystem
-
- As soon as linuxrc terminates, initrd is unmounted and discarded, the
- boot process carries on as normal and the kernel mounts the real filesys-
- tem. What is to be mounted as the root filesystem can be influenced by
- linuxrc. It just needs to mount the /proc filesystem and write the value
- of the real root filesystem in numerical form to /proc/sys/kernel/
- real-root-dev.
-
- 16.2.3 Boot Loaders
-
- Most boot loaders (above all, LILO, loadlin and syslinux) can handle
- initrd. Individual boot loaders are given instructions on how to use
- initrd as follows:
-
- 1. LILO
- Enter the following line in /etc/lilo.conf:
-
-
- initrd=/boot/initdisk.gz
-
-
-
- The file /boot/initdisk.gz is the initial ramdisk. It can, (but
- doesn't have to be) compressed.
- 2. loadlin.exe
- call up with:
- C:> loadlin <kernelimage> initrd=C:\loadlin\initdisk.gz <parameter>
- 3. syslinux
- Enter the following line in syslinux.cfg:
-
-
- append initrd=initdisk.gz <further parameters>
-
-
-
-
- 379
-
-
-
- 16. Special Features of SuSE Linux
-
- 16.2.4 Using initrd in SuSE
-
- Installing the System
- The initrd has already been used some time for the installation: here
- the user can load modules in linuxrc and make the entries necessary for an
- installation (above all, for the source medium). Linuxrc then starts YaST,
- which carries out the installation. When YaST has finished, it tells linuxrc
- where the root filesystem of the freshly installed system is located. linuxrc
- writes this value to /proc, terminates, and the kernel continues booting into
- the newly installed system.
- For an installation of SuSE Linux you are thus, from the very beginning,
- booting the system which is just being installed ¡ somehow, quite clever. A
- real re-boot after installation only takes place if the kernel does not match with
- the modules which were installed in the system. Since SuSE Linux only uses
- a kernel for uni-processor systems, this will only happen if an SMP kernel
- was installed in the system with the corresponding modules. For this reason,
- an SMP kernel newly installed in the system must be re-booted, in order for
- it to be able to use all modules.
-
- Booting the Installed System
- In the past YaST has provided more than 40 kernels for installing in the
- system, whereby the only basic difference in the kernels was that each of them
- contained a specific SCSI driver. This was necessary to be able to mount the
- root filesystem after booting. Further drivers could then be loaded afterwards
- as modules.
- But because optimized kernels are now available, this concept is no longer
- feasible ¡ by now, over 100 kernel-images were needed.
- This is why an initrd is used now, even to start the system normally. The
- way it is used is similar to that for an installation. The linuxrc used here,
- however, is simply a shell script which just has the task of loading a given
- module. Typically, this is just one single module, namely the very SCSI driver
- which is needed to access the root filesystem.
-
- Creating an initrd
- An initrd is created by means of the script mk initrd. In SuSE Linux,
- the modules to be loaded are specified by the variable INITRD MODULES
- in /etc/rc.config. After installation this variable is automatically oc-
- cupied by the correct values (the installation linuxrc knows which modules
- were loaded). Here it should be mentioned that the modules were loaded in
- exactly the same order in which they appear in INITRD MODULES. This is
- especially important if a number of SCSI drivers are used, since otherwise the
- names of the hard drives would change. Strictly speaking, it would be suffi-
- cient just to load those drivers needed to access the root filesystem, because
- the automatic loading of additional SCSI drivers may cause problems (how
- should it be "triggered", if hard drives hang on the second SCSI adapter), we
- load all SCSI drivers needed at the installation, by means of initrd.
-
- 380
-
-
-
- 16.2. Booting with the "initial ramdisk"
-
- The current mk initrd checks if a SCSI driver is needed for the root filesys-
- tem. If you run mk initrd on a system where / is to be found on EIDE
- hard drives, an initrd is not needed, as the kernel used for SuSE Linux
- already contains the EIDE driver. As there are more and more special EIDE
- controllers coming onto the market, in the future it will probably be necessary
- in such cases to use an initrd to boot the installed system.
- Attention: because the loading of the initrd with the boot loader runs in
- just the same way as loading the kernel itself (LILO notices in its map file
- the location of the files), LILO must be re-installed after every change in
- initrd! Thus after every mk initrd, a lilo is also necessary!
-
-
- 16.2.5 Possible Difficulties ¡ Self-Compiled Kernels
-
- If you compile the kernel yourself, this can often lead to the following prob-
- lems: out of habit the SCSI driver is hard-linked to the kernel, but the existing
- initrd remains unchanged. When you boot, the following occurs: the ker-
- nel already contains the SCSI driver, the hardware is detected. initrd how-
- ever now tries to load the driver again as a module; with some SCSI drivers
- (especially with the aic7xxx), this leads to the system blocking. Strictly
- speaking, this is a kernel error (an already existing driver should not be al-
- lowed to be loaded again as a module). ¡ The problem is already known from
- another context, however (serial drivers).
- There are several solutions to the problem; either configure the driver as a
- module (then it will be correctly loaded in the initrd), or remove the
- entry for initrd from the file /etc/lilo.conf. An equivalent to the
- latter solution is to remove the variable INITRD MODULES and then run
- mk initrd, which then realises that no initrd is needed.
-
-
- 16.2.6 Prospects
-
- It is quite possible in the future that an initrd will be used for many more,
- and much more sophisticated things than loading modules needed for access
- to /.
-
- * "High end" EIDE drivers
- * Root file system on RAID software (linuxrc sets up the md devices)
- * Root filesystem on the LVM
- * Root filesystem is encrypted (linuxrc asks for the password)
- * Root filesystem on a SCSI hard drive on a PCMCIA adapter.
-
- Further Information
-
- /usr/src/linux/Documentation/ramdisk.txt
- /usr/src/linux/Documentation/initrd.txt
- manpage for initrd (man 4 initrd).
-
- 381
-
-
-
- 16. Special Features of SuSE Linux
-
- 16.3 linuxrc
- linuxrc is started during the boot up of the kernel, usually as a prelude to a
- Linux system installation, before the "real" booting commences (the kernel
- must first be properly configured, of course). This allows you to boot a small,
- modularized kernel and to load the few drivers you may need as modules,
- onto one floppy disk ¡ in an emergency even from a second disk (modules).
- linuxrc is your assistant for loading all relevant hardware drivers. You can
- also use linuxrc as a boot disk for an already installed system, for example,
- as a rescue disk. You can even start a totally independent RAM disk based
- rescue system, for example, if something serious should happen to your hard
- disk or you have simply forgotten your `root' password. More about this
- below, in Section 16.5 page 389.
-
- Main Menu
-
- After you have selected the language, screen and keyboard, you find yourself
- in linuxrc's main menu (see Figure 2.3 page 26).
- Start an installation with `Start installation / system'. Whether
- you can go there directly depends mainly on your hardware.
- If all components that are needed for installation have already been recog-
- nized by the kernel, you do not need to load additional drivers. This mainly
- applies to machines that only have (E)IDE adapters (and only (E)IDE hard
- disks and CD-ROM as well).
- If there is a SCSI adapter installed which is necessary for installation,1 you
- have to load the corresponding SCSI module. The same applies if you want to
- install via an existing network. Here, the appropriate module has to be loaded
- first.
- Furthermore, there are a lot of older CD-ROMs that are driven by proprietary
- controllers and which, therefore, need their own kernel modules. If PCMCIA
- devices are connected to a laptop, you need these modules as well.
-
- System Information
-
- IN `System information' (Figure 16.1 on the facing page) you can
- check a number of other things, apart from kernel messages, such as the I/O-
- addresses of PCI cards or the size of the main memory recognized by Linux.
- ......If you are not sure about your hardware, the boot messages might help
- you.
- You can check some system information in `System information'.
- Here, you can check the used interrupts, I/O ports used, main memory and
- recognized PCI devices as detected by Linux.
- The next lines show how a hard disk and a CD-ROM connected to an (E)IDE
- controller announce their start. In this case, you do not need to load additional
- modules:
- 1 An adapter with only a scanner connected to it is not required at boot time.
-
- 382
-
-
-
- 16.3. linuxrc
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.1: System information
-
-
- hda: ST32140A, 2015MB w/128kB Cache, LBA, CHS=1023/64/63
- hdb: CD-ROM CDR-S1G, ATAPI CD-ROM drive
- Partition check:
- hda: hda1 hda2 hda3 < hda5 >
-
- If you booted a kernel that already has a SCSI driver compiled in, you do
- not need this SCSI driver as a module as well. Quite typical announcements
- when loading SCSI adapters and connected devices might look like this:
-
- scsi : 1 host.
- Started kswapd v 1.4.2.2
- scsi0 : target 0 accepting period 100ns offset 8 10.00MHz FAST SCSI-II
- scsi0 : setting target 0 to period 100ns offset 8 10.00MHz FAST SCSI-II
- Vendor: QUANTUM Model: VP32210 Rev: 81H8
- Type: Direct-Access ANSI SCSI revision: 02
- Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
- scsi0 : target 2 accepting period 236ns offset 8 4.23MHz synchronous SCSI
- scsi0 : setting target 2 to period 248ns offset 8 4.03MHz synchronous SCSI
- Vendor: TOSHIBA Model: CD-ROM XM-3401TA Rev: 0283
- Type: CD-ROM ANSI SCSI revision: 02
- scsi : detected 1 SCSI disk total.
- SCSI device sda: hdwr sector= 512 bytes. Sectors= 4308352 [2103 MB] [2.1 GB]
- Partition check:
- sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 >
-
- Loading Modules
- You select which kinds of modules you need. If you booted via disk, the
- corresponding data has to be read by linuxrc and displayed in a list.
- If you have booted from CD or from DOS (via loadlin), these modules are
- already set in linuxrc. This saves tedious loading, but it needs additional
- memory. If your machine has less than 8 MB of RAM, you have to boot from
- disk.
- linuxrc offers you a list of available drivers. On the left, there is the name of
- the module and, on the right, a short description of its usage.
-
- 383
-
-
-
- 16. Special Features of SuSE Linux
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.2: Load modules
-
-
- For some components, there are a variety of drivers to choose from (even
- newer alpha-code drivers).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.3: Selection of SCSI drivers
-
-
- Passing on Parameters
-
- When you have found a suitable driver, move to it with the cursor and press
-
- . Now there is a dialog box where you can add additional parameters
- for this module. More on module parameters can be found in Section 14.3.4
- page 339.
- We would like to point out that, in contrast to the LILO prompt, parameters
- for the same module have to be separated by blanks.
-
- 384
-
-
-
- 16.3. linuxrc
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.4: Entering parameters for a module to be loaded
-
-
- In most cases, it is not necessary to specify the hardware in detail. Most
- drivers find their components automatically. Most network cards and propri-
-
- etary CD-ROM drives, however, need parameters. If in doubt, just try
- .
- Recognizing and initializing certain hardware can take some time. Switching
-
- to virtual console #4 ( Alt + F4
- ) lets you watch the kernel messages while
- loading. SCSI drivers need a while, as they have to wait for each device to
- load.
- If loading succeeded, the messages are displayed by linuxrc so you can verify
- that everything ran smoothly. Otherwise, if it fails, the messages might give
- you a hint as to why it failed.
-
- Start Installation / System
-
- Once you have set up hardware support via modules, you can switch to the
- `Start installation / system' menu.
- From here (Figure 16.5 on the following page) a number of procedures
- can be started: `Start installation' (from this item an update is
- also started), `Boot installed system' (the root partition must be
- known), `Start rescue system' (refer to Section 16.5 page 389) und
- `Start Live-CD'2
-
- The item `Start live-CD' can be of great use if, for example, you
- want to test, without actually installing to the hard drive, if the computer in
- question, or the Notebook you might want to buy, is at all compatible with
- SuSE Linux ¡ such a test ought to be possible in every modern PC shop,
- without any trouble!!
-
-
- 2 This live CD ("Live filesystem") is only available for x86 architectures and must be bought
- separately).
-
- 385
-
-
-
- 16. Special Features of SuSE Linux
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.5: the linuxrc `Start' menu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.6: Selection of source media in linuxrc
-
- For the installation (Figure 16.6) you can choose various sources for the
- installation, and similarly for the rescue system (see Figure 16.6).
-
- 16.4 The SuSE Linux Help System
- The help system is component-oriented, and can be viewed using any browser
- (see Figure 1.1 page 6, or Figure 16.7 on the next page) ¡ even across a
- network, if you wish.
- The central component of the help system is located in the package suse-
- hilf, series doc (Documentation). Depending on your requirements, you
- may additionally install the following packages (for help on installation, see
- Section 3.4.3 page 84). The critical parts are always installed along with the
- standard installation, so don't panic;-)
-
- 386
-
-
-
- 16.4. The SuSE Linux Help System
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.7: Homepage of the help system (lynx)
-
-
- package apache, series n: Apache, the local WWW server.
- package sdb, series doc: Basic search functionality for the SDB.
- package sdb de, series doc: The articles of the Support Database (SDB),
- in German.
- package susepak, series doc: For studying package descriptions. . .
- package howtodeh, series doc: Howto documents, German.
- package howtoenh, series doc: Howto documents, English Version (gen-
- erally more up to date than the translations).
- package ldp, series doc: Books, FAQs, etc. of the Linux Documentation
- Project (LDP) in HTML.
- package rman, series ap: Contains http-rman.
- package inf2htm, series doc: This is for reading Texinfo documents (see
- Section 1.4.3 page 5) with your web browser. The documents are con-
- verted "on-the-fly".
- package dochost, series n: A centralized document server. Please read
- /usr/doc/packages/dochost/README.SuSE!
- package htdig, series n: Creates an index for every WWW document
- found on the local host or in the local network. Turns your host into a
- mini web crawler.
-
- The package dochost and the package htdig are not necessarily needed,
- but they enhance the functionality of working with the help system.
-
- 16.4.1 Standalone and Server Configuration
- In /etc/rc.config you should set the variables for a standalone machine
- as listed in File contents 16.4.1 on the following page (preferably with YaST,
- as explained in Section 3.6.11 page 101 and especially in page 406). This
- implies that your machine is named helios.cosmos.com, otherwise you
- will have to enter the name you assigned.
-
- 387
-
-
-
- 16. Special Features of SuSE Linux
-
-
- START_INETD="yes"
- START_HTTPD="yes"
- DOC_SERVER="yes"
- DOC_HOST="helios.cosmos.com"
- DOC_ALLOW="LOCAL .cosmos.com"
-
- File contents 16.4.1: /etc/rc.config for standalone and server systems
-
-
- Please make sure that the HTTP server (apache) is started at boot up. The
- web server is activated via START HTTPD (value: yes).
- DOC SERVER assigns whether this host serves as document server. This
- has to be set to yes if you want to access the documents on a standalone
- machine. DOC HOST sets the name of the document server (in this example:
- helios.cosmos.com). DOC ALLOW is for security reasons. Here you
- may set hosts that are allowed to view the manpages. If you want to allow a
- whole domain do not forget the `.' in front!
-
- Please be aware that you need to run SuSEconfig after changing the
- variables. If you make changes with YaST, SuSEconfig is launched
- automatically.
-
- Full-text search is available as soon as the indices for ht://Dig (package ht-
- dig) have been created. At the moment these are approximately 70 MB in
- size. There should be at least 200 MB of free space below /opt/www/
- htdig. The program is initialized by entering:
- earth: # suserundig
- /usr/sbin/suserundig parses /opt/www/htdig/conf/susedig.
- conf and creates index files. If you update the HTML documents you need
- to re-run /usr/sbin/suserundig.
-
- 16.4.2 Client Configuration
-
- You might not want to install all the help system on every machine in your
- local network. On the client you just need to install the base package do-
- chost, series n and set the variables in /etc/rc.config as listed in File
- contents 16.4.2.
-
-
- DOC_SERVER="no"
- DOC_HOST="helios.cosmos.com"
- DOC_ALLOW=""
-
-
- File contents 16.4.2: /etc/rc.config for a client
-
- This obviously only works if the documentation is installed on
- helios.cosmos.com.
-
- 388
-
-
-
- 16.5. The SuSE Rescue System
-
- 16.4.3 Using the Help System
- If the help system was installed as described above you can invoke it by typing
- susehelp. You can also enter the following URL directly into your WWW
- browser: http://localhost/doc/susehilf/index.html or
- http://sonne.kosmos.all/doc/susehilf/index.html; he-
- lios.cosmos.com will only work, of course, if your computer or the
- document server has this name.
-
- 16.5 The SuSE Rescue System
-
- Overview
- SuSE Linux contains ¡ independent of the installation system ¡ a standalone
- Linux-rescue system3 with which you can, in emergencies, reach all your
- Linux partitions on the hard drives again "from the outside". The rescue sys-
- tem consists of a careful selection of help programs,providing you with suffi-
- cient tools to be able to remedy a large variety of problems with inaccessible
- hard drives, misconfigured configuration files, etc.
- The rescue system consists of a boot disk or a bootable CD and a "rescue" sys-
- tem, which in SuSE Linux can be loaded from quite different media (floppy
- disks, CD, from the network, even directly from the SuSE-FTP server).
- Since you can re-create the boot disk at any time from the appropriate image
- file on the CD, in /disks, this forms quite a secure fallback. Apart from the
- boot disk, at the minimum only the file /disks/rescue is needed form
- the CD, which contains the compressed image of a small root file system. If
- you write this file with the Linux commands
- earth: # /sbin/badblocks -v /dev/fd0 1440
- earth: # dd if=/cdrom/disks/rescue of=/dev/fd0 bs=18k
- or using the DOS command (assuming Q: is your CD-ROM in DOS):
- Q:\dosutils> rawrite.exe
- onto a second error-free "rescue-disk", you can also load the rescue system
- from the boot disk and from this rescue disk; the rescue disk can also be
- created with YaST (see Section 3.6.2 page 93). The rescue disk is currently
- based on libc5; only in this way is it possible to store certain programs on the
- floppy disk (an Editor, fdisk, e2fsck etc.) ¡ the glibc would be too large to
- fit.
- ....Please bear in mind that you cannot mount the rescue disk by itself, because
- it does not contain a filesystem, but a compressed image (the uncompressed
- image would take up to 3.5 MB space, too large to fit on a floppy disk). If you
- want to look at the rescue disk image, you have to decompress it in advance
- and then mount it (your username must be `root'). Provided that your
- Linux kernel supports the loop device, you can enter:
- earth: # cp /cdrom/disks/rescue /root/rescue.gz
- earth: # gunzip /root/rescue.gz
- earth: # mount -t ext2 -o loop /root/rescue /mnt
- 3 to be precise, there are now two of these (more on this below) ¡ or even three, if you are
- inclined to also regard the startable "live filesystem" as a rescue system; this Live-Filesystem
- can be bought separately, at a small price
-
- 389
-
-
-
- 16. Special Features of SuSE Linux
-
- Now you can have a look at the contents of the rescue disk in /mnt.
-
- Always have some extra boot disks at hand! Creating such a disk does
- not take long-much less time than searching for a disk in an emergency.
- In such an emergency, you can be sure that your CD-ROM will not work
- either (Murphy's law...)!
-
- Launching the Rescue System
- The rescue system, like a normal installation, is launched using the SuSE
- boot disk or from the bootable CD 1. The individual steps:
- 1. Requirements: The floppy drive or CD-ROM must be bootable (if not,
- you must run CMOS setup to modify the settings).
- 2. Launch the system with the SuSE boot disk or with CD 1. At the boot
- prompt either enter yast1 or manual; for manual you have the option
- of loading the necessary kernel modules independently.
- 3. Enter the language, keyboard, etc., as in the installation with linuxrc, until
- you get to the main menu.
- 4. Now select `Installation/Start system'.
- 5. Insert the CD or the disk containing the compressed image of the rescue
- system.
- 6. In the main menu select `Start installation / system'.
- 7. If you started with the boot disk, you should now insert the installation-
- CD or the rescue disk with the compressed image of the rescue system.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Figure 16.8: Source media in linuxrc
-
- 8. In the menu `Start installation/system' select the item
- `Start rescue system' (see Figure 16.5 page 386) and then
- specify the desired source medium (Figure 16.8):
- `CD-ROM': this is the "normal way". linuxrc will load a convenient
- system (.../suse/images/rescue). In order to to do this, the
-
- 390
-
-
-
- 16.5. The SuSE Rescue System
-
- computer must have at least 16 MB RAM (memory), 24 MB would
- be preferable. ¡ the directory /cdrom is exported at the same time,
- by the way; thus it is also possible to start the rescue system easily
- and then to perform a network installation from this CD (you should
- provide /etc/rc.config with the necessary values and then run
- SuSEconfig; see Section 17.5 page 399 pp.).
- `Network (NFS)': obtain the rescue system via NFS from the
- network; for this, of course, you have to have the driver for your net-
- work card already installed; refer also to the general hints in Sec-
- tion 2.4.2 page 43.
- `Network (FTP)': obtaining the rescue system via FTP from the
- network; don't forget the network card driver!
- `Hard drive': load the rescue system from the hard drive.
- `Floppy Disk': Start the rescue system from the floppy disk, as
- described above; this variation also works even if the computer only
- has a small amount of RAM.
-
- The rescue system is now decompressed, loaded onto a RAM floppy disk as
- a new root filesystem, mounted and started. Now it is ready for use.
-
- Working with the Rescue System
-
- The rescue system provides three virtual consoles on keys Alt + F1 to Alt
-
- + F3
- . Here `root' may log in without a password. Alt + F4 brings you
- to the system console where you can view the kernel and syslog messages.
- A shell and lots of other useful utilities (net tools) can be found in /bin. In
- sbin you can find e2fsck which is very useful for checking and repairing
- filesystems.
- In sbin, there are some important binaries for system maintenance, such as
- fdisk, mkfs, mkswap, mount, mount, init, shutdown, as well as ifconfig,
- route, and netstat for maintaining the network.
- An editor, vi, is located in /usr/bin. Also, tools like (grep, find, less, etc.)
- and, most important of all, telnet, are available.
- /mnt/usr/bin.
-
- Example: Accessing Your Normal System
- To mount a Linux system using the rescue system, you should use the mount
- point /mnt. You can, of course, also use or create another directory.
- As an example, let's assume that your normal system is put together according
- to the /etc/fstab shown in the example file 16.5.1 on the next page.
- Consider the following example: Assuming your system is configured ac-
- cording to the /etc/fstab given in File contents 16.5.1 on the following
- page, then you may mount it step by step to /mnt. Just execute the following
- commands in order:
- earth:/ # mount /dev/sdb3 /mnt
- earth:/ # mount /dev/sdb6 /mnt/usr
- 391
-
-
-
- 16. Special Features of SuSE Linux
-
-
- /dev/sdb5 swap swap defaults 0 0
- /dev/sdb3 / ext2 defaults 1 1
- /dev/sdb6 /usr ext2 defaults 1 2
-
- File contents 16.5.1: Example /etc/fstab for system recovery
-
- Now you can access your entire system and, e. g., correct mistakes in config-
- uration files such as /etc/fstab, /etc/passwd, and /etc/inittab.
- These files will now be located in /mnt/etc, of course, instead of /etc!
- Every experienced Linux user will print out a hardcopy of the file /etc/
- fstab and save the output of the command
- earth: # fdisk -l /dev/<disk>
- "in a safe place"; instead of <disk> you should insert, in order, the device
- names of your hard drives, e.g. hda (see the list in Section D.1 page 469).
- Even completely lost partitions can often be retrieved with the Linux fdisk,
- simply by re-creating the partition, if you know exactly where the partitions
- were located on the hard drive previously.
-
- Example: Repairing Filesystems
- Damaged filesystems are tricky problems for the rescue system. This could
- happen after an unscheduled shutdown caused by power failure or a system
- crash. Generally, filesystems cannot be repaired on a running system. If you
- encounter really severe problems, you may not even be able to mount your
- root filesystem and have the system boot end up in a "kernel panic".
- Here, the only chance is to repair the system from the "outside" using a rescue
- system.
- The SuSE Linux rrescue system contains the utilities e2fsck and, for problem
- diagnosis, dumpe2fs. These should cover most problems. In an emergency,
- there normally are no manpages available. That is why we have included
- them in this manual in Appendix E page 475.
- Example:
- If mounting a filesystem fails due to an invalid superblock, then e2fsck would
- most probably fail too. If this were the case, your superblock may be cor-
- rupted too. There are copies of the superblock located every 8192 blocks
- (8193, 16385, . . . ). If your superblock got corrupted, you can try one of the
- copies instead. This is accomplished by entering the command:
- earth: # e2fsck -f -b 8193 /dev/damaged partition
- The -f option forces the filesystem check and overrides e2fsck's error so that
- ¡ since the superblock copy is intact ¡ everything is fine.
-
- 16.6 Hints on Special Software Packages
-
- 16.6.1 package cron
- The cron tables are now located in /var/cron/tabs (and not, as pre-
- viously, in /var/lib/cron). /etc/crontab serves as a system wide
-
- 392
-
-
-
- 16.7. Keyboard Layout
-
- cron table. You need to enter the name of the user who should run the com-
- mand directly after the timetable (see File contents 16.6.1, here `root' is
- entered); package-specific tables, located in /etc/cron.d have the same
- format ¡ see manpage for cron (man 8 cron).
-
-
- 1-59/5 * * * * root test -x /usr/sbin/atrun && /usr/sbin/atrun
-
-
- File contents 16.6.1: Example of an entry in /etc/crontab
-
- /etc/crontab can not be processed with crontab -e but must be
- loaded directly into an editor, modified, and then saved.
- A number of packages install shell scripts to the directories /etc/cron.
- hourly, /etc/cron.daily, /etc/cron.weekly and /etc/
- cron.monthly, whose instructions are controlled by /usr/lib/cron/
- run-crons. /usr/lib/cron/run-crons is run every 15 minutes
- from the main table (/etc/contrab); this guarantees that processes which
- may possibly have been neglected can be .... re-done in time ..... rechtzeitig
- nachgeholt werden. You should not be surprised if, shortly after booting
- the user `nobody' turns up in the process tables and is highly active; this
- probably means that `nobody' is just updating the locate database (see
- Section 17.6 page 409).
-
- 16.6.2 package curses
-
- On the CD you will find the package ncurses. The corresponding libraries
- are named libncurses.so.<xx>. This means that some Makefiles have
- to be adapted to link ncurses. Packages of your own should be linked with
- the command -lncurses, and never with -lcurses. For those who want
- to use curses anyway, try:
- -I/usr/include/termcap -I/usr/include/curses
- -L/usr/lib/termcap -L/usr/lib/curses
-
- 16.6.3 Manpages
-
- For some GNU applications (e. g., tar) the manpages are no longer main-
- tained. They have been replaced by info files. Info (info) is GNU's hyper-
- text system. Typing info info gives you a starting help in using info.
- info can be launched via emacs -f info or on its own: info. The
- programs tkinfo and xinfo are easy to use, or you can access the help
- system: 16.4 page 386.
-
-
- 16.7 Keyboard Layout
-
- In order to standardize the keyboard mapping of programs, changes were
- made to the following files:
-
- 393
-
-
-
- 16. Special Features of SuSE Linux
-
- /usr/lib/X11/Xmodmap
- /etc/inputrc
- /etc/skel/.exrc
- /etc/skel/.less
- /etc/skel/.lesskey
- /etc/csh.cshrc
- /etc/termcap
- /usr/lib/terminfo/x/xterm
- /usr/lib/X11/app-defaults/XTerm
- /usr/share/emacs/20.5/site-lisp/term/*.el
- /usr/lib/joerc
- These changes only affect applications that make use of terminfo entries
- or whose configuration files are changed directly (vi, less, etc.). Other,
- non-SuSE applications should be adjusted to these defaults.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 394
-
-
-
-