SUSE Linux Enterprise Server 10 Installation and Administration
SUSE Linux Enterprise Server 10 Installation and Administration
Server
10 www.novell.com
May 11, 2007 Installation and Administration
Installation and Administration
All content is copyright © Novell, Inc.
Legal Notice
This manual is protected under Novell intellectual property rights. By reproducing, duplicating or
distributing this manual you explicitly agree to conform to the terms and conditions of this license
agreement.
This manual may be freely reproduced, duplicated and distributed either as such or as part of a bundled
package in electronic and/or printed format, provided however that the following conditions are ful-
filled:
That this copyright notice and the names of authors and contributors appear clearly and distinctively
on all reproduced, duplicated and distributed copies. That this manual, specifically for the printed
format, is reproduced and/or distributed for noncommercial use only. The express authorization of
Novell, Inc must be obtained prior to any other use of any manual or part thereof.
For Novell trademarks, see the Novell Trademark and Service Mark list http://www.novell
.com/company/legal/trademarks/tmlist.html. * Linux is a registered trademark of
Linus Torvalds. All other third party trademarks are the property of their respective owners. A trademark
symbol (®, ™ etc.) denotes a Novell trademark; an asterisk (*) denotes a third party trademark.
All information found in this book has been compiled with utmost attention to detail. However, this
does not guarantee complete accuracy. Neither Novell, Inc., SUSE LINUX Products GmbH, the authors,
nor the translators shall be held liable for possible errors or the consequences thereof.
Contents
Part I Deployment 1
2 Deployment Strategies 7
2.1 Deploying up to 10 Workstations . . . . . . . . . . . . . . . . . . . 7
2.2 Deploying up to 100 Workstations . . . . . . . . . . . . . . . . . . 9
2.3 Deploying More than 100 Workstations . . . . . . . . . . . . . . . 16
5 Automated Installation 81
5.1 Simple Mass Installation . . . . . . . . . . . . . . . . . . . . . . 81
5.2 Rule-Based Autoinstallation . . . . . . . . . . . . . . . . . . . . . 93
5.3 For More Information . . . . . . . . . . . . . . . . . . . . . . . 98
1 1 OpenWBEM 227
11.1 Setting Up OpenWBEM . . . . . . . . . . . . . . . . . . . . . . 229
11.2 Changing the OpenWBEM CIMOM Configuration . . . . . . . . . . . 234
11.3 For More Information . . . . . . . . . . . . . . . . . . . . . . 254
2 2 Virtualization 421
22.1 System and Software Requirements . . . . . . . . . . . . . . . . . 422
22.2 Virtualization Infrastructure . . . . . . . . . . . . . . . . . . . . 425
22.3 Installing Virtualization Software . . . . . . . . . . . . . . . . . . 426
22.4 Starting the Virtualization Host Server . . . . . . . . . . . . . . . . 427
22.5 Managing Virtual Machines . . . . . . . . . . . . . . . . . . . . 428
22.6 Creating Virtual Machines . . . . . . . . . . . . . . . . . . . . 431
22.7 Windows Server 2003 Virtual Machines . . . . . . . . . . . . . . . 432
22.8 For More Information . . . . . . . . . . . . . . . . . . . . . . 433
3 4 DHCP 635
34.1 Configuring a DHCP Server with YaST . . . . . . . . . . . . . . . . 636
34.2 DHCP Software Packages . . . . . . . . . . . . . . . . . . . . . 647
34.3 The DHCP Server dhcpd . . . . . . . . . . . . . . . . . . . . . 648
34.4 For More Information . . . . . . . . . . . . . . . . . . . . . . 651
3 7 Samba 695
37.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
37.2 Starting and Stopping Samba . . . . . . . . . . . . . . . . . . . 697
37.3 Configuring a Samba Server . . . . . . . . . . . . . . . . . . . . 697
37.4 Configuring Clients . . . . . . . . . . . . . . . . . . . . . . . . 703
37.5 Samba as Login Server . . . . . . . . . . . . . . . . . . . . . . 704
37.6 Samba Server in the Network with Active Directory . . . . . . . . . . 705
37.7 Migrating a Windows NT Server to Samba . . . . . . . . . . . . . . 707
37.8 For More Information . . . . . . . . . . . . . . . . . . . . . . 709
Index 949
About This Guide
This guide is intended for use by professional network and system administrators during
the actual planning, deployment, configuration, and operation of SUSE Linux Enter-
prise®. As such, it is solely concerned with ensuring that SUSE Linux Enterprise is
properly configured and that the required services on the network are available to allow
it to function properly as initially installed. This guide does not cover the process of
ensuring that SUSE Linux Enterprise offers proper compatibility with your enterprise's
application software or that its core functionality meets those requirements. It assumes
that a full requirements audit has been done and the installation has been requested or
that a test installation, for the purpose of such an audit, has been requested.
Deployment
Before you install SUSE Linux Enterprise, choose the deployment strategy and
disk setup that is best suited for your scenario. Learn how to install your system
manually, how to use network installation setups, and how to perform an autoinstal-
lation. Configure the installed system with YaST to adapt it to your requirements.
Administration
SUSE Linux Enterprise offers a wide range of tools to customize various aspects
of the system. This part introduces a few of them.
System
Learn more about the underlying operating system by studying this part. SUSE
Linux Enterprise supports a number of hardware architectures and you can use this
to adapt your own applications to run on SUSE Linux Enterprise. The boot loader
and boot procedure information assists you in understanding how your Linux system
works and how your own custom scripts and applications may blend in with it.
Services
SUSE Linux Enterprise is designed to be a network operating system. It offers a
wide range of network services, such as DNS, DHCP, Web, proxy, and authentica-
tion services, and integrates well into heterogeneous environments including MS
Windows clients and servers.
Security
This edition of SUSE Linux Enterprise includes several security-related features.
It ships with Novell® AppArmor, which enables you to protect your applications
by restricting privileges. Secure login, firewalling, and file system encryption are
covered as well.
Troubleshooting
SUSE Linux Enterprise includes a wealth of applications, tools, and documentation
should you need them in case of trouble. Some of the most common problems that
can occur with SUSE Linux Enterprise and their solutions are discussed in detail.
1 Feedback
We want to hear your comments and suggestions about this manual and the other doc-
umentation included with this product. Please use the User Comments feature at the
bottom of each page of the online documentation and enter your comments there.
2 Documentation Updates
For the latest version of this documentation, see the SUSE Linux Enterprise Server
Web site [http://www.novell.com/documentation/sles10/index
.html].
3 Additional Documentation
For additional documentation on this product, refer to http://www.novell.com/
documentation/sles10/index.html:
Start-Up Guide
Basic information about installation types and work flows.
Architecture-Specific Information
Architecture-specific information needed to prepare a SUSE Linux Enterprise
Server target for installation.
Heartbeat Guide
An in-depth administration guide to setting up high availability scenarios with
Heartbeat.
For a documentation overview on the SUSE® Linux Enterprise Desktop product, refer
to http://www.novell.com/documentation/sled10/index.html. The
following manuals are exclusively available for SUSE Linux Enterprise Desktop:
Deployment Guide
An in-depth guide for administrators facing the deployment and management of
SUSE Linux Enterprise Desktop.
Many chapters in this manual contain links to additional documentation resources. This
includes additional documentation that is available on the system as well as documen-
tation available on the Internet.
• Alt, Alt + F1: a key to press or a key combination; keys are shown in uppercase as
on a keyboard
• ►amd64 ipf: This paragraph is only relevant for the specified architectures. The
arrows mark the beginning and the end of the text block.◄
►ipseries s390 zseries: This paragraph is only relevant for the specified architec-
tures. The arrows mark the beginning and the end of the text block.◄
YaST
Several new configuration options have been developed for YaST. These are nor-
mally described in the chapters about the technology involved.
SPident
The management utility SPident gives an overview of the installed software base
and clarifies the current service pack level of the system.
Directory Services
Several LDAP-compliant directory services are available:
• Microsoft Active Directory
• OpenLDAP
iSCSI
iSCSI provides an easy and reasonably inexpensive solution for connecting Linux
computers to central storage systems. Find more information about iSCSI in
Chapter 12, Mass Storage over IP Networks—iSCSI (page 257).
Heartbeat 2
Heartbeat 2 provides a cluster membership and messaging infrastructure. The setup
of such a cluster is described in the Heartbeat Guide.
Multipath I/O
Device mapping multipath IO features automatic configuration of the subsystem
for a large variety of setups. For details, see the chapter about multipath I/O in
Storage Administration Guide.
• How many installations should be done? Depending on this, the best deployment
method differs. See also Chapter 2, Deployment Strategies (page 7).
• Will the system be in a hostile environment? Have a look at Chapter 49, Security
and Confidentiality (page 879) to get an overview of consequences.
• How will you get regular updates? All patches are provided online for registered
users. Find the registration and patch support database at http://www.novell
.com/suselinuxportal.
• Do you need help for your local installation? Novell provides training, support,
and consulting for all topics around SUSE Linux Enterprise. Find more information
about this at http://www.novell.com/products/
linuxenterpriseserver/.
• Do you need third-party products? Make sure that the required product is also
supported on the desired platform. Novell can also provide help to port software
to different platforms when needed.
SUSE Linux Enterprise provides you with a broad variety of services. Find an overview
of the documentation in this book in About This Guide (page xv). Most of the needed
configurations can be made with YaST, the SUSE configuration utility. In addition to
that, many manual configurations are described in the corresponding chapters.
In addition to the plain software installation, you should consider training the end users
of the systems as well as help desk staff.
For optimal security and safe work, you should make regular updates of all the operated
machines. If you have a mission critical server, you should probably run a second
identical machine where you can apply all changes for testing purposes before doing
so on the real system. This also gives you the possibility to switch machines in case of
hardware failure.
Deployment Strategies 7
Table 2.1 Installing from the SUSE Linux Enterprise Media
• Changing media
Remotely Controlled Tasks None, but this method can be combined with VNC
Remotely Controlled Tasks None, but method can be combined with VNC
Before considering a fully-automated approach, take into account that the more complex
the scenario gets the longer it takes to set up. If a time limit is associated with your de-
ployment, it might be a good idea to select a less complex approach that can be carried
out much more quickly. Automation makes sense for huge deployments and those that
need to be carried out remotely.
Deployment Strategies 9
Simple Remote Installation via VNC—Dynamic Network Configuration (page 11)
Consider this approach in a small to medium scenario with dynamic network setup
through DHCP. A network, network installation server, and VNC viewer application
are required.
Remote Installation via VNC—PXE Boot and Wake on LAN (page 12)
Consider this approach in a small to medium scenario that should be installed via
network and without physical interaction with the installation targets. A network,
a network installation server, network boot images, network bootable target hard-
ware, and a VNC viewer application are required.
Remote Installation via SSH—PXE Boot and Wake on LAN (page 13)
Consider this approach in a small to medium scenario that should be installed via
network and without physical interaction with the installation targets. A network,
a network installation server, network boot images, network bootable target hard-
ware, and an SSH client application are required.
Deployment Strategies 11
Details Section 4.1.2, “Simple Remote Installation via
VNC—Dynamic Network Configuration” (page 45)
Table 2.6 Remote Installation via VNC—PXE Boot and Wake on LAN
Table 2.9 Remote Installation via SSH—PXE Boot and Wake on LAN
Deployment Strategies 13
• Configuring DHCP, TFTP, PXE boot, and WOL
or
• Identical hardware
or
• Cross-site deployments
Deployment Strategies 15
Details Section 5.2, “Rule-Based Autoinstallation” (page 93)
It pays off to invest a considerable amount of time to create a sophisticated rule and
class framework in AutoYaST to match the requirements of a huge deployment site.
Not having to touch each target separately can save you a tremendous amount of time
depending on the scope of your installation project.
To install, follow the description of the installation procedure with YaST starting
from Section 3.4, “Language” (page 21).
CD-ROM This is the easiest boot option. This option can be used if the
system has a local CD-ROM drive that is supported by Linux.
PXE or BOOTP This must be supported by the system's BIOS or firmware and a
boot server must be available in the network. This task can also
be handled by another SUSE Linux Enterprise system.
Hard Disk SUSE Linux Enterprise can also be booted from the hard disk.
To do this, copy the kernel (linux) and the installation system
(initrd) from the directory /boot/loader on CD 1 to the
hard disk and add the appropriate entry to the boot loader.
The installation program retrieves the location of the network installation source using
OpenSLP and configures the network connection with DHCP. If the DHCP network
configuration fails, you are prompted to enter the appropriate parameters manually.
The installation then proceeds normally.
Installation
The normal installation mode. All modern hardware functions are enabled.
Installation—ACPI Disabled
If the normal installation fails, this might be due to the system hardware not sup-
porting ACPI (advanced configuration and power interface). If this seems to be the
case, use this option to install without ACPI support.
If you are not sure, try one of the following options first: Installation—ACPI Dis-
abled or Installation—Safe Settings.
Installation—Safe Settings
Boots the system with the DMA mode (for CD-ROM drives) and power management
functions disabled. Experts can also use the command line to enter or change kernel
parameters.
Installation options from the menu disable only the most problematic functions. If you
need to disable or set other functions, use the Boot Options prompt. Find detailed infor-
mation about kernel parameters at http://en.opensuse.org/Linuxrc.
Use the function keys indicated in the bar at the bottom of the screen to change a lan-
guage, resolution of the monitor, or installation source or to add addition driver from
your hardware vendor:
F1
Get context-sensitive help for the active element of the boot screen.
F2
Select the display language for the installation. The default language is English.
F3
Select various graphical display modes for the installation. Select Text Mode if the
graphical installation causes problems.
F5
Press this key to tell the system that you have an optional disk with a driver update
for SUSE Linux Enterprise. With File, load drivers directly from CD before the
installation starts. If you select Yes, you are prompted to insert the update disk at
the appropriate point in the installation process. The default option is No—not to
load a driver update.
A few seconds after starting the installation, SUSE Linux Enterprise loads a minimal
Linux system to run the installation procedure. To see what is going on during the boot
process, press Esc to see the messages and copyright notices. At the end of the loading
process, the YaST installation program starts. After a few more seconds, the screen
should display the graphical installer. The actual installation of SUSE Linux Enterprise
begins at this point.
If the installer does not detect your mouse correctly, use Tab for navigation,
arrow keys to scroll, and Enter to confirm a selection.
3.4 Language
YaST and SUSE Linux Enterprise in general can be configured to use different languages
according to your needs. The language selected here is also used for the keyboard layout.
In addition, YaST uses the language setting to guess a time zone for the system clock.
These settings can be modified later along with the selection of secondary languages
to install on your system.
You can change the language later during installation in the Installation Summary, de-
scribed in Section 3.9, “Installation Summary” (page 26). For information about lan-
guage settings in the installed system, see Section 8.1, “YaST Language” (page 126).
After selecting Configure DASD Disks, an overview lists all available DASDs. To get
a clearer picture of the available devices, use the entry field located above the list to
specify a range of channels to display. To filter the list according to such a range, select
Filter. See Figure 3.1, “IBM System z: Selecting a DASD” (page 22).
Now specify the DASDs to use for the installation by selecting the corresponding entries
in the list then clicking Select or Deselect. After that, activate and make the DASDs
available for the installation by selecting Perform Action > Activate. See Figure 3.2,
“IBM System z: Activating a DASD” (page 23). To format the DASDs, select Perform
Action > Format right away or use the YaST partitioner later as described in Sec-
tion 8.5.7, “Using the YaST Partitioner” (page 149).
To use ZFCP disks for the SUSE Linux Enterprise installation, select Configure ZFCP
Disks in the selection dialog. This opens a dialog with a list of the ZFCP disks available
on the system. In this dialog, select Add to open another dialog in which to enter ZFCP
parameters. See Figure 3.3, “IBM System z: Overview of Available ZFCP Disks”
(page 23).
To make a ZFCP disk available for the SUSE Linux Enterprise installation, use Channel
Number, WWPN (World Wide Port Number), and FCP-LUN to specify the parameters
identifying the corresponding disk. When completed, exit the ZFCP dialog with Next
Adding DASD or zFCP disks is not only possible during the installation workflow,
but also when the installation proposal is shown. To add disks at that stage,
click Expert and scroll down. The DASD and zFCP entries are shown at the very
bottom.
After adding the disks, reread the partition table. Return to the installation
proposal screen and choose Partitioning then select Reread Partition Table.
This reads the new partition table and resets any previously entered information.
New installation
Select this option to start a new installation from scratch.
Other
This option provides an opportunity to abort installation and boot or repair an in-
stalled system instead. To boot an already installed SUSE Linux Enterprise, select
To repair an installed system that fails to boot, select Repair Installed System. Find
a description of the system repair options in Section “Using YaST System Repair”
(page 934).
NOTE
You can choose to install add-on products together with your SUSE Linux Enterprise
system during the initial installation process or at any time later as described in Sec-
tion 8.3.2, “Installing Add-On Products” (page 135). Add-on products are extensions
for your SUSE Linux Enterprise. An add-on product can include proprietary third-party
products or additional software for your system.
To include add-on products during the installation of SUSE Linux Enterprise, select
Include Add-On Products from Separate Media and click Next. In the next dialog, click
Add to select the source from which to install the add-on products. Many source types
are available, such as CD, FTP, or a local directory. After adding the add-on media,
you may need to agree to additional licenses for third-party products. The added source
for add-on media appears in the overview.
You can reset all changes to the defaults by clicking Change > Reset to Defaults.
YaST then shows the original proposal again.
►zseries: On the IBM System z platforms, the installation is performed from a remote
terminal. The host as such has no keyboard or mouse locally connected to it. ◄
3.9.2 Partitioning
In most cases, YaST proposes a reasonable partitioning scheme that can be accepted
without change. YaST can also be used to customize the partitioning, but only experi-
enced users should change partitioning.
When you select the partitioning item in the suggestion window for the first time, the
YaST partitioning dialog displays the proposed partition settings. To accept these set-
tings, click Accept Proposal.
To make small changes in the proposal, select Base Partition Setup on This Proposal
and adjust partitioning in the next dialog. For completely different partitioning, select
Create Custom Partition Setup. In the next dialog, choose the disk to partition or Custom
Partitioning. The YaST partitioner provides tools for LVM and EVMS creation. To
create an LVM proposal, select Create LVM Based Proposal. To create an EVMS
proposal, select Create EVMS Based Proposal. For more information about custom
partitioning, refer to Section 8.5.7, “Using the YaST Partitioner” (page 149).
The partitioning scheme proposed should have sufficient disk space. If implementing
your own partitioning scheme, consider the following recommendations concerning
the requirements for different system types.
3.9.3 Software
SUSE Linux Enterprise contains a number of software packages for various application
purposes. Click Software in the suggestion window to start the software selection and
modify the installation scope according to your needs. Select your categories from the
list in the middle and see the description in the right window. Each category contains
a number of software packages that meet most requirements for that category. For more
detailed selection of software packages to install, select Details to switch to the YaST
You can also install additional software packages or remove software packages from
your system at any time later. For more information, refer to Section 8.3.1, “Installing
and Removing Software” (page 127) .
The default desktop of SUSE Linux Enterprise is GNOME. To install KDE, click
Software and select KDE Desktop Environment from Graphical Environments.
Figure 3.5 Installing and Removing Software with the YaST Package Manager
3.9.4 Language
To change the system language or to configure support for secondary languages, select
Language. Select the language from the list. The primary language is used as the system
language. To have support for other languages, select these languages as secondary
languages. For more information, see Section 8.5.15, “Language Selection” (page 158).
System
This dialog presents all the hardware information YaST could obtain about your
computer. Select any item in the list and click Details to see detailed information
about the selected item. Also add PCI IDs to device drivers with this dialog.
Add-On Products
The added source for add-on media appears in the overview. Before you start the
installation of the SUSE Linux Enterprise, add, remove, or modify add-on products
here if needed.
Booting
►zseries: This module cannot be used to configure the boot loader (zipl) on the
IBM System z platforms. ◄
During installation, YaST proposes a boot configuration for your system. Normally,
you can leave these settings unchanged. However, if you need a custom setup,
modify the proposal for your system. For information, see Section 20.3, “Config-
uring the Boot Loader with YaST” (page 398).
Time Zone
This is the same as the configuration shown earlier in installation. See Section 3.8,
“Time Zone” (page 25) for details.
Default Runlevel
SUSE Linux Enterprise can boot to different runlevels. Normally there should be
no need to change anything here, but if necessary set the default runlevel with this
dialog. Refer to Section 19.2.3, “Configuring System Services (Runlevel) with
YaST” (page 382) for information about runlevel configuration.
Some software can require the license confirmation. If your software selection includes
such software, YaST displays a license confirmation dialog after you click Accept. To
install the software, read the license and click I Agree. If you do not agree with the li-
cense, click I Disagree. The software then is not installed on your system.
LPAR Installation
In the IBM System z HMC, select LOAD, select Clear, then enter the loading ad-
dress (the device address of the root device). If using a ZFCP disk as the boot device,
choose LOAD from SCSI and specify both ZFCP WWPN and LUN of the boot
device. Now start the loading process.
z/VM Installation
Shut down the installed system with the halt command. Log in to the VM guest
as LINUX1 and proceed to IPL the installed system. If using a ZFCP disk as the
boot device, specify both the ZFCP WWPN and LUN of the boot device before
initiating the IPL. The parameter length is limited to eight characters. Longer
numbers must be separated by spaces:
If connecting using a Java-capable browser, enter the complete URL, consisting of the
IP address of the installed system along with the port number, in the following fashion:
Using X to Connect
When IPLing the installed system, make sure that the X server used for the first phase
of the installation is still available. YaST opens on this X server to finish the installation.
Start SSH in an xterm. Other terminal emulators lack complete support for the
text-based interface of YaST.
A message in the 3270 terminal asks you to connect to the Linux system with an SSH
client. This message is easily missed, however, because it is mixed with kernel messages
and because the terminal process might quit before you become aware of the message.
YaST then starts to complete the installation of the remaining packages and create an
initial system configuration.
First, provide a password for the account of the system administrator (the root user).
You can then configure your Internet access and network connection. With a working
Internet connection, you can perform an update of the system as part of the installation.
You can also configure an authentication server for centralized user administration in
a local network. Finally, configure the hardware devices connected to the machine.
For verification purposes, the password for root must be entered twice. Do not forget
the root password. Once entered, this password cannot be retrieved.
3.11.2 Hostname
The hostname is the computer's name in the network. The domain name is the name of
the network. A hostname and domain are proposed by default. If your system is part
of a local network or should be accessible from the Internet, the domain name used
here must be that expected by the network or Internet. For a system in a local network,
the hostname should be unique in the network.
In many networks, the system receives its hostname over DHCP, in which case you
should not modify the name. Instead select Change Hostname via DHCP.
To be able to access your system using this hostname, select Write Hostname to
/etc/hosts. This assigns the IP address 127.0.0.2 to the name, both with and without the
domain.
To change hostname settings at any time after installation, use YaST Network Devices
> Network Card. For more information, see Section 30.4.1, “Configuring the Network
Card with YaST” (page 560).
3.11.3 Network
TIP: IBM System z: Network Configuration
To configure your network connection later, select Skip Configuration and click Next.
Network hardware can also be configured after the system installation has been com-
pleted. If you skip the network device configuration, your system is left offline and is
unable to retrieve any available updates.
As well as device configuration, configure some other network settings in this step:
Firewall Configuration
When you connect to a network, a firewall is started automatically on the configured
interface. The configuration proposal for the firewall is updated automatically every
time the configuration of the interfaces or services is modified. To adapt the auto-
matic settings to your own preferences, click Change > Firewall. In the dialog that
opens, determine whether the firewall should be started. If you do not want the
firewall to be started, select the appropriate option and exit the dialog. To start and
configure the firewall, click Next for a series of dialogs similar to those described
in Section 43.4.1, “Configuring the Firewall with YaST” (page 822).
IPv6
By default the IPv6 support is enabled. To disable it, click Disable IPv6. For more
information about IPv6, see Section 30.2, “IPv6—The Next Generation Internet”
(page 550).
Proxy
If you have a proxy server in your network to control access to the Internet, enter
the server name and all other required information to enable access to the Internet.
Reset the network settings to the original proposed values by clicking Change
> Reset to Defaults. This discards any changes made.
After configuring an Internet connection, you can test it. For this purpose, YaST estab-
lishes a connection to the SUSE Linux Enterprise server and downloads the latest release
notes. Read them at the end of the installation.
To start the test, select Yes, Test Connection to the Internet and click Next. In the next
dialog, view the progress of the test and the results. If the test fails, click Back to return
in the previous dialog and correct the configuration or skip the test. If you need more
information about the test process, click View Logs.
If you do not want to test the connection at this point, select No, Skip This Test then
Next. This also skips downloading release notes, configuring the customer center, and
updating online.
If you have multiple network interfaces in your system, verify that the the desired card
is used to connect to the Internet. To do so, click Change device.
If you are offline or want to skip this step, select Configure Later. This also skips SUSE
Linux Enterprise online update.
In Include for Convenience, select whether to obtain some of the necessary information
from your system. This simplifies the registration process. To keep your installation
sources valid, select Regularly Synchronize with Customer Center. This option checks
your installation sources and adds new available sources or removes obsolete sources.
It does not touch manually added sources. Additionally, it resends your hardware infor-
mation if Hardware Information is activated, which can make new hardware-specific
sources available. To see what is required to register your system or what happens with
your data, use Details.
If YaST was able to connect to the SUSE Linux Enterprise servers, select whether to
perform a YaST online update. If there are any patched packages available on the
servers, download and install them now to fix known bugs or security issues.
3.11.6 Services
After testing the Internet connection and downloading the first updates, a dialog opens
in which to enable and configure two important network services. See Figure 3.6,
“Proposed Setup for Network Services” (page 37).
CA Management
The purpose of a CA (certificate authority) is to guarantee a trust relationship among
all network services communicating with each other. Without a CA, you can secure
server communications with SSL and TLS separately for each individual service.
By default, a CA is created and enabled during the installation. Find details about
the creation of a CA with YaST in Chapter 42, Managing X.509 Certification
(page 801).
OpenLDAP Server
You can run an LDAP service on your host to have a central facility manage a
range of configuration files. Typically, an LDAP server handles user account data,
but with SUSE Linux Enterprise it can also be used for mail, DHCP, and DNS data.
By default, an LDAP server is set up during the installation. If you decide against
the use of an LDAP server, the YaST mail server module does not work because
it depends on LDAP functionality. However, you can still set up a mail server on
your system with the help of the Mail Transfer Agent module. Find details about
LDAP and its configuration with YaST in Chapter 36, LDAP—A Directory Service
(page 661).
If preferred, you can skip this configuration proposal for now. After the installation is
finished, configure and start the same services with the help of YaST.
Restore the defaults by clicking Change > Reset to Defaults. This discards any
changes made.
3.11.7 Users
If network access was configured successfully during the previous steps of the installa-
tion, you now have the following possibilities to manage user administration method
on your system:
Local (/etc/passwd)
Users are administered locally on the installed host. This is a suitable option for
stand-alone workstations. User data is managed by the local file /etc/passwd.
All users who are entered in this file can log in to the system even if no network
is available.
If YaST found a former version of SUSE Linux Enterprise or another system using
/etc/passwd, it offers the possibility to import local users. To do so, check
Read User Data from a Previous Installation and click Choose. In the next dialog,
select the users to import and click OK.
LDAP
Users are administered centrally on an LDAP server for all systems in the network.
NIS
Users are administered centrally on a NIS server for all systems in the network.
Windows Domain
SMB authentication is often used in mixed Linux and Windows networks.
If you use the custom package selection and one or more authentication
methods are missing from the menu, the required packages probably are not
installed.
Along with the selected user administration method, you can use Kerberos authentication.
This is essential for integrating your SUSE Linux Enterprise to an Active Directory
domain, which is described in Section 37.6, “Samba Server in the Network with Active
Directory” (page 705). To use Kerberos authentication, select Set Up Kerberos Authen-
tication.
3.11.8 Clean Up
This step does not require any user interaction. The installation program launches the
SuSEconfig script to write the system configuration. Depending on the CPU and the
amount of memory, this process can take some time.
However, you should configure the graphics card right away. Although the display
settings as configured by YaST should be generally acceptable, most users have very
strong preferences as far as resolution, color depth, and other graphics features are
concerned. To change these settings, select the respective item and set the values as
desired. To test your new configuration, click Test the Configuration.
You can cancel changes by clicking Change > Reset to Defaults. YaST then shows
the original proposal again.
AutoYaST is a system for installing one or more SUSE Linux Enterprise systems auto-
matically without user intervention. AutoYaST installations are performed using a
control file with installation and configuration data. For detailed information, refer to
Chapter 5, Automated Installation (page 81). Finish the installation of SUSE Linux
Enterprise with Finish in the final dialog.
SUSE Linux Enterprise is now installed. Unless you enabled the automatic login function
or customized the default runlevel, you should see the graphical login on your screen
in which to enter a username and password to log in to the system. If automatic login
is activated, the desktop starts automatically.
Each method is introduced by means of two short check lists: one listing the prerequisites
for this method and the other illustrating the basic procedure. More detail is then pro-
vided for all the techniques used in these installation scenarios.
NOTE
In the following sections, the system to hold your new SUSE Linux Enterprise
installation is referred to as target system or installation target. The term instal-
lation source is used for all sources of installation data. This includes physical
media, such as CD and DVD, and network servers distributing the installation
data in your network.
Remote Installation 43
IMPORTANT
The configuration of the X Window System is not part of any remote installation
process. After the installation has finished, log in to the target system as root,
enter telinit 3, and start SaX2 to configure the graphics hardware.
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• Controlling system with working network connection and VNC viewer software
or Java-enabled browser (Firefox, Konqueror, Internet Explorer, or Opera)
• Physical boot medium (CD or DVD) for booting the target system
• Valid static IP addresses already assigned to the installation source and the control-
ling system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 52). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 60).
3 When the boot screen of the target system appears, use the boot options prompt
to set the appropriate VNC options and the address of the installation source.
This is described in detail in Section 4.4, “Booting the Target System for Instal-
lation” (page 72).
The target system boots to a text-based environment, giving the network address
and display number under which the graphical installation environment can be
addressed by any VNC viewer application or browser. VNC installations announce
themselves over OpenSLP and can be found using Konqueror in service:/
or slp:/ mode.
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
Remote Installation 45
• Controlling system with working network connection and VNC viewer software
or Java-enabled browser (Firefox, Konqueror, Internet Explorer, or Opera)
• Physical boot medium (CD, DVD, or custom boot disk) for booting the target system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 52). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 60).
2 Boot the target system using the first CD or DVD of the SUSE Linux Enterprise
media kit.
3 When the boot screen of the target system appears, use the boot options prompt
to set the appropriate VNC options and the address of the installation source.
This is described in detail in Section 4.4, “Booting the Target System for Instal-
lation” (page 72).
The target system boots to a text-based environment, giving the network address
and display number under which the graphical installation environment can be
addressed by any VNC viewer application or browser. VNC installations announce
themselves over OpenSLP and can be found using Konqueror in service:/
or slp:/ mode.
To perform this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• TFTP server
• Target system capable of PXE boot, networking, and Wake on LAN, plugged in
and connected to the network
• Controlling system with working network connection and VNC viewer software
or Java-enabled browser (Firefox, Konqueror, Internet Explorer, or Opera)
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 52). Choose an NFS, HTTP, or FTP
network server or configure an SMB installation source as described in Sec-
tion 4.2.5, “Managing an SMB Installation Source” (page 60).
2 Set up a TFTP server to hold a boot image that can be pulled by the target system.
This is described in Section 4.3.2, “Setting Up a TFTP Server” (page 64).
3 Set up a DHCP server to provide IP addresses to all machines and reveal the lo-
cation of the TFTP server to the target system. This is described in Section 4.3.1,
“Setting Up a DHCP Server” (page 62).
4 Prepare the target system for PXE boot. This is described in further detail in
Section 4.3.5, “Preparing the Target System for PXE Boot” (page 71).
Remote Installation 47
5 Initiate the boot process of the target system using Wake on LAN. This is de-
scribed in Section 4.3.7, “Wake on LAN” (page 71).
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• Controlling system with working network connection and working SSH client
software
• Physical boot medium (CD, DVD, or custom boot disk) for the target system
• Valid static IP addresses already assigned to the installation source and the control-
ling system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 52). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 60).
2 Boot the target system using the first CD or DVD of the SUSE Linux Enterprise
media kit.
3 When the boot screen of the target system appears, use the boot options prompt
to set the appropriate parameters for network connection, address of the installa-
tion source, and SSH enablement. This is described in detail in Section 4.4.3,
“Using Custom Boot Options” (page 74).
The target system boots to a text-based environment, giving the network address
under which the graphical installation environment can be addressed by any SSH
client.
4 On the controlling workstation, open a terminal window and connect to the target
system as described in Section “Connecting to the Installation Program”
(page 79).
Remote Installation 49
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• Controlling system with working network connection and working SSH client
software
• Physical boot medium (CD or DVD) for booting the target system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 52). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 60).
2 Boot the target system using the first CD or DVD of the SUSE Linux Enterprise
media kit.
3 When the boot screen of the target system appears, use the boot options prompt
to pass the appropriate parameters for network connection, location of the instal-
lation source, and SSH enablement. See Section 4.4.3, “Using Custom Boot
Options” (page 74) for detailed instructions on the use of these parameters.
The target system boots to a text-based environment, giving you the network
address under which the graphical installation environment can be addressed by
any SSH client.
4 On the controlling workstation, open a terminal window and connect to the target
system as described in Section “Connecting to the Installation Program”
(page 79).
To perform this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• TFTP server
• Running DHCP server for your network, providing a static IP to the host to install
• Target system capable of PXE boot, networking, and Wake on LAN, plugged in
and connected to the network
• Controlling system with working network connection and SSH client software
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 52). Choose an NFS, HTTP, or FTP
network server. For the configuration of an SMB installation source, refer to
Section 4.2.5, “Managing an SMB Installation Source” (page 60).
2 Set up a TFTP server to hold a boot image that can be pulled by the target system.
This is described in Section 4.3.2, “Setting Up a TFTP Server” (page 64).
3 Set up a DHCP server to provide IP addresses to all machines and reveal the lo-
cation of the TFTP server to the target system. This is described in Section 4.3.1,
“Setting Up a DHCP Server” (page 62).
4 Prepare the target system for PXE boot. This is described in further detail in
Section 4.3.5, “Preparing the Target System for PXE Boot” (page 71).
5 Initiate the boot process of the target system using Wake on LAN. This is de-
scribed in Section 4.3.7, “Wake on LAN” (page 71).
Remote Installation 51
6 On the controlling workstation, start an SSH client and connect to the target
system as described in Section 4.5.2, “SSH Installation” (page 79).
TIP
You can even use a Microsoft Windows machine as installation server for your
Linux deployment. See Section 4.2.5, “Managing an SMB Installation Source”
(page 60) for details.
4 Configure the required server type. This step relates to the automatic configuration
of server services. It is skipped when automatic configuration is deactivated.
Define an alias for the root directory of the FTP or HTTP server on which the
installation data should be found. The installation source will later be located
under ftp://Server-IP/Alias/Name (FTP) or under
http://Server-IP/Alias/Name (HTTP). Name stands for the name of
the installation source, which is defined in the following step. If you selected
NFS in the previous step, define wild cards and export options. The NFS server
will be accessible under nfs://Server-IP/Name. Details of NFS and exports
can be found in Chapter 38, Sharing File Systems with NFS (page 711).
Make sure that the firewall settings of your server system allow traffic
on the ports for HTTP, NFS, and FTP. If they currently do not, start the
YaST firewall module and open the respective ports.
5 Configure the installation source. Before the installation media are copied to their
destination, define the name of the installation source (ideally, an easily remem-
bered abbreviation of the product and version). YaST allows providing ISO im-
ages of the media instead of copies of the installation CDs. If you want this, acti-
vate the relevant check box and specify the directory path under which the ISO
files can be found locally. Depending on the product to distribute using this in-
stallation server, it might be that more add-on CDs or service pack CDs are re-
quired and should be added as extra installation sources. To announce your in-
stallation server in the network via OpenSLP, activate the appropriate option.
Remote Installation 53
TIP
6 Upload the installation data. The most lengthy step in configuring an installation
server is copying the actual installation CDs. Insert the media in the sequence
requested by YaST and wait for the copying procedure to end. When the sources
have been fully copied, return to the overview of existing information sources
and close the configuration by selecting Finish.
Your installation server is now fully configured and ready for service. It is auto-
matically started every time the system is started. No further intervention is re-
quired. You only need to configure and start this service correctly by hand if you
have deactivated the automatic configuration of the selected network service
with YaST as an initial step.
To deactivate an installation source, select the installation source to remove then select
Delete. The installation data are removed from the system. To deactivate the network
service, use the respective YaST module.
If your installation server should provide the installation data for more than one product
of product version, start the YaST installation server module and select Add in the
overview of existing installation sources to configure the new installation source.
1 Log in as root.
2 Create a directory that should later hold all installation data and change into this
directory. For example:
mkdir install/product/productversion
cd install/product/productversion
3 For each CD contained in the media kit execute the following commands:
3a Copy the entire content of the installation CD into the installation server di-
rectory:
cp -a /media/path_to_your_CD-ROM_drive .
On SUSE Linux Enterprise Server, you can export the installation sources with NFS
using YaST. Proceed as follows:
1 Log in as root.
4 Select Add Directory and browse for the directory containing the installation
sources, in this case, productversion.
Remote Installation 55
5 Select Add Host and enter the hostnames of the machines to which to export the
installation data. Instead of specifying hostnames here, you could also use wild
cards, ranges of network addresses, or just the domain name of your network.
Enter the appropriate export options or leave the default, which works fine in
most setups. For more information about the syntax used in exporting NFS shares,
read the exports man page.
6 Click Finish. The NFS server holding the SUSE Linux Enterprise installation
sources is automatically started and integrated into the boot process.
If you prefer manually exporting the installation sources via NFS instead of using the
YaST NFS Server module, proceed as follows:
1 Log in as root.
This exports the directory /productversion to any host that is part of this
network or to any host that can connect to this server. To limit the access to this
server, use netmasks or domain names instead of the general wild card *. Refer
to the export man page for details. Save and exit this configuration file.
3 To add the NFS service to the list of servers started during system boot, execute
the following commands:
insserv /etc/init.d/nfsserver
insserv /etc/init.d/portmap
4 Start the NFS server with rcnfsserver start. If you need to change the
configuration of your NFS server later, modify the configuration file and restart
the NFS daemon with rcnfsserver restart.
Announcing the NFS server via OpenSLP makes its address known to all clients in
your network.
1 Log in as root.
4 Save this configuration file and start the OpenSLP daemon with rcslpd start.
For more information about OpenSLP, refer to the package documentation located under
/usr/share/doc/packages/openslp/ or refer to Chapter 31, SLP Services
in the Network (page 599).
2 Configure the FTP server to distribute the contents of your installation directory:
2a Log in as root and install the package vsftpd using the YaST package
manager.
2c Create a subdirectory holding the installation sources in the FTP root direc-
tory:
mkdir instsource
Remote Installation 57
2d Mount the contents of the installation repository into the change root envi-
ronment of the FTP server:
mount --bind path_to_instsource /srv/ftp/instsource
3 Announce the installation source via OpenSLP, if this is supported by your net-
work setup:
Replace instsource with the actual name to the installation source direc-
tory on your server. The service: line should be entered as one continuous
line.
3b Save this configuration file and start the OpenSLP daemon with rcslpd
start.
2c Create a symbolic link from the location of the installation sources to the
root directory of the Web server (/srv/www/htdocs):
ln -s /path_instsource /srv/www/htdocs/instsource
with
Options Indexes FollowSymLinks
3 Announce the installation source via OpenSLP, if this is supported by your net-
work setup:
Remote Installation 59
3b Save this configuration file and start the OpenSLP daemon using rcslpd
restart.
To set up an exported Windows Share holding your SUSE Linux Enterprise installation
sources, proceed as follows:
2 Start Explorer and create a new folder that will hold the entire installation tree
and name it INSTALL, for example.
3 Export this share according the procedure outlined in your Windows documenta-
tion.
4 Enter this share and create a subfolder, called product. Replace product
with the actual product name.
2 Select Installation.
4 Choose SMB and enter the Windows machine's name or IP address, the share
name (INSTALL/product/CD1, in this example), username, and password.
After you hit Enter, YaST starts and you can perform the installation.
1 Download the ISO images and save them to the machine to use as the installation
server.
2 Log in as root.
3 Choose and create an appropriate location for the installation data, as described
in Section 4.2.2, “Setting Up an NFS Installation Source Manually” (page 54),
Section 4.2.3, “Setting Up an FTP Installation Source Manually” (page 57), or
Section 4.2.4, “Setting Up an HTTP Installation Source Manually” (page 58).
5 To mount and unpack each ISO image to the final location, issue the following
command:
Replace path_to_iso with the path to your local copy of the ISO image,
path_to_instsource with the source directory of your server, product
with the product name, and mediumx with the type (CD or DVD) and number
of media you are using.
6 Repeat the previous step to mount all ISO images needed for your product.
Remote Installation 61
4.3 Preparing the Boot of the Target
System
This section covers the configuration tasks needed in complex boot scenarios. It contains
ready-to-apply configuration examples for DHCP, PXE boot, TFTP, and Wake on
LAN.
4 Select Expert Settings and select Yes when warned about leaving the start-up di-
alog.
5 In the Configured Declarations dialog, select the subnet in which the new system
should be located and click Edit.
6 In the Subnet Configuration dialog select Add to add a new option to the subnet's
configuration.
To configure DHCP to provide a static IP address to a specific host, enter the Expert
Settings of the DHCP server configuration module (Step 4 (page 62)) and add a new
declaration of the host type. Add the options hardware and fixed-address to
this host declaration and provide the appropriate values.
2 Append the following lines to your DHCP server's configuration file located
under /etc/dhcpd.conf:
group {
# PXE related stuff
#
# "next server" defines the tftp server that will be used
next server ip_tftp_server:
#
# "filename" specifies the pxelinux image on the tftp server
# the server runs in chroot under /srv/tftpboot
filename "pxelinux.0";
}
If you plan on using SSH for the remote control of a PXE and Wake on LAN installation,
explicitly specify the IP address DHCP should provide to the installation target. To
achieve this, modify the above-mentioned DHCP configuration according to the follow-
ing example:
Remote Installation 63
group {
# PXE related stuff
#
# "next server" defines the tftp server that will be used
next server ip_tftp_server:
#
# "filename" specifies the pxelinux image on the tftp server
# the server runs in chroot under /srv/tftpboot
filename "pxelinux.0";
host test { hardware ethernet mac_address;
fixed-address some_ip_address; }
}
The host statement introduces the hostname of the installation target. To bind the
hostname and IP address to a specific host, you must know and specify the system's
hardware (MAC) address. Replace all the variables used in this example with the actual
values that match your environment.
After restarting the DHCP server, it provides a static IP to the host specified, enabling
you to connect to the system via SSH.
2 Start YaST > Network Services > TFTP Server and install the requested package.
3 Click Enable to make sure that the server is started and included in the boot
routines. No further action from your side is required to secure this. xinetd starts
tftpd at boot time.
4 Click Open Port in Firewall to open the appropriate port in the firewall running
on your machine. If there is no firewall running on your server, this option is not
available.
3 Add the appropriate files needed for the boot image as described in Section 4.3.3,
“Using PXE Boot” (page 66).
4a If it does not exist, create a file called tftp under this directory with touch
tftp. Then run chmod 755 tftp.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /srv/tftpboot
disable = no
}
Remote Installation 65
4.3.3 Using PXE Boot
Some technical background information as well as PXE's complete specifications are
available in the Preboot Execution Environment (PXE) Specification (http://www
.pix.net/software/pxeboot/archive/pxespec.pdf).
1 Change to the directory of your installation repository and copy the linux,
initrd, message, and memtest files to the /srv/tftpboot directory
by entering the following:
cp -a boot/loader/linux boot/loader/initrd
boot/loader/message boot/loader/memtest /srv/tftpboot
2 Install the syslinux package directly from your installation CDs or DVDs
with YaST.
4 Change to the directory of your installation repository and copy the isolinux
.cfg file to /srv/tftpboot/pxelinux.cfg/default by entering the
following:
cp -a boot/loader/isolinux.cfg /srv/tftpboot/pxelinux.cfg/default
6 Insert the following entries in the append lines of the default failsafe and
apic labels:
insmod=kernel module
By means of this entry, enter the network kernel module needed to support
network installation on the PXE client. Replace kernel module with the
appropriate module name for your network device.
install=nfs://ip_instserver/path_instsource/CD1
This entry defines the NFS server and the installation source for the client
installation. Replace ip_instserver with the actual IP address of your
installation server. path_instsource should be replaced with the actual
path to the installation sources. HTTP, FTP, or SMB sources are addressed
in a similar manner, except for the protocol prefix, which should read http,
ftp, or smb.
IMPORTANT
default linux
# default
label linux
kernel linux
append initrd=initrd ramdisk_size=65536 insmod=e100 \
install=nfs://ip_instserver/path_instsource/product/CD1
# failsafe
label failsafe
kernel linux
append initrd=initrd ramdisk_size=65536 ide=nodma apm=off acpi=off \
insmod=e100 install=nfs://ip_instserver/path_instsource/product/CD1
# apic
Remote Installation 67
label apic
kernel linux
append initrd=initrd ramdisk_size=65536 apic insmod=e100 \
install=nfs://ip_instserver/path_instsource/product/CD1
# manual
label manual
kernel linux
append initrd=initrd ramdisk_size=65536 manual=1
# rescue
label rescue
kernel linux
append initrd=initrd ramdisk_size=65536 rescue=1
# memory test
label memtest
kernel memtest
# hard disk
label harddisk
kernel
linux append SLX=0x202
implicit 0
display message
prompt 1
timeout 100
The following section serves as a short reference to the PXELINUX options used
in this setup. Find more information about the options available in the documen-
tation of the syslinux package located under /usr/share/doc/
packages/syslinux/.
APPEND options...
Add one or more options to the kernel command line. These are added for both
automatic and manual boots. The options are added at the very beginning of the
kernel command line, usually permitting explicitly entered kernel options to override
them.
title mytitle
kernel my_kernel my_kernel_options
initrd myinitrd
label mylabel
kernel mykernel
append myoptions
Labels are mangled as if they were filenames and they must be unique after man-
gling. For example, the two labels “v2.1.30” and “v2.1.31” would not be distin-
guishable under PXELINUX because both mangle to the same DOS filename.
The kernel does not have to be a Linux kernel; it can be a boot sector or a COM-
BOOT file.
APPEND -
Append nothing. APPEND with a single hyphen as argument in a LABEL section
can be used to override a global APPEND.
Remote Installation 69
LOCALBOOT type
On PXELINUX, specifying LOCALBOOT 0 instead of a KERNEL option means
invoking this particular label and causes a local disk boot instead of a kernel boot.
Argument Description
All other values are undefined. If you do not know what the UNDI or PXE stacks
are, specify 0.
TIMEOUT time-out
Indicates how long to wait at the boot prompt until booting automatically, in units
of 1/10 second. The time-out is canceled as soon as the user types anything on the
keyboard, assuming the user will complete the command begun. A time-out of zero
disables the time-out completely (this is also the default). The maximum possible
time-out value is 35996 (just less than one hour).
PROMPT flag_val
If flag_val is 0, displays the boot prompt only if Shift or Alt is pressed or Caps
Lock or Scroll Lock is set (this is the default). If flag_val is 1, always displays
the boot prompt.
F2 filename
F1 filename
..etc...
F9 filename
F10 filename
Displays the indicated file on the screen when a function key is pressed at the boot
prompt. This can be used to implement preboot online help (presumably for the
kernel command line options). For backward compatibility with earlier releases,
Do not place the PXE option ahead of the hard disk boot option in the BIOS.
Otherwise this system would try to reinstall itself every time you boot it.
If the controlling machine is not located in the same network segment as the
installation target that should be awakened, either configure the WOL requests
to be sent as multicasts or remotely control a machine on that network segment
to act as the sender of these requests.
Remote Installation 71
Users of SUSE Linux Enterprise Server 9 and higher can use a YaST module called
WOL to easily configure Wake on LAN. Users of other versions of SUSE Linux-based
operating systems can use a command line tool.
3 Click Add and enter the hostname and MAC address of the target system.
4 To turn on this machine, select the appropriate entry and click Wake up.
2 Start YaST > Software Management and install the package netdiag.
3 Open a terminal and enter the following command as root to wake the target:
ether-wake mac_of_target
See the table below for a complete set of the options available.
• resolution #2
• ...
Remote Installation 73
Key Purpose Available Options Default Value
• FTP
• HTTP
• NFS
• SMB
• Hard Disk
The following table lists all installation scenarios mentioned in this chapter with the
required parameters for booting and the corresponding boot options. Just append all of
them in the order they appear in this table to get one boot option string that is handed
to the installation routines. For example (all in one line):
Replace all the values (...) in this string with the values appropriate for your setup.
Section 4.1.3, “Remote • Location of the in- Not applicable; process man-
Installation via stallation server aged through PXE and DHCP
VNC—PXE Boot and • Location of the
Wake on LAN” TFTP server
(page 47) • VNC enablement
• VNC password
Remote Installation 75
Installation Scenario Parameters Needed Boot Options
for Booting
Section 4.1.6, “Remote • Location of the in- Not applicable; process man-
Installation via stallation server aged through PXE and DHCP
SSH—PXE Boot and • Location of the
Wake on LAN” TFTP server
(page 51) • SSH enablement
• SSH password
Find more information about the linuxrc boot options used for booting a Linux
system in /usr/share/doc/packages/linuxrc/linuxrc.html.
The installation program announces the IP address and display number needed to connect
for installation. If you have physical access to the target system, this information is
provided right after the system booted for installation. Enter this data when your VNC
client software prompts for it and provide your VNC password.
Because the installation target announces itself via OpenSLP, you can retrieve the address
information of the installation target via an SLP browser without the need for any
physical contact to the installation itself provided your network setup and all machines
support OpenSLP:
Remote Installation 77
1 Start the KDE file and Web browser Konqueror.
Using VNC, you can control the installation of a Linux system from any other operating
system, including other Linux flavors, Windows, or Mac OS.
On a Linux machine, make sure that the package tightvnc is installed. On a Windows
machine, install the Windows port of this application, which can be obtained at the
TightVNC home page (http://www.tightvnc.com/download.html).
2 Enter the IP address and display number of the installation target as provided by
the SLP browser or the installation program itself:
ip_address:display_number
Using a Web browser to connect to the installation program makes you totally indepen-
dent of any VNC software or the underlying operating system. As long as the browser
application has Java support enabled, you can use any browser (Firefox, Internet Ex-
plorer, Konqueror, Opera, etc.) to perform the installation of your Linux system.
3 Enter your VNC password when prompted to do so. The browser window now
displays the YaST screens as in a normal local installation.
ssh -X root@ip_address_of_target
Remote Installation 79
4 When prompted for the password, enter the password that has been set with the
SSH boot option. After you have successfully authenticated, a command line
prompt for the installation target appears.
5 Enter yast to launch the installation program. A window opens showing the
normal YaST screens as described in Chapter 3, Installation with YaST (page 17).
This scenario assumes you are rolling out SUSE Linux Enterprise to a set of
machines with exactly the same hardware configuration.
1 Create an AutoYaST profile that contains the installation details needed for your
deployment as described in Section 5.1.1, “Creating an AutoYaST Profile”
(page 82).
2 Determine the source of the AutoYaST profile and the parameter to pass to the
installation routines as described in Section 5.1.2, “Distributing the Profile and
Determining the autoyast Parameter” (page 84).
3 Determine the source of the SUSE Linux Enterprise installation data as described
in Section 5.1.3, “Providing the Installation Data” (page 87).
Automated Installation 81
4 Determine and set up the boot scenario for autoinstallation as described in Sec-
tion 5.1.4, “Setting Up the Boot Scenario” (page 87).
5 Pass the command line to the installation routines by adding the parameters
manually or by creating an info file as described in Section 5.1.5, “Creating
the info File” (page 89).
• Use the AutoYaST GUI to create and modify a profile to meet your requirements
2 After you complete the hardware configuration and read the release notes, check
Clone This Installation for AutoYaST, if it is not yet checked by default. This
creates a ready-to-use profile as /root/autoinst.xml that can be used to
create clones of this particular installation.
To use the AutoYaST GUI to create a profile from an existing system configuration
and modify it to your needs, proceed as follows:
4 As well as the default resources, like boot loader, partitioning, and software se-
lection, you can add various other aspects of your system to the profile by
checking the items in the list in Create a Reference Control File.
5 Click Create to have YaST gather all the system information and write it to a
new profile.
• If the profile is complete and matches your requirements, select File > Save
as and enter a filename for the profile, such as autoinst.xml.
Automated Installation 83
Figure 5.1 Editing an AutoYaST Profile with the AutoYaST Front-End
Replace the server and path placeholders with values matching your actual setup.
Automated Installation 85
AutoYaST includes a feature that allows binding certain profiles to the client's MAC
address. Without having to alter the autoyast= parameter, you can have the same
setup install several different instances using different profiles.
1 Create separate profiles with the MAC address of the client as the filename and
put them on the HTTP server that holds your AutoYaST profiles.
2 Omit the exact path including the filename when creating the autoyast= pa-
rameter, for example:
autoyast=http://192.0.2.91/
YaST tries to determine the location of the profile in the following way:
1. YaST searches for the profile using its own IP address in uppercase hexadecimal,
for example, 192.0.2.91 is C000025B.
2. If this file is not found, YaST removes one hex digit and tries again. This action
is repeated eight times until the file with the correct name is found.
3. If that still fails, it tries looking for a file with the MAC address of the clients as
the filename. The MAC address of the example client is 0080C8F6484C.
4. If the MAC address–named file cannot be found, YaST searches for a file named
default (in lowercase). An example sequence of addresses where YaST
searches for the AutoYaST profile looks as follows:
C000025B
C000025
C00002
C0000
C000
C00
C0
C
0080C8F6484C
default
To provide the installation sources over the network, set up a network installation
server (HTTP, NFS, FTP) as described in Section 4.2.1, “Setting Up an Installation
Server Using YaST” (page 52). Use an info file to pass the server's location to the
installation routines.
Network Boot
As for a normal remote installation, autoinstallation can be initiated with Wake on
LAN and PXE, the boot image and control file can be pulled in via TFTP, and the
installation sources from any network installation server.
Bootable CD-ROM
You can use the original SUSE Linux Enterprise media to boot the system for au-
toinstallation and pull in the control file from a network location or a floppy. Alter-
natively, create your own custom CD-ROM holding both the installation sources
and the AutoYaST profile.
The following sections provide a basic outline of the procedures for network boot or
boot from CD-ROM.
Automated Installation 87
default linux
default linux
Replace the example IP addresses and paths with the data used in your setup.
Boot from SUSE Linux Enterprise Media, Get the Profile over the Network
Use this approach if a totally network-based scenario is not possible (for example,
if your hardware does not support PXE) and you have physical access to system
to install during most of the process.
You need:
• A network server providing the profile data (see Section 5.1.2, “Distributing the
Profile and Determining the autoyast Parameter” (page 84) for details)
• A floppy containing the info file that tells the installation routines where to find
the profile
or
Boot and Install from SUSE Linux Enterprise Media, Get the Profile from a Floppy
Use this approach if an entirely network-based installation scenario would not
work. It requires physical access to the system to install for turning on the target
machine, or, in the second case, to enter the profile's location at the boot prompt.
In both cases, you may also need to change media depending on the scope of instal-
lation.
You need:
or
Access to the boot prompt of the target to enter the autoyast= parameter
Boot and Install from Custom Media, Get the Profile from the Media
If you just need to install a limited number of software packages and the number
of targets is relatively low, creating your own custom CD holding both the installa-
tion data and the profile itself might prove a good idea, especially if no network is
available in your setup.
Do this by manually passing these parameters at the boot prompt of the installation or
by providing a file called info that is read by the installation routines (linuxrc). The
former requires physical access to any client to install, which makes this approach un-
suitable for large deployments. The latter enables you to provide the info file on some
media that is prepared and inserted into the clients' drives prior to the autoinstallation.
Alternatively, use PXE boot and include the linuxrc parameters in the pxelinux
.cfg/default file as shown in Section “Preparing for Network Boot” (page 87).
Automated Installation 89
The following parameters are commonly used for linuxrc. For more information, refer
to the AutoYaST package documentation under /usr/share/doc/packages/
autoyast.
Keyword Value
netmask Netmask.
gateway Gateway.
autoyast Location of the the control file to use for the automatic in-
stallation, such as
autoyast=http://192.168.2.1/profiles/.
If you prefer a static network setup at installation time, your info file would look like
the following:
autoyast:profile_source \
install:install_source \
hostip:some_ip \
netmask:some_netmask \
gateway:some_gateway
The \ indicate that the line breaks have only been added for the sake of readability. All
options must be entered as one continuous string.
The info data can be made available to linuxrc in various different ways:
• As a file in the root directory of a floppy that is in the client's floppy drive at instal-
lation time.
• As a file in the root directory of the initial RAM disk used for booting the system
provided either from custom installation media or via PXE boot.
• As part of the AutoYaST profile. In this case, the AutoYaST file needs to be called
info to enable linuxrc to parse it. An example for this approach is given below.
linuxrc looks for a string (start_linuxrc_conf) in the profile that represents the
beginning of the file. If it is found, it parses the content starting from that string and
finishes when the string end_linuxrc_conf is found. The options are stored in the
profile as follows:
....
<install>
....
<init>
<info_file>
<![CDATA[
#
# Don't remove the following line:
# start_linuxrc_conf
#
install: nfs:server/path
Automated Installation 91
vnc: 1
vncpassword: test
autoyast: file:///info
# end_linuxrc_conf
# Do not remove the above comment
#
]]>
</info_file>
</init>
......
</install>
....
linuxrc loads the profile containing the boot parameters instead of the traditional info
file. The install: parameter points to the location of the installation sources. vnc
and vncpassword indicate the use of VNC for installation monitoring. The
autoyast parameter tells linuxrc to treat info as an AutoYaST profile.
• If the client system boots from any kind of physical media, either product media
or custom CDs, you need to insert these into the client's drives.
• If the client is not switched on via Wake on LAN, you need to at least switch on
the client machine.
• If you have not opted for remote controlled autoinstallation, the graphical feedback
from AutoYaST is sent to the client's attached monitor or, if you use a headless
client, to a serial console.
To enable remote controlled autoinstallation, use the VNC or SSH parameters described
in Section 5.1.5, “Creating the info File” (page 89) and connect to the client from
another machine as described in Section 4.5, “Monitoring the Installation Process”
(page 77).
• Are the machines on your site of different hardware configuration (for example,
using different devices or using different memory and disk sizes)?
• Do you intend to install across different domains and need to distinguish between
them?
What rule-based autoinstallation does is, basically, generate a custom profile to match
a heterogeneous scenario by merging several profiles into one. Each rule describes one
particular distinctive feature of your setup (such as disk size) and tells AutoYaST which
profile to use when the rule matches. Several rules describing different features of your
setup are combined in an AutoYaST rules.xml file. The rule stack is then processed
and AutoYaST generates the final profile by merging the different profiles matching
the AutoYaST rules into one. To illustrate this procedure, refer to Section 5.2.2, “Ex-
ample Scenario for Rule-Based Autoinstallation” (page 95).
Rule-based AutoYaST offers you great flexibility in planning and executing your SUSE
Linux Enterprise deployment. You can:
• Create rules for matching any of the predefined system attributes in AutoYaST
• Combine multiple system attributes (such as disk size and kernel architecture) into
one rule by using logical operators
Automated Installation 93
• Create custom rules by running shell scripts and passing their output to the Auto-
YaST framework. The number of custom rules is limited to five.
NOTE
For more information about rule creation and usage with AutoYaST, refer to
the package's documentation under /usr/share/doc/packages/
autoyast2/html/index.html, Chapter Rules and Classes.
1 Create several AutoYaST profiles that contain the installation details needed for
your heterogeneous setup as described in Section 5.1.1, “Creating an AutoYaST
Profile” (page 82).
2 Define rules to match the system attributes of your hardware setup as shown in
Section 5.2.2, “Example Scenario for Rule-Based Autoinstallation” (page 95).
3 Determine the source of the AutoYaST profile and the parameter to pass to the
installation routines as described in Section 5.1.2, “Distributing the Profile and
Determining the autoyast Parameter” (page 84).
4 Determine the source of the SUSE Linux Enterprise installation data as described
in Section 5.1.3, “Providing the Installation Data” (page 87)
5 Pass the command line to the installation routines by adding the parameters
manually or by creating an info file as described in Section 5.1.5, “Creating
the info File” (page 89).
6 Determine and set up the boot scenario for autoinstallation as described in Sec-
tion 5.1.4, “Setting Up the Boot Scenario” (page 87).
A Print Server
This machine just needs a minimal installation without a desktop environment and
a limited set of software packages.
Automated Installation 95
Figure 5.2 AutoYaST Rules
AutoYaST Directory
Enigineering Department
Computers
rules.xml File
Rule 1
Rule 3
Sales Profile
Sales Department
Laptops
Print Server
In the second step, create rules to distinguish the three hardware types from one another
and to tell AutoYaST which profile to use. Use an algorithm similar to the following
to set up the rules:
1. Does the machine have an IP of 192.168.27.11? Then make it the print server.
2. Does the machine have PCMCIA hardware and feature an Intel chipset? Then
consider it an Intel laptop and install the sales department software selection.
3. If none of the above is true, consider the machine a developer workstation and install
accordingly.
Roughly sketched, this translates into a rules.xml file with the following content:
<?xml version="1.0"?>
<!DOCTYPE autoinstall SYSTEM "/usr/share/autoinstall/dtd/rules.dtd">
<autoinstall xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">
<rules config:type="list">
<rule>
<hostaddress>
<match>192.168.27.11</match>
<match_type>exact</match_type>
</hostaddress>
<result>
<profile>print.xml</profile>
<continue config:type="boolean">false</continue>
</result>
</rule>
<rule>
<haspcmcia>
<match>1</match>
<match_type>exact</match_type>
</haspcmcia>
<custom1>
<script>
if grep -i intel /proc/cpuinfo > /dev/null; then
echo -n "intel"
else
echo -n "non_intel"
fi;
</script>
<match>*</match>
<match_type>exact</match_type>
Automated Installation 97
</custom1>
<result>
<profile>sales.xml</profile>
<continue config:type="boolean">false</continue>
</result>
<operator>and</operator>
</rule>
<rule>
<haspcmcia>
<match>0</match>
<match_type>exact</match_type>
</haspcmcia>
<result>
<profile>engineering.xml</profile>
<continue config:type="boolean">false</continue>
</result>
</rule>
</rules>
</autoinstall>
When distributing the rules file, make sure that the rules directory resides under the
profiles directory specified in the autoyast=protocol:serverip/
profiles/ URL. AutoYaST looks for a rules subdirectory containing a file named
rules.xml first then loads and merges the profiles specified in the rules file.
Creating a custom installation, rolling it out to your hardware, and personalizing the
final product involves the following steps:
1 Prepare the master machine whose disk should be cloned to the client machines.
For more information, refer to Section 6.1, “Preparing the Master Machine”
(page 100).
2 Customize the firstboot workflow. For more information, refer to Section 6.2,
“Customizing the firstboot Installation” (page 100).
3 Clone the master machine's disk and roll this image out to the clients' disks. For
more information, refer to Section 6.3, “Cloning the Master Installation”
(page 108).
4 Have the end user personalize the instance of SUSE Linux Enterprise. For more
information, refer to Section 6.4, “Personalizing the Installation” (page 109).
4 To define your own workflow of YaST configuration steps for the end user or
add your own YaST modules to this workflow, proceed to Section 6.2, “Customiz-
ing the firstboot Installation” (page 100). Otherwise proceed directly to Step 5
(page 100).
/etc/sysconfig/firstboot
Configure various aspects of firstboot, such as release notes, scripts, and license
actions.
/etc/YaST2/firstboot.xml
Configure the installation workflow by enabling or disabling components or adding
custom ones.
1 Log in as root.
3 Create the welcome file and the localized versions and place them in the directory
specified in the /etc/sysconfig/firstboot configuration file.
Proceed in a similar way to configure customized license and finish messages. These
variables are FIRSTBOOT_LICENSE_DIR and FIRSTBOOT_FINISH_FILE.
halt
The firstboot installation is aborted and the entire system shuts down. This is the
default setting.
continue
The firstboot installation continues.
abort
The firstboot installation is aborted, but the system tries to boot.
1 Create your own release notes file. Use the RTF format as in the example file in
/usr/share/doc/release-notes and save the result as
RELEASE-NOTES.lang.rtf.
2 Store optional localized version next to the original version and replace the lang
part of the filename with the actual language code, such as de for German.
• Language Selection
• Welcome
• License Agreement
• Host Name
• Network
• Desktop
• root Password
• User Management
• Hardware Configuration
• Finish Setup
This standard layout of a firstboot installation workflow is not mandatory. You can
enable or disable certain components or hook your own modules into the workflow.
To modify the firstboot workflow, manually edit the firstboot configuration file /etc/
YaST2/firstboot.xml. This XML file is a subset of the standard control.xml
file that is used by YaST to control the installation workflow.
The following overview provides you with enough background to modify the firstboot
installation workflow. In it, see the basic syntax of the firstboot configuration file and
how the key elements are configured.
…
<proposals config:type="list">❶
<proposal>❷
<name>firstboot_hardware</name>❸
<mode>installation</mode>❹
<stage>firstboot</stage>❺
<label>Hardware Configuration</label>❻
<proposal_modules config:type="list">❼
<proposal_module>printer</proposal_module>❽
</proposal_modules>
</proposal>
<proposal>
…
</proposal>
</proposals>
❶ The container for all proposals that should be part of the firstboot workflow.
❷ The container for an individual proposal.
❸ The internal name of the proposal.
❹ The mode of this proposal. Do not make any changes here. For a firstboot instal-
lation, this must be set to installation.
The next section of the firstboot configuration file consists of the workflow definition.
All modules that should be part of the firstboot installation workflow must be listed
here.
<workflows config:type="list">
<workflow>
<defaults>
<enable_back>yes</enable_back>
<enable_next>yes</enable_next>
<archs>all</archs>
</defaults>
<stage>firstboot</stage>
<label>Configuration</label>
<mode>installation</mode>
… <!–– list of modules ––>
</modules>
</workflow>
</workflows>
…
The overall structure of the workflows section is very similar to that of the
proposals section. A container holds the workflow elements and the workflow ele-
ments all include stage, label and mode information just as the proposals introduced in
Example 6.1, “Configuring the Proposal Screens” (page 104). The most notable difference
is the defaults section, which contains basic design information for the workflow
components:
enable_back
Include the Back button in all dialogs.
enable_next
Include the Next button in all dialogs.
<modules config:type="list">❶
<module>❷
<label>Language</label>❸
<enabled config:type="boolean">false</enabled>❹
<name>firstboot_language</name>❺
</module>
<modules>
To make changes to the number or order of proposal screens during the firstboot instal-
lation, proceed as follows:
2 Delete or add proposal screens or change the order of the existing ones:
• To add a new proposal, create a new proposal element and fill in all the
required subelements. Make sure that the proposal exists as a YaST module
in /usr/share/YaST2/clients.
You can always change the workflow of the configuration steps when the default does
not meet your needs. Enable or disable certain modules in the workflow or add your
own custom ones.
2 Change the value for the enabled element from true to false to disable
the module or from false to true to enable it again.
<module>
<label>Time and Date</label>
<enabled config:type="boolean">true</enabled>
<name>firstboot_timezone</name>
</module>
1 Create your own YaST module and store the module file module_name.ycp
in /usr/share/YaST2/clients.
3 Determine at which point of the workflow your new module should be run. In
doing so, make sure that possible dependencies to other steps in the workflow
are taken into account and resolved.
4 Create a new module element inside the modules container and add the appro-
priate subelements:
<modules config:type="list">
…
<module>
<label>my_module</label>
<enabled config:type="boolean">true</enabled>
<name>filename_my_module</name>
</module>
</modules>
4b Make sure that enabled is set to true to have your module included in
the workflow.
4c Enter the filename of your module in the name element. Omit the full path
and the .ycp suffix.
2 Create your shell script, store it in the specified directory, and apply the appropri-
ate file permissions.
WARNING
Using LVM might be associated with increased risk, such as data loss. Risks also
include application crashes, power failures, and faulty commands. Save your
data before implementing LVM or reconfiguring volumes. Never work without
a backup.
VG 1 VG 2
LV 1 LV 2 LV 3 LV 4
MP MP MP MP MP MP MP
Figure 7.1, “Physical Partitioning versus LVM” (page 112) compares physical partitioning
(left) with LVM segmentation (right). On the left side, one single disk has been divided
into three physical partitions (PART), each with a mount point (MP) assigned so that
the operating system can access them. On the right side, two disks have been divided
into two and three physical partitions each. Two LVM volume groups (VG 1 and VG 2)
have been defined. VG 1 contains two partitions from DISK 1 and one from DISK 2.
VG 2 contains the remaining two partitions from DISK 2. In LVM, the physical disk
partitions that are incorporated in a volume group are called physical volumes (PVs).
Within the volume groups, four logical volumes (LV 1 through LV 4) have been defined,
which can be used by the operating system via the associated mount points. The border
LVM features:
• Using LVM, it is possible to add hard disks or LVs in a running system. However,
this requires hot-swappable hardware that is capable of such actions.
• It is possible to activate a "striping mode" that distributes the data stream of a logical
volume over several physical volumes. If these physical volumes reside on different
disks, this can improve the reading and writing performance just like RAID 0.
• The snapshot feature enables consistent backups (especially for servers) in the
running system.
With these features, using LVM already makes sense for heavily used home PCs or
small servers. If you have a growing data stock, as in the case of databases, music
archives, or user directories, LVM is just the right thing for you. This would allow file
systems that are larger than the physical hard disk. Another advantage of LVM is that
up to 256 LVs can be added. However, keep in mind that working with LVM is different
from working with conventional partitions. Instructions and further information about
configuring LVM is available in the official LVM HOWTO at http://tldp.org/
HOWTO/LVM-HOWTO/.
Starting from kernel version 2.6, LVM version 2 is available, which is downward-
compatible with the previous LVM and enables the continued management of old volume
groups. When creating new volume groups, decide whether to use the new format or
the downward-compatible version. LVM 2 does not require any kernel patches. It makes
use of the device mapper integrated in kernel 2.6. This kernel only supports LVM ver-
sion 2. Therefore, when talking about LVM, this section always refers to LVM version 2.
Instead of LVM 2, you can use EVMS (Enterprise Volume Management System),
which offers a uniform interface for logical volumes and RAID volumes. Like LVM 2,
EVMS makes use of the device mapper in kernel 2.6.
If there are several volume groups, set the current volume group in the selection box
to the upper left. The buttons in the upper right enable creation of additional volume
groups and deletion of existing volume groups. Only volume groups that do not have
any partitions assigned can be deleted. All partitions that are assigned to a volume group
are also referred to as a physical volumes (PV).
To add a previously unassigned partition to the selected volume group, first click the
partition then Add Volume. At this point, the name of the volume group is entered next
to the selected partition. Assign all partitions reserved for LVM to a volume group.
Otherwise, the space on the partition remains unused. Before exiting the dialog, every
volume group must be assigned at least one physical volume. After assigning all phys-
ical volumes, click Next to proceed to the configuration of logical volumes.
To create a new logical volume, click Add and fill out the pop-up that opens. As for
partitioning, enter the size, file system, and mount point. Normally, a file system, such
as reiserfs or ext2, is created on a logical volume and is then designated a mount point.
The files stored on this logical volume can be found at this mount point on the installed
system. Additionally it is possible to distribute the data stream in the logical volume
among several physical volumes (striping). If these physical volumes reside on different
hard disks, this generally results in a better reading and writing performance (like
RAID 0). However, a striping LV with n stripes can only be created correctly if the
hard disk space required by the LV can be distributed evenly to n physical volumes.
WARNING: Striping
YaST has no chance at this point to verify the correctness of your entries con-
cerning striping. Any mistake made here is apparent only later when the LVM
is implemented on disk.
If you have already configured LVM on your system, the existing logical volumes can
be entered now. Before continuing, assign appropriate mount points to these logical
volumes too. With Next, return to the YaST Expert Partitioner and finish your work
there.
EVMS2 provides a unified interface (evmsgui and command line) for managing the
following storage resources:
• Physical disks and logical devices on local media and SAN-based media, including
iSCSI
• Cluster storage objects with the Cluster Segment Manager (CSM) plug-in
• Volumes for all file systems that have a file system interface module (FSIM) for
EVMS2
• Snapshots of volumes
In SUSE Linux Enterprise Server 10, new features include the following:
• EVMS2 and CLVM2 (Cluster Linux Volume Manager 2) use the same multidisk
(MD) drivers and device mapper (DM) drivers in the kernel.
• File system plug-ins are available for Heartbeat 2 Cluster Manager and Oracle
Cluster File System 2.
EVMS Devices
The EVMS Administration Utility distinguishes five different levels of devices:
Segments
Segments consist of partitions and other memory regions on a disk, such as the
master boot record (MBR).
Containers
These are the counterparts of volume groups in LVM.
Regions
The available devices are grouped into LVM2 and RAID here.
Volumes
All devices, regardless of whether they are represented by a real partition, a logical
volume, or a RAID device are available with their respective mount points.
If you choose to use EVMS, you must replace your device names with the EVMS device
names. Simple partitions are found in /dev/evms/, logical volumes in /dev/evms/
lvm/, and RAID devices in /dev/evms/md. To activate EVMS at boot time, add
boot.evms to the boot scripts in the YaST runlevel editor. See also Section 19.2.3,
“Configuring System Services (Runlevel) with YaST” (page 382).
RAID 0
This level improves the performance of your data access by spreading out blocks
of each file across multiple disk drives. Actually, this is not really a RAID, because
it does not provide data backup, but the name RAID 0 for this type of system has
become the norm. With RAID 0, two or more hard disks are pooled together. The
performance is very good, but the RAID system is destroyed and your data lost if
even one hard disk fails.
RAID 1
This level provides adequate security for your data, because the data is copied to
another hard disk 1:1. This is known as hard disk mirroring. If a disk is destroyed,
a copy of its contents is available on another one. All of them except one could be
damaged without endangering your data. However, if damage is not detected, it
also may happen that damaged data is mirrored to the correct disk and data corrup-
tion happens that way. The writing performance suffers a little in the copying process
compared to when using single disk access (10 to 20 % slower), but read access is
significantly faster in comparison to any one of the normal physical hard disks,
because the data is duplicated so can be parallel scanned. Generally it can be said
that Level 1 provides nearly twice the read transaction rate of single disks and almost
the same write transaction rate as single disks.
RAID 4
Level 4 provides block-level striping just like Level 0 combined with a dedicated
parity disk. In the case of a data disk failure, the parity data is used to create a re-
placement disk. However, the parity disk may create a bottleneck for write access.
Nevertheless, Level 4 is sometimes used.
RAID 5
RAID 5 is an optimized compromise between Level 0 and Level 1 in terms of
performance and redundancy. The hard disk space equals the number of disks used
minus one. The data is distributed over the hard disks as with RAID 0. Parity blocks,
created on one of the partitions, are there for security reasons. They are linked to
each other with XOR, enabling the contents to be reconstructed by the corresponding
parity block in case of system failure. With RAID 5, no more than one hard disk
can fail at the same time. If one hard disk fails, it must be replaced as soon as pos-
sible to avoid the risk of losing data.
In the next dialog, choose between RAID levels 0, 1, and 5 (see Section 7.2.1, “RAID
Levels” (page 120) for details). After Next is clicked, the following dialog lists all parti-
tions with either the “Linux RAID” or “Linux native” type (see Figure 7.6, “RAID
Partitions” (page 122)). No swap or DOS partitions are shown. If a partition is already
assigned to a RAID volume, the name of the RAID device (for example, /dev/md0)
is shown in the list. Unassigned partitions are indicated with “--”.
To add a previously unassigned partition to the selected RAID volume, first click the
partition then Add. At this point, the name of the RAID device is entered next to the
selected partition. Assign all partitions reserved for RAID. Otherwise, the space on the
partition remains unused. After assigning all partitions, click Next to proceed to the
settings dialog where you can fine-tune the performance (see Figure 7.7, “File System
Settings” (page 123)).
As with conventional partitioning, set the file system to use as well as encryption and
the mount point for the RAID volume. Checking Persistent Superblock ensures that
the RAID partitions are recognized as such when booting. After completing the confi-
guration with Finish, see the /dev/md0 device and others indicated with RAID in the
expert partitioner.
7.2.3 Troubleshooting
Check the file /proc/mdstats to find out whether a RAID partition has been de-
stroyed. In the event of a system failure, shut down your Linux system and replace the
defective hard disk with a new one partitioned the same way. Then restart your system
and enter the command mdadm /dev/mdX --add /dev/sdX. Replace 'X' with
your particular device identifiers. This integrates the hard disk automatically into the
RAID system and fully reconstructs it.
• /usr/share/doc/packages/mdadm/Software-RAID.HOWTO.html
• http://en.tldp.org/HOWTO/Software-RAID-HOWTO.html
Configure the system with YaST using various YaST modules. Depending on the
hardware platform and the installed software, there are different ways to access YaST
in the installed system.
In KDE or GNOME, start the YaST Control Center from the main menu. Before YaST
starts, you are prompted to enter the root password, because YaST needs system ad-
ministrator permissions to change the system files.
To start YaST from the command line, enter the commands su (for changing to the
user root) and yast2. To start the text version, enter yast instead of yast2. Also
use the command yast to start the program from one of the virtual consoles.
For hardware platforms that do not support a display device of their own and for remote
administration on other hosts, run YaST remotely. First, open a console on the host on
which to display YaST and enter the command
ssh -X root@<system-to-configure> to log in to the system to configure
as root and redirect the X server output to your terminal. Following the successful
SSH login, enter yast2 to start YaST in graphical mode.
To save time, the individual YaST modules can be started directly. To start a module,
enter yast2 module_name. View a list of all module names available on your
system with yast2 -l or yast2 --list. Start the network module, for example,
with yast2 lan.
If you need work in a different language but do not want to change the system language
setting, run the YaST with the LANG variable set to your preferred language. Use a long
language code in the format langcode_statecode. For example, for American
English, enter LANG="en_US" yast2.
This command starts YaST using the specified language. The language is only valid
for this YaST session. The language settings of the terminal, other users, and your
other sessions remain unchanged.
If you run YaST remotely over SSH, YaST uses the language settings of your local
system.
8.3 Software
8.3.1 Installing and Removing Software
To install, uninstall, and update software on your machine, use Software > Software
Management. This opens a package manager dialog as shown in Figure 8.2, “YaST
Package Manager” (page 128).
In SUSE® Linux Enterprise, software is available in the form of RPM packages. Nor-
mally, a package contains everything needed for a program: the program itself, the
configuration files, and all documentation. A list of individual packages is displayed
to the right in the individual package window. The content of this list is determined by
the currently selected filter. If, for example, the Patterns filter is selected, the individual
package window displays all packages of the current selection.
In the package manager, each package has a status that determines what to do with the
package, such as “Install” or “Delete.” This status is shown by a symbol in a status box
at the beginning of the line. Change the status by clicking or selecting the desired status
from the menu that opens when the item is right-clicked. Depending on the current sit-
uation, some of the possible status flags may not be available for selection. For example,
a package that has not yet been installed cannot be set to “Delete.” View the available
status flags with Help > Symbols.
The font color used for various packages in the individual package window provides
additional information. Installed packages for which a newer version is available on
the installation media are displayed in blue. Installed packages whose version numbers
are higher than those on the installation media are displayed in red. However, because
the version numbering of packages is not always linear, the information may not be
Installing Packages
To install packages, select packages for installation and click Accept. Selected packages
should have the Install status icon. The package manager automatically checks the de-
pendencies and selects any other required packages (resolution of dependencies). To
view other packages required for installation before clicking Accept, choose Extras >
Show Automatic Package Changes from the main menu. After installing packages,
continue working with the package manager by clicking Install More or close it by
clicking Finish.
The package manager provides preselected groups for installation. You can select an
entire group instead of single packages. To view these groups, use Filter in the left
frame.
To display all packages on your installation media, use the filter Package Groups
and select zzz All at the bottom of the tree. SUSE Linux Enterprise contains a
number of packages and it might take some time to display this long list.
Click the status box at the beginning of a line to install or uninstall this pattern. Select
a status directly by right-clicking the pattern and using the context menu. From the in-
dividual package overview to the right, which displays the packages included in the
current pattern, select and deselect individual packages.
To uninstall a language from your system, select a language from the language list and
uncheck the status box at the beginning of a line.
NOTE
To view a list of the all installed packages from the selected installation source, select
the filter Installation Sources then select Installation Summary from Secondary Filters
and deactivate all check boxes except Keep.
The package status in the individual package window can be changed as usual. However,
the changed package may no longer meet the search criteria. To remove such packages
from the list, update the list with Update List.
To install sources for selected program, mark the check box in the Source column. If
you cannot see a check box, your installation sources do not contain the source of the
package.
Because this function saves the exact package list, it is only reliable when the
hardware is identical on the source and target systems. For more complicated
situations, AutoYaST, described in Chapter 5, Automated Installation (page 81),
may be a better choice.
Removing Packages
To remove packages, assign the correct status to the packages to remove and click Ac-
cept. Selected packages should have the Delete status. If a package required by other
installed packages is marked for deletion, the package manager issues an alert with
detailed information and alternative solutions.
Reinstalling Packages
If you find damaged files that belong to package or you want to reinstall the original
version of a package from your installation media, reinstall the package. To reinstall
packages, select packages for reinstallation and click Accept. Selected packages should
have the Update status. If any dependency issues arise with installed packages, the
package manager issues an alert with detailed information and alternative solutions.
In addition to the Search filter, all lists of the package manager feature a quick
search. Simply enter a letter to move the cursor to the first package in the list
whose name begins with this letter. The cursor must be in the list (by clicking
the list).
To find a package by name, select Name, enter the name of the package to find in the
search field, and click Search. To find a package by text in the description, select
Summary and Descriptions, enter a search string, and click Search.
To search for the package that contains a certain file, enter the name of the file, select
RPM "Provides", and click Search. To find all packages that depend on a particular
package, select RPM "Requires", enter the name of package, and click Search.
If you are familiar with the package structure of SUSE Linux Enterprise, you can use
the Package Groups filter to find packages by subject. This filter sorts the program
packages by subjects, such as applications, development, and hardware, in a tree
structure to the left. The more you expand the branches, the more specific the selection
is. This means fewer packages are displayed in the individual package window.
Installation Summary
After selecting the packages for installation, update, or deletion, view the installation
summary with Installation Summary. It shows how packages will be affected when you
click Accept. Use the check boxes to the left to filter the packages to view in the indi-
vidual package window. For example, to check which packages are already installed,
deactivate all check boxes except Keep.
The package status in the individual package window can be changed as usual. However,
the respective package may no longer meet the search criteria. To remove such packages
from the list, update the list with Update List.
Disk Usage
During the selection of the software, the resource window at the bottom left of the
module displays the prospective disk usage of all mounted file systems. The colored
bar graph grows with every selection. As long as it remains green, there is sufficient
space. The bar color slowly changes to red as you approach the limit of disk space. If
you select too many packages for installation, an alert is displayed.
Checking Dependencies
Some packages depend on other packages. This means that the software of the package
only works properly if another package is also installed. There are some packages with
identical or similar functionality. If these packages use the same system resource, they
should not be installed at the same time (package conflict).
When the package manager starts, it examines the system and displays installed pack-
ages. When you select to install and remove packages, the package manager can auto-
matically check the dependencies and select any other required packages (resolution
of dependencies). If you select or deselect conflicting packages, the package manager
indicates this and submits suggestions for solving the problem (resolution of conflicts).
To activate the automatic dependency check, select Autocheck, located under the infor-
mation window. With Autocheck activated, any change of a package status triggers an
automatic check. This is a useful feature, because the consistency of the package selec-
tion is monitored permanently. However, this process consumes resources and can slow
down the package manager. For this reason, the automatic check is not activated by
default. Regardless of the state of Autocheck, a consistency check is performed when
you confirm your selection with Accept.
If you click Check, located under the information window, the package manager checks
if the current package selection results in any unresolved package dependencies or
conflicts. In the event of unresolved dependencies, the required additional packages
are selected automatically. For package conflicts, the package manager opens a dialog
that shows the conflict and offers various options for solving the problem.
Unless you are very experienced, follow the suggestions of YaST when handling
package conflicts, because otherwise the stability and functionality of your
system could be endangered by the existing conflict.
After successfully adding the add-on media, the package manager window appears. If
the add-on provides a new pattern, see the new item in the Patterns filter. To view the
list of all packages from the selected installation source, select the filter Installation
Sources and choose the installation source to view. To view packages from a selected
add-on by package groups, select the secondary filter Package Groups.
Create your own add-on products with YaST Add-On Creator. Read about the
YaST add-on creator at http://developer.novell.com/wiki/index
.php/Creating_Add-On_Media_with_YaST. Find technical background
information at http://developer.novell.com/wiki/index.php/
Creating_Add-Ons.
All registered sources have an activation status in the first column of the list. Enable
or disable individual installation sources by clicking Activate or Deactivate. During
the installation of software packages or updates, YaST selects a suitable entry from the
list of activated installation sources. When you exit the module with Close, the current
NOTE
Before starting the update of SUSE Linux Enterprise, configure the Novell Cus-
tomer Center. This is described in Section 3.11.4, “Customer Center” (page 35).
To install updates and improvements with YaST, run Software > Online Update. All
new patches (except the optional ones) that are currently available for your system are
already marked for installation. Clicking Accept automatically installs these patches.
After the installation has completed, confirm with Finish. Your system is now up-to-
date.
TIP
YaST Online Update has been integrated into the YaST software management
module. This ensures that the newest version of a package is always installed.
It is no longer necessary to run an online update after installing new packages.
The patch display lists all patches available for SUSE Linux Enterprise. A list entry
consists of a symbol and the patch name. For a list of possible symbols, press Shift +
F1. New patches that are not yet installed are marked with a small arrow in front of the
symbol. Patches that are already installed are marked with the Keep symbol. Patches
on packages that are not installed are marked with an empty box.
The patches are sorted by security level. The color of the patch name and a tool tip in-
dicate the security status of the patch: Security (red), Recommended (blue), or
Optional (black).
Selected new patches are marked with the symbol Install (if this is the first patch
with this name) or Update (when previous patches with this name already have been
installed). To change the status, right-click a patch and choose an action from the list.
Another alternative for updating software is the ZENworks updater applet for KDE and
GNOME. The ZENworks updater helps monitor new patches. It also provides a quick
update function. For more information, refer to Section 9.2, “Managing Packages with
the ZEN Tools” (page 197).
When Only Download Patches is checked, the patches are downloaded at the specified
time but not installed. They must be installed manually. The patches are downloaded
to the rug cache directory, /var/cache/zmd/web, by default. Use the command
rug get-prefs cache-directory to get the current rug cache directory. For
more information about rug, see Section 9.1, “Managing Packages from the Command
Line with rug” (page 194).
The procedure for updating the system is similar to a new installation. Initially, YaST
examines the system, determines a suitable update strategy, and presents the results in
a suggestion dialog. Click Change or the individual items to change any details.
Update Options
Set the update method for your system. Two options are available.
Update with Installation of New Software and Features Based on the Selection
To update the entire system to the latest versions of software, select one of the
predefined selections. These selections ensure that packages that did not exist pre-
viously are also installed.
Additionally, you can use Delete Outdated Packages to remove packages that do not
exist in the new version. By default, this option is preselected to prevent outdated
packages from unnecessarily occupying hard disk space.
Packages
Click Packages to start the package manager and select or deselect individual packages
for update. Any package conflicts should be resolved with the consistency check. The
use of the package manager is covered in detail in Section 8.3.1, “Installing and Remov-
ing Software” (page 127).
Backup
During the update, the configuration files of some packages may be replaced by those
of the new version. Because you may have modified some of the files in your current
system, the package manager normally makes backup copies of the replaced files. With
this dialog, determine the scope of these backups.
This backup does not include the software. It only contains configuration files.
Language
Primary and other languages currently installed on the system are listed here. Change
them by clicking Language in the displayed configuration or with Change > Language.
Optionally, adapt the keyboard layout and time zone to the region where the primary
language is spoken. Find more about language selection in Section 8.5.15, “Language
Selection” (page 158).
In most cases, YaST replaces old versions with new ones without problems. A backup
of the existing system should be performed prior to updating to ensure that existing
configurations are not lost during the update. Conflicts can then be resolved manually
after the update has finished.
8.4 Hardware
New hardware must first be installed or connected as directed by the vendor. Turn on
external devices and start the appropriate YaST module. Most devices are automatically
detected by YaST and the technical data is displayed. If the automatic detection fails,
YaST offers a list of devices (model, vendor, etc.) from which to select the suitable
device. Consult the documentation enclosed with your hardware for more information.
If your model is not included in the device list, try a model with a similar des-
ignation. However, in some cases the model must match exactly, because sim-
ilar designations do not always indicate compatibility.
The dialog presents a list of detected hard disk controllers and enables assignment of
the suitable kernel module with specific parameters. Use Test Loading of Module to
check if the current settings work before they are saved permanently in the system.
It is advised to test the settings before making them permanent in the system.
Incorrect settings can prevent the system from booting.
Save the hardware information displayed to a file by clicking Save to File. Select the
desired directory and filename then click Save to create the file.
During installation, the current SUSE Linux Enterprise kernel automatically activates
DMA for hard disks but not for CD drives, because default DMA activation for all
drives often causes problems with CD drives. Use the DMA module to activate DMA
for your drives. If the drive supports the DMA mode without any problems, the data
transfer rate of your drive can be increased by activating DMA.
NOTE
DMA (direct memory access) means that your data can be transferred directly
to the RAM, bypassing the processor control.
YaST
To add a DASD to an installed system, use the YaST DASD module (Hardware
> DASD). In the first screen, select the disks to make available to your Linux instal-
lation and click Perform Action. Select Activate then leave the dialog with Next.
Command Line
Issue the following command:
dasd_configure 0.0.0150 1 0
Replace 0.0.0150 with the actual channel number to which the DASD is attached.
The last zero of the command line should be 1 if the DASD should be accessed in
DIAG mode.
NOTE
mkinitrd
zipl
NOTE
To make the changes persistent through a reboot, run the following commands:
mkinitrd
zipl
8.4.9 Joystick
Configure a joystick connected to the sound card with Hardware > Joystick. Select
your joystick type in the list provided. If your joystick is not listed, select Generic
Analog Joystick. After selecting your joystick, make sure that it is connected then click
Test to test the functionality. Click Continue and YaST installs the required files. After
the Joystick Test window appears, test the joystick by moving it in all directions and
pressing all buttons. Each movement should be displayed in the window. If you are
satisfied with the settings, click OK to return to the module and Finish to complete
configuration.
If you have a USB device, this configuration is not necessary. Plug in the joystick and
start using it.
Fine-tune the settings by clicking Expert Settings. Adjust the key repeat rate and delay
and configure the start-up state by choosing the desired settings in Start-Up States. For
Devices to Lock, enter a space-separated list of devices to which to apply the Scroll
Lock, Num Lock, and Caps Lock settings. Click OK to complete the fine-tuning. Finally,
after all selections have been made, click Accept for your changes to take effect.
To set up the keyboard for the graphical environment, run the graphical YaST then select
Keyboard Layout. Find information about the graphical configuration in Section 8.14.3,
“Keyboard Properties” (page 190).
To configure your mouse for the text environment, use YaST in text mode. After entering
text mode and selecting Hardware > Mouse Model, use the keyboard arrow keys to
choose your mouse from the provided list. Then click Accept to save the settings and
exit the module.
8.4.12 Sound
Most sound cards are detected automatically and configured with reasonable values
during initial installation. To install a card added later or modify settings, use Hardware
> Sound. It is also possible to switch the sequence of the cards.
1 Click Add to open a dialog in which to select a sound card vendor and model.
Refer to your sound card documentation for the information required. Find a
reference list of sound cards supported by ALSA with their corresponding sound
modules in /usr/share/doc/packages/alsa/cards.txt and at
http://www.alsa-project.org/alsa-doc/. After making your se-
lection, click Next.
2 In Sound Card Configuration, choose the configuration level in the first setup
screen:
Normal setup
Adjust the output volume and play a test sound.
3 In Sound Card Volume, test your sound configuration and make adjustments to
the volume. You should start at about ten percent to avoid damage to your hearing
or the speakers. A test sound should be audible when you click Test. If you cannot
hear anything, increase the volume. Press Next > Finish to complete the sound
configuration.
Volume
Use this dialog for setting the volume.
Start Sequencer
For playback of MIDI files, check this option.
The volume and configuration of all sound cards installed are saved when you click
Finish in the YaST sound module. The mixer settings are saved to the file /etc/
asound.conf and the ALSA configuration data is appended to the end of the files
/etc/modprobe.d/sound and /etc/sysconfig/hardware.
8.5 System
This group of modules is designed to help you manage your system. All modules in
this group are system-related and serve as valuable tools for ensuring that your system
runs properly and your data is managed efficiently.
For IBM System z, continue with Section 8.5.3, “Boot Loader Configuration”
(page 149).
8.5.1 Backup
Create a backup of both your system and data using System > System Backup. However,
the backup created by the module does not include the entire system. The system is
backed up by saving important storage areas on your hard disk that may be crucial when
trying to restore a system, such as the partition table or master boot record (MBR). It
can also include the XML configuration acquired from the installation of the system,
which is used for AutoYaST. Data is backed up by saving changed files of packages
accessible on installation media, entire packages that are unaccessible (such as online
updates), and files not belonging to packages, such as many of the configuration files
in /etc or the directories under /home.
8.5.2 Restoration
With System > System Restoration, restore your system from a backup archive created
with System Backup. First, specify where the archives are located (removable media,
local hard disks, or network file systems). Click Next to view the description and contents
of the individual archives and select what to restore from the archives.
You can also uninstall packages that were added since the last backup and reinstall
packages that were deleted since the last backup. These two steps enable you to restore
the exact system state at the time of the last backup.
8.5.4 Clustering
Find information about Heartbeat and high availability configuration with YaST in
Heartbeat Guide.
8.5.5 LVM
The logical volume manager (LVM) is a tool for custom partitioning of hard disks with
logical drives. Find information about LVM in Section 7.1, “LVM Configuration”
(page 111).
8.5.6 EVMS
The enterprise volume management system (EVMS) is, like LVM, a tool for custom
partitioning and grouping of hard disks into virtual volumes. It is flexible, extensible,
and can be tailored using a plug-in model to individual needs of various volume man-
agement systems.
EVMS is compatible with existing memory and volume management systems, like
DOS, Linux LVM, GPT (GUID partition table), IBM System z, Macintosh, and BSD
partitions. More information is provided at http://evms.sourceforge.net/.
The risk of making a mistake that causes data loss is very high. Before modifying
partitions in the installed system, back up your data.
IBM System z recognize only DASD and SCSI hard disks. IDE hard disks are not
supported. This is why these devices appear in the partition table as dasda or
sda for the first recognized device.
All existing or suggested partitions on all connected hard disks are displayed in the list
of the YaST Expert Partitioner dialog. Entire hard disks are listed as devices without
numbers, such as /dev/hda or /dev/sda (or /dev/dasda). Partitions are listed
as parts of these devices, such as /dev/hda1 or /dev/sda1 (or /dev/dasda1,
respectively). The size, type, file system, and mount point of the hard disks and their
partitions are also displayed. The mount point describes where the partition appears in
the Linux file system tree.
Partition Types
TIP: IBM System z: Hard Disks
On the IBM System z platforms, SUSE Linux Enterprise Server supports SCSI
hard disks as well as DASDs (direct access storage devices). While SCSI disks
can be partitioned as described here, DASDs can have no more than three
partition entries in their partition tables.
Every hard disk has a partition table with space for four entries. An entry in the partition
table can correspond to a primary partition or an extended partition. Only one extended
partition entry is allowed, however.
If you need more than four partitions, create an extended partition as the fourth partition
or earlier. This extended partition should span the entire remaining free cylinder range.
Then create multiple logical partitions within the extended partition. The maximum
number of logical partitions is 15 on SCSI, SATA, and FireWire disks and 63 on (E)IDE
disks. It does not matter which types of partitions are used for Linux. Primary and log-
ical partitions both work fine.
For architectures using the GPT disk label, the number of primary partitions is
not restricted. Consequently, there are no logical partitions.
1 Select Create. If several hard disks are connected, a selection dialog appears in
which to select a hard disk for the new partition.
2 Specify the partition type (primary or extended). Create up to four primary parti-
tions or up to three primary partitions and one extended partition. Within the
extended partition, create several logical partitions (see Section “Partition Types”
(page 151)).
3 Select the file system to use and a mount point. YaST suggests a mount point
for each partition created. Refer to Chapter 25, File Systems in Linux (page 469)
for details on the various file systems.
4 Specify additional file system options if your setup require them. For details of
the options available, refer to Section “Editing a Partition” (page 152).
5 Click OK > Apply to apply your partitioning setup and leave the partitioning
module.
If you created the partition during installation, you are returned to the installation
overview screen.
Editing a Partition
When you create a new partition or modify an existing partition, set various parameters.
For new partitions, suitable parameters are set by YaST and usually do not require any
modification. To edit your partition setup manually, proceed as follows:
File System ID
Even if you do not want to format the partition at this stage, assign it a file
system ID to ensure that the partition is registered correctly. Possible values
include Linux, Linux swap, Linux LVM, Linux EVMS, and Linux RAID. For
File System
Change the file system or format the partition here. File system changes or
partition reformats irreversibly delete all data from the partition. For details
of the various file systems, refer to Chapter 25, File Systems in Linux
(page 469).
Fstab Options
Here, specify various parameters for the administration file of the file systems
(/etc/fstab). For example, change the file system identification from
the device name, which is default, to a volume label. In the volume label,
you can use all characters except / and space.
Mount Point
Specify the directory at which the partition should be mounted in the file
system tree. Select from various YaST proposals or enter any other name.
Expert Options
Expert opens a menu containing the following commands:
The partitions, regardless of whether they are Linux or FAT partitions, are specified
with the options noauto and user. This allows any user to mount or unmount these
partitions as needed. For security reasons, YaST does not automatically enter the exec
option here, which is needed for executing programs from the location. However, to
run programs from there, you can enter this option manually. This measure is necessary
if you encounter system messages such as “bad interpreter” or “Permission denied”.
At the beginning of the physical volumes (PVs), information about the volume is written
to the partition. To reuse such a partition for other non-LVM purposes, it is advisable
The file system used for booting (the root file system or /boot) must not be
stored on an LVM logical volume. Instead, store it on a normal physical partition.
For IBM System z, continue with Section 8.5.12, “System Services (Runlevel)”
(page 157).
Each kernel driver contains a list of device IDs of all devices it supports. If a new device
is not in any driver's database, the device is treated as unsupported, even if it can be
used with an existing driver. With this YaST module from System section, you can add
PCI IDs. Only advanced users should attempt to use this YaST module.
To add an ID, click Add and select how to assign it: by selecting a PCI device from a
list or by manually entering PCI values. In the first option, select the PCI device from
the provided list then enter the driver or directory name. If the directory is left empty,
the driver name is used as the directory name. When assigning PCI ID values manually,
enter the appropriate data to set up a PCI ID. Click OK to save your changes.
To edit a PCI ID, select the device driver from the list and click Edit. Edit the information
and click OK to save your changes. To delete an ID, select the driver and click Delete.
The ID immediately disappears from the list. When finished, click OK.
To change the time zone, select the region in the left column and the location or time
zone in the right column. With Hardware Clock Set To, set whether the system clock
should use Local Time or UTC (Coordinated Universal Time). UTC is often used in
Linux systems. Machines with additional operating systems, such as Microsoft Windows,
mostly use local time.
Set the current system time and date with Change. In the dialog that opens, modify the
time and date by entering new values or adjusting them with the arrow buttons. Press
Apply to save the changes.
Select the main language to use for your system in Primary Language. To adjust the
keyboard or time zone to this setting, enable Adapt Keyboard Layout or Adapt Time
Zone.
Set how locale variables are set for the root user with Details. Also use Details to set
the primary language to a dialect not available in the main list. These settings are written
into the file /etc/sysconfig/language.
You can configure supported CDMA and GPRS modems as regular modems in
the YaST modem module.
To configure your mail with YaST, specify the type of your connection to the Internet
in the first dialog. Choose one of the following options:
Permanent
Select this option if you have a dedicated line to the Internet. Your machine is online
permanently, so no dial-up is required. If your system is part of a local network
with a central e-mail server, select this option to ensure permanent access to your
e-mail messages.
Dial-Up
This item is relevant for users who have a computer at home, are not located in a
network, and occasionally connect to the Internet.
Activate virus scanning for your incoming and outgoing e-mail with AMaViS by select-
ing that option. The package is installed automatically as soon as you activate the mail
filtering feature. In the following dialogs, specify the outgoing mail server (usually the
SMTP server of your provider) and the parameters for incoming mail. Set the diverse
POP or IMAP servers for mail reception by various users. Using this dialog, you can
also assign aliases, use masquerading, or set up virtual domains. Click Finish to exit
the mail configuration.
The mail server module of SUSE Linux Enterprise only works if the users, groups,
and the DNS and DHCP services are managed with LDAP.
The mail server module allows configuration of SUSE Linux Enterprise as a mail
server. YaST assists with the following steps of the configuration process:
Global Settings
Configures the identification of the local mail server and the maximum size of in-
coming or outgoing messages and the type of mail transport.
Local Delivery
Configures the type of local mail delivery.
Mail Transport
Configures special transport routes for mail depending on its target address.
SPAM Prevention
Configures the SPAM protection settings of the mail server. This activates the tool
AMaViS. Set up the type and strictness of the SPAM check.
main
Main or master domain of the local mail server
local
All users who can receive mail in a master domain can also receive mail in a
local domain. In the case of a message within the local domain, only the portion
before the @ is evaluated.
virtual
Only users with an explicit address within a virtual domain receive mail. Vir-
tual mail addresses are set up in the user management module of YaST.
DHCP Server
Use this to set up a custom DHCP server in only a few steps. Chapter 34, DHCP
(page 635) provides basic knowledge about the subject and a step-by-step description
of the configuration process.
DNS Server
Configuring a DNS server that is responsible for name resolution is recommended
for larger networks. You can use DNS Server for this as described in Section 33.2,
“Configuration with YaST” (page 610). Chapter 33, The Domain Name System
(page 609) provides background information about DNS.
HTTP Server
To run your own Web server, configure Apache in HTTP Server. Find more infor-
mation in Chapter 40, The Apache HTTP Server (page 737).
Hostnames
When booting and in small networks, you can use Hostnames for hostname resolu-
tion instead of DNS. The entries in this module reflect the data of the file /etc/
hosts. For more information, read Section “ /etc/hosts ” (page 586).
Kerberos Client
If you have a Kerberos server in your network for network authentication, use
Kerberos Client. A detailed description of the client configuration with YaST is
available in Section 46.6, “Configuring a Kerberos Client with YaST” (page 849).
LDAP Client
If using LDAP for user authentication in the network, configure the client in LDAP
Client. Information about LDAP and a detailed description of the client configuration
with YaST are available in Section 36.6, “Configuring an LDAP Client with YaST”
(page 681).
LDAP Server
The LDAP server can keep various data in a central directory and distribute it to
all clients in your network. Mostly it is used to store shared contact information
but its function is not limited to that. An LDAP server can be used also for authen-
tication. Information about LDAP and a detailed description of the server configu-
ration with YaST are available in Chapter 36, LDAP—A Directory Service
(page 661).
NFS Client
With NFS client, mount directories provided by NFS server in your own file trees.
Use NFS Client to configure your system to access an NFS server in the network.
A description of the YaST module and background information about NFS are
provided in Chapter 38, Sharing File Systems with NFS (page 711).
NIS Client
If you run NIS server to administer user data on a central place and distribute it to
the clients, configure the client here. Detailed information about NIS client and
configuration with YaST is available in Section 35.2, “Configuring NIS Clients”
(page 659).
NIS Server
If you run more than one system, local user administration (using the files /etc/
passwd and /etc/shadow) is impractical and requires a lot of maintenance.
In this case, administer user data on a central server and distribute it to the clients
from there. NIS is one option for this. Detailed information about NIS and its
configuration with YaST is available in Section 35.1.1, “Configuring a NIS Master
Server” (page 654).
NTP Client
NTP (network time protocol) is a protocol for synchronizing hardware clocks over
a network. Information about NTP and instructions for configuring it with YaST
are available in Chapter 32, Time Synchronization with NTP (page 603).
When this module starts, choose whether to start inetd or xinetd. The selected
daemon can be started with a standard selection of services. Alternatively, compose
your own selection of services with Add, Delete, and Edit.
Proxy
Configure Internet proxy client settings in Proxy. Click Enable Proxy then enter
the desired proxy settings. You can test these settings by clicking Test Proxy Set-
tings. A small window informs you whether your proxy settings work correctly.
After your settings have been entered and tested, save them by clicking Accept.
Remote Administration
To administer your machine remotely from another machine, use Remote Adminis-
tration. To maintain your system remotely, use a VNC client, such as krdc, or a
Java-enabled browser. Although remote administration using VNC is simple and
fast, it is less secure than using SSH, so you should always keep this in mind when
using a VNC server. Find detailed information about installing with a VNC client
in Section 4.1.1, “Simple Remote Installation via VNC—Static Network Configu-
ration” (page 44).
Routing
Use Routing to configure the paths data takes over the network. In most cases, only
enter the IP address of the system through which to send all data in Default Gateway.
To create more complicated configurations, use Expert Configuration.
SLP Server
With service location protocol (SLP), you can configure clients in your network
without knowledge of server names and services that these servers provide. Detailed
information about SLP servers and configuration with YaST are described in
Chapter 31, SLP Services in the Network (page 599).
TFTP Server
A TFTP server in not an FTP server. While an FTP server uses the File Transfer
Protocol (FTP), a TFTP server uses the much simpler Trivial File Transfer Protocol
(TFTP) without security features. TFTP servers are usually used to boot diskless
workstations, X terminals, and routers. Detailed information about TFTP servers
and configuration with YaST are described in Section 4.3.2, “Setting Up a TFTP
Server” (page 64).
WOL
WOL (wake on LAN) refers to the possibility of waking up a computer from
standby mode over the network using special packages. It only works with mother-
boards that support this functionality in their BIOS. WOL configuration with YaST
is described in Section 4.3.7, “Wake on LAN” (page 71).
iSCSI Target
iSCSI technology provides an easy and reasonably inexpensive solution for con-
necting Linux computers to central storage systems. To configure the server side,
use Miscellaneous > iSCSI Target. Find more information about configuration of
iSCSI with YaST in Chapter 12, Mass Storage over IP Networks—iSCSI (page 257).
8.8 AppArmor
Novell AppArmor is designed to provide easy-to-use application security for both
servers and workstations. Novell AppArmor is an access control system that lets you
specify which files each program may read, write, and execute. To enable or disable
Novell AppArmor on your system, use AppArmor Control Panel. Information about
Novell AppArmor and a detailed description of the configuration with YaST are
available in Novell AppArmor Administration Guide (↑Novell AppArmor Administration
Guide).
Whenever you need to make multiple configuration changes and want to avoid
restarting the user and group configuration module for every single one of
these changes, use Write Changes Now to save your changes without exiting
the configuration module.
1 Click Add.
2 Enter the necessary data for User Data. If you do not need to adjust any more
detailed settings for this new user, proceed to Step 5 (page 168).
3 To change a user's ID, home directory name, default home, group, group mem-
berships, directory permissions, or login shell, open the Details tab and change
the default values.
4 To adjust user's password expiration, length, and expiration warnings, use the
Password Settings tab.
The new user can immediately log in with the created login name and password.
Deleting Users
To delete a user, proceed as follows:
2 Click Delete.
3 Determine whether to delete or keep the home directory of the user to delete.
2 Click Edit.
1 Click Add.
For more information about encrypted homes, see Section 47.2, “Using Encrypted
Home Directories” (page 865).
Using the auto login feature on any system that can be physically accessed by
more than one person is a potential security risk. Any user accessing this system
can manipulate the data on it. If your system contains confidential data, do
not use the auto login functionality.
If you are the only user of your system, you can configure auto login. It automatically
logs a user into the system after start. Only one selected user can use the auto login
function. Auto login works only with KDM or GDM.
To activate auto login, select the user from the list of users and click Expert Options >
Login Settings. Then choose Auto Login and click OK.
To deactivate this functionality, select the user and click Expert Options > Login Settings.
Then uncheck Auto Login and click OK.
Using the passwordless login feature on any system that can be physically ac-
cessed by more than one person is a potential security risk. Any user accessing
this system can manipulate the data on it. If your system contains confidential
data, do not use this functionality.
Login without a password automatically logs a user into the system after the user enters
the username in the login manager. It is available to multiple users on a system and
works only with KDM or GDM.
To activate the function, select the user from the list of users and click Expert Options
> Login Settings. Then choose Passwordless Login and click OK.
To deactivate this function, select the user for whom to disable this functionality from
the list of users and click Expert Options > Login Settings. Then uncheck Passwordless
Login and click OK.
1 Click Add.
To configure the password expiration policy for a new user, proceed as follows:
1 Click Add.
You can limit the lifetime of any user account by specifying a date of expiration for
this particular account. Specify the Expiration Date in the YYYY-MM-DD format and
leave the user configuration. If no Expiration Date is given, the user account never
expires.
• Default Group
• Secondary Groups
SUSE Linux Enterprise can use DES, MD5, or Blowfish for password encryption. The
default password encryption method is Blowfish. The encryption method is set during
installation of the system, as described in Section 3.11.1, “Root Password” (page 32).
To change the password encryption method in the installed system, select Expert Options
> Password Encryption.
The module gives an overview of all groups. As in the user management dialog, change
filter settings by clicking Set Filter.
To add a group, click Add and enter the appropriate data. Select group members from
the list by checking the corresponding box. Click Accept to create the group. To edit a
group, select the group to edit from the list and click Edit. Make all necessary changes
then save them with Accept. To delete a group, simply select it from the list and click
Delete.
Password Settings
To have new passwords checked by the system for security before they are accepted,
click Check New Passwords and Test for Complicated Passwords. Set the minimum
password length for newly created users. Define the period for which the password
should be valid and how many days in advance an expiration alert should be issued
when the user logs in to the text console.
Boot Settings
Set how the key combination Ctrl + Alt + Del should be interpreted by selecting
the desired action. Normally, this combination, when entered in the text console,
causes the system to reboot. Do not modify this setting unless your machine or
server is publicly accessible and you are afraid someone could carry out this action
without authorization. If you select Stop, this key combination causes the system
to shut down. With Ignore, this key combination is ignored.
If you use the KDE login manager (KDM), set permissions for shutting down the
system in Shutdown Behavior of KDM. Give permission to Only root (the system
administrator), All Users, Nobody, or Local Users. If Nobody is selected, the system
can only be shut down from the text console.
Login Settings
Typically, following a failed login attempt, there is a waiting period lasting a few
seconds before another login is possible. This makes it more difficult for password
sniffers to log in. Optionally activate Record Successful Login Attempts. If you
suspect someone is trying to discover your password, check the entries in the system
log files in /var/log. To grant other users access to your graphical login screen
User Addition
Every user has a numerical and an alphabetical user ID. The correlation between
these is established using the file /etc/passwd and should be as unique as pos-
sible. Using the data in this screen, define the range of numbers assigned to the
numerical part of the user ID when a new user is added. A minimum of 500 is
suitable for users. Automatically generated system users start with 1000. Proceed
in the same way with the group ID settings.
Miscellaneous Settings
To use predefined file permission settings, select Easy, Secure, or Paranoid. Easy
should be sufficient for most users. The setting Paranoid is extremely restrictive
and can serve as the basic level of operation for custom settings. If you select
Paranoid, remember that some programs might not work correctly or even at all,
because users no longer have permission to access certain files.
Also set which user should launch the updatedb program, if installed. This pro-
gram, which automatically runs on a daily basis or after booting, generates a
database (locatedb) in which the location of each file on your computer is stored.
If you select Nobody, any user can find only the paths in the database that can be
seen by any other (unprivileged) user. If root is selected, all local files are indexed,
because the user root, as superuser, may access all directories. Make sure that
the options Current Directory in root's Path and Current Directory in Path of
Regular Users are deactivated. Only advanced users should consider using these
options because these settings may pose a significant security risk if used incorrectly.
To have some control over the system even if it crashes, click Enable Magic SysRq
Keys.
8.10 Virtualization
Virtualization makes it possible to run several operating systems on one physical ma-
chine. The hardware for the different systems is provided virtually. Virtualization YaST
modules provide configuration for the Xen virtualization system. For detailed information
about Xen, see Chapter 22, Virtualization (page 421).
8.11 Miscellaneous
The YaST Control Center has several modules that cannot easily be classified into the
first six module groups. They can be used for things like viewing log files and installing
drivers from a vendor CD.
8.11.3 Autoinstallation
The AutoYaST tool is intended for automated installation. In Miscellaneous > Autoin-
stallation, prepare profiles for this tool. Find detailed information about automated in-
stallation with AutoYaST in Chapter 5, Automated Installation (page 81). The informa-
tion about using the Autoinstallation module is in Section 5.1.1, “Creating an AutoYaST
Profile” (page 82).
/var/log/messages
This is the general system log file. Here, view kernel messages, users logging in
as root, and other useful information.
/proc/cpuinfo
This displays processor information, including its type, make, model, and perfor-
mance.
/proc/dma
This shows which DMA channels are currently being used.
/proc/interrupts
This shows which interrupts are in use and how many of each have been in use.
/proc/iomem
This displays the status of input/output memory.
/proc/ioports
This shows which I/O ports are in use at the moment.
/proc/meminfo
This displays memory status.
/proc/mounts
This displays devices currently mounted.
/proc/partitions
This shows the partitioning of all hard disks.
/proc/version
This displays the current version of Linux.
/var/log/YaST2/y2log
This displays all YaST log messages.
/var/log/boot.msg
This displays information concerning the start-up of the system.
/var/log/faillog
This displays login failures.
/var/log/warn
This displays all system warnings.
When the YaST Control Center is started, the category Software is selected automati-
cally. Use ↓ and ↑ to change the category. To start a module from the selected category,
press →. The module selection now appears with a thick border. Use ↓ and ↑ to select
the desired module. Keep the arrow keys pressed to scroll through the list of available
modules. When a module is selected, the module title appears with a colored background
and a brief description is displayed in the bottom frame.
Press Enter to start the desired module. Various buttons or selection fields in the module
contain a letter with a different color (yellow by default). Use Alt + yellow_letter to
select a button directly instead of navigating there with Tab. Exit the YaST Control
Center by pressing the Exit button or by selecting Exit in the category overview and
pressing Enter.
Function Keys
The F keys (F1 to F12) enable quick access to the various buttons. Which function
keys are actually mapped to which buttons depends on the active YaST module,
because the different modules offer different buttons (Details, Info, Add, Delete,
etc.). Use F10 for OK, Next, and Finish. Press F1 to access the YaST help, which
shows the functions mapped to the individual F keys.
View a list of all module names available on your system with yast -l or yast
--list. To display the available options of a module, enter yast module_name
help. If a module does not have a command line mode, a message informs you of this.
Some modules do not support the command line mode because command line tools
with the same functionality already exist. The modules concerned and the command
line tools available are:
sw_single
sw_single provides package management and system update functionality. Use
rug instead of YaST in your scripts. Refer to Section 9.1, “Managing Packages
from the Command Line with rug” (page 194).
online_update_setup
online_update_setup configures automatic updating of your system. This
can be configured with cron.
inst_suse_register
With inst_suse_register, register your SUSE Linux Enterprise. For more
information about the registration, see Section 8.3.4, “Registering SUSE Linux
Enterprise” (page 136).
hwinfo
hwinfo provides information about the hardware of your system. The command
hwinfo does the same.
The YaST module users is used for user management. To display the command op-
tions, enter yast users help.
To add multiple users, create a /tmp/users.txt file with a list of users to add.
Enter one username per line and use the following script:
#!/bin/bash
#
# adds new user, the password is same as username
#
#!/bin/bash
#
# the home will be not deleted
# to delete homes, use option delete_home
#
To display the YaST network card configuration options, enter yast lan help. To
display the YaST firewall card configuration options, enter yast firewall help.
The network and firewall configurations with YaST are persistent. After reboot, it is
not necessary to execute scripts again.
To display a configuration summary for the network, use yast lan list. The first
item in the output of Example 8.4, “Sample Output of yast lan list” (page 185)
is a device ID. To get more information about the configuration of the device, use yast
lan show id=<number>. In this example, the correct command is yast lan
show id=0.
The command line interface of the YaST firewall configuration is a fast and easy way
to enable or disable services, ports, or protocols. To display allowed services, ports,
and protocols, use yast firewall services show. For examples of how to
enable a service or port, use yast firewall services help. To enable mas-
querading, enter yast firewall masquerade enable.
If you change your display hardware after installation, use sax2 -r on the
command line to cause SaX2 to detect your hardware. You must be root to
run SaX2 from the command line.
Graphics Card
It is not possible to change the graphics card because only known models are supported
and these are detected automatically. However, you can change many options that affect
the behavior of the card. Normally, this should not be necessary because the system
already has set them up appropriately during installation. If you are an expert and want
to tweak some of the options, click Options next to the graphics card and select the
option to change. To assign a value needed to a certain option, enter this value in the
dialog that appears after selecting that option. Click OK to close the options dialog.
Monitor
To change the current settings for the monitor, click Change next to the monitor. A
new dialog opens in which to adjust various monitor-specific settings. This dialog has
several tabs for various aspects of monitor operation. Select the first tab to manually
select the vendor and model of the display device in two lists. If your monitor is not
listed, you can choose one of the VESA or LCD modes that suit your needs or, if you
have a vendor driver disk or CD, click Utility Disk and follow the instructions on the
screen to use it. Check Activate DPMS to use display power management signaling.
Display Size, with the geometrical properties of the monitor, and Sync Frequencies,
with the ranges for the horizontal and vertical sync frequencies of your monitor, are
normally set up correctly by the system, but you can modify these values manually.
After making all adjustments, click OK to close this dialog.
Although there are safety mechanisms, you should still be very careful when
changing the allowed monitor frequencies manually. Incorrect values might
destroy your monitor. You should always refer to the monitor's manual before
changing frequencies.
Dual Head
If you have a graphics card with two outputs installed in your computer, you can connect
two screens to your system. Two screens that are attached to the same graphics card
are referred to as dual head. SaX2 automatically detects multiple display devices in the
system and prepares the configuration accordingly. To use the dual head mode of a
graphics card, check Activate Dual Head Mode at the bottom of the dialog and click
Configure to set the dual head options and the arrangement of the screens in the dual
head dialog.
The tabs in the row at the top of the dialog each correspond to a graphics card in your
system. Select the card to configure and set its multihead options in the dialog below.
In the upper part of the multihead dialog, click Change to configure the additional
screen. The possible options are the same as for the first screen. Choose the resolution
to use for this screen from the list. Select one of three possible multihead modes.
Cloned Multihead
In this mode, all monitors display the same contents. The mouse is only visible on
the main screen.
Xinerama Multihead
All screens combine to form a single large screen. Program windows can be posi-
tioned freely on all screens or scaled to a size that fills more than one monitor.
NOTE
Linux currently does not offer 3D support for Xinerama multihead environ-
ments. In this case, SaX2 deactivates the 3D support.
The arrangement of the dual head environment describes the sequence of the individual
screens. By default, SaX2 configures a standard layout that follows the sequence of the
Multihead
If you have more than one graphics card installed in your computer, you can connect
more than one screen to your system. Two or more screens that are attached to different
graphics cards are referred to as multihead. SaX2 automatically detects multiple
graphics cards in the system and prepares the configuration accordingly. By default,
SaX2 configures a standard layout that follows the sequence of the detected graphics
cards, arranging all screens in a row from left to right. The additional Arrangement tab
allows for changing this layout manually. Drag the icons representing the individual
screens in the grid and click OK to close the dialog.
NOTE
Regardless of whether you run a test, all modifications are only activated when
you restart the X server.
When you are satisfied with your settings, click OK to confirm your changes.
NOTE
Any changes you make here take effect only after you restart the X server.
In the Port and Mode dialog, configure the connection to the tablet. SaX2 enables the
configuration of graphics tablets connected to the USB port or the serial port. If your
tablet is connected to the serial port, verify the port. /dev/ttyS0 refers to the first
serial port. /dev/ttyS1 refers to the second. Additional ports use similar notation.
Choose appropriate Options from the list and select the Primary Tablet Mode suitable
for your needs.
If your graphics tablet supports electronic pens, configure them in Electronic Pens.
Add eraser and pen and set their properties after clicking Properties.
When you are satisfied with the settings, click OK to confirm your changes.
Use this dialog to configure your X server as a host for VNC sessions. If you want VNC
clients to connect to your X server, check Allow Access to Display Using VNC Protocol.
Set a password to restrict access to your VNC-enabled X server. Check Allow Multiple
VNC Connections if more than one VNC client should connect to the X server at the
same time. Allow HTTP access by checking Activate HTTP Access and setting the port
to be use in HTTP Port.
When you are satisfied with your settings, click OK to save your changes.
8.15 Troubleshooting
All error messages and alerts are logged in the directory /var/log/YaST2. The
most important file for finding YaST problems is y2log.
• http://forge.novell.com/modules/xfmod/project/
?yast—Another YaST project page
The back-end daemon for the Novell ZENworks Linux Management Agent is the
ZENworks Management Daemon (ZMD). ZMD performs software management func-
tions. The daemon is started automatically during boot.
Check the status of the daemon with rczmd status. To start the daemon, enter
rczmd start. To restart it, use rczmd restart. Deactivate it with rczmd
stop.
ZMD can also be started with special options to control its behavior. To have ZMD
always start with some special options permanently, set ZMD_OPTIONS in /etc/
sysconfig/zmd then run SuSEconfig. The available options are:
-n, --no-daemon
Do not run the daemon in the background.
-m, --no-modules
Do not load any modules.
-r, --no-remote
Do not start remote services.
ZMD is the back-end only. The software management tasks are initiated through the
command line tool rug or the graphical Software Updater applet.
rug sorts software from services into catalogs (also known as channels), groups of
similar software. For example, one catalog might contain software from an update
server and another some software from a third-party software vendor. Subscribe to in-
dividual catalogs to control the display of available packages and prevent the accidental
installation of unwanted software. Operations are normally performed only on software
from catalogs to which you are subscribed.
If the zmd daemon is not used for a certain period of time, it can be switched to sleep
mode. To check the zmd status and reactivate the daemon, use rug ping. The command
wakes up zmd and logs status information of the daemon.
To check for available patches, use rug pch. To view information about a patch, enter
rug patch-info patch.
install
The user may install new software
remove
The user may remove software
subscribe
The user may change channel subscriptions
trusted
The user is considered trusted, so may install packages without package signatures
upgrade
The user may update software packages
view
This allows the user to see which software is installed on the machine and which
software is in available channels. The option is relevant only to remote users. Local
users are normally permitted to view installed and available packages.
superuser
Permits all rug commands except user management and settings, which must be
done locally.
To give a user permission to update the system, use the command rug ua username
upgrade. Replace username with the name of the user. To revoke the privileges of
a user, use command rug ud username. To list users with their rights, use rug ul.
To change the current privileges of a user, use rug ue username. Replace username
with the name of the desired user.
The edit command is interactive. It lists privileges of the selected user and gives a
prompt. Enter the plus (+) or minus (-) symbol and the name of the privilege. Then
press Enter. For example, to permit the user to delete software, enter +remove. To
save and quit, press Enter at a blank prompt.
If you instead want only to download the patches then select the patches for installation
at a later time, use rug up -dy. The up -dy option downloads the patches from
your catalogs without confirmation and saves them to the rug cache. The default location
of the rug cache is /var/cache/zmd.
Replace url_path with the name of your proxy server. Replace name with your
username. Replace password with your password.
Left-click the panel icon to open the updater window. It displays a list of patches and
new package versions available. Each entry has a short description and, if applicable,
a category icon: Security patches are marked with a yellow shield. Optional patches
are marked with a light blue circle. Recommended patches are not marked with an icon.
Security patches are listed first, then recommended patches, optional patches, and finally
new package versions. Use the links All, Packages, and Patches to filter the list of
packages displayed.
Officially released updates from Novell show up as Patches. New package ver-
sions from other sources show up as Packages.
To get details about a certain entry, mark it with the mouse and click the Details link
under the list window. To select an entry for installation, mark the entry's check box.
The service tab lists all services available together with type and status information (if
you cannot see the latter two, adjust the window size). Use Remove Service or Add
Service to add or remove services. The following service types are available:
YUM
An HTTP, HTTPS, or FTP server using the RPM-MD format for the package data.
ZYPP
ZYPP services are the YaST installation sources added with Software > Installation
Source in YaST. Use Software Updater or YaST to add installation sources. The
source from which you initially installed (DVD or CD-ROM in most cases) is
preconfigured. If you change or delete this source, replace it with another valid
installation source (ZYPP service), because otherwise you cannot install new soft-
ware.
The terms YaST installation source, YaST package repository, and ZYPP
service are the same name for a source from which you can install software.
Mount
With Mount, embed a directory mounted on your machine. This is useful, for ex-
ample, in a network that regularly mirrors the Novell YUM server and exports its
content to the local network. To add the directory, provide the full path to the direc-
tory in Service URI.
NU
NU stands for Novell Update. Novell provides updates for SUSE Linux Enterprise
exclusively as NU services. If you configured update during installation, the official
Novell NU server is already present in the list.
After SUSE Linux Enterprise is installed, two services are preconfigured: your installa-
tion source (DVD, CD-ROM, or network resource) as a ZYPP service and a SUSE
Linux Enterprise update server as a NU service, which was added during product reg-
istration. Normally there is no need to change these settings. If you do not see a NUYUM
service, open a root shell and execute the command suse_register. A service
is added automatically.
Catalogs
Services are able to provide packages for different pieces of software or for different
software versions (typically RCE or ZENworks services do so). These are organized
in different categories called catalogs. Subscribe or unsubscribe from a catalog by
marking or unmarking the check box in front of it.
Preferences
On the Preferences tab, specify whether Software Updater should be launched at start-
up or not. As user root, you can also modify the Software Updater settings. As an
unprivileged user, you can only view the settings. Refer to the rug man page for an
explanation of the settings.
10.1.1 Preparations
Before updating, copy the old configuration files to a separate medium, such as
streamer, removable hard disk, USB stick, or ZIP drive, to secure the data. This primar-
ily applies to files stored in /etc as well as some of the directories and files in /var
and /opt. You may also want to write the user data in /home (the HOME directories)
to a backup medium. Back up this data as root. Only root has read permission for
all local files.
PostgreSQL
Before updating PostgreSQL (postgres), dump the databases. See the manual page
of pg_dump. This is only necessary if you actually used PostgreSQL prior to your
update.
2 Boot the system as for the installation, described in Section 3.2, “System Start-
Up for Installation” (page 18). In YaST, choose a language and select Update
in the Installation Mode dialog. Do not select New Installation.
3 YaST determines whether there are multiple root partitions. If there is only one,
continue with the next step. If there are several, select the right partition and
confirm with Next (/dev/hda3 was selected in the example in Section 10.1.1,
“Preparations” (page 203)). YaST reads the old fstab on this partition to analyze
and mount the file systems listed there.
4 In the Installation Settings dialog, adjust the settings according to your require-
ments. Normally, you can leave the default settings untouched, but if you intend
to enhance your system, check the packages offered in the Software Selection
submenus or add support for additional languages.
4a Click Update Options to update only software that is already installed (Only
Update Installed Packages) or to add new software and features to the system
according to selected patterns. It is advisable to accept the suggestion. You
can adjustment it later with YaST.
4b You also have the possibility to make backups (Backup) of various system
components. Selecting backups slows down the update process. Use this
option if you do not have a recent system backup.
Read the installation instructions on the Service Pack media for further changes.
Installing a SUSE Linux Enterprise Service Pack is very similar to installing the original
SUSE Linux Enterprise media. As with the original installation, you can choose to install
from a local CD or DVD drive or from a central network installation source.
1 Insert the first SUSE Linux Enterprise SP medium (CD 1 or DVD 1) and boot
your machine. A boot screen similar to the original installation of SUSE Linux
Enterprise 10 is displayed.
Network Installation
Before starting a network installation of an SUSE Linux Enterprise SP, make sure that
the following requirements are met:
• A working network connection both on the installation server and the target machine
that includes a name service, DHCP (optional, but needed for PXE boot), and
OpenSLP (optional).
• The SUSE Linux Enterprise SP CD 1 or DVD 1 to boot the target system or a target
system set up for PXE boot according to Section 4.3.5, “Preparing the Target System
for PXE Boot” (page 71).
1 Insert the SUSE Linux Enterprise SP CD 1 or DVD 1 and boot your machine.
A boot screen similar to the original installation of SUSE Linux Enterprise 10
is displayed.
2 Select Installation to boot the SP kernel then use F3 to select a type of network
installation source (FTP, HTTP, NFS, or SMB).
3 Provide the appropriate path information or select SLP as the installation source.
Finish the installation as outlined in Chapter 3, Installation with YaST (page 17).
1 Adjust the setup of your DHCP server to provide the address information needed
for PXE boot according to Section 4.3.5, “Preparing the Target System for PXE
Boot” (page 71).
2 Set up a TFTP server to hold the boot image needed for PXE boot.
Use the first CD or DVD of your SUSE Linux Enterprise Service Pack for this
and otherwise follow the instructions in Section 4.3.2, “Setting Up a TFTP
Server” (page 64).
4 Initiate the boot of the target system and use VNC to remotely connect to the
installation routine running on this machine. See Section 4.5.1, “VNC Installation”
(page 77) for more information.
5 Accept the license agreement then select a language, default desktop, and other
installation settings.
7 Continue as usual with the installation (entering a password for root, completing
the network configuration, testing your Internet connection, activating the Online
Update service, selecting the user authentication method, and entering a username
and password).
For detailed instructions for installing SUSE Linux Enterprise, see Chapter 3,
Installation with YaST (page 17).
• The system must be online throughout the entire update process, because this process
requires access to the Novell registration server.
• If your setup involves third party software or add-on software, test this procedure
on another machine to make sure that the dependencies are not broken by the update.
• Make sure that the entire process is completed successfully. Otherwise the system
becomes inconsistent.
1 In a running SUSE Linux Enterprise system, select Computer > YaST > Software
> Online Update.
If you are not logged in as root, enter the root password when prompted.
2 The Online Update dialog appears. Scroll down the patch list and select Update
to Service Pack 1 as shown in Figure 10.1, “Update to Service Pack 1” (page 210).
In the pop-up window, click Accept to confirm the start of the update procedure
to the service pack feature level.
3 The Patch Download and Installation dialog tracks the progress log of the migra-
tion patch installation. When Total Progress reaches 100%, click Finish.
4 Run the online update a second time. Once done, in the Patch Download and
Installation click Close. During this second run YaST installs the kernel and all
the other software.
6 To finish the update, manually reboot the system to activate the new kernel.
For a detailed list of software and configuration changes from SUSE Linux En-
terprise Server 10 to SUSE Linux Enterprise Server 10 SP1, refer to the release
notes of the service pack. View them in the installed system using the YaST
release notes module.
The default boot loader menus contain one kernel entry. Before installing multiple
kernels, it is useful to add an entry for the extra kernels, so they can be selected easily.
The kernel that was active before installing the new kernel can be accessed as vmlinuz
.previous and initrd.previous. By creating a boot loader entry similar to the
default entry and having this entry refer to vmlinuz.previous and initrd
.previous instead of vmlinuz and initrd, the previously active kernel can be
• km_wlan—Various drivers for wireless LAN cards. The madwifi driver for
Atheros WLAN cards from km_wlan was removed.
For technical reasons, it was necessary to drop support for Ralink WLAN cards. The
following modules were not part of the distribution and will not be added in the future:
On HP systems, you must reconfigure the EFI console then you can drop the console
parameter from the kernel boot command. As a work-around, you can try
console=ttyS1... as a boot parameter instead of console=ttyS0....
/etc/krb5.conf /etc/krb5.conf.heimdal
/etc/krb5.keytab /etc/krb5.keytab.heimdal
It is not possible to copy the server-related (kdc and kadmind) data. After the system
update, the old heimdal database is still available under /var/heimdal. MIT kerberos
maintains the database under /var/lib/kerberos/krb5kdc. For more informa-
tion, see Chapter 45, Network Authentication—Kerberos (page 833) and Chapter 46,
Installing and Administering Kerberos (page 841).
XFree86 X.Org
XFree86 Xorg
xf86config xorgconfig
xf86cfg xorgcfg
XFree86 X.Org
XFree86.0.log Xorg.0.log
XFree86.0.log.old Xorg.0.log.old
In the course of the change to X.Org, the packages were renamed from XFree86* to
xorg-x11*.
Wrapper
There are some new wrappers for starting the OOo components. The new names
are shown in Table 10.4, “Wrapper” (page 217).
Old New
/usr/X11R6/bin/OOo-calc /usr/bin/oocalc
/usr/X11R6/bin/OOo-draw /usr/bin/oodraw
/usr/X11R6/bin/OOo-impress /usr/bin/ooimpress
/usr/X11R6/bin/OOo-math /usr/bin/oomath
/usr/X11R6/bin/OOo-padmin /usr/sbin/oopadmin
/usr/X11R6/bin/OOo-setup –
/usr/X11R6/bin/OOo-template /usr/bin/oofromtemplate
/usr/X11R6/bin/OOo-web /usr/bin/ooweb
/usr/X11R6/bin/OOo-writer /usr/bin/oowriter
/usr/X11R6/bin/OOo /usr/bin/ooffice
/usr/X11R6/bin/OOo-wrapper /usr/bin/ooo-wrapper
The wrapper now supports the option --icons-set for switching between KDE
and GNOME icons. The following options are no longer supported:
--default-configuration, --gui, --java-path, --skip-check,
--lang (the language is now determined by means of locales),
--messages-in-window, and --quiet.
The growisofs program from the dvd+rw-tools package can now burn all DVD
media (DVD+R, DVD-R, DVD+RW, DVD-RW, DVD+RL). Try using that one instead
of the patched cdrecord-dvd.
common-auth
Default PAM configuration for auth section
common-account
Default PAM configuration for account section
common-password
Default PAM configuration for password changing
common-session
Default PAM configuration for session management
You should include these default configuration files from within your application-spe-
cific configuration file, because it is easier to modify and maintain one file instead of
The changes are simple. If you have the following configuration file (which should be
the default for most applications):
#%PAM-1.0
auth required pam_unix2.so
account required pam_unix2.so
password required pam_pwcheck.so
password required pam_unix2.so use_first_pass use_authtok
#password required pam_make.so /var/yp
session required pam_unix2.so
/etc/sysconfig/powersave/ common
common
cpufreq
events
battery
sleep
thermal
To:
If you have a local ~/.xinitrc file, you must change it accordingly. Otherwise ap-
plications like f-spot, banshee, tomboy, or Network Manager banshee might fail. Save
your old ~/.xinitrc. Then copy the new template file into your home directory
with:
cp /etc/skel/.xinitrc.template ~/.xinitrc
• /etc/slp.reg.d/ntp.reg
• /etc/init.d/ntp
• /etc/logrotate.d/ntp
• /usr/sbin/rcntp
GNOME (gnome-vfs2 and libgda) contains a wrapper that picks gamin or fam to provide
file system change notification:
• If the FAM daemon is not running, gamin is preferred (Rationale: Inotify is support-
ed only by gamin and it is more efficient for local file systems).
The following information describes a few of the components proposed by the DMTF
standards. Understanding what these are and how they relate to each other can help you
understand what OpenWBEM is and how you most effectively use it in your network.
OpenWBEM 227
nications that provide for distributed system management. There are two parts to
CIM: the CIM Specification and the CIM Schema.
The CIM Specification describes the language, naming, and meta schema. The
meta schema is a formal definition of the model. It defines the terms used to express
the model and their usage and semantics. The elements of the meta schema are
Classes, Properties, and Methods. The meta schema also supports Indications and
Associations as types of Classes, and References as types of Properties.
The CIM Schema provides the actual model descriptions. The CIM Schema supplies
a set of classes with properties and associations that provide a well understood
conceptual framework within which it is possible to organize the available informa-
tion about the managed environment.
• CIMOM providers are software that performs specific tasks within the CIMOM
that are requested by client applications. Each provider instruments one or more
aspects of the CIMOM's schema.
SUSE® Linux Enterprise Server contains the open source CIMOM from the Open-
WBEM project [http://openwbem.org].
Understanding how the OpenWBEM CIMOM is set up and how to configure it can
help you monitor and manage disparate systems in your network with more confidence
and ease.
• yast2-cim, YaST2 - CIM Bindings: This package adds CIM bindings to YaST2
(YaST2 is the Graphical User Interface of the SUSE System Tools Manager). These
bindings provide a client interface to the Common Information Model Object
Manager (CIMOM).
• Section 11.1.1, “Starting, Stopping, or Checking Status for owcimomd” (page 230)
OpenWBEM 229
• Section 11.1.3, “Setting Up Logging” (page 233)
If desired, you can replace the path for the default certificate with a path to a commercial
certificate that you have purchased or with a different certificate that you have generated
in the http_server.SSL_cert = path_filename setting in the openwbem
.conf file.
/etc/openwbem/servercert.pem
If you want to generate a new certificate, use the following command. Running this
command replaces the current certificate, so Novell recommends making a copy of the
old certificate before generating a new one.
If you want to change the certificate that OpenWBEM uses, see Section 11.2.2,
“Changing the Certificate Configuration” (page 242).
Ports
OpenWBEM is configured by default to accept all communications through a secure
port, 5989. The following table explains the port communication setup and recommended
configuration.
5989 Secure The secure port that OpenWBEM communications use via HTTPS
services.
OpenWBEM 231
Port Type Notes and Recommendations
5988 Unse- The unsecure port that OpenWBEM communications use via HTTP
cure services.
Novell recommends that you use this setting only when attempting
to debug a problem with the CIMOM. As soon as the problem is
resolved, set the non-secure port option back to Disabled.
If you want to change the default port assignments, see Section 11.2.3, “Changing the
Port Configuration” (page 243).
You can change any of the default settings. See Section 11.2.1, “Changing the Authen-
tication Configuration” (page 234).
• http_server.allow_local_authentication = true
• http_server.ssl_client_verification = disabled
• http_server.use_digest = false
• owcimomd.allow_anonymous = false
• owcimomd.allowed_users = root
• owcimomd.authentication_module =
/usr/lib/openwbem/authentication/libpamauthentication.so
The OpenWBEM CIMOM is PAM enabled by default; therefore the local root user
can authenticate to the OpenWBEM CIMOM with local root user credentials.
• log.main.components = *
• log.main.level = ERROR
• log.main.type = syslog
OpenWBEM 233
11.2 Changing the OpenWBEM
CIMOM Configuration
When OpenWBEM CIMOM (owcimomd) starts, it reads it run-time configuration from
the openwbem.conf file. The openwbem.conffile is located in the /etc/
openwbem directory.
Any setting that has the options commented out with a semicolon (;) or pound sign (#)
uses the default setting.
When making changes to this file, you can use any text editor that saves the file in a
format that is native to the platform you are using.
You can change any of the settings in the openwbem.conf file. This section discusses
the following configuration settings:
http_server.allow_local_authentication
Purpose
Directs the http_server to allow local authentication without supplying a password, re-
lying on local system file permissions.
You can use this setting with the Basic or Digest settings.
Syntax
http_server.allow_local_authentication = option
Option Description
OpenWBEM 235
Option Description
Example
http_server.allow_local_authentication = true
http_server.digest_password_file
Purpose
Specifies a location for the password file. This is required if the http_server.use_digest
setting is enabled.
Syntax
http_server.digest_password_file = path_filename
The following is the default path and filename for the digest password file:
/etc/openwbem/digest_auth.passwd
Example
http_server.digest_password_file =
/etc/openwbem/digest_auth.passwd
http_server.ssl_client_verification
Purpose
Determines whether the server should attempt to authenticate clients with SSL Client
Certificate verification.
Option Description
Example
http_server.ssl_client_verification = disabled
http_server.ssl_trust_store
Purpose
Specifies a directory containing the OpenSSL trust store.
Syntax
http_server.ssl_trust_store = path
The following is the default path for the trust store file.
OpenWBEM 237
/etc/openwbem/truststore
Example
http_server.ssl_trust_store = /etc/openwbem/truststore
http_server.use_digest
Purpose
Directs the HTTP server to use Digest authentication, which bypasses the Basic authen-
tication mechanism. To use digest, you must set up the digest password file using
owdigestgenpass.
Syntax
http_server.use_digest = option
Option Description
Example
http_server.use_digest = false
ACL processing is not enabled until the OpenWBEM_Acl1.0.mof file has been im-
ported.
Syntax
owcimomd.ACL_superuser = username
Example
owcimomd.ACL_superuser = root
owcimomd.allow_anonymous
Purpose
Enables or disables anonymous logins to owcimomd.
Syntax
owcimomd.allow_anonymous = option
Option Description
OpenWBEM 239
Option Description
Example
owcimomd.allowed_anonymous = false
owcimomd.allowed_users
Purpose
Specifies a list of users who are allowed to access owcimomd data.
Syntax
owcimomd.allowed_users = option
Option Description
username Specifies one or more users who are allowed to access the owci-
momd data.
Example
owcimomd.allowed_users = bcwhitely jkcarey jlanderson
Syntax
owcimomd.authentication_module = path_filename
The following is the default path and filename for the authentication modules:
/usr/lib/openwbem/authentication/libpamauthentication.so
Example
owcimomd.authentication_module =
/usr/lib/openwbem/authentication/libpamauthentication.so
simple_auth.password_file
Purpose
Specifies the path to the password file when the simple authentication module is used.
Syntax
simple_auth.password_file = path_filename
Example
simple_auth.password_file =
/etc/openwbem/simple_auth.passwd
OpenWBEM 241
11.2.2 Changing the Certificate
Configuration
The http_server.SSL_cert and the http_server.SSL_key settings specify the location of
the file or files that contains the host's private key and the certificate that is used by
OpenSSL for HTTPS communications.
/etc/openwbem/servercert.pem
/etc/openwbem/serverkey.pem
Syntax
http_server.SSL_cert = path_filename
or
http_server.SSL_key = path_filename
NOTE
Both the key and certificate can be in the same file. In this case, the values of
http_server.SSL_cert and http_server.SSL_key would be the same.
Examples
http_server.SSL_cert = /etc/openwbem/servercert.pem
http_server.SSL_key = /etc/openwbem/servercert.pem
http_server.SSL_key = /etc/openwbem/serverkey.pem
Syntax
http_server.http_port = option
or
http_server.https_port = option
Option Description
Example
These settings disable the HTTP port and enable port 5989 for HTTPS communications:
http_server.http_port = -1
http_server.https_port = 5989
OpenWBEM 243
11.2.4 Changing the Default Logging
Configuration
The following log settings in the owcimomd.conf file let you specify where and how
much logging occurs, the type of errors logged, and the log size, filename, and format:
If you want to set up debug logging, see Section 11.2.5, “Configuring Debug Logging”
(page 252).
If you want to set up additional logs, see Section 11.2.6, “Configuring Additional Logs”
(page 253).
log.main.categories
Purpose
Specifies the categories the log outputs.
Syntax
log.main.categories = option
• DEBUG
• ERROR
• FATAL
• INFO
Example
log.main.categories = FATAL ERROR INFO
log.main.components
Purpose
Specifies the components that the log outputs.
OpenWBEM 245
Syntax
log.main.components = option
Option Description
Example
log.main.components = owcimomd nssd
log.main.format
Purpose
Specifies the format (text mixed with printf() style conversion specifiers) of the log
messages.
Syntax
log.main.format = conversion_specifier
Option Specifies
%% %
%d Date
For more information about the date format specifiers, see the
documentation for the strftime() function found in the <ctime>
header.
%F Filename
%L Line number
%M Method name where the logging request was issued (only works
on C++ compilers which support __PRETTY_FUNCTION__
or C99’s __func__).
%m Message
%t Thread ID
\n New line
OpenWBEM 247
Option Specifies
\t Tab
\r Line feed
\\ \
It is possible to change the minimum field width, the maximum field width, and justifi-
cation. The optional format modifier is placed between the percent sign (%) and the
conversion character. The first optional format modifier is the left justification flag,
which is the minus (-) character. The optional minimum field width modifier follows,
which is an integer that represents the minimum number of characters to output. If the
data item requires fewer characters, it is padded with spaces on either the left or the
right, according to the justification flag. If the data item is larger than the minimum
field width, the field is expanded to accommodate the data.
The maximum field width modifier is designated by a period (.) followed by a decimal
constant. If the data item is longer than the maximum field, then the extra characters
are removed from the beginning of the data item (by default) or from the end (if the
left justification flag was specified).
Examples
Log4j TTCC layout:
XML output conforming to log4j.dtd 1.2, which can be processed by Chainsaw (if used,
this must be on one line; it is split up here for readability):
log.main.format = [%t]%m
log.main.level
Purpose
Specifies the level the log outputs. If set, the log outputs all predefined categories at
and above the specified level.
Syntax
log.main.level = option
Option Description
DEBUG Logs all Debug, Info, Error, and Fatal error messages.
Example
log.main. level = ERROR
OpenWBEM 249
log.main.location
Purpose
Specifies the location of the log file owcimomd uses when the log.main.type setting
option specifies that logging is sent to a file.
Syntax
log.main.location = path_filename
Example
log.main.location = /system/cimom/var/owcimomd.log
log.main.max_backup_index
Purpose
Specifies the amount of backup logs that are kept before the oldest is erased.
Syntax
log.main.backup_index = option
Option Description
Example
log.main.max_backup_index = 1
Syntax
log.main.max_file_size = option
Option Description
Example
log.main.max_file_size = 0
log.main.type
Purpose
Specifies the type of main log owcimomd uses.
Syntax
log.main.type = option
Option Description
OpenWBEM 251
Option Description
Example
log.main.type = syslog
• log.debug.categories = *
• log.debug.components = *
• log.debug.format = [%t] %m
• log.debug.level = *
• log.debug.type = stderr
log.debug.format =
\x1b[1;37;40m[\x1b[1;31;40m%-.6t\x1b[1;37;40m]\x1b[1;32;40m
%m\x1b[0;37;40m
If you want to use additional colors, use the following codes with the log.debug.format
command:
Color Codes
red \x1b[1;31;40m
green \x1b[1;32;40m
yellow \x1b[1;33;40m
blue \x1b[1;34;40m
purple \x1b[1;35;40m
cyan \x1b[1;36;40m
white \x1b[1;37;40m
gray \x1b[0;37;40m
OpenWBEM 253
owcimomd.additional_logs = logname
Syntax
owcimomd.additional_logs = logname
• log.log_name.categories
• log.log_name.components
• log.log_name.format
• log.log_name.level
• log.log_name.location
• log.log_name.max_backup_index
• log.log_name.max_file_size
Example
owcimomd.additional_logs = errorlog1 errorlog2 errorlog3
• readme
• openwbem-faq.html
OpenWBEM 255
Mass Storage over IP
Networks—iSCSI
One of the central tasks in computer centers and when operating servers is providing
12
hard disk capacity for server systems. Fiber channel is often used for this purpose in
the mainframe sector. So far, UNIX computers and the majority of servers are not
connected to central storage solutions.
linux-iSCSI provides an easy and reasonably inexpensive solution for connecting Linux
computers to central storage systems. In principle, iSCSI represents a transfer of SCSI
commands on the IP level. If a program starts an inquiry for such a device, the operating
system produces the necessary SCSI commands. These are then embedded in IP packages
and encrypted as necessary by software that is commonly known as an iSCSI initiator.
The packages are then transferred to the corresponding iSCSI remote station, also called
iSCSI target.
Many storage solutions provide access over iSCSI, but it is also possible to run a Linux
server that provides an iSCSI target. In this case, it is important to set up the Linux
server optimized for file system services. The iSCSI target just accesses block devices
in Linux. Therefore it is possible to use RAID solutions to increase disk space as well
as a lot of memory to improve data caching. For more information about RAID, also
see Section 7.2, “Soft RAID Configuration” (page 119).
To configure the iSCSI target, run the iSCSI Target module in YaST. The configuration
is split into three tabs. In the Service tab, select the start mode and the firewall settings.
If you want to access the iSCSI target from a remote machine, select Open Port in
Firewall.
The Global tab provides settings for the iSCSI server. The authentication set here is
used for the discovery of services, not for accessing the targets. If you do not want to
restrict the access to the discovery, use No Authentication.
If authentication is needed, there are two possibilities to consider. One is that an initiator
must prove that it has the permissions to run a discovery on the iSCSI target. This is
done with Incoming Authentication. The other is that the iSCSI target must prove to
the initiator that it is the expected target. Therefore, the iSCSI target can also provide
a username and password. This is done with Outgoing Authentication. Find more infor-
mation about authentication in RFC 3720 (see http://www.ietf.org/rfc/
rfc3720.txt).
The targets are defined in the Targets tab. Use Add to create a new iSCSI target. The
first dialog asks for information about the device to export.
Target
The Target line has a fixed syntax that looks like the following:
iqn.yyyy-mm.<reversed domain name>
It always starts with iqn. yyyy-mm is the format of the date when this target is ac-
tivated. Find more about naming conventions in RFC 3722 (see http://www
.ietf.org/rfc/rfc3722.txt).
LUN
It is possible to assign several LUNs to a target. To do this, select a target in the
Targets tab then click Edit. There, add new LUNs to an existing target.
Path
Add the path to the block device or file system image to export.
The next menu configures the access restrictions of the target. The configuration is very
similar to the configuration of the discovery authentication. In this case, at least an in-
coming authentication should be setup.
Next finishes the configuration of the new target, and brings you back to the overview
page of the Target tab. Activate your changes by clicking on Finish.
All iSCSI authentication may be done in two directions. The iSCSI target can require
the iSCSI initiator to authenticate with the IncomingUser, which can be added
multiple times. The iSCSI initiator may also require the iSCSI target to authenticate.
Use OutgoingUser for this. Both have the same syntax:
IncomingUser <username> <password>
OutgoingUser <username> <password>
The authentication is followed by one or several target definitions. For each target, add
a Target section. This section always starts with a Target identifier followed by
definitions of logical unit numbers:
Target iqn.yyyy-mm.<reversed domain name>[:identifier]
Lun 0 Path=/dev/mapper/system-v3
Lun 1 Path=/dev/hda4
Lun 2 Path=/var/lib/xen/images/xen-1,Type=fileio
Before activating the iSCSI target, add at least one IncomingUser after the Lun
definitions. It does the authentication for the use of this target.
To activate all your changes, restart the iscsitarget daemon with rciscsi restart.
Check your configuration in the /proc file system:
cat /proc/net/iet/volume
tid:1 name:iqn.2006-02.com.example.iserv:systems
lun:0 state:0 iotype:fileio path:/dev/mapper/system-v3
lun:1 state:0 iotype:fileio path:/dev/hda4
lun:2 state:0 iotype:fileio path:/var/lib/xen/images/xen-1
There are many more options that control the behavior of the iSCSI target. Find them
in the manual page of ietd.conf.
Active sessions are also displayed in the /proc file system. For each connected initiator,
an extra entry is added to /proc/net/iet/session:
cat /proc/net/iet/session
tid:1 name:iqn.2006-02.com.example.iserv:system-v3
sid:562949957419520
initiator:iqn.2005-11.de.suse:cn=rome.example.com,01.9ff842f5645
cid:0 ip:192.168.178.42 state:active hd:none dd:none
sid:281474980708864 initiator:iqn.2006-02.de.suse:01.6f7259c88b70
cid:0 ip:192.168.178.72 state:active hd:none dd:none
Target iqn.2006-02.com.example.iserv:system2
Lun 0 Path=/dev/mapper/system-swap2
IncomingUser joe secret
1 Create a new target with the command ietadm --op new --tid=2
--params Name=iqn.2006-02.com.example.iserv:system2.
3 Set the username and password combination on this target with ietadm --op
new --tid=2 --user
--params=IncomingUser=joe,Password=secret.
It is also possible to delete active connections. First, check all active connections with
the command cat /proc/net/iet/session. This may look like:
cat /proc/net/iet/session
tid:1 name:iqn.2006-03.com.example.iserv:system
sid:281474980708864 initiator:iqn.1996-04.com.example:01.82725735af5
cid:0 ip:192.168.178.72 state:active hd:none dd:none
To delete the session with the session ID 281474980708864, use the command ietadm
--op delete --tid=1 --sid=281474980708864 --cid=0. Be aware
that this makes the device unaccessible on the client system and processes accessing
this device are likely to hang.
ietadm can also be used to change various configuration parameters. Obtain a list of
the global variables with ietadm --op show --tid=1 --sid=0. The output
looks like:
InitialR2T=Yes
ImmediateData=Yes
MaxConnections=1
MaxRecvDataSegmentLength=8192
MaxXmitDataSegmentLength=8192
All of these parameters may be changed easily. For example, if you want to change the
maximum number of connections to two, use ietadm --op update --tid=1
--params=MaxConnections=2. In the file /etc/ietd.conf, the associated
line should look like MaxConnections 2.
The changes that you make with the command ietadm are not permanent
for the system. These changes are lost at the next reboot if they are not added
to the configuration file /etc/ietd.conf. Depending on the usage of iSCSI
in your network, this may lead to severe problems.
There are several more options available for the command ietadm. Find an overview
with ietadm -h. The abbreviations there are target ID (tid), session ID (sid), and
connection ID (cid). They can also be found in /proc/net/iet/session.
After a successful discovery, use Login to activate the target. You will be asked for
authentication information to use the selected iSCSI target. Next finishes the configura-
tion. If everything went well, the target now appears in Connected Targets.
The virtual iSCSI device is now available. Find the actual device with lsscsi:
lsscsi
[1:0:0:0] disk IET VIRTUAL-DISK 0 /dev/sda
The discovery stores all received values in an internal persistent database. In addition,
it displays all detected targets. Run this discovery with the command iscsiadm -m
discovery --type=st --portal=<targetip>. The output should look
like:
[bd0ac2] 149.44.171.99:3260,1 iqn.2006-02.com.example.iserv:systems
For each target defined on the iSCSI target, one line appears. In the previous example,
the ID of the target is bd0ac2. This ID is used to access the target. Learn how to obtain
more information about the stored data in Section 12.2.3, “The iSCSI Client Databases”
(page 264).
The newly generated devices show up in the output of lsscsi and can now be accessed
by mount.
The record ID in this example is bd0ac2. This ID is needed for all actions that relate
to this special data set. To examine the content of the data record with the ID bd0c2,
use the following command:
iscsiadm -m node -r bd0ac2
node.name = iqn.2006-02.com.example.iserv:systems
To edit the value of one of these variables, use the command iscsiadm with the
update operation. For example, if you want iscsid to log in to the iSCSI target when
it initializes, set the variable node.startup to the value automatic:
iscsiadm -m node -r bd0ac2 --op=update --name=node.startup --value=automatic
Remove obsolete data sets with the operation delete. If the record bd0ac2 is no
longer a valid record, delete this record with the command iscsiadm -m node
-r bd0ac2 --op=delete. Use this option with caution because it deletes the
record without any additional confirmation prompt.
• http://www.open-iscsi.org/
• http://www.open-iscsi.org/cgi-bin/wiki.pl
• http://www.novell.com/coolsolutions/appnote/15394.html
XEN virtual machines and virtual servers can be stored on OCFS2 volumes that
are mounted by cluster servers to provide quick and easy portability of XEN virtual
machines between servers.
• An application’s files are available to all nodes in the cluster. Users simply install
it once on an OCFS2 volume in the cluster.
• All nodes can concurrently read and write directly to storage via the standard file
system interface, enabling easy management of applications that run across a cluster.
DLM control is good for most cases, but an application’s design might limit scala-
bility if it contends with the DLM to coordinate file access.
• Metadata caching
• Metadata journaling
• Support for multiple-block sizes (each volume can have a different block size) up
to 4 KB, for a maximum volume size of 16 TB
• Asynchronous and direct I/O support for database files for improved database per-
formance
Service Description
Node Manager (NM) Keeps track of all the nodes in the /etc/ocfs2/
cluster.conf file
Distributed Lock Manager Keeps track of all locks and their owners and status
(DLM)
DLMFS User space interface to the kernel space DLM. For de-
tails, see Section 13.1.4, “In-Memory File Systems”
(page 270).
The OC2B cluster service communicates the node status via a disk heartbeat. The
heartbeat system file resides on the SAN, where it is available to all nodes in the cluster.
The block assignments in the file correspond sequentially to each node’s slot assignment.
Each node reads the file and writes to its assigned block in the file at two-second inter-
vals. Changes to a node’s time stamp indicates the node is alive. A node is dead if it
does not write to the heartbeat file for a specified number of sequential intervals, called
the heartbeat threshold. Even if only a single node is alive, the O2CB cluster service
must perform this check, because another node could be added dynamically at any time.
You can modify the disk heartbeat threshold in the /etc/sysconfig/o2cb file,
using the O2CB_HEARTBEAT_THRESHOLD parameter. The wait time is calculated
as follows:
The ocfs2console utility is a GTK GUI-based interface for managing the configu-
ration of the OCFS2 services in the cluster. Use this utility to set up and save the /etc/
ocfs2/cluster.conf file to all member nodes of the cluster. In addition, you can
use it to format, tune, mount, and umount OCFS2 volumes.
IMPORTANT
The file browser column in the ocfs2console utility is prohibitively slow and
inconsistent across the cluster. We recommend that you use the ls(1) com-
mand to list files instead.
Additional OCFS2 utilities are described in the following table. For information about
syntax for these commands, see their man pages.
de- Examines the state of the OCFS file system for the purpose of debug-
bugfs.ocfs2 ging.
fsck.ocfs2 Checks the file system for errors and optionally repairs errors.
mount- Detects and lists all OCFS2 volumes on a clustered system. Detects
ed.ocfs2 and lists all nodes on the system that have mounted an OCFS2 device
or lists all OCFS2 devices.
tune.ocfs2 Changes OCFS2 file system parameters, including the volume label,
number of node slots, journal size for all node slots, and volume size.
Use the following commands to manage O2CB services. For more information about
the o2cb command syntax, see its man page.
Command Description
/etc/init.d/o2cb status Reports whether the o2cb services are loaded and mounted
/etc/init.d/o2cb load Loads the O2CB modules and in-memory file systems
/etc/init.d/o2cb unload Unloads the O2CB modules and in-memory file systems
/etc/init.d/o2cb start If the cluster is set up to load on boot, starts the cluster
ocfs2 named ocfs2 by loading o2cb and onlining the cluster
/etc/init.d/o2cb stop If the cluster is set up to load on boot, stops the cluster
ocfs2 named ocfs2 by offlining the cluster and unloading the
O2CB modules and in-memory file systems
1 Log in as the root user or equivalent, then open the YaST Control Center.
ocfs2
13.2.1 Prerequisites
Before you begin, do the following:
• Initialize, carve, or configure RAIDs on the SAN disks, as needed, to prepare the
devices you plan to use for your OCFS2 volumes. Leave the devices as free space.
We recommend that you store application files and data files on different OCFS2
volumes, but it is only mandatory to do so if your application volumes and data
volumes have different requirements for mounting. For example, the Oracle RAC
database volume requires the datavolume and nointr mounting options, but
the Oracle Home volume should never use these options.
• Make sure that the ocfs2console, and ocfs2-tools packages are installed.
Use YaST or command line methods to install them if they are not. For YaST in-
structions, see Section 13.1.6, “OCFS2 Packages” (page 273).
Follow the procedure in this section for one node in the cluster.
When you add a new service, chkconfig ensures that the service has either a
start or a kill entry in every run level.
4a Enter
/etc/init.d/o2cb configure
none
This choice presumes that you are setting up OCFS2 for the first time or re-
setting the service. You specify a cluster name in the next step when you set
up the /etc/ocfs2/cluster.conf file.
This file should be the same on all the nodes in the cluster. Use the following
steps to set up the first node. Later, you can use the ocfs2console to add new
nodes to the cluster dynamically and to propagate the modified cluster.conf
file to all nodes.
ocfs2console
If cluster.conf is not present, the console will create one with a default cluster
name of ocfs2. Modify the cluster name as desired.
5c In the Node Configuration dialog box, click Add to open the Add Node dialog
box.
5d In the Add Node dialog box, specify the unique name of your primary node,
a unique IP address (such as 192.168.1.1), and the port number (optional,
default is 7777), then click OK.
5e In the Node Configuration dialog box, click Apply, then click Close to dismiss
the Add Node dialog box.
6 If you need to restart the OCFS2 cluster for the changes to take effect, enter the
following lines, waiting in between for the process to return a status of OK.
/etc/init.d/o2cb stop
/etc/init.d/o2cb start
2 If the O2CB cluster service is offline, start it by entering the following command,
then wait for the process to return a status of OK.
Replace ocfs2 with the actual cluster name of your OCFS2 cluster.
The OCFS2 cluster must be online, because the format operation must first ensure
that the volume is not mounted on any node in the cluster.
3 Create and format the volume using one of the following methods:
• In EVMSGUI, go to the Volumes page, select Make a file system > OCFS2,
then specify the configuration settings.
• Use the mkfs.ocfs2 utility. For information about the syntax for this
command, refer to the mkfs.ocfs2 man page.
Volume la- A descriptive name for the volume to make it uniquely identifi-
bel able when it is mounted on different nodes.
Cluster size Cluster size is the smallest unit of space allocated to a file to
hold the data.
Options are 4, 8, 16, 32, 64, 128, 256, 512, and 1024 KB. Cluster
size cannot be modified after the volume is formatted.
Block size The smallest unit of space addressable by the file system.
Specify the block size when you create the volume.
2 If the O2CB cluster service is offline, start it by entering the following command,
then wait for the process to return a status of OK.
Replace ocfs2 with the actual cluster name of your OCFS2 cluster.
The OCFS2 cluster must be online, because the format operation must ensure
that the volume is not mounted on any node in the cluster.
• Mount the volume from the command line, using the mount command.
For information about mounting an OCFS2 volume using any of these methods,
see the OCFS2 User Guide [http://oss.oracle.com/projects/
ocfs2/documentation/] on the OCFS2 project at Oracle [http://oss
.oracle.com/projects/ocfs2/].
When running Oracle RAC, make sure to use the datavolume and nointr
mounting options for OCFS2 volumes that contain the Voting diskfile (CRS),
Cluster registry (OCR), Data files, Redo logs, Archive logs, and Control files.
Do not use these options when mounting the Oracle Home volume.
Ensures that the Oracle processes open the files with the o_direct
datavolume
flag.
The term POSIX ACL suggests that this is a true POSIX (portable operating system
interface) standard. The respective draft standards POSIX 1003.1e and POSIX 1003.2c
have been withdrawn for several reasons. Nevertheless, ACLs as found on many systems
belonging to the UNIX family are based on these drafts and the implementation of file
system ACLs as described in this chapter follows these two standards as well. They
can be viewed at http://wt.xpilot.org/publications/posix.1e/.
You can see the s that denotes that the setuid bit is set for the user permission. By
means of the setuid bit, all users starting the passwd command execute it as root.
You can see the s that denotes that the setgid bit is set for the group permission. The
owner of the directory and members of the group archive may access this directory.
Users that are not members of this group are “mapped” to the respective group. The
effective group ID of all written files will be archive. For example, a backup program
that runs with the group ID archive is able to access this directory even without root
privileges.
ACLs can be used as an extension of the traditional file permission concept. They allow
assignment of permissions to individual users or groups even if these do not correspond
to the original owner or the owning group. Access control lists are a feature of the
Linux kernel and are currently supported by ReiserFS, Ext2, Ext3, JFS, and XFS. Using
ACLs, complex scenarios can be realized without implementing complex permission
models on the application level.
The advantages of ACLs are evident if you want to replace a Windows server with a
Linux server. Some of the connected workstations may continue to run under Windows
even after the migration. The Linux system offers file and print services to the Windows
clients with Samba. With Samba supporting access control lists, user permissions can
be configured both on the Linux server and in Windows with a graphical user interface
(only Windows NT and later). With winbindd, part of the samba suite, it is even
possible to assign permissions to users only existing in the Windows domain without
any account on the Linux server.
14.3 Definitions
user class
The conventional POSIX permission concept uses three classes of users for assign-
ing permissions in the file system: the owner, the owning group, and other users.
Three permission bits can be set for each user class, giving permission to read (r),
write (w), and execute (x).
access ACL
The user and group access permissions for all kinds of file system objects (files
and directories) are determined by means of access ACLs.
ACL entry
Each ACL consists of a set of ACL entries. An ACL entry contains a type, a qual-
ifier for the user or group to which the entry refers, and a set of permissions. For
some entry types, the qualifier for the group or users is undefined.
The mask entry further limits the permissions granted by named user, named group,
and owning group entries by defining which of the permissions in those entries are ef-
fective and which are masked. If permissions exist in one of the mentioned entries as
well as in the mask, they are effective. Permissions contained only in the mask or only
in the actual entry are not effective—meaning the permissions are not granted. All
permissions defined in the owner and owning group entries are always effective. The
example in Table 14.2, “Masking Access Permissions” (page 285) demonstrates this
mechanism.
There are two basic classes of ACLs: A minimum ACL contains only the entries for
the types owner, owning group, and other, which correspond to the conventional per-
mission bits for files and directories. An extended ACL goes beyond this. It must contain
a mask entry and may contain several entries of the named user and named group types.
owner user::rwx
mask mask::rwx
other other::rwx
In the case of a minimum ACL—without mask—the group class permissions are mapped
to the ACL entry owning group. This is shown in Figure 14.1, “Minimum ACL: ACL
Entries Compared to Permission Bits” (page 286). In the case of an extended ACL—with
mask—the group class permissions are mapped to the mask entry. This is shown in
Figure 14.2, “Extended ACL: ACL Entries Compared to Permission Bits” (page 286).
mkdir mydir creates the mydir directory with the default permissions as set by
umask. Use ls -dl mydir to check whether all permissions were assigned correctly.
The output for this example is:
With getfacl mydir, check the initial state of the ACL. This gives information
like:
# file: mydir
# owner: tux
# group: project3
user::rwx
group::r-x
other::---
The first three output lines display the name, owner, and owning group of the directory.
The next three lines contain the three ACL entries owner, owning group, and other. In
fact, in the case of this minimum ACL, the getfacl command does not produce any
information you could not have obtained with ls.
Modify the ACL to assign read, write, and execute permissions to an additional user
geeko and an additional group mascots with:
The option -m prompts setfacl to modify the existing ACL. The following argument
indicates the ACL entries to modify (multiple entries are separated by commas). The
final part specifies the name of the directory to which these modifications should be
applied. Use the getfacl command to take a look at the resulting ACL.
# file: mydir
# owner: tux
# group: project3
In addition to the entries initiated for the user geeko and the group mascots, a mask
entry has been generated. This mask entry is set automatically so that all permissions
are effective. setfacl automatically adapts existing mask entries to the settings
modified, unless you deactivate this feature with -n. mask defines the maximum effec-
tive access permissions for all entries in the group class. This includes named user,
named group, and owning group. The group class permission bits displayed by ls -dl
mydir now correspond to the mask entry.
The first column of the output contains an additional + to indicate that there is an ex-
tended ACL for this item.
According to the output of the ls command, the permissions for the mask entry include
write access. Traditionally, such permission bits would mean that the owning group
(here project3) also has write access to the directory mydir. However, the effective
access permissions for the owning group correspond to the overlapping portion of the
permissions defined for the owning group and for the mask—which is r-x in our ex-
ample (see Table 14.2, “Masking Access Permissions” (page 285)). As far as the effective
permissions of the owning group in this example are concerned, nothing has changed
even after the addition of the ACL entries.
Edit the mask entry with setfacl or chmod. For example, use chmod g-w mydir.
ls -dl mydir then shows:
# file: mydir
# owner: tux
# group: project3
user::rwx
user:geeko:rwx # effective: r-x
group::r-x
After executing the chmod command to remove the write permission from the group
class bits, the output of the ls command is sufficient to see that the mask bits must
have changed accordingly: write permission is again limited to the owner of mydir.
The output of the getfacl confirms this. This output includes a comment for all those
entries in which the effective permission bits do not correspond to the original permis-
sions, because they are filtered according to the mask entry. The original permissions
can be restored at any time with chmod g+w mydir.
• A subdirectory inherits the default ACL of the parent directory both as its default
ACL and as an access ACL.
All system calls that create file system objects use a mode parameter that defines the
access permissions for the newly created file system object. If the parent directory does
not have a default ACL, the permission bits as defined by the umask are subtracted
from the permissions as passed by the mode parameter, with the result being assigned
to the new object. If a default ACL exists for the parent directory, the permission bits
assigned to the new object correspond to the overlapping portion of the permissions of
the mode parameter and those that are defined in the default ACL. The umask is dis-
regarded in this case.
The option -d of the setfacl command prompts setfacl to perform the fol-
lowing modifications (option -m) in the default ACL.
getfacl mydir
# file: mydir
# owner: tux
# group: project3
user::rwx
user:geeko:rwx
group::r-x
group:mascots:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:mascots:r-x
default:mask::r-x
default:other::---
getfacl returns both the access ACL and the default ACL. The default ACL is
formed by all lines that start with default. Although you merely executed the
setfacl command with an entry for the mascots group for the default ACL,
setfacl automatically copied all other entries from the access ACL to create a
valid default ACL. Default ACLs do not have an immediate effect on access per-
missions. They only come into play when file system objects are created. These
new objects inherit permissions only from the default ACL of their parent directory.
2. In the next example, use mkdir to create a subdirectory in mydir, which inherits
the default ACL.
mkdir mydir/mysubdir
# file: mydir/mysubdir
# owner: tux
# group: project3
user::rwx
group::r-x
group:mascots:r-x
mask::r-x
other::---
default:user::rwx
default:group::r-x
default:group:mascots:r-x
default:mask::r-x
default:other::---
3. Use touch to create a file in the mydir directory, for example, touch
mydir/myfile. ls -l mydir/myfile then shows:
# file: mydir/myfile
# owner: tux
# group: project3
user::rw-
group::r-x # effective:r--
group:mascots:r-x # effective:r--
mask::r--
other::---
touch uses a mode with the value 0666 when creating new files, which means
that the files are created with read and write permissions for all user classes, pro-
vided no other restrictions exist in umask or in the default ACL (see Section
“Effects of a Default ACL” (page 289)). In effect, this means that all access permis-
sions not contained in the mode value are removed from the respective ACL entries.
Although no permissions were removed from the ACL entry of the group class,
the mask entry was modified to mask permissions not set in mode.
Things are more complicated if a process belongs to more than one group and would
potentially suit several group entries. An entry is randomly selected from the suitable
entries with the required permissions. It is irrelevant which of the entries triggers the
final result “access granted”. Likewise, if none of the suitable group entries contains
the required permissions, a randomly selected entry triggers the final result “access
denied”.
Unfortunately, many editors and file managers still lack ACL support. When copying
files with Emacs, for instance, the ACLs of these files are lost. When modifying files
with an editor, the ACLs of files are sometimes preserved and sometimes not, depending
on the backup mode of the editor used. If the editor writes the changes to the original
file, the access ACL is preserved. If the editor saves the updated contents to a new file
that is subsequently renamed to the old filename, the ACLs may be lost, unless the ed-
itor supports ACLs. Except for the star archiver, there are currently no backup applica-
tions that preserve ACLs.
Essentially, rpm has five modes: installing, uninstalling, or updating software packages;
rebuilding the RPM database; querying RPM bases or individual RPM archives; integrity
checking of packages; and signing packages. rpmbuild can be used to build installable
packages from pristine sources.
Installable RPM archives are packed in a special binary format. These archives consist
of the program files to install and certain meta information used during the installation
by rpm to configure the software package or stored in the RPM database for documen-
tation purposes. RPM archives normally have the extension .rpm.
• If a configuration file was not changed by the system administrator, rpm installs
the new version of the appropriate file. No action by the system administrator is
required.
• .rpmnew files appear if the configuration file already exists and if the noreplace
label was specified in the .spec file.
Following an update, .rpmsave and .rpmnew files should be removed after compar-
ing them, so they do not obstruct future updates. The .rpmorig extension is assigned
if the file has not previously been recognized by the RPM database.
Otherwise, .rpmsave is used. In other words, .rpmorig results from updating from
a foreign format to RPM. .rpmsave results from updating from an older RPM to a
newer RPM. .rpmnew does not disclose any information as to whether the system
administrator has made any changes to the configuration file. A list of these files is
available in /var/adm/rpmconfigcheck. Some configuration files (like /etc/
httpd/httpd.conf) are not overwritten to allow continued operation.
The -U switch is not just an equivalent to uninstalling with the -e option and installing
with the -i option. Use -U whenever possible.
To remove a package, enter rpm -e package. rpm only deletes the package if there
are no unresolved dependencies. It is theoretically impossible to delete Tcl/Tk, for ex-
ample, as long as another application requires it. Even in this case, RPM calls for assis-
tance from the database. If such a deletion is—for whatever reason and under unusual
circumstances—impossible, even if no additional dependencies exist, it may be helpful
to rebuild the RPM database using the option --rebuilddb.
rpm -q pine
pine-4.44-188
Then check if the patch RPM is suitable for this version of pine:
rpm -qp --basedon pine-4.44-224.i586.patch.rpm
pine = 4.44-188
pine = 4.44-195
pine = 4.44-207
This patch is suitable for three different versions of pine. The installed version in
the example is also listed, so the patch can be installed.
rpm -qPa
pine-4.44-224
If, at a later date, you want to know which package version was originally installed,
this information is also available in the RPM database. For pine, this information
can be displayed with the following command:
More information, including information about the patch feature of RPM, is available
in the man pages of rpm and rpmbuild.
Finally, remove the temporary working files old.cpio, new.cpio, and delta.
To derive it from the old RPM without accessing the file system, use the -r option:
applydeltarpm -r old.rpm new.delta.rpm new.rpm
-i Package information
-l File list
-f FILE Query the package that contains the file FILE (the full
path must be specified with FILE)
--dump File list with complete details (to be used with -l, -c, or
-d)
--provides List features of the package that another package can re-
quest with --requires
For example, the command rpm -q -i wget displays the information shown in
Example 15.1, “rpm -q -i wget” (page 301).
The option -f only works if you specify the complete filename with its full path. Provide
as many filenames as desired. For example, the following command
rpm -q -f /bin/rpm /usr/bin/wget
results in:
rpm-4.1.1-191
wget-1.9.1-50
If only part of the filename is known, use a shell script as shown in Example 15.2,
“Script to Search for Packages” (page 302). Pass the partial filename to the script shown
as a parameter when running it.
#! /bin/sh
for i in $(rpm -q -a -l | grep $1); do
echo "\"$i\" is in package:"
rpm -q -f $i
echo ""
done
The command rpm -q --changelog rpm displays a detailed list of change infor-
mation about a specific package, sorted by date. This example shows information about
the package rpm.
With the help of the installed RPM database, verification checks can be made. Initiate
these with -V, -y, or --verify. With this option, rpm shows all files in a package
that have been changed since installation. rpm uses eight character symbols to give
some hints about the following changes:
S File size
L Symbolic link
T Modification time
U Owner
G Group
In the case of configuration files, the letter c is printed. For example, for changes to
/etc/wgetrc (wget):
rpm -V wget
S.5....T c /etc/wgetrc
TIP
Source packages can be copied from the installation medium to the hard disk
and unpacked with YaST. They are not, however, marked as installed ([i]) in
the package manager. This is because the source packages are not entered in
the RPM database. Only installed operating system software is listed in the RPM
database. When you “install” a source package, only the source code is added
to the system.
The following directories must be available for rpm and rpmbuild in /usr/src/
packages (unless you specified custom settings in a file like /etc/rpmrc):
SOURCES
for the original sources (.tar.bz2 or .tar.gz files, etc.) and for distribution-
specific adjustments (mostly .diff or .patch files)
SPECS
for the .spec files, similar to a meta Makefile, which control the build process
BUILD
all the sources are unpacked, patched, and compiled in this directory
SRPMS
here are the source RPMs
When you install a source package with YaST, all the necessary components are installed
in /usr/src/packages: the sources and the adjustments in SOURCES and the
relevant .spec file in SPECS.
WARNING
The following example uses the wget.src.rpm package. After installing the package
with YaST, you should have files similar to the following listing:
/usr/src/packages/SOURCES/nops_doc.diff
/usr/src/packages/SOURCES/toplev_destdir.diff
/usr/src/packages/SOURCES/wget-1.9.1+ipvmisc.patch
/usr/src/packages/SOURCES/wget-1.9.1-brokentime.patch
/usr/src/packages/SOURCES/wget-1.9.1-passive_ftp.diff
/usr/src/packages/SOURCES/wget-LFS-20040909.tar.bz2
/usr/src/packages/SOURCES/wget-wrong_charset.patch
/usr/src/packages/SPECS/wget.spec
-bp
Prepare sources in /usr/src/packages/BUILD: unpack and patch.
-bc
Do the same as -bp, but with additional compilation.
-bi
Do the same as -bp, but with additional installation of the built software. Caution:
if the package does not support the BuildRoot feature, you might overwrite confi-
guration files.
-ba
Do the same as -bb, but with the additional creation of the source RPM. If the
compilation was successful, the binary should be in /usr/src/packages/
SRPMS.
--short-circuit
Skip some steps.
The binary RPM created can now be installed with rpm -i or, preferably, with rpm
-U. Installation with rpm makes it appear in the RPM database.
cd /usr/src/packages/SOURCES/
mv ../SPECS/wget.spec .
build --rpms /media/dvd/suse/ wget.spec
The build script offers a number of additional options. For example, cause the script
to prefer your own RPMs, omit the initialization of the build environment, or limit the
KDE offers the kpackage tool as a front-end for rpm. A full-featured package manager
is available as a YaST module (see Section 8.3.1, “Installing and Removing Software”
(page 127)).
For each of the commands introduced, examples of the relevant outputs are presented.
In these examples, the first line is the command itself (after the > or # sign prompt).
Omissions are indicated with square brackets ([...]) and long lines are wrapped
where necessary. Line breaks for long lines are indicated by a backslash (\).
# command -x -y
output line 1
output line 2
output line 3 is annoyingly long, so long that \
we have to break it
output line 3
[...]
output line 98
output line 99
The descriptions have been kept short to allow as many utilities as possible to be men-
tioned. Further information for all the commands can be found in the man pages. Most
of the commands also understand the parameter --help, which produces a brief list
of the possible parameters.
tester@linux:~> strace ls
execve("/bin/ls", ["ls"], [/* 61 vars */]) = 0
uname({sys="Linux", node="linux", ...}) = 0
brk(0) = 0x805c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or \
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=89696, ...}) = 0
mmap2(NULL, 89696, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef2000
close(3) = 0
open("/lib/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\36\0"..., 512) \
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=36659, ...}) = 0
[...]
stat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) \
= 0xb7ca7000
write(1, "bin Desktop Documents music\tM"..., 55bin Desktop Documents \
\ music Music public_html tmp
) = 55
close(1) = 0
munmap(0xb7ca7000, 4096) = 0
exit_group(0) = ?
For example, to trace all attempts to open a particular file, use the following:
To trace all the child processes, use the parameter -f. The behavior and output format
of strace can be largely controlled. For information, see man strace.
The parameter -f list specifies a file with a list of filenames to examine. The -z
allows file to look inside compressed files:
tester@linux:~> mount
/dev/hda3 on / type reiserfs (rw,acl,user_xattr)
Obtain information about total usage of the file systems with the command df. The
parameter -h (or --human-readable) transforms the output into a form understand-
able for common users.
tester@linux:~> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 11G 3.2G 6.9G 32% /
udev 252M 104K 252M 1% /dev
/dev/hda1 16M 6.6M 7.8M 46% /boot
/dev/hda4 27G 34M 27G 1% /local
Display the total size of all the files in a given directory and its subdirectories with the
command du. The parameter -s suppresses the output of detailed information. -h
again transforms the data into a human-readable form:
The parameter --filesystem produces details of the properties of the file system
in which the specified file is located:
linux:~ # lspci
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE \
DRAM Controller/Host-Hub Interface (rev 01)
00:01.0 PCI bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE \
Host-to-AGP Bridge (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM \
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM \
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM \
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM \
(ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) \
LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE \
Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) \
SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM \
(ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
01:00.0 VGA compatible controller: Matrox Graphics, Inc. G400/G450 (rev 85)
02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (LOM) \
Ethernet Controller (rev 81)
linux:~ # lspci
[...]
02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (LOM)\
Ethernet Controller (rev 81)
Subsystem: Fujitsu Siemens Computer GmbH: Unknown device 1001
Flags: bus master, medium devsel, latency 66, IRQ 11
Memory at d1000000 (32-bit, non-prefetchable) [size=4K]
I/O ports at 3000 [size=64]
Capabilities: [dc] Power Management version 2
The parameter -vv produces all the information that could be queried by the program.
To view the pure numeric values, use the parameter -n.
linux:/ # lsusb
Bus 004 Device 007: ID 0ea0:2168 Ours Technology, Inc. Transcend JetFlash \
2.0 / Astone USB Drive
Bus 004 Device 006: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE \
Adapter
Bus 004 Device 005: ID 05e3:0605 Genesys Logic, Inc.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 005: ID 046d:c012 Logitech, Inc. Optical Mouse
Bus 001 Device 001: ID 0000:0000
The option -d puts out a defects list with two tables of bad blocks of a hard disk: first
the one supplied by the vendor (manufacturer table) and second the list of bad blocks
that appeared in operation (grown table). If the number of entries in the grown table
increases, it might be a good idea to replace the hard disk.
16.4 Networking
16.4.1 Show the Network Status: netstat
netstat shows network connections, routing tables (-r), interfaces (-i), masquerade
connections (-M), multicast memberships (-g), and statistics (-s).
tester@linux:~> netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.22.0 * 255.255.254.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.22.254 0.0.0.0 UG 0 0 0 eth0
tester@linux:~> netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 1624507 129056 0 0 7055 0 0 0 BMNRU
When displaying network connections or statistics, you can specify the socket type to
display: TCP (-t), UDP (-u), or raw (-r). The -p option shows the PID and name
of the program to which each socket belongs.
The following example lists all TCP connections and the programs using these connec-
tions.
linux:~ # netstat -t -p
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Pro
tester@linux:~> netstat -s -t
Tcp:
2427 active connections openings
2374 passive connection openings
0 failed connection attempts
0 connection resets received
1 connections established
27476 segments received
26786 segments send out
54 segments retransmited
0 bad segments received.
6 resets sent
[...]
TCPAbortOnLinger: 0
TCPAbortFailed: 0
TCPMemoryPressures: 0
Query the allocation and use of interrupts with the following command:
/proc/devices
Available devices
/proc/modules
Kernel modules loaded
/proc/cmdline
Kernel command line
/proc/meminfo
Detailed information about memory usage
tester@linux:~> ls -l /proc/self
lrwxrwxrwx 1 root root 64 2006-01-09 13:03 /proc/self -> 5356
tester@linux:~> ls -l /proc/self/
total 0
dr-xr-xr-x 2 tester users 0 2006-01-09 17:04 attr
-r-------- 1 tester users 0 2006-01-09 17:04 auxv
-r--r--r-- 1 tester users 0 2006-01-09 17:04 cmdline
lrwxrwxrwx 1 tester users 0 2006-01-09 17:04 cwd -> /home/tester
-r-------- 1 tester users 0 2006-01-09 17:04 environ
lrwxrwxrwx 1 tester users 0 2006-01-09 17:04 exe -> /bin/ls
dr-x------ 2 tester users 0 2006-01-09 17:04 fd
-rw-r--r-- 1 tester users 0 2006-01-09 17:04 loginuid
-r--r--r-- 1 tester users 0 2006-01-09 17:04 maps
-rw------- 1 tester users 0 2006-01-09 17:04 mem
-r--r--r-- 1 tester users 0 2006-01-09 17:04 mounts
-rw-r--r-- 1 tester users 0 2006-01-09 17:04 oom_adj
-r--r--r-- 1 tester users 0 2006-01-09 17:04 oom_score
lrwxrwxrwx 1 tester users 0 2006-01-09 17:04 root -> /
-rw------- 1 tester users 0 2006-01-09 17:04 seccomp
-r--r--r-- 1 tester users 0 2006-01-09 17:04 smaps
-r--r--r-- 1 tester users 0 2006-01-09 17:04 stat
[...]
dr-xr-xr-x 3 tester users 0 2006-01-09 17:04 task
-r--r--r-- 1 tester users 0 2006-01-09 17:04 wchan
The address assignment of executables and libraries is contained in the maps file:
16.5.1 procinfo
Important information from the /proc file system is summarized by the command
procinfo:
tester@linux:~> procinfo
Linux 2.6.15-rc5-git3-2-default (geeko@buildhost) (gcc 4.1.0 20051129) #1 Wed
Bootup: Mon Jan 9 12:59:08 2006 Load average: 0.10 0.04 0.05 1/86 5406
To see all the information, use the parameter -a. The parameter -nN produces updates
of the information every N seconds. In this case, terminate the program by pressing Q.
16.6 Processes
16.6.1 Interprocess Communication: ipcs
The command ipcs produces a list of the IPC resources currently in use:
To list all processes with user and command line information, use ps axu:
tester@linux:~> ps axu
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 696 272 ? S 12:59 0:01 init [5]
root 2 0.0 0.0 0 0 ? SN 12:59 0:00 [ksoftirqd
root 3 0.0 0.0 0 0 ? S< 12:59 0:00 [events
[...]
To check how many sshd processes are running, use the option -p together with the
command pidof, which lists the process IDs of the given processes.
The process list can be formatted according to your needs. The option -L returns a list
of all keywords. Enter the following command to issue a list of all processes sorted by
memory usage:
The parameter -p adds the process ID to a given name. To have the command lines
displayed as well, use the -a parameter:
If you press F while top is running, a menu opens with which to make extensive changes
to the format of the output.
The parameter -U UID monitors only the processes associated with a particular user.
Replace UID with the user ID of the user. top -U `id -u` returns the UID of the
user on the basis of the username and displays his processes.
sar can generate extensive reports on almost all important system activities, among
them CPU, memory, IRQ usage, IO, or networking. With its many options, it is too
complex to explain further here. Refer to the man page for extensive documentation
with examples.
tester@linux:~> free
total used free shared buffers cached
Mem: 515584 501704 13880 0 73040 334592
-/+ buffers/cache: 94072 421512
Swap: 658656 0 658656
The options -b,-k,-m,-g show output in bytes, KB, MB, or GB, respectively. The
parameter -d delay ensures that the display is refreshed every delay seconds. For
example, free -d 1.5 produces an update every 1.5 seconds.
Following termination of the less process, which was running on another terminal,
the file system can successfully be unmounted.
$ dmesg
[...]
end_request: I/O error, dev fd0, sector 0
subfs: unsuccessful attempt to mount media (256)
e100: eth0: e100_watchdog: link up, 100Mbps, half-duplex
NET: Registered protocol family 17
IA-32 Microcode Update Driver: v1.14 <[email protected]>
microcode: CPU0 updated from revision 0xe to 0x2e, date = 08112004
IA-32 Microcode Update Driver v1.14 unregistered
bootsplash: status on console 0 changed to on
NET: Registered protocol family 10
Disabled Privacy Extensions on device c0326ea0(lo)
IPv6 over IPv4 tunneling driver
powernow: This module only works with AMD K7 CPUs
bootsplash: status on console 0 changed to on
tester@linux:~> lsof -p $$
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
bash 5552 tester cwd DIR 3,3 1512 117619 /home/tester
bash 5552 tester rtd DIR 3,3 584 2 /
bash 5552 tester txt REG 3,3 498816 13047 /bin/bash
bash 5552 tester mem REG 0,0 0 [heap] (stat: No such
bash 5552 tester mem REG 3,3 217016 115687 /var/run/nscd/passwd
bash 5552 tester mem REG 3,3 208464 11867 /usr/lib/locale/en_GB.
The special shell variable $$, whose value is the process ID of the shell, has been used.
The command lsof lists all the files currently open when used without any parameters.
Because there are often thousands of open files, listing all of them is rarely useful.
However, the list of all files can be combined with search functions to generate useful
lists. For example, list all used character devices:
res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier
3e00000 385 36 1 751 107 18161K 13K 18175K ? NOVELL: SU
4600000 391 122 1 1182 889 4566K 33K 4600K ? amaroK - S
1600000 35 11 0 76 142 3811K 4K 3816K ? KDE Deskto
3400000 52 31 1 69 74 2816K 4K 2820K ? Linux Shel
tester@linux:~> w
16:33:03 up 3:33, 2 users, load average: 0.14, 0.06, 0.02
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
tester :0 16:33 ?xdm? 9.42s 0.15s /bin/sh /opt/kde3/bin/startk
tester pts/0 15:59 0.00s 0.19s 0.00s w
If any users of other systems have logged in remotely, the parameter -f shows the
computers from which they have established the connection.
real 0m4.051s
user 0m0.042s
sys 0m0.205s
There are several shells for UNIX or Linux. The default shell in SUSE® Linux Enterprise
is Bash (GNU Bourne-Again Shell).
This chapter deals with a couple of basics you need to know for using the shell. This
includes the following topics: how to enter commands, the directory structure of Linux,
how to work with files and directories and how to use some basic functions, the user
and permission concept of Linux, an overview of important shell commands, and a
short introduction to the vi editor, which is a default editor always available in Unix
and Linux systems.
The Konsole or the GNOME Terminal window appears, showing the prompt on the
first line like in Figure 17.1, “Example of a Bash Terminal Window” (page 332). The
prompt usually shows your login name (in this example, tux), the hostname of your
computer (here, knox), and the current path (in this case, your home directory, indicated
by the tilde symbol, ~). When you are logged in on a remote computer this information
always shows you which system you are currently working on. When the cursor is after
this prompt, you can send commands directly to your computer system.
The shell is not verbose: in contrast to some graphical user interfaces, it usually
does not provide confirmation messages when commands have been executed.
Messages only appear in case of problems or errors.
Also keep this in mind for commands to delete objects. Before entering a
command like rm for removing a file, you should know if you really want to
get rid of the object: it will be deleted irretrievably, without enquiry.
Unlike in other operating systems, files in Linux may have a file extension, such as
.txt, but do not need to have one. This makes it difficult to differentiate between files
and folders in this output of the ls. By default, the colors can give you a hint: directories
are usually shown in blue, files in black.
On the left of each object name, information about the object is shown in several
columns. The most important are the following: The first column shows the file type
of the object (in this example, d for directory or - for normal files). The next nine
columns show the user permissions for the object. Columns 11 and 12 show the name
of the file owner and the group (in this case, tux and users). Find information about
user permissions and the user concept of Linux in Section 17.2, “Users and Access
Permissions” (page 343). The next column shows the file size in bytes. Then date and
time of the last change are displayed. The last column shows the object name.
If you want to see even more, you can combine two options for the ls command and
enter ls -la. The shell now also shows hidden files in the directory, indicated by a
dot in front (for example, .hiddenfile).
Getting Help
Nobody is expected to know all options of all commands by heart. If you remember
the command name but are not sure about the options, you can enter the command
followed by a blank and --help. This --help option exists for many commands.
Entering ls --help displays all the options for the ls command.
Figure 17.4 shows the standard directory tree in Linux, with the home directories of
the example users yxz, linux, and tux. The /home directory contains the directories
in which the individual users can store their personal files.
If you are working in a network environment, your home directory may not be
called /home. It can be mapped to any directory in the file system.
The following list provides a brief description of the standard directories in Linux.
bin boot dev etc home lib media mnt opt proc root sbin srv sys tmp usr var
ld.so
hda sda st0
yxz linux tux X11R6 bin etc lib local sbin share
/bin, /sbin Programs needed early in the boot process (/bin) and
for the administrator (/sbin)
/tmp, /var/tmp Temporary files (do not save files in this directory unless
you do not need them)
/sys System file system where all device information for the
kernel is gathered
• The entire (absolute) path from the root directory to the respective file
Absolute paths always start with a slash. Relative paths do not have a slash at the begin-
ning.
Linux distinguishes between uppercase and lowercase in the file system. For
example, entering test.txt or Test.txt makes a difference in Linux. Keep
this in mind when entering filenames or paths.
• Refer to the current directory with a dot (.). This is mainly useful for other com-
mands (cp, mv, …).
• The next higher level in the tree is represented by two dots (..). For example, to
switch to the parent directory of your current directory, enter cd ...
1c To check what happened, now enter ls -l /tmp. The new directory test
should appear in the list of contents of the /tmp directory.
2 Now create a new file in your home directory and copy it to the /tmp/test
directory by using a relative path.
2b Check this by entering ls -l. The new file should appear in the list of
contents.
To list the contents of home directories of other users, enter ls ~username . In the
example directory tree in Figure 17.4, “Excerpt from a Standard Directory Tree”
(page 335), one of the sample users is tux. In this case, ls ~tux would list the contents
of the home directory of tux.
If a filename contains a space, either escape the space using a back slash (\)
in front of the blank or enclose the filename in single or double quotes. Other-
wise Bash interprets a filename like My Documents as the names of two files
or directories. The difference between single and double quotes is that variable
expansion takes place within double quotes. Single quotes ensure that the shell
sees the quoted string literally.
You can edit the selected command, for example, changing the name of a file, before
you execute the command by pressing Enter. To edit the command line, just move the
cursor to the desired position using the arrow keys and start typing.
Completing a filename or directory name to its full length after typing its first letters
is another helpful feature of Bash. To do so, type the first letters then press →|. If the
filename or path can be uniquely identified, it is completed at once and the cursor moves
to the end of the filename. You can then enter the next option of the command, if nec-
essary. If the filename or path cannot be uniquely identified (because there are several
filenames starting with the same letters), the filename or path is only completed up to
the point where again several options are possible. You can then obtain a list of them
by pressing →| a second time. After this, you can enter the next letters of the file or
path then try completion again by pressing →|. When completing filenames and paths
with the help of →|, you can simultaneously check whether the file or path you want
to enter really exists (and you can be sure of getting the spelling right).
Wild Cards
Another convenience offered by the shell is wild cards for pathname expansion. Wild
cards are characters that can stand for other characters. There are three different types
of these in Bash:
?
Matches exactly one arbitrary character
*
Matches any number of characters
Using ! or ^ at the beginning of the group ([!set]) matches one character other
than those identified by set.
Assuming that your test directory contains the files Testfile, Testfile1,
Testfile2, and datafile.
• Use the set wild card to address all sample files whose last character is a number:
ls Testfile[1-9] or, using classes, ls Testfile[[:digit:]].
Of the four types of wild cards, the most inclusive one is the asterisk. It could be used
to copy all files contained in one directory to another one or to delete all files with one
command. The command rm *fil*, for instance, would delete all files in the current
directory whose name includes the string fil.
Instead of less, you can also use the older program more. However, it is less convenient
because it does not allow you to scroll backwards.
Sometimes it is also useful to use a file as the input for a command. For example, with
the tr command, you can replace characters redirected from a file and write the result
to the standard output, your screen. Suppose you want to replace all characters t of
your file.txt from the example above with x and print this to your screen. Do so
by entering tr t x < file.txt.
Just like the standard output, the standard error output is sent to the console. To redirect
the standard error output to a file named errors, append 2> errors to the corre-
sponding command. Both standard output and standard error are saved to one file named
alloutput if you append >& alloutput.
Using pipelines or pipes is also a sort redirection, although the use of the pipe is not
constrained to files. With a pipe (|), you can combine several commands, using the
output of one command as input for the next command. For example, to view the contents
or your current directory in less, enter ls | less. This only makes sense if the
normal output with ls would be too lengthy. For instance, if you view the contents of
the dev directory with ls /dev, you only see a small portion in the window. View
the entire list with ls /dev | less.
-c
(for create) Create a new archive.
-t
(for table) Display the contents of an archive.
-x
(for extract) Unpack the archive.
-v
(for verbose) Show all files on screen while creating the archive.
-f
(for file) Choose a filename for the archive file. When creating an archive, this
option must always be given as the last one.
To pack the test directory with all its files and subdirectories into an archive named
testarchive.tar, do the following:
1 Open a shell.
4 View the contents of the archive file with tar -tf testarchive.tar.
The test directory with all its files and directories has remained unchanged on your
hard disk. To unpack the archive, enter tar -xvf testarchive.tar, but do not
try this yet.
Now, unpack this file in the test2 directory created earlier. To do so, enter cp
testarchive.tar.gz test2 to copy the file to that directory. Change to the
directory with cd test2. A compressed archive with the .tar.gz extension can
be unzipped with the gunzip command. Enter gunzip testarchive.tar.gz,
which results in the file testarchive.tar, which then needs to be extracted or
untarred with tar -xvf testarchive.tar. You can also unzip and extract a
compressed archive in one step with tar -xvf testarchive.tar.gz (adding
the -z option is no longer required). With ls, you can see that a new test directory
has been created with the same contents as your test directory in your home directory.
17.1.6 Cleaning Up
After this crash course, you should be familiar with the basics of the Linux shell or
command line. You may want to clean up your home directory by deleting the various
test files and directories using the rm and rmdir commands. In Section 17.3, “Important
Linux Commands” (page 347), find a list of the most important commands and a brief
description of their functions.
A group, in this case, can be defined as a set of connected users with certain collective
rights. For example, call a group working on a certain project project3. Every user
in a Linux system is a member of at least one proprietary group, normally users.
There can be as many groups in a system as needed, but only root is able to add
groups. Every user can find out, with the command groups, of which groups he is a
member.
File Access
The organization of permissions in the file system differs for files and directories.
File permission information can be displayed with the command ls -l. The
output could appear as in Example 17.1, “Sample Output Showing File Permissions”
(page 344).
As shown in the third column, this file belongs to user tux. It is assigned to the
group project3. To discover the user permissions of the Roadmap file, the first
column must be examined more closely.
This column consists of one leading character followed by nine characters grouped
in threes. The first of the ten letters stands for the type of file system component.
The hyphen (–) shows that this is a file. A directory (d), a link (l), a block device
(b), or a character device could also be indicated.
In this example, tux has, as owner of the file Roadmap, read (r) and write access
(w) to it, but cannot execute it (x). The members of the group project3 can read
the file, but they cannot modify it or execute it. Other users do not have any access
to this file. Other permissions can be assigned by means of ACLs (access control
lists).
Directory Permissions
Access permissions for directories have the type d. For directories, the individual
permissions have a slightly different meaning.
In Example 17.2, “Sample Output Showing Directory Permissions” (page 345), the
owner (tux) and the owning group (project3) of the directory ProjectData
are easy to recognize. In contrast to the file access permissions from File Access
(page 344), the set reading permission (r) means that the contents of the directory
can be shown. The write permission (w) means that new files can be created. The
executable permission (x) means that the user can change to this directory. In the
above example, the user tux as well as the members of the group project3 can
change to the ProjectData directory (x), view the contents (r), and add or
delete files (w). The rest of the users, on the other hand, are given less access. They
may enter the directory (x) and browse through it (r), but not insert any new files
(w).
3. The abbreviations
• r—read
• w—write
• x—execute
If, for example, the user tux in Example 17.2, “Sample Output Showing Directory
Permissions” (page 345) also wants to grant other users write (w) access to the di-
rectory ProjectData, he can do this using the command chmod o+w
ProjectData.
If, however, he wants to deny all users other than himself write permissions, he
can do this by entering the command chmod go-w ProjectData. To prohibit
all users from adding a new file to the folder ProjectData, enter chmod -w
ProjectData. Now, not even the owner can create a new file in the directory
without first reestablishing write permissions.
Suppose the file Roadmap from Example 17.2, “Sample Output Showing Directory
Permissions” (page 345) should no longer belong to tux, but to the user geeko.
root should then enter chown geeko Roadmap.
In the man pages, move up and down with PgUp and PgDn. Move between the beginning
and the end of a document with Home and End. End this viewing mode by pressing Q.
Learn more about the man command itself with man man.
In the following overview, the individual command elements are written in different
typefaces. The actual command and its mandatory options are always printed as
command option. Specifications or parameters that are not required are placed in
[square brackets].
Adjust the settings to your needs. It makes no sense to write ls file if no file named
file actually exists. You can usually combine several parameters, for example, by
writing ls -la instead of ls -l -a.
File Administration
ls [options] [files]
If you run ls without any additional parameters, the program lists the contents of
the current directory in short form.
-a
Displays hidden files
-i
Waits for confirmation, if necessary, before an existing target is overwritten
-r
Copies recursively (includes subdirectories)
-b
Creates a backup copy of the source before moving
-i
Waits for confirmation, if necessary, before an existing targetfile is
overwritten
rm [options] files
Removes the specified files from the file system. Directories are not removed by
rm unless the option -r is used.
-r
Deletes any existing subdirectories
-i
Waits for confirmation before deleting each file
cd [options] [directory]
Changes the current directory. cd without any parameters changes to the user's
home directory.
-R
Changes files and directories in all subdirectories
The mode parameter has three parts: group, access, and access type.
group accepts the following characters:
u
User
g
Group
o
Others
r
Read
w
Write
x
Execute—executing files or changing to the directory
s
Setuid bit—the application or program is started as if it were started by the
owner of the file
As an alternative, a numeric code can be used. The four digits of this code are
composed of the sum of the values 4, 2, and 1—the decimal result of a binary mask.
The first digit sets the set user ID (SUID) (4), the set group ID (2), and the sticky
(1) bits. The second digit defines the permissions of the owner of the file. The third
digit defines the permissions of the group members and the last digit sets the per-
missions for all other users. The read permission is set with 4, the write permission
with 2, and the permission for executing a file is set with 1. The owner of a file
would usually receive a 6 or a 7 for executable files.
-d
Decompresses the packed gzip files so they return to their original size and
can be processed normally (like the command gunzip)
-f
Writes the output to a file and not to the screen as is usually the case
-r
Adds files to an existing archive
-t
Outputs the contents of an archive
-u
Adds files, but only if they are newer than the files already contained in the
archive
-x
Unpacks files from an archive (extraction)
-z
Packs the resulting archive with gzip
-j
Compresses the resulting archive with bzip2
-v
Lists files processed
The archive files created by tar end with .tar. If the tar archive was also com-
pressed using gzip, the ending is .tgz or .tar.gz. If it was compressed using
bzip2, the ending is .tar.bz2.
locate patterns
This command is only available if you have installed the findutils-locate
package. The locate command can find in which directory a specified file is lo-
cated. If desired, use wild cards to specify filenames. The program is very speedy,
because it uses a database specifically created for the purpose (rather than searching
through the entire file system). This very fact, however, also results in a major
drawback: locate is unable to find any files created after the latest update of its
database. The database can be generated by root with updatedb.
updatedb [options]
This command performs an update of the database used by locate. To include
files in all existing directories, run the program as root. It also makes sense to
find [options]
With find, search for a file in a given directory. The first argument specifies the
directory in which to start the search. The option -name must be followed by a
search string, which may also include wild cards. Unlike locate, which uses a
database, find scans the actual directory.
-z
Tries to look inside compressed files
-n
Numbers the output on the left margin
-i
Ignores case
-n
Additionally displays the numbers of the lines in which it found a hit
-l
Only lists the files in which searchstring does not occur
-q
Only reports whether the two files differ
-u
Produces a “unified” diff, which makes the output more readable
File Systems
mount [options] [device] mountpoint
This command can be used to mount any data media, such as hard disks, CD-ROM
drives, and other drives, to a directory of the Linux file system.
-r
Mount read-only
-t filesystem
Specify the file system, commonly ext2 for Linux hard disks, msdos for
MS-DOS media, vfat for the Windows file system, and iso9660 for CDs
For hard disks not defined in the file /etc/fstab, the device type must also be
specified. In this case, only root can mount it. If the file system should also be
mounted by other users, enter the option user in the appropriate line in the /etc/
fstab file (separated by commas) and save this change. Further information is
available in the mount(1) man page.
System Information
df [options] [directory]
The df (disk free) command, when used without any options, displays information
about the total disk space, the disk space currently in use, and the free space on all
the mounted drives. If a directory is specified, the information is limited to the
drive on which that directory is located.
-h
Shows the number of occupied blocks in gigabytes, megabytes, or kilobytes—in
human-readable format
-T
Type of file system (ext2, nfs, etc.)
du [options] [path]
This command, when executed without any parameters, shows the total disk space
occupied by files and subdirectories in the current directory.
-a
Displays the size of each individual file
-h
Output in human-readable form
-s
Displays only the calculated total size
-b
Output in bytes
-k
Output in kilobytes
-m
Output in megabytes
date [options]
This simple program displays the current system time. If run as root, it can also
be used to change the system time. Details about the program are available in the
date(1) man page.
Processes
top [options]
top provides a quick overview of the currently running processes. Press H to access
a page that briefly explains the main options for customizing the program.
aux
Displays a detailed list of all processes, independent of the owner
Network
ping [options] hostname or IP address
The ping command is the standard tool for testing the basic functionality of TCP/IP
networks. It sends a small data packet to the destination host, requesting an imme-
diate reply. If this works, ping displays a message to that effect, which indicates
that the network link is basically functioning.
-c number
Determines the total number of packages to send and ends after they have been
dispatched (by default, there is no limitation set)
-f
flood ping: sends as many data packages as possible; a popular means, reserved
for root, to test networks
-i value
Specifies the interval between two data packages in seconds (default: one
second)
nslookup
The domain name system resolves domain names to IP addresses. With this tool,
send queries to name servers (DNS servers).
Do not use telnet over a network on which third parties can “eavesdrop.”
Particularly on the Internet, use encrypted transfer methods, such as ssh,
to avoid the risk of malicious misuse of a password (see the man page for
ssh).
Miscellaneous
passwd [options] [username]
Users may change their own passwords at any time using this command. The ad-
ministrator root can use the command to change the password of any user on the
system.
su [options] [username]
The su command makes it possible to log in under a different username from a
running session. Specify a username and the corresponding password. The password
is not required from root, because root is authorized to assume the identity of
any user. When using the command without specifying a username, you are
prompted for the root password and change to the superuser (root).
-
Use su - to start a login shell for the different user
halt [options]
To avoid loss of data, you should always use this program to shut down your system.
reboot [options]
Does the same as halt except the system performs an immediate reboot.
clear
This command cleans up the visible area of the console. It has no options.
In the following, find several commands that you can enter in vi by just pressing
keys. These appear in uppercase as on a keyboard. If you need to enter a key
in uppercase, this is stated explicitly by showing a key combination including
the Shift key.
Basically, vi makes use of three operating modes: insert mode, command mode, and
extended mode. The keys have different functions depending on the mode. On start-up,
vi is normally set to the command mode. The first thing to learn is how to switch between
the modes:
vi, like other editors, has its own procedure for terminating the program. You cannot
terminate vi while in insert mode. First, exit insert mode by pressing Esc. Subsequently,
you have two options:
1. Exit without saving: To terminate the editor without saving the changes, enter : –
Q – ! in command mode. The exclamation mark (!) causes vi to ignore any changes.
2. Save and exit: There are several possibilities to save your changes and terminate
the editor. In command mode, use Shift + Z Shift + Z. To exit the program saving
all changes using the extended mode, enter : – W – Q. In extended mode, w stands
for write and q for quit.
17.4.2 vi in Action
vi can be used as a normal editor. In insert mode, enter text and delete text with the <—
and Del keys. Use the arrow keys to move the cursor.
However, these control keys often cause problems, because there are many terminal
types that use special key codes. This is where the command mode comes into play.
Press Esc to switch from insert mode to command mode. In command mode, move the
cursor with H, J, K, and L. The keys have the following functions:
H
Move one character to the left
J
Move one line down
K
Move one line up
L
Move one character to the right
Shift + A Change to insert mode (characters are added at the end of the
line)
Shift + O Change to insert mode (a new line is inserted before the cur-
rent one)
C–W Change to insert mode (the rest of the current word is over-
written by the next entries you make)
• In vim, enter the command :help to get help for many subjects.
• The Web pages of the vim project at http://www.vim.org feature all kinds
of news, mailing lists, and other documentation.
vim is “charityware,” which means that the authors do not charge any money
for the software but encourage you to support a nonprofit project with a
monetary contribution. This project solicits help for poor children in Uganda.
More information is available online at http://iccf-holland.org/index
.html, http://www.vim.org/iccf/, and http://www.iccf.nl/.
SUSE Linux Enterprise for the 64-bit platforms ia64, ppc64, s390x, and x86_64 is de-
signed so that existing 32-bit applications run in the 64-bit environment “out-of-the-
box.” The corresponding 32-bit platforms are x86 for ia64, ppc for ppc64, s390 for
s390x, and x86 for x86_64. This support means that you can continue to use your pre-
ferred 32-bit applications without waiting for a corresponding 64-bit port to become
available. The current ppc64 system runs most applications in 32-bit mode, but you
can run 64-bit applications.
The same approach is used for the 64-bit platforms ppc64, s390x, and x86_64: To retain
compatibility with the 32-bit version, the libraries are stored at the same place in the
system as in the 32-bit environment. The 32-bit version of libc.so.6 is located under
/lib/libc.so.6 in both the 32-bit and 64-bit environments.
All 64-bit libraries and object files are located in directories called lib64. The 64-bit
object files you would normally expect to find under /lib, /usr/lib, and /usr/
X11R6/lib are now found under /lib64, /usr/lib64, and /usr/X11R6/
lib64. This means that there is space for the 32-bit libraries under /lib, /usr/lib
and /usr/X11R6/lib, so the filename for both versions can remain unchanged.
Subdirectories of 32-bit /lib directories whose data content does not depend on the
word size are not moved. For example, the X11 fonts are still found in the usual location
under /usr/X11R6/lib/X11/fonts. This scheme conforms to LSB (Linux
Standards Base) and FHS (File System Hierarchy Standard).
►ipf: The 64-bit libraries for ia64 are located in the standard lib directories. In such
cases, there is neither a lib64 directory or a lib32 directory. ia64 executes the 32-
bit x86 code under an emulation. A set of basic libraries is installed in /emul/
ia32-linux/lib and /emul/ia32-linux/usr/X11R6/lib. ◄
Biarch Compiler
Both 32-bit and 64-bit objects can be generated with a biarch development tool
chain. The compilation of 64-bit objects is the default on almost all platforms. 32-
bit objects can be generated if special flags are used. This special flag is -m32 for
GCC (-m31 for generating s390 binaries). The flags for the binutils are architecture-
dependent, but GCC transfers the correct flags to linkers and assemblers. A biarch
development tool chain currently exists for amd64 (supports development for x86
and amd64 instructions), for s390x, and for ppc64. 32-bit objects are normally
created on the ppc64 platform. The -m64 flag must be used to generate 64-bit ob-
jects.
No Support
SUSE Linux Enterprise does not support the direct development of 32-bit software
on all platforms. To develop applications for x86 under ia64, use the corresponding
32-bit version of SUSE Linux Enterprise.
All header files must be written in an architecture-independent form. The installed 32-
bit and 64-bit libraries must have an API (application programming interface) that
matches the installed header files. The normal SUSE Linux Enterprise environment is
designed according to this principle. In the case of manually updated libraries, resolve
these issues yourself.
For example, to compile a program that uses libaio on a system whose second archi-
tecture is a 32-bit architecture (x86_64 or s390x), you need the following RPMs:
libaio-32bit
32-bit runtime package
libaio-devel-32bit
Headers and libraries for 32-bit development
libaio
64-bit runtime package
libaio-devel
64-bit development headers and libraries
The following example refers to an x86_64 system with x86 as the second architecture.
Examples for s390x with s390 as the second architecture or ppc64 with ppc as the second
architecture would be similar. This example does not apply to ia64 where you do not
build 32-bit packages.
When using s390 as second architecture, you have to use -m31 instead of
-m32, because this is a 31 bit system.
2 Instruct the linker to process 32-bit objects (always use gcc as the linker front-
end):
LD="gcc -m32"
4 Determine that the libraries for libtool and so on come from /usr/lib:
LDFLAGS="-L/usr/lib"
Not all of these variables are needed for every program. Adapt them to the respective
program.
CC="gcc -m32" \
LDFLAGS="-L/usr/lib;" \
.configure \
--prefix=/usr \
--libdir=/usr/lib
make
make install
The 32-bit emulation of system calls for a 64-bit kernel does not support all the APIs
used by system programs. This depends on the platform. For this reason, a small number
of applications, like lspci, must be compiled on non-ppc64 platforms as 64-bit pro-
grams to function properly. On IBM System z, not all ioctls are available in the 32-bit
kernel ABI.
A 64-bit kernel can only load 64-bit kernel modules that have been specially compiled
for this kernel. It is not possible to use 32-bit kernel modules.
TIP
1. BIOS After the computer has been turned on, the BIOS initializes the screen
and keyboard and tests the main memory. Up to this stage, the machine does not
access any mass storage media. Subsequently, the information about the current
date, time, and the most important peripherals are loaded from the CMOS values.
When the first hard disk and its geometry are recognized, the system control
passes from the BIOS to the boot loader. If the BIOS supports network booting,
it is also possible to configure a boot server that provides the boot loader. On x86
systems, PXE boot is needed. Other architectures commonly use the BOOTP
protocol to get the boot loader.
2. Boot Loader The first physical 512-byte data sector of the first hard disk is
loaded into the main memory and the boot loader that resides at the beginning of
this sector takes over. The commands executed by the boot loader determine the
remaining part of the boot process. Therefore, the first 512 bytes on the first hard
3. Kernel and initramfs To pass system control, the boot loader loads both the
kernel and an initial RAM–based file system (initramfs) into memory. The contents
of the initramfs can be used by the kernel directly. initramfs contains a small exe-
cutable called init that handles the mounting of the real root file system. If special
hardware drivers are needed before the mass storage can be accessed, they must
be in initramfs. For more information about initramfs, refer to Section 19.1.1,
“initramfs” (page 372). If the system does not have a local hard disk, initramfs must
provide the root file system to the kernel. This can be done with the help of a net-
work block device like iSCSI or SAN, but it is also possible to use NFS as the root
device.
4. init on initramfs This program performs all actions needed to mount the
proper root file system, like providing kernel functionality for the needed file
system and device drivers for mass storage controllers with udev. After the root
file system has been found, it is checked for errors and mounted. If this has been
successful, the initramfs is cleaned and the init program on the root file system is
executed. For more information about init, refer to Section 19.1.2, “init on
initramfs” (page 373). Find more information about udev in Chapter 24, Dynamic
Kernel Device Management with udev (page 461).
5. init init handles the actual booting of the system through several different levels
providing different functionality. init is described in Section 19.2, “The init Process”
(page 375).
19.1.1 initramfs
initramfs is a small cpio archive that the kernel can load to a RAM disk. It provides a
minimal Linux environment that enables the execution of programs before the actual
root file system is mounted. This minimal Linux environment is loaded into memory
by BIOS routines and does not have specific hardware requirements other than sufficient
memory. initramfs must always provide an executable named init that should execute
the actual init program on the root file system for the boot process to proceed.
If you need to change hardware (hard disks) in an installed system and this hardware
requires different drivers to be present in the kernel at boot time, you must update the
initramfs file. This is done in the same way as with its predecessor, initrd—by
calling mkinitrd. Calling mkinitrd without any argument creates an initramfs.
Calling mkinitrd -R creates an initrd. In SUSE Linux Enterprise®, the modules to
load are specified by the variable INITRD_MODULES in /etc/sysconfig/
kernel. After installation, this variable is automatically set to the correct value. The
modules are loaded in exactly the order in which they appear in INITRD_MODULES.
This is only important if you rely on the correct setting of the device files /dev/sd?.
However, in current systems you also may use the device files below /dev/disk/
that are sorted in several subdirectories, named by-id, by-path and by-uuid, and
always represent the same disk.
The boot loader loads initramfs or initrd in the same way as the kernel. It is
not necessary to reinstall GRUB after updating initramfs or initrd, because GRUB
searches the directory for the right file when booting.
If the file system resides on a networked block device like iSCSI or SAN, connection
to the storage server is also set up by the initramfs.
When init is called during the initial boot as part of the installation process, its tasks
differ from those mentioned earlier:
Starting YaST
Finally, init starts YaST, which starts package installation and system configuration.
init is centrally configured in the /etc/inittab file where the runlevels are defined
(see Section 19.2.1, “Runlevels” (page 375)). The file also specifies which services and
daemons are available in each of the levels. Depending on the entries in /etc/
inittab, several scripts are run by init. For reasons of clarity, these scripts, called
init scripts, all reside in the directory /etc/init.d (see Section 19.2.2, “Init Scripts”
(page 378)).
The entire process of starting the system and shutting it down is maintained by init.
From this point of view, the kernel can be considered a background process whose task
is to maintain all other processes and adjust CPU time and hardware access according
to requests from other programs.
19.2.1 Runlevels
In Linux, runlevels define how the system is started and what services are available in
the running system. After booting, the system starts as defined in /etc/inittab in
the line initdefault. Usually this is 3 or 5. See Table 19.1, “Available Runlevels”
(page 376). As an alternative, the runlevel can be specified at boot time (by adding the
runlevel number at the boot prompt, for instance). Any parameters that are not directly
evaluated by the kernel itself are passed to init.
Runlevel Description
0 System halt
S Single user mode; from the boot prompt, only with US keyboard
mapping
4 Not used
6 System reboot
You should not use runlevel 2 if your system mounts a partition like /usr via
NFS. The system might behave unexpectedly if program files or libraries are
missing because the NFS service is not available in runlevel 2 (local multiuser
mode without remote network).
To change runlevels while the system is running, enter telinit and the corresponding
number as an argument. Only the system administrator is allowed to do this. The fol-
lowing list summarizes the most important commands in the runlevel area.
telinit 5
The graphical environment is enabled. Usually a display manager like XDM, GDM,
or KDM is started. If autologin is enabled, the local user is logged in to the prese-
lected window manager (GNOME or KDE or any other window manager).
Runlevel 5 is the default runlevel in all SUSE Linux Enterprise standard installations.
Users are prompted for login with a graphical interface or the default user is logged in
automatically. If the default runlevel is 3, the X Window System must be configured
properly, as described in Chapter 26, The X Window System (page 481), before the run-
level can be switched to 5. If this is done, check whether the system works in the desired
way by entering telinit 5. If everything turns out as expected, you can use YaST
to set the default runlevel to 5.
Generally, two things happen when you change runlevels. First, stop scripts of the
current runlevel are launched, closing down some programs essential for the current
runlevel. Then start scripts of the new runlevel are started. Here, in most cases, a number
of programs are started. For example, the following occurs when changing from runlevel
3 to 5:
3. Now rc calls the stop scripts of the current runlevel for which there is no start
script in the new runlevel. In this example, these are all the scripts that reside in
/etc/init.d/rc3.d (old runlevel was 3) and start with a K. The number
following K specifies the order to run the scripts with the stop parameter, because
there are some dependencies to consider.
4. The last things to start are the start scripts of the new runlevel. In this example,
these are in /etc/init.d/rc5.d and begin with an S. Again, the number that
follows the S determines the sequence in which the scripts are started.
When changing into the same runlevel as the current runlevel, init only checks /etc/
inittab for changes and starts the appropriate steps, for example, for starting a
getty on another interface. The same functionality may be achieved with the command
telinit q.
All scripts are located in /etc/init.d. Scripts that are run at boot time are called
through symbolic links from /etc/init.d/boot.d. Scripts for changing the run-
level are called through symbolic links from one of the subdirectories (/etc/init
.d/rc0.d to /etc/init.d/rc6.d). This is just for clarity reasons and avoids
duplicate scripts if they are used in several runlevels. Because every script can be exe-
cuted as both a start and a stop script, these scripts must understand the parameters
Option Description
All of these settings may also be changed with the help of the YaST module. If you
need to check the status on the command line, use the tool chkconfig, described in the
chkconfig(8) man page.
A short introduction to the boot and stop scripts launched first or last, respectively,
follows as well as an explanation of the maintaining script.
boot
Executed while starting the system directly using init. It is independent of the
chosen runlevel and is only executed once. Here, the proc and pts file systems
are mounted and blogd (boot logging daemon) is activated. If the system is booted
The blogd daemon is a service started by boot and rc before any other one. It is
stopped after the actions triggered by these scripts (running a number of subscripts,
for example, making block special files available) are completed. blogd writes any
screen output to the log file /var/log/boot.msg, but only if and when /var
is mounted read-write. Otherwise, blogd buffers all screen data until /var becomes
available. Get further information about blogd on the blogd(8) man page.
The script boot is also responsible for starting all the scripts in /etc/init.d/
boot.d with a name that starts with S. There, the file systems are checked and
loop devices are configured if needed. The system time is also set. If an error occurs
while automatically checking and repairing the file system, the system administrator
can intervene after first entering the root password. Last executed is the script
boot.local.
boot.local
Here, enter additional commands to execute at boot before changing into a runlevel.
It can be compared to AUTOEXEC.BAT on DOS systems.
boot.setup
This script is executed when changing from single user mode to any other runlevel
and is responsible for a number of basic settings, such as the keyboard layout and
initialization of the virtual consoles.
halt
This script is only executed while changing into runlevel 0 or 6. Here, it is executed
either as halt or as reboot. Whether the system shuts down or reboots depends
on how halt is called.
rc
This script calls the appropriate stop scripts of the current runlevel and the start
scripts of the newly selected runlevel.
You can create your own scripts and easily integrate them into the scheme described
above. For instructions about formatting, naming, and organizing custom scripts, refer
to the specifications of the LSB and to the man pages of init, init.d, chkconfig,
and insserv. Additionally consult the man pages of startproc and killproc.
Faulty init scripts may hang your machine. Edit such scripts with great care and,
if possible, subject them to heavy testing in the multiuser environment. Find
some useful information about init scripts in Section 19.2.1, “Runlevels”
(page 375).
To create a custom init script for a given program or service, use the file /etc/init
.d/skeleton as a template. Save a copy of this file under the new name and edit
the relevant program and filenames, paths, and other details as needed. You may also
need to enhance the script with your own parts, so the correct actions are triggered by
the init procedure.
The INIT INFO block at the top is a required part of the script and must be edited.
See Example 19.1, “A Minimal INIT INFO Block” (page 381).
In the first line of the INFO block, after Provides:, specify the name of the program
or service controlled by this init script. In the Required-Start: and
Required-Stop: lines, specify all services that need to be started or stopped before
the service itself is started or stopped. This information is used later to generate the
numbering of script names, as found in the runlevel directories. After
Default-Start: and Default-Stop:, specify the runlevels in which the service
should automatically be started or stopped. Finally, for Description:, provide a
short description of the service in question.
Do not set these links manually. If something is wrong in the INFO block, problems
will arise when insserv is run later for some other service. The manually-added
service will be removed with the next run of insserv.
For detailed control over the runlevels in which a service is started or stopped or to
change the default runlevel, first select Expert Mode. The current default runlevel or
“initdefault” (the runlevel into which the system boots by default) is displayed at the
top. Normally, the default runlevel of a SUSE Linux Enterprise system is runlevel 5
(full multiuser mode with network and X). A suitable alternative might be runlevel 3
(full multiuser mode with network).
This YaST dialog allows the selection of one of the runlevels (as listed in Table 19.1,
“Available Runlevels” (page 376)) as the new default. Additionally use the table in this
window to enable or disable individual services and daemons. The table lists the services
and daemons available, shows whether they are currently enabled on your system, and,
if so, for which runlevels. After selecting one of the rows with the mouse, click the
check boxes representing the runlevels (B, 0, 1, 2, 3, 5, 6, and S) to define the runlevels
in which the selected service or daemon should be running. Runlevel 4 is undefined to
allow creation of a custom runlevel. A brief description of the currently selected service
or daemon is provided below the table overview.
With Start, Stop, or Refresh, decide whether a service should be activated. Refresh
status checks the current status. Set or Reset lets you select whether to apply your
changes to the system or to restore the settings that existed before starting the runlevel
editor. Selecting Finish saves the changed settings to disk.
Faulty runlevel settings may render a system unusable. Before applying your
changes, make absolutely sure that you know their consequences.
There are two ways to edit the system configuration. Either use the YaST sysconfig
Editor or edit the configuration files manually.
The YaST sysconfig dialog is split into three parts. The left part of the dialog shows a
tree view of all configurable variables. When you select a variable, the right part displays
both the current selection and the current setting of this variable. Below, a third window
displays a short description of the variable's purpose, possible values, the default value,
and the actual configuration file from which this variable originates. The dialog also
provides information about which configuration script is executed after changing the
variable and which new service is started as a result of the change. YaST prompts you
to confirm your changes and informs you which scripts will be executed after you leave
the dialog by selecting Finish. Also select the services and scripts to skip for now, so
they are started later. YaST applies all changes automatically and restarts any services
involved for your changes to take an effect.
1 Become root.
2 Bring the system into single user mode (runlevel 1) with init 1.
5 Bring your system back to the previous runlevel with a command like init
default_runlevel. Replace default_runlevel with the default run-
level of the system. Choose 5 if you want to return to full multiuser with network
and X or choose 3 if you prefer to work in full multiuser with network.
This procedure is mainly relevant when changing systemwide settings, such as the
network configuration. Small changes should not require going into single user mode,
but you may still do so to make absolutely sure that all the programs concerned are
correctly restarted.
This chapter focuses on boot management and the configuration of the boot loader
GRUB. The boot procedure as a whole is outlined in Chapter 19, Booting and Config-
uring a Linux System (page 371). A boot loader represents the interface between machine
(BIOS) and the operating system (SUSE Linux Enterprise). The configuration of the
boot loader directly impacts the start of the operating system.
The following terms appear frequently in this chapter and might need some explanation:
Information about the installation and configuration of LILO is available in the Support
Database under the keyword LILO and in /usr/share/doc/packages/lilo.
In some configurations, an intermediate stage 1.5 can be used, which locates and loads
stage 2 from an appropriate file system. If possible, this method is chosen by default
on installation or when initially setting up GRUB with YaST.
stage2 is able to access many file systems. Currently, Ext2, Ext3, ReiserFS, Minix, and
the DOS FAT file system used by Windows are supported. To a certain extent, XFS,
and UFS and FFS used by BSD systems are also supported. Since version 0.95, GRUB
is also able to boot from a CD or DVD containing an ISO 9660 standard file system
pursuant to the “El Torito” specification. Even before the system is booted, GRUB can
The actual configuration of GRUB is based on three files that are described below:
/boot/grub/menu.lst
This file contains all information about partitions or operating systems that can be
booted with GRUB. Without this information, the GRUB command line prompts
the user for how to proceed (see Section “Editing Menu Entries during the Boot
Procedure” (page 394) for details).
/boot/grub/device.map
This file translates device names from the GRUB and BIOS notation to Linux device
names.
/etc/grub.conf
This file contains the commands, parameters, and options the GRUB shell needs
for installing the boot loader correctly.
GRUB can be controlled in various ways. Boot entries from an existing configuration
can be selected from the graphical menu (splash screen). The configuration is loaded
from the file menu.lst.
In GRUB, all boot parameters can be changed prior to booting. For example, errors
made when editing the menu file can be corrected in this way. Boot commands can also
be entered interactively at a kind of input prompt (see Section “Editing Menu Entries
during the Boot Procedure” (page 394)). GRUB offers the possibility of determining
the location of the kernel and the initrd prior to booting. In this way, you can even
boot an installed operating system for which no entry exists in the boot loader configu-
ration.
GRUB actually exists in two versions: as a boot loader and as a normal Linux program
in /usr/sbin/grub. This program is referred to as the GRUB shell. It provides an
emulation of GRUB in the installed system and can be used to install GRUB or test
new settings before applying them. The functionality to install GRUB as the boot
loader on a hard disk or floppy disk is integrated in GRUB in the form of the commands
install and setup. This is available in the GRUB shell when Linux is loaded.
Every time the system is booted, GRUB loads the menu file from the file system. For
this reason, GRUB does not need to be reinstalled after every change to the file. Use
the YaST boot loader to modify the GRUB configuration as described in Section 20.3,
“Configuring the Boot Loader with YaST” (page 398).
The menu file contains commands. The syntax is very simple. Every line contains a
command followed by optional parameters separated by spaces like in the shell. For
historical reasons, some commands permit an = in front of the first parameter. Comments
are introduced by a hash (#).
To identify the menu items in the menu overview, set a title for every entry. The
text (including any spaces) following the keyword title is displayed as a selectable
option in the menu. All commands up to the next title are executed when this menu
item is selected.
The simplest case is the redirection to boot loaders of other operating systems. The
command is chainloader and the argument is usually the boot block of another
partition, in GRUB block notation. For example:
chainloader (hd0,3)+1
The device names in GRUB are explained in Section “Naming Conventions for Hard
Disks and Partitions” (page 391). This example specifies the first block of the fourth
partition of the first hard disk.
Use the command kernel to specify a kernel image. The first argument is the path to
the kernel image in a partition. The other arguments are passed to the kernel on its
command line.
If the kernel does not have built-in drivers for access to the root partition or a recent
Linux system with advanced hotplug features is used, initrd must be specified with
a separate GRUB command whose only argument is the path to the initrd file. Be-
cause the loading address of the initrd is written into the loaded kernel image, the
command initrd must follow after the kernel command.
The boot command is implied at the end of every menu entry, so it does not need to
be written into the menu file. However, if you use GRUB interactively for booting, you
must enter the boot command at the end. The command itself has no arguments. It
merely boots the loaded kernel image or the specified chain loader.
After writing all menu entries, define one of them as the default entry. Otherwise,
the first one (entry 0) is used. You can also specify a time-out in seconds after which
the default entry should boot. timeout and default usually precede the menu entries.
An example file is described in Section “An Example Menu File” (page 392).
The four possible primary partitions are assigned the partition numbers 0 to 3. The
logical partitions are numbered from 4:
Being dependent on BIOS devices, GRUB does not distinguish between IDE, SATA,
SCSI, and hardware RAID devices. All hard disks recognized by the BIOS or other
controllers are numbered according to the boot sequence preset in the BIOS.
Unfortunately, it is often not possible to map the Linux device names to BIOS device
names exactly. It generates this mapping with the help of an algorithm and saves it to
A complete GRUB path consists of a device name written in parentheses and the path
to the file in the file system in the specified partition. The path begins with a slash. For
example, the bootable kernel could be specified as follows on a system with a single
IDE hard disk containing Linux in its first partition:
(hd0,0)/boot/vmlinuz
gfxmenu (hd0,4)/message
color white/blue black/light-gray
default 0
timeout 8
title linux
kernel (hd0,4)/vmlinuz root=/dev/hda7 vga=791
initrd (hd0,4)/initrd
title windows
chainloader(hd0,0)+1
title floppy
chainloader(fd0)+1
title failsafe
kernel (hd0,4)/vmlinuz.shipped root=/dev/hda7 ide=nodma \
apm=off acpi=off vga=normal nosmp maxcpus=0 3
initrd (hd0,4)/initrd.shipped
gfxmenu (hd0,4)/message
The background image message is located in the top directory of the /dev/
hda5 partition.
default 0
The first menu entry title linux is the one to boot by default.
timeout 8
After eight seconds without any user input, GRUB automatically boots the default
entry. To deactivate automatic boot, delete the timeout line. If you set timeout
0, GRUB boots the default entry immediately.
The second and largest block lists the various bootable operating systems. The sections
for the individual operating systems are introduced by title.
• The first entry (title linux) is responsible for booting SUSE Linux Enterprise.
The kernel (vmlinuz) is located in the first logical partition (the boot partition)
of the first hard disk. Kernel parameters, such as the root partition and VGA mode,
are appended here. The root partition is specified according to the Linux naming
convention (/dev/hda7/), because this information is read by the kernel and
has nothing to do with GRUB. The initrd is also located in the first logical
partition of the first hard disk.
• The second entry is responsible for loading Windows. Windows is booted from the
first partition of the first hard disk (hd0,0). The command chainloader +1
causes GRUB to read and execute the first sector of the specified partition.
• The next entry enables booting from floppy disk without modifying the BIOS set-
tings.
• The boot option failsafe starts Linux with a selection of kernel parameters that
enables Linux to boot even on problematic systems.
The menu file can be changed whenever necessary. GRUB then uses the modified set-
tings during the next boot. Edit the file permanently using YaST or an editor of your
choice. Alternatively, make temporary changes interactively using the edit function of
GRUB. See Section “Editing Menu Entries during the Boot Procedure” (page 394).
The US keyboard layout is the only one available when booting. See Figure 51.1,
“US Keyboard Layout” (page 914) for a figure.
Editing menu entries facilitates the repair of a defective system that can no longer be
booted, because the faulty configuration file of the boot loader can be circumvented by
manually entering parameters. Manually entering parameters during the boot procedure
is also useful for testing new settings without impairing the native system.
After activating the editing mode, use the arrow keys to select the menu entry of the
configuration to edit. To make the configuration editable, press E again. In this way,
edit incorrect partitions or path specifications before they have a negative effect on the
boot process. Press Enter to exit the editing mode and return to the menu. Then press
B to boot this entry. Further possible actions are displayed in the help text at the bottom.
To enter changed boot options permanently and pass them to the kernel, open the file
menu.lst as the user root and append the respective kernel parameters to the existing
line, separated by spaces:
title linux
kernel (hd0,0)/vmlinuz root=/dev/hda3 additional parameter
initrd (hd0,0)/initrd
GRUB automatically adopts the new parameters the next time the system is booted.
Alternatively, this change can also be made with the YaST boot loader module. Append
the new parameters to the existing line, separated by spaces.
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/sda
Because the order of IDE, SCSI, and other hard disks depends on various factors and
Linux is not able to identify the mapping, the sequence in the file device.map can
be set manually. If you encounter problems when booting, check if the sequence in this
file corresponds to the sequence in the BIOS and use the GRUB prompt to modify it
temporarily if necessary. After the Linux system has booted, the file device.map
can be edited permanently with the YaST boot loader module or an editor of your
choice.
Depending on the controller, SATA disks are either recognized as IDE (/dev/hdx)
or SCSI (/dev/sdx) devices.
root (hd0,4)
install /grub/stage1 (hd0,3) /grub/stage2 0x8000 (hd0,4)/grub/menu.lst
quit
root (hd0,4)
This command tells GRUB to apply the following commands to the first logical
partition of the first hard disk (the location of the boot files).
install parameter
The command grub should be run with the parameter install. stage1 of the
boot loader should be installed in the the extended partition container
(/grub/stage1 (hd0,3)). This is a slightly esoteric configuration, but it is
known to work in many cases. stage2 should be loaded to the memory address
0x8000 (/grub/stage2 0x8000). The last entry
((hd0,4)/grub/menu.lst) tells GRUB where to look for the menu file.
If you use a boot password for GRUB, the usual splash screen is not displayed.
# grub-md5-crypt
Password: ****
Retype password: ****
Encrypted: $1$lS2dv/$JOYcdxIn7CJk9xShzzJVw/
2 Paste the encrypted string into the global section of the file menu.lst:
gfxmenu (hd0,4)/message
color white/blue black/light-gray
default 0
timeout 8
password --md5 $1$lS2dv/$JOYcdxIn7CJk9xShzzJVw/
Now GRUB commands can only be executed at the boot prompt after pressing
P and entering the password. However, users can still boot all operating systems
from the boot menu.
3 To prevent one or several operating systems from being booted from the boot
menu, add the entry lock to every section in menu.lst that should not be
bootable without entering a password. For example:
title linux
kernel (hd0,4)/vmlinuz root=/dev/hda7 vga=791
initrd (hd0,4)/initrd
lock
After rebooting the system and selecting the Linux entry from the boot menu,
the following error message is displayed:
Error 32: Must be authenticated
Press Enter to enter the menu. Then press P to get a password prompt. After en-
tering the password and pressing Enter, the selected operating system (Linux in
this case) should boot.
Use the Section Management tab to edit, change, and delete boot loader sections for
the individual operating systems. To add an option, click Add. To change the value of
an existing option, select it with the mouse and click Edit. To remove an existing entry,
select it and click Delete. If you are not familiar with boot loader options, read Sec-
tion 20.2, “Booting with GRUB” (page 388) first.
Use the Boot Loader Installation tab to view and change settings related to type, location,
and advanced loader settings.
3 In the dialog box that opens, select one of the following actions:
To use a boot loader other than GRUB or LILO, select Do Not Install Any Boot
Loader. Read the documentation of your boot loader carefully before choosing
this option.
1 Select the Boot Loader Installation tab then select one of the following options
for Boot Loader Location:
/dev/hda1
3 Change the value of Timeout in Seconds by typing in a new value, clicking the
appropriate arrow key with your mouse, or by using the arrow keys on the key-
board.
4 Click OK.
4 Click OK.
To uninstall GRUB, start the YaST boot loader module (System > Boot Loader Confi-
guration). In the first dialog, select Reset > Restore MBR of Hard Disk and exit the di-
alog with Finish.
1 Change into a directory in which to create the ISO image, for example:
cd /tmp
cp /boot/vmlinuz iso/boot/
cp /boot/initrd iso/boot/
cp /boot/message iso/boot/
cp /usr/lib/grub/stage2_eltorito iso/boot/grub
cp /boot/grub/menu.lst iso/boot/grub
timeout 8
default 0
gfxmenu (cd)/boot/message
title Linux
root (cd)
kernel /boot/vmlinuz root=/dev/hda5 vga=794 resume=/dev/hda1 \
splash=verbose showopts
initrd /boot/initrd
6 Write the resulting file grub.iso to a CD using your preferred utility. Do not
burn the ISO image as data file, but use the option for burning a CD image in
your burning utility.
TIP
GRUB also returns this error message if Linux was installed on an additional hard
disk that is not registered in the BIOS. stage1 of the boot loader is found and
loaded correctly, but stage2 is not found. This problem can be remedied by regis-
tering the new hard disk in the BIOS.
System Containing IDE and SCSI Hard Disks Does Not Boot
During the installation, YaST may have incorrectly determined the boot sequence
of the hard disks. For example, GRUB may regard /dev/hda as hd0 and /dev/
sda as hd1, although the boot sequence in the BIOS is reversed (SCSI before
IDE).
In this case, correct the hard disks during the boot process with the help of the
GRUB command line. After the system has booted, edit device.map to apply
the new mapping permanently. Then check the GRUB device names in the files
/boot/grub/menu.lst and /boot/grub/device.map and reinstall the
boot loader with the following command:
grub --batch < /etc/grub.conf
...
title windows
map (hd0) (hd1)
map (hd1) (hd0)
chainloader(hd1,0)+1
...
In this example, Windows is started from the second hard disk. For this purpose,
the logical order of the hard disks is changed with map. This change does not affect
the logic within the GRUB menu file. Therefore, the second hard disk must be
specified for chainloader.
1. /etc/profile
3. /etc/bash.bashrc
4. ~/.bashrc
mv ~/.bashrc ~/.bashrc.old
cp /etc/skel/.bashrc ~/.bashrc
mv ~/.profile ~/.profile.old
cp /etc/skel/.profile ~/.profile
You cannot edit /etc/crontab by calling the command crontab -e. This file
must be loaded directly into an editor, modified, then saved.
To run the hourly, daily, or other periodic maintenance scripts at custom times,
remove the time stamp files regularly using /etc/crontab entries (see Example 21.2,
“/etc/crontab: Remove Time Stamp Files” (page 409), which removes the hourly one
before every full hour, the daily one once a day at 2:14 a.m., etc.).
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 2 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 2 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 2 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
The daily system maintenance jobs have been distributed to various scripts for reasons
of clarity. They are contained in the package aaa_base. /etc/cron.daily con-
tains, for example, the components suse.de-backup-rpmdb, suse
.de-clean-tmp, or suse.de-cron-local.
IMPORTANT
The create option reads all settings made by the administrator in /etc/
permissions*. Ensure that no conflicts arise from any personal modifications.
ulimit can be used with various options. To limit memory usage, use the options
listed in Table 21.1, “ulimit: Setting Resources for the User” (page 411).
Memory amounts must be specified in KB. For more detailed information, see man
bash.
Not all shells support ulimit directives. PAM (for instance, pam_limits)
offers comprehensive adjustment possibilities if you depend on encompassing
settings for these restrictions.
Basically, the kernel does not have direct knowledge of any applications or user data.
Instead, it manages applications and user data in a page cache. If memory runs short,
parts of it are written to the swap partition or to files, from which they can initially be
read with the help of the mmap command (see man mmap).
The kernel also contains other caches, such as the slab cache, where the caches used
for network access are stored. This may explain differences between the counters in
/proc/meminfo. Most, but not all of them, can be accessed via /proc/slabinfo.
On start-up, Emacs reads several files containing the settings of the user, system admin-
istrator, and distributor for customization or preconfiguration. The initialization file ~/
.emacs is installed to the home directories of the individual users from /etc/skel.
.emacs, in turn, reads the file /etc/skel/.gnu-emacs. To customize the program,
copy .gnu-emacs to the home directory (with cp /etc/skel/.gnu-emacs
~/.gnu-emacs) and make the desired settings there.
With SUSE® Linux Enterprise, the emacs package installs the file site-start.el
in the directory /usr/share/emacs/site-lisp. The file site-start.el is
loaded before the initialization file ~/.emacs. Among other things, site-start
.el ensures that special configuration files distributed with Emacs add-on packages,
such as psgml, are loaded automatically. Configuration files of this type are located
in /usr/share/emacs/site-lisp, too, and always begin with suse-start-.
The local system administrator can specify systemwide settings in default.el.
More information about these files is available in the Emacs info file under Init File:
info:/emacs/InitFile. Information about how to disable loading these files (if
necessary) is also provided at this location.
• emacs-el: the uncompiled library files in Emacs Lisp. These are not required at
runtime.
To switch to a console from X without shutting it down, use Ctrl + Alt + F1 to Ctrl +
Alt + F6. To return to X, press Alt + F7.
/etc/inputrc
/etc/X11/Xmodmap
/etc/skel/.Xmodmap
/etc/skel/.exrc
/etc/skel/.less
/etc/skel/.lesskey
These changes only affect applications that use terminfo entries or whose configu-
ration files are changed directly (vi, less, etc.). Applications not shipped with the
system should be adapted to these defaults.
Under X, the compose key (multikey) can be accessed using Ctrl + Shift (right). Also
see the corresponding entry in /etc/X11/Xmodmap.
Further settings are possible using the X Keyboard Extension (XKB). This extension
is also used by the desktop environments GNOME (gswitchit) and KDE (kxkb).
Detailed information about the input of Chinese, Japanese, and Korean (CJK)
is available at Mike Fabian's page: http://www.suse.de/~mfabian/
suse-cjk/input.html.
Settings are made with LC_ variables defined in the file /etc/sysconfig/
language. This refers not only to native language support, but also to the categories
Messages (Language), Character Set, Sort Order, Time and Date, Numbers, and Money.
Each of these categories can be defined directly with its own variable or indirectly with
a master variable in the file language (see the locale man page).
RC_LC_ALL
This variable, if set, overwrites the values of the variables already mentioned.
RC_LANG
If none of the previous variables are set, this is the fallback. By default, only
RC_LANG is set. This makes it easier for users to enter their own values.
ROOT_USES_LANG
A yes or no variable. If it is set to no, root always works in the POSIX environ-
ment.
The variables can be set with the YaST sysconfig editor (see Section 19.3.1, “Changing
the System Configuration Using the YaST sysconfig Editor” (page 384)). The value of
such a variable contains the language code, country code, encoding, and modifier. The
individual components are connected by special characters:
LANG=<language>[[_<COUNTRY>].<Encoding>[@<Modifier>]]
It only makes sense to set values for which usable description files can be found in
/usr/lib/locale. Additional description files can be created from the files in
/usr/share/i18n using the command localedef. The description files are part
of the glibc-i18ndata package. A description file for en_US.UTF-8 (for English
and United States) can be created with:
LANG=en_US.UTF-8
This is the default setting if American English is selected during installation. If you
selected another language, that language is enabled but still with UTF-8 as the
character encoding.
LANG=en_US.ISO-8859-1
This sets the language to English, country to United States, and the character set
to ISO-8859-1. This character set does not support the Euro sign, but it can be
useful sometimes for programs that have not been updated to support UTF-8. The
string defining the charset (ISO-8859-1 in this case) is then evaluated by pro-
grams like Emacs.
LANG=en_IE@euro
The above example explicitly includes the Euro sign in a language setting. Strictly
speaking, this setting is obsolete now, because UTF-8 also covers the Euro symbol.
It is only useful if an application does not support UTF-8, but ISO-8859-15.
Users can override the system defaults by editing their ~/.bashrc accordingly. For
instance, if you do not want to use the systemwide en_US for program messages, include
LC_MESSAGES=es_ES so messages are displayed in Spanish instead.
A fallback chain can also be defined, for example, for Breton to French or for Galician
to Spanish to Portuguese:
LANGUAGE="br_FR:fr_FR"
LANGUAGE="gl_ES:es_ES:pt_PT"
If desired, use the Norwegian variants Nynorsk and Bokmål instead (with additional
fallback to no):
LANG="nn_NO"
LANGUAGE="nn_NO:nb_NO:no"
or
LANG="nb_NO"
LANGUAGE="nb_NO:nn_NO:no"
One problem that can arise is a separator used to delimit groups of digits not being
recognized properly. This occurs if LANG is set to only a two-letter language code like
de, but the definition file glibc uses is located in /usr/share/lib/de_DE/LC
_NUMERIC. Thus LC_NUMERIC must be set to de_DE to make the separator definition
visible to the system.
Virtualization 421
22.1 System and Software
Requirements
The following sections list the system and software requirements for running virtualiza-
tion. Remember that virtual machines, just like physical machines, perform better when
they run on faster processors and have access to more system memory.
• Although the SUSE Linux operating system can run on many platforms, the virtu-
alization host server is only available on x86 32-bit and x86 64-bit platforms.
For information on AMD Virtualization, see the AMD Web Site [http://www
.amd.com].
The virtualization host server requires the following software packages and their depen-
dencies to be installed:
• kernel-xen
• xen
• xen-tools
Updates are available through your update channel. Make sure to update to the most
recent packages available.
Table 22.1 Popular Operating Systems Tested to Run in Full Virtualization Mode
Virtualization 423
Operating System x86 32- x86 64-
bit bit
Windows XP X X
Windows Vista* X X
Paravirtual mode is available for operating systems that are modified to recognize the
Xen virtualization environment.
For more information on specific guest operating systems, see the Guest Operating
System Guide at Novell Virtualization Technology [http://www.novell.com/
documentation/vmserver/].
• Virtual machines are instances of virtual hardware that operating systems recognize
as a physical computer. A virtual machine can run an operating system in full vir-
tualization mode or paravirtual mode.
• Full virtualization mode lets virtual machines run unmodified operating systems,
such as Windows Server 2003, but requires the computer running the virtualization
host server to support hardware-assisted virtualization technology.
Virtualization 425
Figure 22.1 Virtualization Architecture
NOTE
• During the initial installation, change the Software category so it includes the Xen
Virtual Machine Host Server selection. Complete the installation and restart the
computer.
• On a computer already running SUSE Linux, enter yast2 xen from a command
line interface. Complete the on-screen instructions and restart the computer.
• Copy the virtualization packages to the virtualization host server desktop and run
the rpm -U package_name command. Restart the computer.
NOTE
If you use the rpm command, you can safely ignore any messages stating
“ Cannot determine dependencies of module edd.” The message
might be repeated two or three times during installation.
Virtualization 427
If the GRUB boot loader does not display or the Xen option is not on the menu, review
the steps for installation and verify that the GRUB boot loader has been updated.
1 On the virtualization host server, click YaST > Virtualization > Virtual Machine
Manager.
The Virtual Machine Manager page displays the virtualization host server (Do-
main-0) and all virtual machines.
• Details displays status and hardware of the selected virtual machine or Do-
main-0
• Open displays the command console for the selected virtual machine.
• Start a virtual machine by selecting it from the list, click Open, and then click
Run.
Virtual Machine Manager is recommended for managing virtual machines, but you can
also perform actions by entering commands on the command line.
Command Action
Virtualization 429
Command Action
1 Launch the Create Virtual Machine Wizard by using one of the following methods:
• From the virtualization host server desktop, click YaST > Virtualization >
Create Virtual Machine
If the wizard does not appear or the vm-install command does not work,
review the process of installing and starting the virtualization host server. The
virtualization software might not be installed properly.
2 Choose between installing an operating system or using a disk or disk image that
already has an installed operating system.
The option to set up a virtual machine based on an existing disk or disk image
is only supported if the existing disk or disk image was originally set up through
the Create Virtual Machine Wizard.
4 Change the settings on the Summary screen to meet your configuration require-
ments.
TIP
5 Click OK to start the virtual machine and launch the operating system installation
program.
Virtualization 431
6 Follow the on-screen instructions to complete the installation program.
The virtual machine should now appear in the Virtual Machine Manager.
• Unmodified operating systems, such as Windows Server 2003, must run in full
virtualization mode, which requires the computer running the virtualization host
server to support hardware-assisted virtualization.
• The most recent version of the operating system should be installed on the virtual
machine.
• The minimum amount of RAM must be enough to run the host operating system
and the operating system of each virtual machine you plan to run simultaneously.
• The virtual machine should be set up using the Create Virtual Machine Wizard,
which is available by running YaST > Virtualization > Virtual Machine Manager
> New.
• The option to set up a virtual machine based on an existing disk or disk image is
only supported if the existing disk or disk image was originally set up through the
Create Virtual Machine Wizard.
• The operating system installation source can be launched from CD/DVD or from
ISO image files.
• Virtual disks can be based on a file, partition, volume, or other type of block device.
• Virtual machines are managed using the Virtual Machine Manager, which is
available by running YaST > Virtualization > Virtual Machine Manager.
Virtualization 433
Printer Operation
SUSE Linux Enterprise® supports printing with many types of printers, including remote
23
network printers. Printers can be configured with YaST or manually. Both graphical
and command line utilities are available for starting and managing print jobs. If your
printer does not work as expected, refer to Section 23.9, “Troubleshooting” (page 452).
CUPS is the standard print system in SUSE Linux Enterprise. CUPS is highly user-
oriented. In many cases, it is compatible with LPRng or can be adapted with relatively
little effort. LPRng is included in SUSE Linux Enterprise only for reasons of compati-
bility.
Printers can be distinguished by interface, such as USB or network, and printer language.
When buying a printer, make sure that the printer has an interface (like USB or parallel
port) that is available on your hardware and a suitable printer language. Printers can be
categorized on the basis of the following three classes of printer languages:
PostScript Printers
PostScript is the printer language in which most print jobs in Linux and Unix are
generated and processed by the internal print system. This language is already quite
old and very efficient. If PostScript documents can be processed directly by the
printer and do not need to be converted in additional stages in the print system, the
number of potential error sources is reduced. Because PostScript printers are subject
to substantial license costs, these printers usually cost more than printers without
a PostScript interpreter.
Before you buy a new printer, refer to the following sources to check how well the
printer you intend to buy is supported:
http://www.linuxprinting.org/
The LinuxPrinting.org printer database.
http://www.cs.wisc.edu/~ghost/
The Ghostscript Web page.
/usr/share/doc/packages/ghostscript/catalog.devices
List of included drivers.
The online databases always show the latest Linux support status. However, a Linux
distribution can only integrate the drivers available at production time. Accordingly, a
printer currently rated as “perfectly supported” may not have had this status when the
latest SUSE Linux Enterprise version was released. Thus, the databases may not neces-
sarily indicate the correct status, but only provide an approximation.
At least one dedicated printer queue exists for every printer. The spooler holds the print
job in the queue until the desired printer is ready to receive data. When the printer is
ready, the spooler sends the data through the filter and back-end to the printer.
The filter converts the data generated by the application that is printing (usually
PostScript or PDF, but also ASCII, JPEG, etc.) into printer-specific data (PostScript,
PCL, ESC/P, etc.). The features of the printer are described in the PPD files. A PPD
file contains printer-specific options with the parameters needed to enable them on the
printer. The filter system makes sure that options selected by the user are enabled.
If you use a PostScript printer, the filter system converts the data into printer-specific
PostScript. This does not require a printer driver. If you use a non-PostScript printer,
the filter system converts the data into printer-specific data using Ghostscript. This re-
quires a Ghostscript printer driver suitable for your printer. The back-end receives the
printer-specific data from the filter then passes it to the printer.
When connecting the printer to the machine, do not forget that only USB de-
vices can be plugged in or unplugged during operation. To avoid damaging
your system or printer, shut down the system before changing any connections
that are not USB.
To configure a PostScript printer, the best approach is to get a suitable PPD file. Many
PPD files are available in the package manufacturer-PPDs, which is automatically
installed within the scope of the standard installation. See Section 23.8.3, “PPD Files
in Various Packages” (page 450) and Section 23.9.2, “No Suitable PPD File Available
for a PostScript Printer” (page 453).
• The printer does not identify itself correctly. This may apply to very old devices.
Try to configure your printer as described in Section “Configuring Manually”
(page 439).
• If the manual configuration does not work, communication between printer and
computer is not possible. Check the cable and the plugs to make sure that the
printer is properly connected. If this is the case, the problem may not be printer-
related, but rather a USB or parallel port–related problem.
Configuring Manually
To manually configure the printer, select Hardware > Printer in the YaST control
center. This opens the main Printer Configuration window, where the detected devices
are listed in the upper part. The lower part lists any queues configured so far (refer to
Section 23.1, “The Workflow of the Printing System” (page 437) for more information
about print queues). If no printer was detected, both parts of the configuration window
are empty. Use Edit to change the configuration of a listed printer or Add to set up a
printer not automatically detected. Editing an existing configuration uses the same di-
alogs as in Adding a Local Printer Manually (page 440).
In Printer Configuration, you can also Delete an existing entry. Clicking Other opens
a list with advanced options. By restarting the detection, manually start the automatic
To make sure that everything works correctly, the crucial configuration steps
can be checked with the print test function of YaST. The test page also pro-
vides important information about the configuration tested. If the output is
garbled, for example, with several pages almost empty, you can stop the
printer by first removing all paper then stopping the test from YaST.
1 Start YaST and choose Hardware > Printer to open the Printer Configuration
dialog.
4 Select the port to which the printer is connected (usually USB or parallel port)
and choose the device in the next configuration screen. It is recommended to
Test the Printer Connection at this point. If problems occur, select the correct
device or choose Back to return to the previous dialog.
5 In Queue Name, set up a print queue. Specifying a Name for Printing is manda-
tory. It is recommended to choose a recognizable name—with this name, you
can later identify the printer in the printing dialogs of applications. Use Printer
Description and Printer Location to further describe the printer. This is optional,
but useful if you have more than one printer connected to the machine or if you
set up a print server. Do Local Filtering should be checked—it is needed for local
printers.
6 In Printer Model, specify the printer by Manufacturer and Model. If your printer
is not listed, you can try UNKNOWN MANUFACTURER from the manufacturer
list and select an appropriate standard language (the set of commands controlling
the printer) from the model list (refer to your printer's documentation to find out
7 The Configuration screen lists a summary of the printer setup. This dialog is also
shown when editing an existing printer configuration from the start screen of this
YaST module.
The summary contains the following entries, which you can also modify with
Edit:
• Name and basic settings, Printer Model, and Connection let you change en-
tries made while following this procedure.
• Refer to Section “Choosing an Alternative PPD File with YaST” (page 442)
for details on PPD file.
• With Filter settings fine-tune the printer setup. Configure options like Page
Size, Color Mode, and Resolution here.
• By default, every user is able to use the printer. With Restriction settings,
list users that are forbidden to use the printer or list users that are allowed to
use it.
Get PPD files directly from your printer vendor or from the driver CD of the printer
(see Section 23.9.2, “No Suitable PPD File Available for a PostScript Printer” (page 453)
for details). An alternative source for PPD files is http://www.linuxprinting
.org/, the “Linux Printing Database”. When downloading PPD files from linuxprint-
ing.org, keep in mind that it always shows the latest Linux support status, which is not
necessarily met by SUSE Linux Enterprise.
Normally it should not be necessary to change the PPD file—the PPD file chosen by
YaST should produce the best results. However, if you want a color printer to print
only in black and white, for example, it is most convenient to use a PPD file that does
not support color printing. If you experience performance problems with a PostScript
printer when printing graphics, it may help to switch from a PostScript PPD file to a
PCL PPD file (provided your printer understands PCL).
socket
Socket refers to a connection in which the data is sent to an Internet socket without
first performing a data handshake. Some of the socket port numbers that are com-
monly used are 9100 or 35. The device URI (uniform resource identifier) syntax
is socket://IP.of.the.printer:port, for example,
socket://192.168.0.202:9100/.
The protocol supported by the printer must be determined before configuration. If the
manufacturer does not provide the needed information, the command nmap, which
comes with the nmap package, can be used to guess the protocol. nmap checks a host
for open ports. For example:
1 Start YaST and choose Hardware > Printer to open the Printer Configuration
dialog.
3 Choose Network Printers to open a dialog in which to specify further details that
should be provided by your network administrator.
With lpadmin, the CUPS server administrator can add, remove, or manage class and
print queues. To add a print queue, use the following syntax:
Then the device (-v) is available as queue (-p), using the specified PPD file (-P).
This means that you must know the PPD file and the name of the device to configure
the printer manually.
Do not use -E as the first option. For all CUPS commands, -E as the first argument
sets use of an encrypted connection. To enable the printer, -E must be used as shown
in the following example:
lpadmin -p ps -v parallel:/dev/lp0 -P \
/usr/share/cups/model/Postscript.ppd.gz -E
lpadmin -p ps -v socket://192.168.1.0:9100/ -P \
/usr/share/cups/model/Postscript-level1.ppd.gz -E
lpoptions -p queue -l
Example:
lpoptions -p queue -l
When a normal user runs lpoptions, the settings are written to ~/.lpoptions.
However, root settings are written to /etc/cups/lpoptions.
Some applications rely on the lp command for printing. In this case, enter the correct
command in the application's print dialog, usually without specifying filename, for
example, lp -d queuename.
1. For every queue on the network server, you can configure a local queue through
which to forward all jobs to the corresponding network server (forwarding queue).
Usually this approach is not recommended, because all client machines must be
reconfigured whenever the configuration of the network server changes.
2. Print jobs can also be forwarded directly to one network server. For this type of
configuration, do not run a local CUPS daemon. lp or corresponding library calls
of other programs can send jobs directly to the network server. However, this
configuration does not work if you also want to print on a local printer.
3. The CUPS daemon can listen to IPP broadcast packets that other network servers
send to announce available queues.
YaST can find CUPS servers by scanning local network hosts to see if they offer the
IPP service or by listening to IPP broadcasts. This requires the firewall to allow incoming
packets on port 631/UDP (service IPP client) to pass through. This is automatically
enabled when you have configured your machine to be in the internal firewall zone.
Opening a port to configure access to remote queues in the external zone can be a secu-
rity risk because an attacker could broadcast a server that might be accepted by users.
By default, IPP broadcasts are rejected in the external zone. See Section 43.4.1, “Con-
figuring the Firewall with YaST” (page 822) for details of firewall configuration.
Alternatively, the user can detect CUPS servers by actively scanning the local network
hosts or configure all queues manually. However, this method is not recommended.
However, the authentication (the password check) cannot be performed via /etc/
shadow, because lp has no access to /etc/shadow. Instead, the CUPS-specific
authentication via /etc/cups/passwd.md5 must be used. For this purpose, a CUPS
administrator with the CUPS administration group sys and a CUPS password must
be entered in /etc/cups/passwd.md5. To do this, enter the following as root:
This setting is also essential if you want to use the CUPS administration Web front-end
or the KDE printer administration tool.
When cupsd runs as lp, port 631 cannot be opened. Therefore, cupsd cannot be
reloaded with rccups reload. Use rccups restart instead.
BrowseAllow @LOCAL
BrowseDeny All
and
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From @LOCAL
</Location>
In this way, only LOCAL hosts can access cupsd on a CUPS server. LOCAL hosts are
hosts whose IP addresses belong to a non-PPP interface (interfaces whose
IFF_POINTOPOINT flags are not set) and whose IP addresses belong to the same
network as the CUPS server. Packets from all other hosts are rejected immediately.
The configuration using only PPD files and no other information sources has the advan-
tage that the PPD files in /usr/share/cups/model can be modified freely. The
YaST printer configuration recognizes changes and regenerates the vendor and model
database. For example, if you only have PostScript printers, normally you do not need
the Foomatic PPD files in the cups-drivers package or the Gimp-Print PPD files
in the cups-drivers-stp package. Instead, the PPD files for your PostScript
printers can be copied directly to /usr/share/cups/model (if they do not already
exist in the manufacturer-PPDs package) to achieve an optimum configuration
for your printers.
• /usr/share/cups/model/Postscript-level1.ppd.gz
• /usr/share/cups/model/Postscript-level2.ppd.gz
• The vendor and model determined during the hardware detection match the vendor
and model in a PPD file from the manufacturer-PPDs package.
• The PPD file from the manufacturer-PPDs package is the only suitable PPD
file for the printer model or a there is a Foomatic PPD file with a *NickName:
... Foomatic/Postscript (recommended) entry that also matches the
printer model.
Accordingly, YaST does not use any PPD file from the manufacturer-PPDs
package in the following cases:
• The PPD file from the the manufacturer-PPDs package does not match the
vendor and model. This may happen if the manufacturer-PPDs package con-
tains only one PPD file for similar models, for example, if there is no separate PPD
file for the individual models of a model series, but the model name is specified in
a form like Funprinter 1000 series in the PPD file.
23.9 Troubleshooting
The following sections cover some of the most frequently encountered printer hardware
and software problems and ways to solve or circumvent these problems. Among the
topics covered are GDI printers, PPD files, and port configuration. Common network
printer problems, defective printouts, and queue handling are also addressed.
Some GDI printers can be switched to operate either in GDI mode or one of the standard
printer languages. See whether it is possible in the manual of the printer. Some models
require a special Windows software to do the switch (note that the Windows printer
driver may always switch the printer back into GDI mode when printing from Windows).
For other GDI printers, there are extension modules for a standard printer language
available.
Instead of spending time trying to make a proprietary Linux driver work, it may be
more cost-effective to purchase a supported printer. This would solve the driver problem
once and for all, eliminating the need to install and configure special driver software
and obtain driver updates that may be required due to new developments in the print
system.
If the PPD file is provided as a zip archive (.zip) or a self-extracting zip archive (.exe),
unpack it with unzip. First, review the license terms of the PPD file. Then use the
cupstestppd utility to check if the PPD file complies with “Adobe PostScript
Printer Description File Format Specification, version 4.3.” If the utility returns “FAIL,”
the errors in the PPD files are serious and are likely to cause major problems. The
problem spots reported by cupstestppd should be eliminated. If necessary, ask the
printer manufacturer for a suitable PPD file.
• Interrupt: irrelevant
• DMA: disabled
If the printer cannot be addressed on the parallel port despite these settings, enter the
I/O address explicitly in accordance with the setting in the BIOS in the form 0x378
in /etc/modprobe.conf. If there are two parallel ports that are set to the I/O ad-
dresses 378 and 278 (hexadecimal), enter these in the form 0x378,0x278.
If interrupt 7 is free, it can be activated with the entry shown in Example 23.1,
“/etc/modprobe.conf: Interrupt Mode for the First Parallel Port” (page 454). Before ac-
tivating the interrupt mode, check the file /proc/interrupts to see which interrupts
are already in use. Only the interrupts currently being used are displayed. This may
change depending on which hardware components are active. The interrupt for the
parallel port must not be used by any other device. If you are not sure, use the polling
mode with irq=none.
Example 23.1 /etc/modprobe.conf: Interrupt Mode for the First Parallel Port
If the connection to lpd cannot be established, lpd may not be active or there
may be basic network problems.
As the user root, use the following command to query a (possibly very long)
status report for queue on remote host, provided the respective lpd is active
and the host accepts queries:
echo -e "\004queue" \
| netcat -w 2 -p 722 host 515
If lpd does not respond, it may not be active or there may be basic network prob-
lems. If lpd responds, the response should show why printing is not possible on
the queue on host. If you receive a response like that in Example 23.2, “Error
Message from lpd” (page 455), the problem is caused by the remote lpd.
If a broadcasting CUPS network server exists, the output appears as shown in Ex-
ample 23.3, “Broadcast from the CUPS Network Server” (page 455).
ipp://192.168.0.202:631/printers/queue
The following command can be used to test if a TCP connection can be established
to cupsd (port 631) on host:
The next command can be used to test if the queue on host accepts a print job
consisting of a single carriage-return character. Nothing should be printed. Possibly,
a blank page may be ejected.
In this way, the print server box is reduced to a converter between the various forms
of data transfer (TCP/IP network and local printer connection). To use this method,
you need to know the TCP port on the print server box. If the printer is connected
to the print server box and powered on, this TCP port can usually be determined
with the nmap utility from the nmap package some time after the print server box
is powered on. For example, nmap IP-address may deliver the following
output for a print server box:
to send character strings or files directly to the respective port to test if the printer
can be addressed on this port.
To delete the print job on the server, use a command such as lpstat -h
print-server -o to determine the job number on the server, provided the server
has not already completed the print job (that is, sent it completely to the printer). Using
this job number, the print job on the server can be deleted:
If a print job is defective or an error occurs in the communication between the host and
the printer, the printer prints numerous sheets of paper with unintelligible characters,
because it is unable to process the data correctly. To deal with this, follow these steps:
1 To stop printing, remove all paper from ink jet printers or open the paper trays
of laser printers. High-quality printers have a button for canceling the current
printout.
2 The print job may still be in the queue, because jobs are only removed after they
are sent completely to the printer. Use lpstat -o or lpstat -h
print-server -o to check which queue is currently printing. Delete the
print job with cancel queue-jobnumber or cancel -h
print-server queue-jobnumber.
4 Reset the printer completely by switching it off for some time. Then insert the
paper and turn on the printer.
2 Stop cupsd.
4 Start cupsd.
The content of the /dev directory is kept on a temporary file system and all files are
created from scratch at every system start-up. Manually created or changed files inten-
tionally do not survive a reboot. Static files and directories that should always be present
in the /dev directory regardless of the state of the corresponding kernel device can be
placed in the /lib/udev/devices directory. At system start-up, the contents of
that directory is copied to the /dev directory with the same ownership and permissions
as the files in /lib/udev/devices.
The udev daemon reads and parses all provided rules from the /etc/udev/rules
.d/*.rules files once at start-up and keeps them in memory. If rules files are
changed, added, or removed, the daemon receives an event and updates the in-memory
representation of the rules.
Every received event is matched against the set of provides rules. The rules can add or
change event environment keys, request a specific name for the device node to create,
add symlinks pointing to the node, or add programs to run after the device node is cre-
ated. The driver core uevents are received from a kernel netlink socket.
Every device driver carries a list of known aliases for devices it can handle. The list is
contained in the kernel module file itself. The program depmod reads the ID lists and
creates the file modules.alias in the kernel's /lib/modules directory for all
currently available modules. With this infrastructure, module loading is as easy as
calling modprobe for every event that carries a MODALIAS key. If modprobe
$MODALIAS is called, it matches the device alias composed for the device with the
As an example, a USB mouse present during boot may not be initialized by the early
boot logic, because the driver is not available that time. The event for the device discov-
ery was lost and failed to find a kernel module for the device. Instead of manually
searching for possibly connected devices, udev just requests all device events from the
kernel after the root file system is available, so the event for the USB mouse device
just runs again. Now it finds the kernel module on the mounted root file system and the
USB mouse can be initialized.
From userspace, there is no visible difference between a device coldplug sequence and
a device discovery during runtime. In both cases, the same rules are used to match and
the same configured programs are run.
UEVENT[1132632714.285362] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2
UEVENT[1132632714.288166] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0
UEVENT[1132632714.309485] add@/class/input/input6
UEVENT[1132632714.309511] add@/class/input/input6/mouse2
UEVENT[1132632714.309524] add@/class/usb_device/usbdev2.12
UDEV [1132632714.348966] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2
UDEV [1132632714.420947] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0
UDEV [1132632714.427298] add@/class/input/input6
UDEV [1132632714.434223] add@/class/usb_device/usbdev2.12
UDEV [1132632714.439934] add@/class/input/input6/mouse2
udev also sends messages to syslog. The default syslog priority that controls which
messages are sent to syslog is specified in the udev configuration file /etc/udev/
udev.conf. The log priority of the running daemon can be changed with
udevcontrol log_priority=level/number.
/dev/disk
|-- by-id
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B -> ../../sda
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part1 -> ../../sda1
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part6 -> ../../sda6
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part7 -> ../../sda7
| |-- usb-Generic_STORAGE_DEVICE_02773 -> ../../sdd
| `-- usb-Generic_STORAGE_DEVICE_02773-part1 -> ../../sdd1
|-- by-label
| |-- Photos -> ../../sdd1
| |-- SUSE10 -> ../../sda7
| `-- devel -> ../../sda6
|-- by-path
| |-- pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
| |-- pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
| |-- pci-0000:00:1f.2-scsi-0:0:0:0-part6 -> ../../sda6
| |-- pci-0000:00:1f.2-scsi-0:0:0:0-part7 -> ../../sda7
| |-- pci-0000:00:1f.2-scsi-1:0:0:0 -> ../../sr0
| |-- usb-02773:0:0:2 -> ../../sdd
| |-- usb-02773:0:0:2-part1 -> ../../sdd1
`-- by-uuid
|-- 159a47a4-e6e6-40be-a757-a629991479ae -> ../../sda7
|-- 3e999973-00c9-4917-9442-b7633bd95b9e -> ../../sda6
`-- 4210-8F8C -> ../../sdd1
/etc/hotplug/*.agent
No longer needed or moved to /lib/udev
/etc/hotplug/*.rc
Replaced by the /sys/*/uevent trigger
/etc/hotplug/blacklist
Replaced by the blacklist option in modprobe.conf
/etc/dev.d/*
Replaced by the udev rule RUN key
/etc/hotplug.d/*
Replaced by the udev rule RUN key
/sbin/hotplug
Replaced by udevd listening to netlink; only used in the initial RAM file system
until the root file system can be mounted, then it is disabled
/dev/*
Replaced by dynamic udev and static content in /lib/udev/devices/*
The following files and directories contain the crucial elements of the udev infrastructure:
/etc/udev/udev.conf
Main udev configuration file
/etc/udev/rules.d/*
udev event matching rules
/lib/udev/devices/*
Static /dev content
udev
General information about udev, keys, rules, and other important configuration is-
sues.
udevinfo
udevinfo can be used to query device information from the udev database.
udevd
Information about the udev event managing daemon.
udevmonitor
udevmonitor prints the kernel and udev event sequence to the console. This tool is
mainly used for debugging purposes.
25.1 Terminology
metadata
A file system–internal data structure that assures all the data on disk is properly
organized and accessible. Essentially, it is “data about the data.” Almost every file
system has its own structure of metadata, which is part of why the file systems
show different performance characteristics. It is extremely important to maintain
metadata intact, because otherwise all data on the file system could become inac-
cessible.
inode
Inodes contain various information about a file, including size, number of links,
pointers to the disk blocks where the file contents are actually stored, and date and
time of creation, modification, and access.
journal
In the context of a file system, a journal is an on-disk structure containing a kind
of log in which the file system stores what it is about to change in the file system's
metadata. Journaling greatly reduces the recovery time of a Linux system because
It is very important to bear in mind that there may be no file system that best suits all
kinds of applications. Each file system has its particular strengths and weaknesses,
which must be taken into account. Even the most sophisticated file system cannot replace
a reasonable backup strategy, however.
The terms data integrity and data consistency, when used in this chapter, do not refer
to the consistency of the user space data (the data your application writes to its files).
Whether this data is consistent must be controlled by the application itself.
Unless stated otherwise in this chapter, all the steps required to set up or
change partitions and file systems can be performed using YaST.
25.2.1 ReiserFS
Officially one of the key features of the 2.4 kernel release, ReiserFS has been available
as a kernel patch for 2.2.x SUSE kernels since version 6.4. ReiserFS was designed by
Hans Reiser and the Namesys development team. It has proven itself to be a powerful
alternative to Ext2. Its key assets are better disk space utilization, better disk access
performance, and faster crash recovery.
25.2.2 Ext2
The origins of Ext2 go back to the early days of Linux history. Its predecessor, the
Extended File System, was implemented in April 1992 and integrated in Linux 0.96c.
The Extended File System underwent a number of modifications and, as Ext2, became
the most popular Linux file system for years. With the creation of journaling file systems
and their astonishingly short recovery times, Ext2 became less important.
A brief summary of Ext2's strengths might help understand why it was—and in some
areas still is—the favorite Linux file system of many Linux users.
Solidity
Being quite an “old-timer,” Ext2 underwent many improvements and was heavily
tested. This may be the reason why people often refer to it as rock-solid. After a
system outage when the file system could not be cleanly unmounted, e2fsck starts
to analyze the file system data. Metadata is brought into a consistent state and
pending files or data blocks are written to a designated directory (called lost
Easy Upgradability
The code for Ext2 is the strong foundation on which Ext3 could become a highly-
acclaimed next-generation file system. Its reliability and solidity were elegantly
combined with the advantages of a journaling file system.
25.2.3 Ext3
Ext3 was designed by Stephen Tweedie. Unlike all other next-generation file systems,
Ext3 does not follow a completely new design principle. It is based on Ext2. These two
file systems are very closely related to each other. An Ext3 file system can be easily
built on top of an Ext2 file system. The most important difference between Ext2 and
Ext3 is that Ext3 supports journaling. In summary, Ext3 has three major advantages to
offer:
To decide yourself how large the journal should be and on which device it should
reside, run tune2fs -J instead together with the desired journal options
size= and device=. More information about the tune2fs program is available
in the tune2fs manual page.
2 To ensure that the Ext3 file system is recognized as such, edit the file /etc/
fstab as root, changing the file system type specified for the corresponding
partition from ext2 to ext3. The change takes effect after the next reboot.
3 To boot a root file system set up as an Ext3 partition, include the modules ext3
and jbd in the initrd. To do this, edit /etc/sysconfig/kernel as
root, adding ext3 and jbd to the INITRD_MODULES variable. After saving
the changes, run the mkinitrd command. This builds a new initrd and prepares
it for use.
A quick review of XFS's key features explains why it may prove a strong competitor
for other journaling file systems in high-end computing.
Every node in an OCFS2 setup has concurrent read and write access to all data. This
requires OCFS2 to be cluster-aware, meaning that OCFS2 must include a means to
determine of which nodes the cluster consists and whether these nodes are actually
alive and available. To compute a cluster's membership, OCFS2 includes a node man-
ager (NM). To monitor the availability of the nodes in a cluster, OCFS2 includes a
simple heartbeat implementation. To avoid chaos arising from various nodes directly
accessing the file system, OCFS2 also contains a lock manager, DLM (distributed lock
manager). Communication between the nodes is handled via a TCP-based messaging
system.
• Asynchronous and direct I/O support for database files for improved database per-
formance
• Support for multiple block sizes (where each volume can have a different block
size) up to 4 KB, for a maximum volume size of 16 TB
For more in-depth information about OCFS2, refer to Chapter 13, Oracle Cluster File
System 2 (page 267).
hpfs High Performance File System: The IBM OS/2 standard file
system—only supported in read-only mode.
msdos fat, the file system originally used by DOS, is today used by
various operating systems.
nfs Network File System: Here, data can be stored on any machine
in a network and access may be granted via a network.
vfat Virtual FAT: Extension of the fat file system (supports long
filenames).
Ext2 or Ext3 (8 KB block size) 246 (64 TB) 245 (32 TB)
(systems with 8 KB pages, like
Alpha)
Table 25.2, “Maximum Sizes of File Systems (On-Disk Format)” (page 477) de-
scribes the limitations regarding the on-disk format. The 2.6 kernel imposes its
own limits on the size of files and file systems handled by it. These are as follows:
File Size
41
On 32-bit systems, files may not exceed the size of 2 TB (2 bytes).
• http://e2fsprogs.sourceforge.net/
• http://www.zipworld.com.au/~akpm/linux/ext3/
• http://www.namesys.com/
• http://oss.sgi.com/projects/xfs/
• http://oss.oracle.com/projects/ocfs2/
IBM System z do not have any input and output devices supported by X.Org.
Therefore, none of the configuration procedures described in this section apply.
Find more relevant information for IBM System z in Section 8.6, “Network De-
vices” (page 159).
Be very careful when configuring your X Window System. Never start the X
Window System until the configuration is finished. A wrongly configured system
can cause irreparable damage to your hardware (this applies especially to fixed-
frequency monitors). The creators of this book and SUSE Linux Enterprise
cannot be held responsible for any resulting damage. This information has been
carefully researched, but this does not guarantee that all methods presented
here are correct and cannot damage your hardware.
The following sections describe the structure of the configuration file /etc/X11/
xorg.conf. It consists of several sections, each one dealing with a certain aspect of
the configuration. Each section starts with the keyword Section <designation>
and ends with EndSection. The following convention applies to all sections:
Section designation
entry 1
entry 2
entry n
EndSection
The section types available are listed in Table 26.1, “Sections in /etc/X11/xorg.conf”
(page 483).
Type Meaning
Files The paths used for fonts and the RGB color table.
InputDevice Input devices, like keyboard, mouse, and special input devices
(touchpads, joysticks, etc.), are configured in this section. Impor-
tant parameters in this section are Driver and the options
defining the Protocol and Device.
Monitor The monitor used. The individual elements of this section are
the name, which is referred to later in the Screen definition,
the Bandwidth, and the synchronization frequency limits
(HorizSync and VertRefresh). Settings are given in MHz,
kHz, and Hz. Normally, the server refuses any modeline that
does not correspond with the specification of the monitor. This
prevents too high frequencies from being sent to the monitor by
accident.
Monitor, Device, and Screen are explained in more detail. Further information
about the other sections can be found in the manual pages of X.Org and xorg.conf.
There can be several different Monitor and Device sections in xorg.conf. Even
multiple Screen sections are possible. The following ServerLayout section deter-
mines which one is used.
Section "Screen"❶
DefaultDepth 16❷
SubSection "Display"❸
Depth 16❹
Modes "1152x864" "1024x768" "800x600"❺
Virtual 1152x864❻
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
SubSection "Display"
Depth 32
Modes "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"❼
Monitor "Monitor[0]"
EndSection
The first resolution found is the Default mode. With Ctrl + Alt + + (on the
number pad), switch to the next resolution in the list to the right. With Ctrl + Alt
+ – (on the number pad), switch to the left. This enables you to vary the resolution
while X is running.
Section "Device"
BoardName "MGA2064W"
BusID "0:19:0"❶
Driver "mga"❷
Identifier "Device[0]"
VendorName "Matrox"
Option "sw_cursor"
EndSection
❶ The BusID defines the PCI or AGP slot in which the graphics card is installed.
This matches the ID displayed by the command lspci. The X server needs details
The behavior of the X server or of the driver can also be influenced through additional
options. An example of this is the option sw_cursor, which is set in the device section.
This deactivates the hardware mouse cursor and depicts the mouse cursor using software.
Depending on the driver module, there are various options available, which can be
found in the description files of the driver modules in the directory /usr/share/
doc/package_name. Generally valid options can also be found in the manual pages
(man xorg.conf and man X.Org).
Monitor definitions should only be set by experienced users. The modelines constitute
an important part of the Monitor sections. Modelines set horizontal and vertical timings
for the respective resolution. The monitor properties, especially the allowed frequencies,
are stored in the Monitor section.
WARNING
Unless you have an in-depth knowledge of monitor and graphics card functions,
nothing should be changed in the modelines, because this could cause severe
damage to your monitor.
Manual specification of modelines is rarely required today. If you are using a modern
multisync monitor, the allowed frequencies and optimal resolutions can, as a rule, be
read directly from the monitor by the X server via DDC, as described in the SaX2
configuration section. If this is not possible for some reason, use one of the VESA
modes included in the X server. This works with almost all graphics card and monitor
combinations.
Instead of copying the actual fonts, you can also create symbolic links. For example,
you may want to do this if you have licensed fonts on a mounted Windows partition
and want to use them. Subsequently, run SuSEconfig --module fonts.
The procedure is the same for bitmap fonts, TrueType and OpenType fonts, and Type1
(PostScript) fonts. All these font types can be installed in any directory.
X.Org contains two completely different font systems: the old X11 core font system
and the newly designed Xft and fontconfig system. The following sections briefly de-
scribe these two systems.
The X11 core font system has a few inherent weaknesses. It is outdated and can no
longer be extended in a meaningful fashion. Although it must be retained for reasons
of backward compatibility, the more modern Xft and fontconfig system should be used
if at all possible.
For its operation, the X server needs to know which fonts are available and where in
the system it can find them. This is handled by a FontPath variable, which contains the
path to all valid system font directories. In each of these directories, a file named fonts
.dir lists the available fonts in this directory. The FontPath is generated by the X
server at start-up. It searches for a valid fonts.dir file in each of the FontPath
entries in the configuration file /etc/X11/xorg.conf. These entries are found in
If the X server is already active, newly installed fonts in mounted directories can be
made available with the command xset fp rehash. This command is executed by
SuSEconfig --module fonts. Because the command xset needs access to the
running X server, this only works if SuSEconfig --module fonts is started from
a shell that has access to the running X server. The easiest way to achieve this is to as-
sume root permissions by entering su and the root password. su transfers the access
permissions of the user who started the X server to the root shell. To check if the fonts
were installed correctly and are available by way of the X11 core font system, use the
command xlsfonts to list all available fonts.
By default, SUSE Linux Enterprise uses UTF-8 locales. Therefore, Unicode fonts should
be preferred (font names ending with iso10646-1 in xlsfonts output). All available
Unicode fonts can be listed with xlsfonts | grep iso10646-1. Nearly all
Unicode fonts available in SUSE Linux Enterprise contain at least the glyphs needed
for European languages (formerly encoded as iso-8859-*).
26.2.2 Xft
From the outset, the programmers of Xft made sure that scalable fonts including an-
tialiasing are supported well. If Xft is used, the fonts are rendered by the application
using the fonts, not by the X server as in the X11 core font system. In this way, the re-
spective application has access to the actual font files and full control of how the glyphs
are rendered. This constitutes the basis for the correct display of text in a number of
languages. Direct access to the font files is very useful for embedding fonts for printing
to make sure that the printout looks the same as the screen output.
In SUSE Linux Enterprise, the two desktop environments KDE and GNOME, Mozilla,
and many other applications already use Xft by default. Xft is already used by more
applications than the old X11 core font system.
Xft uses the fontconfig library for finding fonts and influencing how they are rendered.
The properties of fontconfig are controlled by the global configuration file /etc/
fonts/fonts.conf and the user-specific configuration file ~/.fonts.conf.
Each of these fontconfig configuration files must begin with
To add directories to search for fonts, append lines such as the following:
<dir>/usr/local/share/fonts/</dir>
However, this is usually not necessary. By default, the user-specific directory ~/.fonts
is already entered in /etc/fonts/fonts.conf. Accordingly, all you need to do
to install additional fonts is to copy them to ~/.fonts.
You can also insert rules that influence the appearance of the fonts. For example, enter
<match target="font">
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<test name="family">
<string>Luxi Mono</string>
<string>Luxi Sans</string>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
By default, most applications use the font names sans-serif (or the equivalent
sans), serif, or monospace. These are not real fonts but only aliases that are re-
solved to a suitable font, depending on the language setting.
Users can easily add rules to ~/.fonts.conf to resolve these aliases to their favorite
fonts:
Because nearly all applications use these aliases by default, this affects almost the entire
system. Thus, you can easily use your favorite fonts almost everywhere without having
to modify the font settings in the individual applications.
Use the command fc-list to find out which fonts are installed and available for use.
For instance, the command fc-list returns a list of all fonts. To find out which of
the available scalable fonts (:scalable=true) contain all glyphs required for Hebrew
(:lang=he), their font names (family), their style (style), their weight (weight),
and the name of the files containing the fonts, enter the following command:
fc-list ":lang=he:scalable=true" family style weight
FreeSansBold.ttf: FreeSans:style=Bold:weight=200
FreeMonoBoldOblique.ttf: FreeMono:style=BoldOblique:weight=200
FreeSerif.ttf: FreeSerif:style=Medium:weight=80
FreeSerifBoldItalic.ttf: FreeSerif:style=BoldItalic:weight=200
FreeSansOblique.ttf: FreeSans:style=Oblique:weight=80
FreeSerifItalic.ttf: FreeSerif:style=Italic:weight=80
FreeMonoOblique.ttf: FreeMono:style=Oblique:weight=80
FreeMono.ttf: FreeMono:style=Medium:weight=80
FreeSans.ttf: FreeSans:style=Medium:weight=80
FreeSerifBold.ttf: FreeSerif:style=Bold:weight=200
FreeSansBoldOblique.ttf: FreeSans:style=BoldOblique:weight=200
FreeMonoBold.ttf: FreeMono:style=Bold:weight=200
lang The language that the font supports, for example, de for
German, ja for Japanese, zh-TW for traditional Chinese,
or zh-CN for simplified Chinese.
weight The font weight, such as 80 for regular or 200 for bold.
slant The slant, usually 0 for none and 100 for italic.
System administrators and programmers often want to restrict access to certain parts
of the system or to limit the use of certain functions of an application. Without PAM,
applications must be adapted every time a new authentication mechanism, such as
LDAP or SAMBA, is introduced. This process, however, is rather time-consuming and
error-prone. One way to avoid these drawbacks is to separate applications from the
authentication mechanism and delegate authentication to centrally managed modules.
Whenever a newly required authentication scheme is needed, it is sufficient to adapt
or write a suitable PAM module for use by the program in question.
Every program that relies on the PAM mechanism has its own configuration file in the
directory /etc/pam.d/programname. These files define the PAM modules used
for authentication. In addition, there are global configuration files for most PAM
modules under /etc/security, which define the exact behavior of these modules
(examples include pam_env.conf, pam_pwcheck.conf, pam_unix2.conf,
and time.conf). Every application that uses a PAM module actually calls a set of
PAM functions, which then process the information in the various configuration files
and return the result to the calling application.
PAM modules are processed as stacks. Different types of modules have different pur-
poses, for example, one module checks the password, another one verifies the location
from which the system is accessed, and yet another one reads user-specific settings.
PAM knows about four different types of modules:
auth
The purpose of this type of module is to check the user's authenticity. This is tradi-
tionally done by querying a password, but it can also be achieved with the help of
a chip card or through biometrics (fingerprints or iris scan).
account
Modules of this type check whether the user has general permission to use the re-
quested service. As an example, such a check should be performed to ensure that
no one can log in under the username of an expired account.
password
The purpose of this type of module is to enable the change of an authentication
token. In most cases, this is a password.
session
Modules of this type are responsible for managing and configuring user sessions.
They are started before and after authentication to register login attempts in system
logs and configure the user's specific environment (mail accounts, home directory,
system limits, etc.).
The second column contains control flags to influence the behavior of the modules
started:
required
A module with this flag must be successfully processed before the authentication
may proceed. After the failure of a module with the required flag, all other
requisite
Modules having this flag must also be processed successfully, in much the same
way as a module with the required flag. However, in case of failure a module
with this flag gives immediate feedback to the user and no further modules are
processed. In case of success, other modules are subsequently processed, just like
any modules with the required flag. The requisite flag can be used as a
basic filter checking for the existence of certain conditions that are essential for a
correct authentication.
sufficient
After a module with this flag has been successfully processed, the calling application
receives an immediate message about the success and no further modules are pro-
cessed, provided there was no preceding failure of a module with the required
flag. The failure of a module with the sufficient flag has no direct conse-
quences, in the sense that any subsequent modules are processed in their respective
order.
optional
The failure or success of a module with this flag does not have any direct conse-
quences. This can be useful for modules that are only intended to display a message
(for example, to tell the user that mail has arrived) without taking any further action.
include
If this flag is given, the file specified as argument is inserted at this place.
The module path does not need to be specified explicitly, as long as the module is lo-
cated in the default directory /lib/security (for all 64-bit platforms supported by
SUSE Linux Enterprise®, the directory is /lib64/security). The fourth column
may contain an option for the given module, such as debug (enables debugging) or
nullok (allows the use of empty passwords).
#%PAM-1.0
auth include common-auth
auth required pam_nologin.so
account include common-account
password include common-password
session include common-session
# Enable the following line to get resmgr support for
# ssh sessions (see /usr/share/doc/packages/resmgr/README.SuSE)
#session optional pam_resmgr.so fake_ttyname
The typical PAM configuration of an application (sshd, in this case) contains four include
statements referring to the configuration files of four module types: common-auth,
common-account, common-password, and common-session. These four
files hold the default configuration for each module type. By including them instead of
calling each module separately for each PAM application, automatically get an updated
PAM configuration if the administrator changes the defaults. In former times, you had
to adjust all configuration files manually for all applications when changes to PAM
occurred or a new application was installed. Now the PAM configuration is made with
central configuration files and all changes are automatically inherited by the PAM
configuration of each service.
The first include file (common-auth) calls two modules of the auth type: pam_env
and pam_unix2. See Example 27.2, “Default Configuration for the auth Section”
(page 498).
After the modules specified in common-auth have been successfully called, a third
module called pam_nologin checks whether the file /etc/nologin exists. If it
does, no user other than root may log in. The whole stack of auth modules is pro-
cessed before sshd gets any feedback about whether the login has succeeded. Given
As soon as all modules of the auth type have been successfully processed, another
include statement is processed, in this case, that in Example 27.3, “Default Configuration
for the account Section” (page 499). common-account contains just one module,
pam_unix2. If pam_unix2 returns the result that the user exists, sshd receives a
message announcing this success and the next stack of modules (password) is pro-
cessed, shown in Example 27.4, “Default Configuration for the password Section”
(page 499).
Again, the PAM configuration of sshd involves just an include statement referring to
the default configuration for password modules located in common-password.
These modules must successfully be completed (control flag required) whenever
the application requests the change of an authentication token. Changing a password
or another authentication token requires a security check. This is achieved with the pam
_pwcheck module. The pam_unix2 module used afterwards carries over any old
and new passwords from pam_pwcheck, so the user does not need to authenticate
again. This also makes it impossible to circumvent the checks carried out by pam
_pwcheck. The modules of the password type should be used wherever the preceding
modules of the account or the auth type are configured to complain about an expired
password.
27.3.1 pam_unix2.conf
The traditional password-based authentication method is controlled by the PAM module
pam_unix2. It can read the necessary data from /etc/passwd, /etc/shadow,
NIS maps, NIS+ tables, or an LDAP database. The behavior of this module can be in-
fluenced by configuring the PAM options of the individual application itself or globally
by editing /etc/security/pam_unix2.conf. A very basic configuration file
for the module is shown in Example 27.6, “pam_unix2.conf” (page 500).
The nullok option for module types auth and password specifies that empty
passwords are permitted for the corresponding type of account. Users are also allowed
to change passwords for their accounts. The none option for the module type session
specifies that no messages are logged on its behalf (this is the default). Learn about
additional configuration options from the comments in the file itself and from the
manual page pam_unix2(8).
VARIABLE
Name of the environment variable to set.
[DEFAULT=[value]]
Default value the administrator wants set.
[OVERRIDE=[value]]
Values that may be queried and set by pam_env, overriding the default value.
A typical example of how pam_env can be used is the adaptation of the DISPLAY
variable, which is changed whenever a remote login takes place. This is shown in Ex-
ample 27.7, “pam_env.conf” (page 501).
The first line sets the value of the REMOTEHOST variable to localhost, which is
used whenever pam_env cannot determine any other value. The DISPLAY variable
in turn contains the value of REMOTEHOST. Find more information in the comments
in the file /etc/security/pam_env.conf.
27.3.3 pam_pwcheck.conf
This configuration file is for the pam_pwcheck module, which reads options from it
for all password type modules. Settings stored in this file take precedence over the
PAM settings of an individual application. If application-specific settings have not been
defined, the application uses the global settings. Example 27.8, “pam_pwcheck.conf”
(page 502) tells pam_pwcheck to allow empty passwords and modification of pass-
words. More options for the module are mentioned in the file /etc/security/pam
_pwcheck.conf.
27.3.4 limits.conf
System limits can be set on a user or group basis in the file limits.conf, which is
read by the pam_limits module. The file allows you to set hard limits, which may
not be exceeded at all, and soft limits, which may be exceeded temporarily. To learn
about the syntax and the available options, read the comments included in the file.
READMEs
In the top level of this directory, there are some general README files. The sub-
directory modules holds README files about the available PAM modules.
Thorsten Kukuk has developed a number of PAM modules and made some information
available about them at http://www.suse.de/~kukuk/pam/.
►zseries: The features and hardware described in this chapter do not exist on IBM
System z, making this chapter irrelevant for these platforms. ◄
Unlike APM, which was previously used on laptops for power management only, the
hardware information and configuration tool ACPI is available on all modern computers
(laptops, desktops, and servers). All power management technologies require suitable
hardware and BIOS routines. Most laptops and many modern desktops and servers
meet these requirements.
APM had been used in many older computers. Because APM largely consists of a
function set implemented in the BIOS, the level of APM support may vary depending
on the hardware. This is even more true of ACPI, which is even more complex. For
this reason, it is virtually impossible to recommend one over the other. Simply test the
various procedures on your hardware then select the technology that is best supported.
Standby
This operating mode turns off the display. On some computers, the processor per-
formance is throttled. This function is not available in all APM implementations.
This function corresponds to the ACPI state S1 or S2.
Battery Monitor
ACPI and APM check the battery charge status and provide information about it.
Additionally, both systems coordinate actions to perform when a critical charge
status is reached.
Automatic Power-Off
Following a shutdown, the computer is powered off. This is especially important
when an automatic shutdown is performed shortly before the battery is empty.
28.2 APM
Some of the power saving functions are performed by the APM BIOS itself. On many
laptops, standby and suspend states can be activated with key combinations or by
closing the lid without any special operating system function. However, to activate
these modes with a command, certain actions must be triggered before the system is
suspended. To view the battery charge level, you need special program packages and
a suitable kernel.
SUSE Linux Enterprise® kernels have built-in APM support. However, APM is only
activated if ACPI is not implemented in the BIOS and an APM BIOS is detected. To
activate APM support, ACPI must be disabled with acpi=off at the boot prompt.
Enter cat /proc/apm to check if APM is active. An output consisting of various
numbers indicates that everything is OK. You should now be able to shut down the
computer with the command shutdown -h.
BIOS implementations that are not fully standard-compliant can cause problems with
APM. Some problems can be circumvented with special boot parameters. All parameters
are entered at the boot prompt in the form of apm=parameter with parameter
being one of:
(no-)allow-ints
Allow interrupts during the execution of BIOS functions.
(no-)broken-psr
The “GetPowerStatus” function of the BIOS does not work properly.
(no-)realmode-power-off
Reset processor to real mode prior to shutdown.
(no-)debug
Log APM events in system log.
(no-)power-off
Power system off after shutdown.
bounce-interval=n
Time in hundredths of a second after a suspend event during which additional
suspend events are ignored.
idle-threshold=n
System inactivity percentage from which the BIOS function idle is executed
(0=always, 100=never).
idle-period=n
Time in hundredths of a second after which the system activity is measured.
The APM daemon (apmd) is no longer used. Its functionality is now handled by the
new powersaved, which also supports ACPI and provides many other features.
The BIOS provides tables containing information about the individual components and
hardware access methods. The operating system uses this information for tasks like
assigning interrupts or activating and deactivating components. Because the operating
system executes commands stored in the BIOS, the functionality depends on the BIOS
implementation. The tables ACPI can detect and load are reported in /var/log/boot
.msg. See Section 28.3.4, “Troubleshooting” (page 512) for more information about
troubleshooting ACPI problems.
Subsequently, a number of modules must be loaded. This is done by the start script of
acpid. If any of these modules cause problems, the respective module can be excluded
from loading or unloading in /etc/sysconfig/powersave/common. The system
log (/var/log/messages) contains the messages of the modules, enabling you to
see which components were detected.
/proc/acpi now contains a number of files that provide information about the system
state or can be used to change some of the states. Some features do not work yet because
they are still under development and the support of some functions largely depends on
the implementation of the manufacturer.
All files (except dsdt and fadt) can be read with cat. In some files, settings can be
modified with echo, for example, echo X > file to specify suitable values for
X. One possibility for easy access to those values is the powersave command, which
acts as a front-end for the Powersave daemon. The following describes the most impor-
tant files:
/proc/acpi/alarm
Here, specify when the system should wake from a sleep state. Currently, this feature
is not fully supported.
/proc/acpi/sleep
Provides information about possible sleep states.
/proc/acpi/event
All events are reported here and processed by the Powersave daemon
(powersaved). If no daemon accesses this file, events, such as a brief click on
the power button or closing the lid, can be read with cat /proc/acpi/event
(terminate with Ctrl + C).
/proc/acpi/ac_adapter/AC/state
Shows whether the AC adapter is connected.
/proc/acpi/battery/BAT*/{alarm,info,state}
Detailed information about the battery state. The charge level is read by comparing
the last full capacity from info with the remaining capacity
from state. A more comfortable way to do this is to use one of the special pro-
grams introduced in Section 28.3.3, “ACPI Tools” (page 512). The charge level at
which a battery event (such as warning, low and critical) is triggered can be specified
in alarm.
/proc/acpi/button
This directory contains information about various switches, like the laptop lid and
buttons.
/proc/acpi/fan/FAN/state
Shows if the fan is currently active. Activate or deactivate the fan manually by
writing 0 (on) or 3 (off) into this file. However, both the ACPI code in the kernel
/proc/acpi/processor/*
A separate subdirectory is kept for each CPU included in your system.
/proc/acpi/processor/*/info
Information about the energy saving options of the processor.
/proc/acpi/processor/*/power
Information about the current processor state. An asterisk next to C2 indicates that
the processor is idle. This is the most frequent state, as can be seen from the usage
value.
/proc/acpi/processor/*/throttling
Can be used to set the throttling of the processor clock. Usually, throttling is possible
in eight levels. This is independent of the frequency control of the CPU.
/proc/acpi/processor/*/limit
If the performance (outdated) and the throttling are automatically controlled by a
daemon, the maximum limits can be specified here. Some of the limits are deter-
mined by the system. Some can be adjusted by the user.
/proc/acpi/thermal_zone/
A separate subdirectory exists for every thermal zone. A thermal zone is an area
with similar thermal properties whose number and names are designated by the
hardware manufacturer. However, many of the possibilities offered by ACPI are
rarely implemented. Instead, the temperature control is handled conventionally by
the BIOS. The operating system is not given much opportunity to intervene, because
the life span of the hardware is at stake. Therefore, some of the files only have a
theoretical value.
/proc/acpi/thermal_zone/*/temperature
Current temperature of the thermal zone.
/proc/acpi/thermal_zone/*/state
The state indicates if everything is ok or if ACPI applies active or passive
cooling. In the case of ACPI-independent fan control, this state is always ok.
/proc/acpi/thermal_zone/*/trip_points
Enables the determination of temperature limits for triggering specific actions, like
passive or active cooling, suspension (hot), or a shutdown (critical). The
possible actions are defined in the DSDT (device-dependent). The trip points deter-
mined in the ACPI specification are critical, hot, passive, active1, and
active2. Even if not all of them are implemented, they must always be entered
in this file in this order. For example, the entry echo 90:0:70:0:0 >
trip_points sets the temperature for critical to 90 and the temperature
for passive to 70 (all temperatures measured in degrees Celsius).
/proc/acpi/thermal_zone/*/polling_frequency
If the value in temperature is not updated automatically when the temperature
changes, toggle the polling mode here. The command echo X >
/proc/acpi/thermal_zone/*/polling_frequency causes the temper-
ature to be queried every X seconds. Set X=0 to disable polling.
None of these settings, information, and events need to be edited manually. This can
be done with the Powersave daemon (powersaved) and its various front-ends, like
powersave, kpowersave, and wmpowersave. See Section 28.3.3, “ACPI Tools”
(page 512).
userspace governor
If the userspace governor is set, the kernel gives the control of CPU frequency
scaling to a userspace application, usually a daemon. In SUSE Linux Enterprise
distributions, this daemon is the powersaved package. When this implemen-
tation is used, the CPU frequency is adjusted in regard to the current system
load. By default, one of the kernel implementations is used. However, on some
hardware or in regard to specific processors or drivers, the userspace implemen-
tation is still the only working solution.
ondemand governor
This is the kernel implementation of a dynamic CPU frequency policy and
should work on most systems. As soon as there is a high system load, the CPU
frequency is immediately increased. It is lowered on a low system load.
conservative governor
This governor is similar to the ondemand implementation, except that a more
conservative policy is used. The load of the system must be high for a specific
amount of time before the CPU frequency is increased.
powersave governor
The cpu frequency is statically set to the lowest possible.
performance governor
The cpu frequency is statically set to the highest possible.
Frequency scaling and throttling are only relevant if the processor is busy, because the
most economic C state is applied anyway when the processor is idle. If the CPU is busy,
frequency scaling is the recommended power saving method. Often the processor only
works with a partial load. In this case, it can be run with a lower frequency. Usually,
dynamic frequency scaling controlled by the kernel ondemand governor or a daemon,
such as powersaved, is the best approach. A static setting to a low frequency is useful
for battery operation or if you want the computer to be cool or quiet.
Throttling should be used as the last resort, for example, to extend the battery operation
time despite a high system load. However, some systems do not run smoothly when
they are throttled too much. Moreover, CPU throttling does not make sense if the CPU
has little to do.
In SUSE Linux Enterprise these technologies are controlled by the powersave daemon.
The configuration is explained in Section 28.5, “The powersave Package” (page 515).
28.3.4 Troubleshooting
There are two different types of problems. On one hand, the ACPI code of the kernel
may contain bugs that were not detected in time. In this case, a solution will be made
available for download. More often, however, the problems are caused by the BIOS.
Sometimes, deviations from the ACPI specification are purposely integrated in the
BIOS to circumvent errors in the ACPI implementation in other widespread operating
systems. Hardware components that have serious errors in the ACPI implementation
are recorded in a blacklist that prevents the Linux kernel from using ACPI for these
components.
pci=noacpi
Do not use ACPI for configuring the PCI devices.
acpi=ht
Only perform a simple resource configuration. Do not use ACPI for other purposes.
acpi=off
Disable ACPI.
Some newer machines (especially SMP systems and AMD64 systems) need ACPI
for configuring the hardware correctly. On these machines, disabling ACPI can
cause problems.
Monitor the boot messages of the system with the command dmesg | grep -2i
acpi (or all messages, because the problem may not be caused by ACPI) after booting.
If an error occurs while parsing an ACPI table, the most important table—the DS-
DT—can be replaced with an improved version. In this case, the faulty DSDT of the
BIOS is ignored. The procedure is described in Section 28.5.4, “Troubleshooting”
(page 522).
In the kernel configuration, there is a switch for activating ACPI debug messages. If a
kernel with ACPI debugging is compiled and installed, experts searching for an error
can be supported with detailed information.
• http://www.intel.com/technology/iapc/acpi/faq.htm (ACPI
FAQ @Intel)
The hdparm application can be used to modify various hard disk settings. The option
-y instantly switches the hard disk to the standby mode. -Y puts it to sleep. hdparm
-S x causes the hard disk to be spun down after a certain period of inactivity. Replace
x as follows: 0 disables this mechanism, causing the hard disk to run continuously.
Values from 1 to 240 are multiplied by 5 seconds. Values from 241 to 251 correspond
to 1 to 11 times 30 minutes.
Internal power saving options of the hard disk can be controlled with the option -B.
Select a value from 0 to 255 for maximum saving to maximum throughput. The result
depends on the hard disk used and is difficult to assess. To make a hard disk quieter,
use the option -M. Select a value from 128 to 254 for quiet to fast.
Often, it is not so easy to put the hard disk to sleep. In Linux, numerous processes write
to the hard disk, waking it up repeatedly. Therefore, it is important to understand how
Linux handles data that needs to be written to the hard disk. First, all data is buffered
Changes to the kernel update daemon settings endanger the data integrity.
Apart from these processes, journaling file systems, like ReiserFS and Ext3, write their
metadata independently from bdflush, which also prevents the hard disk from spinning
down. To avoid this, a special kernel extension has been developed for mobile devices.
See /usr/src/linux/Documentation/laptop-mode.txt for details.
Another important factor is the way active programs behave. For example, good editors
regularly write hidden backups of the currently modified file to the hard disk, causing
the disk to wake up. Features like this can be disabled at the expense of data integrity.
In this connection, the mail daemon postfix makes use of the variable
POSTFIX_LAPTOP. If this variable is set to yes, postfix accesses the hard disk far
less frequently. However, this is irrelevant if the interval for kupdated was increased.
This package contains all power management features of your computer. It supports
hardware using ACPI, APM, IDE hard disks, and PowerNow! or SpeedStep technologies.
The functions from the packages apmd, acpid, ospmd, and cpufreqd (now
cpuspeed) have been consolidated in the powersave package. Daemons from these
Even if your system does not contain all the hardware elements listed above, use the
powersave daemon for controlling the power saving function. Because ACPI and APM
are mutually exclusive, you can only use one of these systems on your computer. The
daemon automatically detects any changes in the hardware configuration.
/etc/sysconfig/powersave/common
This file contains general settings for the powersave daemon. For example, the
amount of debug messages in /var/log/messages can be increased by increas-
ing the value of the variable DEBUG.
/etc/sysconfig/powersave/events
The powersave daemon needs this file for processing system events. An event can
be assigned external actions or actions performed by the daemon itself. For external
actions, the daemon tries to run an executable file (usually a Bash script) in /usr/
lib/powersave/scripts/. Predefined internal actions are:
• ignore
• throttle
• dethrottle
• suspend_to_disk
• suspend_to_ram
• standby
• do_suspend_to_disk
• do_suspend_to_ram
• notify
• screen_saver
• reread_cpu_capabilities
switch_vt
Useful if the screen is displaced after a suspend or standby.
wm_logout
Saves the settings and logs out from GNOME, KDE, or other window managers.
wm_shutdown
Saves the GNOME or KDE settings and shuts down the system.
set_disk_settings
Executes the disk settings made in /etc/sysconfig/powersave/disk.
/etc/sysconfig/powersave/cpufreq
Contains variables for optimizing the dynamic CPU frequency settings and whether
the user space or the kernel implementation should be used.
/etc/sysconfig/powersave/battery
Contains battery limits and other battery-specific settings.
/etc/sysconfig/powersave/sleep
In this file, activate the sleep modes and determine which critical modules should
be unloaded and which services should be stopped prior to a suspend or standby
event. When the system is resumed, these modules are reloaded and the services
are restarted. You can even delay a triggered sleep mode, for example, to save files.
The default settings mainly concern USB and PCMCIA modules. A failure of
suspend or standby is usually caused by certain modules. See Section 28.5.4,
“Troubleshooting” (page 522) for more information about identifying the error.
/etc/sysconfig/powersave/thermal
Activates cooling and thermal control. Details about this subject are available in
the file /usr/share/doc/packages/powersave/README.thermal.
/etc/sysconfig/powersave/disk
This configuration file controls the actions and settings made regarding the hard
disk.
/etc/sysconfig/powersave/scheme_*
These are the various schemes that adapt the power consumption to certain deploy-
ment scenarios. A number of schemes are preconfigured and can be used as they
are. Custom schemes can be saved here.
This sleep mode is enabled by default, but it is only executed if the current machine
is listed in a database as capable of supporting this mode. This database is contained
in the /usr/sbin/s2ram binary provided by the suspend package.
To modify the default parameters (for example, to generally disable the suspend
to ram sleep mode or to force it even for machines not listed in the database),
find more information about available options in the /etc/sysconfig/
powersave/sleep configuration file.
To learn more about the s2ram binary, refer to the README files in /usr/
share/doc/packages/suspend.
Make sure that the following default options are set in the file /etc/sysconfig/
powersave/events for the correct processing of suspend, standby, and resume
(default settings following the installation of SUSE Linux Enterprise):
EVENT_GLOBAL_SUSPEND2DISK=
"prepare_suspend_to_disk screen_saver do_suspend_to_disk"
EVENT_GLOBAL_SUSPEND2RAM=
"prepare_suspend_to_ram screen_saver do_suspend_to_ram"
EVENT_GLOBAL_STANDBY=
"prepare_standby screen_saver do_standby"
BATTERY_WARNING=12
BATTERY_LOW=7
BATTERY_CRITICAL=2
The actions or scripts to execute when the charge levels drop under the specified limits
are defined in the configuration file /etc/sysconfig/powersave/events.
The standard actions for buttons can be modified as described in Section 28.5.1,
“Configuring the powersave Package” (page 516).
EVENT_BATTERY_NORMAL="ignore"
EVENT_BATTERY_WARNING="notify"
EVENT_BATTERY_LOW="notify"
EVENT_BATTERY_CRITICAL="wm_shutdown"
The actions to execute when the computer is disconnected from or connected to the AC
power supply are defined in /etc/sysconfig/powersave/events. Select the
schemes to use in /etc/sysconfig/powersave/common:
AC_SCHEME="performance"
BATTERY_SCHEME="powersave"
EVENT_BUTTON_POWER="wm_shutdown"
When the power button is pressed, the system responds by shutting down the re-
spective window manager (KDE, GNOME, fvwm, etc.).
EVENT_BUTTON_SLEEP="suspend_to_disk"
When the sleep button is pressed, the system is set to the suspend-to-disk mode.
EVENT_BUTTON_LID_OPEN="ignore"
Nothing happens when the lid is opened.
EVENT_BUTTON_LID_CLOSED="screen_saver"
When the lid is closed, the screen saver is activated.
EVENT_OTHER="ignore"
This event happens if an unknown event is encountered by the daemon. Unknown
events include ACPI hot keys on some machines.
Further throttling of the CPU performance is possible if the CPU load does not exceed
a specified limit for a specified time. Specify the load limit in
PROCESSOR_IDLE_LIMIT and the time-out in CPU_IDLE_TIMEOUT. If the CPU
load stays below the limit longer than the time-out, the event configured in
EVENT_PROCESSOR_IDLE is activated. If the CPU is busy again,
EVENT_PROCESSOR_BUSY is executed.
2 If the file extension of the downloaded table is .asl (ACPI source language),
compile it with iasl (package pmtools). Enter the command iasl -sa
file.asl. The latest version of iasl (Intel ACPI compiler) is available at
http://developer.intel.com/technology/iapc/acpi/
downloads.htm.
On ACPI and APM systems: When the system tries to unload faulty modules, the system
is arrested or the suspend event is not triggered. The same can also happen if you do
not unload modules or stop services that prevent a successful suspend. In both cases,
try to identify the faulty module that prevented the sleep mode. The log files generated
by the powersave daemon in /var/log/suspend2ram.log and /var/log/
suspend2disk.log are very helpful in this regard. If the computer does not enter
the sleep mode, the cause lies in the last module unloaded. Manipulate the following
settings in /etc/sysconfig/powersave/sleep to unload problematic modules
prior to a suspend or standby.
UNLOAD_MODULES_BEFORE_SUSPEND2DISK=""
UNLOAD_MODULES_BEFORE_SUSPEND2RAM=""
UNLOAD_MODULES_BEFORE_STANDBY=""
SUSPEND2DISK_RESTART_SERVICES=""
SUSPEND2RAM_RESTART_SERVICES=""
STANDBY_RESTART_SERVICES=""
• http://www.opensuse.org/Projects_Powersave—Project page in
the openSUSE wiki
In the scheme overview, select the scheme to modify then click Edit. To create a new
scheme, click Add. The dialog that opens is the same in both cases and is shown in
Figure 28.3, “Configuring a Scheme” (page 526).
First, enter a suitable name and description for the new or edited scheme. Determine if
and how the CPU performance should be controlled for this scheme. Decide if and to
what extent frequency scaling and throttling should be used and whether processes with
low priority (niced processes) should be ignored when adjusting the CPU frequency.
In the following dialog for the hard disk, define a Standby Policy for maximum perfor-
mance or for energy saving. The Acoustic Policy controls the noise level of the hard
disk (supported by few hard disks). The Cooling Policy determines the cooling method
to use. Unfortunately, this type of thermal control is rarely supported by the BIOS.
Read /usr/share/doc/packages/powersave/powersave_manual.html
#Thermal to learn how you can use the fan and passive cooling methods.
Global power management settings can also be made from the initial dialog using Battery
Warning, ACPI Settings, or Suspend Permissions. Access these controls by clicking
Other Settings and selecting the appropriate item from the menu. Click Battery Warning
to access the dialog for the battery charge level, shown in Figure 28.4, “Battery Charge
Level” (page 527).
The BIOS of your system notifies the operating system whenever the charge level drops
under certain configurable limits. In this dialog, define three limits: Warning Capacity,
Low Capacity, and Critical Capacity. Specific actions are triggered when the charge
level drops under these limits. Usually, the first two states merely trigger a notification
to the user. The third critical level triggers a shutdown, because the remaining energy
is not sufficient for continued system operation. Select suitable charge levels and the
desired actions then click OK to return to the start dialog.
Access the dialog for configuring the ACPI buttons using ACPI Settings. It is shown
in Figure 28.5, “ACPI Settings” (page 528). The settings for the ACPI buttons determine
how the system should respond to certain switches. Configure the system response to
pressing the power button, pressing the sleep button, and closing the laptop lid. Click
OK to complete the configuration and return to the start dialog.
Click Enable Suspend to enter a dialog in which to determine if and how users of this
system may use the suspend or standby functionality. Click OK to return to the main
dialog. Click OK again to exit the module and confirm your power management settings.
Additionally, there are proprietary standards, like the 802