Home Wiki > SDB:YaST remote logging during installation
Sign up | Login

SDB:YaST remote logging during installation

tagline: From openSUSE


About

This article describes how openSUSE Installation can be enhanced to use remote logging.

Advantages of remote logging:

  • Facilitates getting YaST logs when YaST crashes or is somehow locked
  • Lower memory requirements (logs don't occupy RAM)
  • Facilitates watching YaST logs during the installation

Disadvantages:

  • Needs configured network (any remote installation over VNC or SSH or any network installation source sets the network up by default)

Used Technology

It's very simple! According to Report a YaST bug, Installation logs the entire installation process into the /var/log/YaST2/ directory. Some other logs, e.g., Xorg.log (when Installing in GUI) are stored under /var/log/ directory. What we can do, is to redirect the /var/log/ directory to a remote NFS server (with write-access enabled).

Definitions

 192.168.1.66     - IP of the computer being installed
 name.example.com - DNS name of the same computer
 192.168.1.9      - IP of the NFS server (the computer where you redirect logs to)

NFS Server Configuration

The only thing we have to do is to configure a NFS Server to export some directory with write permissions enabled. This is an example of more strict configuration stored in /etc/exports file

 /yast/logs/     192.168.1.66(rw,no_root_squash,async,no_subtree_check)
 /yast/logs/     name.example.com(rw,no_root_squash,async,no_subtree_check)

You can use YaST -> Network Services -> NFS Server to configure it. Consult the configuration parameters with `man export`. If you modify the configuration manually, don't forget to call

 rcnfsserver restart

or maybe better

 rcnfsserver reload

If you are using firewall, don't forget to adjust it to allow connections to your NFS Server.

Modifying Installation Process

When the installation from network, CD, DVD ... is starting, append this entry as a command-line parameter to linuxrc:

 startshell=1

This allows you to redirect the /var/log/ directory to the NFS Server before YaST (Installation program) is started.

After the Linuxrc boot to the installation system (You'll get a standard shell interface), mount the remote NFS Server

 mount -t nfs 192.168.1.9:/yast/logs /var/log

This could take some time when NFS Server is not configured perfectly or when firewall blocks it ... etc. Watch the /var/log/messages file at the server for errors.

This command should show whether the /var/log directory is really redirected

 mount

Don't forget to create YaST2 directory under the /var/log/ (Maybe a bug of YaST itself)

 mkdir /var/log/YaST2

Continuing Installation

Exiting the shell continues the installation process

 exit

or

 Ctrl+d

You can also start YaST manually (You'd get a shell also after the fist stage installation is finished -- before the first reboot)

 /usr/lib/YaST2/startup/YaST2.First-Stage

or better

 /usr/lib/YaST2/startup/YaST2.First-Stage 1>/var/log/YaST2/stdout 2>/var/log/YaST2/stderr

then reboot the computer manually