What You See Is What You Get Element

How to Initialize an Oracle Linux System

SUSE Linux to Oracle Linux Migration Guide

by Manik Ahuja and Kamal Dodeja

This article, Part 1 in a series that compares and contrasts Oracle Linux with SUSE Linux, describes registering the software, booting, and system initialization.

Published July 2013

Want to comment on this article? Post the link on Facebook's OTN Garage page.  Have a similar article to share? Bring it up on Facebook or Twitter and let's discuss.
Software Support Centers
Registering and Updating Oracle Linux 6 with the Unbreakable Linux Network
Registering and Updating SUSE Linux Enterprise at the Novell Customer Center
Booting and System Initialization
See Also
About the Authors

This article is Part 1 of a six-part series whose goal is to give SUSE Linux administrators a quick way to understand and perform day-to-day system administration tasks on Oracle Linux.

The series outlines similarities and differences in major areas of Linux system administration such as file system differences, boot-up sequence, setting up commonly used daemons such as mail and Web, and package management. Throughout the series, you will find actual configuration examples, complete with the steps required to achieve a particular objective. The examples are repeated for both Oracle Linux and SUSE Linux.

After reading the series of articles, you should be able to not only distinguish the subtle differences between the two operating systems but also perform your daily duties with ease. The series will also help you mitigate any risks related to migrating from SUSE Linux to Oracle Linux.

For the purposes of this series, Oracle Linux 6.1 and SUSE Linux Enterprise Server 11 serve as the two base operating systems for comparison. All configuration examples and illustrations are based on either Oracle Linux 6.1 or SUSE Linux Enterprise Server.

Software Support Centers

Every operating system vendor offers a support center for registering systems and downloading the latest updates, security patches, and errata. Oracle offers the Unbreakable Linux Network for Oracle Linux and SUSE offers the Novell Customer Center (NCC) for support subscription, Linux software patches, updates, and fixes.

The following sections outline how Unbreakable Linux Network and NCC can be configured for accessing software packages, updates, and errata.

Registering and Updating Oracle Linux 6 with the Unbreakable Linux Network

After installing the Oracle Linux 6 operating system, the first thing you should do is register your server(s) with the Unbreakable Linux Network, which is a comprehensive resource for Oracle Linux support subscribers that offers access to Linux software patches, updates, and fixes. You can access the Unbreakable Linux Network at https://linux.oracle.com/.

Registering your Oracle Linux 6 Server

To register your Oracle Linux 6 server with the Unbreakable Linux Network, follow the steps below. The process is straightforward and simple.

First, ensure that your system has access to the internet. The Unbreakable Linux Network requires port 80 and 443 to be open for communication between the server being registered and the Unbreakable Linux Network. Work with your network administrator to ensure that the server being registered can access the Unbreakable Linux Network.

Next, start a terminal session, and as the root user, issue the following command:

.# uln_register

You should then see the welcome screen shown in Figure 1.

Unbreakable Linux Network Welcome Screen

Figure 1. Unbreakable Linux Network welcome screen

Enter your authentication details in the welcome screen.

You can obtain the Unbreakable Linux Network login ID required on this screen by going to http://linux.oracle.com/register.

You will also need the valid Oracle Linux Support Customer Support Identifier (CSI) that is provided when you purchase an Oracle Linux Support subscription. Contact your Oracle Sales representative about purchasing an Oracle Linux Support subscription. You can also purchase Oracle Linux Support online via the Oracle Linux Store at oracle.com/linux.

Once you have the CSI, you will be able to create an Unbreakable Linux Network login ID and gain access to Oracle Linux Support, Linux software patches, updates, and fixes. You may also be able to raise customer support tickets based on the level of support you opted for.

Once you have provided the login details, click Advanced Network Configuration to enter proxy details (if any). Then click Close and click Forward to proceed to the next step.

Unbreakable Linux Network's Advanced Network Configuration screen

Figure 2. Unbreakable Linux Network's Advanced Network Configuration screen

If your login details are correct, you will be presented with the following screen.

Unbreakable Linux Network System Profile Screen

Figure 3. Unbreakable Linux Network system profile screen

When you click Forward, the process will collect the hardware and software package information for the server being registered and send it to the Unbreakable Linux Network. This is required so that appropriate packages can be made available for the server. It also helps to identify the server being registered for maintaining and managing its state later.

Unbreakable Linux Network Progress Dialog Box

Figure 4. Unbreakable Linux Network progress dialog box

The next screen shows the channels available for this system.

Unbreakable Linux Network Channel Subscriptions Screen

Figure 5. Unbreakable Linux Network channel subscriptions screen

Click Finish to complete the registration process.

Unbreakable Linux Network Finish Setup Screen

Figure 6. Unbreakable Linux Network finish setup screen

Managing Your Subscriptions

After registering the server, you can visit the Unbreakable Linux Network to view, edit, and manage your subscriptions. To do this, follow these steps:

  1. Open a Java-enabled Web browser, and enter https://linux.oracle.com.
  2. Click Sign On to log in to the Unbreakable Linux Network to view registered system details and manage subscriptions.

    Unbreakable Linux Network Sign-On Screen

    Figure 7. Unbreakable Linux Network sign-on screen

  3. Sign in to the Unbreakable Linux Network with a valid username and password.

    Unbreakable Linux Network Sign-In

    Figure 8. Unbreakable Linux Network sign-in

  4. Click the Home tab to see the registered system details, OS release, registration date, and channel names.

    Home Tab

    Figure 9. Home tab

  5. Click the Systems tab to view registered system details, such as the system host name, CSI number, subscribed channels count, and Ksplice access key (if you have Oracle Premier Support).

    Systems Tab

    Figure 10. Systems tab

  6. Go to Systems -> System Detail to view system details. To unsubscribe the system from Unbreakable Linux Network, click Delete.

    Systems Detail Screen

    Figure 11. System Detail screen

  7. To manage a channels subscription, click Manage Subscription.

    Depending on your system configuration and support level, you will be able to access various Unbreakable Linux Network channels. As an Oracle Linux Premier Support customer, you will also have access to Ksplice technology and you can subscribe to the Ksplice channel as well. The Ksplice channel provides kernel updates that can be applied in real time to a running Unbreakable Enterprise Kernel from Oracle. This is a significant advantage for Oracle Linux customers: it enables them to update the kernel of a running system and eliminates the need for any downtime. You can read more about Ksplice at http://oss.oracle.com/ksplice/docs/ksplice-quickstart.pdf or oracle.com/linux.

    Manage Subscriptions Screen

    Figure 12. Manage Subscriptions screen

  8. You can now proceed to add or remove your channel subscriptions as required. The example in Figure 12 has the "Latest Unbreakable Enterprise Kernel for Oracle Linux 6 (x86_64)" channel added to the server you registered earlier. Similarly, you can add other channels. The list of channels available depends on the support level you have signed up for. To get access to a specific channel or group of channels, contact your Oracle sales representative.

Registering and Updating SUSE Linux Enterprise at the Novell Customer Center

Novell Customer Center (NCC) is a centralized tool for managing products and subscriptions as well as systems and administrators. For more information on the NCC, see www.novell.com/customercenter/. Registering a SUSE Linux Enterprise (SLE) machine with the NCC adds the system to the NCC for management and enables the system to receive online updates. Registering a machine can occur during or after SLE installation.

Registering During Installation

NCC registration is performed during installation, after the network has been configured and tested. If the network is not configured and tested, NCC configuration is skipped. To register with the NCC, choose Configure Now (Recommended) and click Next on the Novell Customer Center Configuration screen. To skip configuration and do it later, choose Configure Later.

Novell Customer Center Configuration Screen

Figure 13. Novell Customer Center Configuration screen

Registering After Installation

If the NCC configuration was skipped during installation, either intentionally or because of network problems, the configuration can be run later. To register, do the following:

  1. Launch YaST.
  2. Choose Software -> Novell Customer Center Configuration.

     YaST Control Center Screen

    Figure 14. YaST Control Center screen

  3. Follow the wizard's further instructions.

     Another view of the Novell Customer Center Configuration Screen

    Figure 15. Another view of the Novell Customer Center Configuration screen

Booting and System Initialization

The Linux startup process is the process of Linux operating system initialization. In Linux, the flow of control during the boot process is handed over from the computer BIOS to the boot loader and finally to the kernel. The kernel then starts the scheduler (to allow multitasking) and runs the first userland (outside kernel space) program, called init (which is mostly responsible for running startup scripts for each runlevel), at which point the kernel goes idle unless called externally. The init (short for initialization) program is for Linux-based computer operating systems and spawns all other processes.

Boot Process

The boot process has several phases.

  • BIOS checks the system and peripheral devices as well as locating and running the Master Boot Record (MBR).
  • The MBR loads the Grand Unified Bootloader (GRUB).
  • The GRUB boots the kernel, using information in /boot/grub/menu.lst.
  • The kernel starts initializing devices, loads additional device drivers from initrd image, and then starts the init process from /sbin/init.
  • The init process starts other processes based on the /etc/inittab file.
  • /etc/rc.d/rc in Oracle Linux or /etc/init.d/rc in SUSE Linux runs the corresponding /etc/rcX.d scripts to start up other components.

The default kernel location is /boot, which contains the kernels and initrd images.

The default kernel modules location is /lib/modules/'uname -r'/.


Table 1. Runlevels
Runlevel Description
S or s Minimal single-user mode in SUSE Linux. In Oracle Linux, it is the same as init level 1.
0 Power-down state. Shuts down the operating system and tries to turn power off, if that is supported by the system.
1 Single-user mode.
2 Multiuser without NFS resources shared. Text-only login.
3 Multiuser with NFS resources shared. Text-only login.
4 N/A (alternative multiuser).
5 Full multiuser, NFS resources shared, and graphic login with X display manager.
6 Reboot.
Emergency Ignore the /etc/inittab file, and launch the default shell.

Boot Configuration Files

Boot configuration involves several files.

  • /etc/inittab file: When the kernel loads the /sbin/init program, it reads the /etc/inittab file to see what the default run level is and what scripts need to run. After initialization, the information in this file is used whenever the administrator changes the run level of the system.

    If you modify the /etc/inittab file and want to instruct init to reload it, you can do so with the init q or init Q commands.

  • Run control (rc) files: Each runlevel has a set of scripts associated with it called run control files or rc files.

    The scripts directory associated with each runlevel is /etc/rcX.d/ in Oracle Linux and /etc/init.d/rcX.d in SUSE Linux, where X is the runlevel. Usually, the scripts in those directories are mostly symbolic links to the /etc/init.d/ main service scripts.

    For instance, in Oracle Linux, /etc/rc3.d/S80sendmail is a symbolic link to the /init.d/sendmail script and /etc/rc1.d/K30sendmail is a symbolic link to the same script.

    Oracle Linux has only one set of scripts for each runlevel, meaning that for runlevel 3, the init program runs only the scripts for runlevel 3. It does not run the lower-runlevel scripts to get to its intended runlevel. Pay extra attention to where you manually place an rc script.

    In Oracle Linux, you can restart or check the status of most services by passing the argument restart or status to the service script in the /etc/init.d directory:

    # /etc/init.d/sendmail restart
    # /etc/init.d/sendmail status

    Running the service script without options lists the supported options for that specific script:

    # /etc/init.d/sendmail
    Usage: /etc/init.d/sendmail {start|stop|restart|condrestart|status}

Disabling RC Scripts

Sometimes you might need to prevent certain services from running automatically at boot time initialization. In Linux, you can use the chkconfig command or GUI programs such as system-config-services in Oracle Linux or the System/Runlevel Editor module from YaST2 in SUSE Linux.

As a fairly common practice, system administrators usually disable the iptables service during installation. This service provides a way to protect and secure the operating system from network-related threats. It is a good idea to configure a set of suitable iptables rules and enable the iptables service once the Linux server is fully configured to meet requirements.

The following information first provides an overview of the chkconfig command and demonstrates how it can be used to check the present status of various Linux services. Then, the next section provides an example of configuring some sample iptables rules and enabling the iptables service to automatically start up during the boot-up sequence.

With the ckhconfig -- list command, you can view the current boot time status of various services on an Oracle Linux server, as shown in Listing 1.

# chkconfig -- list
abrtd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
acpid 0:off 1:off 2:off 3:off 4:off 5:off 6:off
atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
SUSE Linux to Oracle Linux: Guide for System Administrators

Listing 1

In Listing 1, you can see that

  • The abrtd service is set to automatically start at runlevels 3 and 5.
  • The acpid service is set to remain off at all runlevels.
  • The atd service is configured to start automatically at runlevels 3, 4, and 5.
  • The iptables service is set to remain off at all runlevels.
  • Adding some iptables rules and then enabling the iptables service to start automatically during the boot-up sequence will illustrate the startup sequence.

A complete overview of iptables is beyond the scope of this document, but you can refer to the documentation on Netfilter and to iptables(8) for more information.

iptables Example

This example adds rules to iptables to drop all incoming connections but allow outgoing traffic originating from the server.

# iptables -P INPUT DROP
# iptables -P FORWARD DROP
# iptables -P OUTPUT ACCEPT
# iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT
# iptables -L -v -n
### *** now ping and wget should work *** ###
# ping oracle.com
$ wget http://www.openss7.org/repos/tarballs/strx25-

At this point, the iptables rules are running in memory, but they will be lost when the server reboots. To restore them after a reboot, save these rules to a file by using the following command.

# /sbin/service iptables save

Note that the command above will run only if the iptables init script is already present in the /etc/init directory. This init script, which is part of the distribution, is installed during installation.

Upon successful execution of the command above, the iptables init script runs the /sbin/iptables-save program and writes the current iptables configuration to the /etc/sysconfig/iptables file. Any existing /etc/sysconfig/iptables file is saved as /etc/sysconfig/iptables.save.

The last step is to enable iptables to start up automatically at each reboot and invoke the /etc/sysconfig/iptables file to load the iptables rules you saved earlier. To enable this, issue the following command:

# chkconfig --add iptables

Whenever you add a service to or remove it from chkconfig control, it does the following under the /etc/rc.d subdirectories:

  • When the chkconfig --add command is executed, it creates a symbolic link file to start and stop the service under the corresponding rc directory.
  • When the chkconfig --del command is executed, it removes the symbolic link file from the corresponding rc directory.

To verify the successful addition of the iptables service, you can use the following command:

# chkconfig --list | grep iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off

You can see that the iptables service is now set to automatically start at boot time and will be run when the system boots up in either runlevel 3, 4, or 5. This is the default behavior when a service is added with the chkconfig utility.

The chkconfig utility can be used to manage the startup services in a variety of other ways as well. A few more examples are listed below for quick reference:

  • To view other services that are configured to be started during system startup at runlevel 3, you can issue the following command:

    # chkconfig --list | grep 3:on
  • To check the settings of a particular service, use grep to filter the output of chkconfig --list for that service. For example, to check the network service, use the following command:

    # chkconfig --list | grep network

Shutting Down

The shutdown, reboot, halt, poweroff, and init commands exist in both Oracle Linux and SUSE Linux:

  • init 6        reboot
  • init 0        shutdown/halt/poweroff

See Also

About the Authors

Manik Ahuja is the Global Sales Consulting Director for the Oracle Linux and Oracle VM products. He has been providing technology consulting solutions to customers for the last 18 years. Apart from providing pre-sales solutions, he has also built and managed product and service portfolios for various Linux and open source products. He is an acknowledged expert on all things open source and regularly writes technology articles for various IT magazines. His areas of specialization include designing and implementing high availability clusters, data center consolidation, and cloud-based solutions.

Kamal Dodeja is a Principal Consultant and a senior member of the Oracle Linux sales consulting team. He holds a master's degree in computer applications and has over 10 years of IT experience. Kamal's expertise lies in designing and implementing highly optimized Linux and virtualization solutions. He regularly conducts proof-of-concept workshops and provides pre-sales support to potential customers worldwide.

Revision 1.0, 04/24/2013

Follow us:
Blog | Facebook | Twitter | YouTube