Showing posts with label telinit. Show all posts
Showing posts with label telinit. Show all posts

Wednesday, February 15, 2017

How to boot AIX to Single User Mode in order to perform maintenance

In this post, I will explain to you, how do we boot AIX server to single user mode in order to perform maintenance. AIX is IPM operating system which is widely used today.

In AIX operating system we do not need to use single user mode very much, because many problems or issues require having the root file systems unmounted for repairs. 

In my post you can found the list of some issues when it's good to use single-user.

  • System boot hangs due to NFS configuration issues
  • Debug problems with entries in /etc/inittab
  • If you want to work on the system without users login to attempt.
  • If you want to work without applications starting up
Normally when we repair any file system if it is get crashed then we use "fsck" utility and their command but for this repair process the good condition is you need to unmount /tmp & /var file system.

If the system boots fine from the root volume group, then booting into single-user to repair or perform work has advantages. These advantages of this as listed below.
  • Its boots faster than Maintenance Mode.
  • It allows you to run all commands you would normally have access to in multi user.
  • Unlike maintenance mode, there is no possibility that hdisks will be renamed.

Procedure to boot AIX operating system to Single User mode: 

I will explain you two way to boot the system in single user mode which is describe below.

Standalone System (no HMC):
  • First boot system with no media in the CD/DVD drive on AIX operating system.
  • Wait until you see the options of choosing another boot list, and hear beeps on the console
  • Press 6 to start diagnostics
System using an HMC:
  • Select the LPAR in the HMC GUI
  • Select Operations -> Activate
  • In the Activate window, click the button that says "Advanced"
  • Change "Boot mode" to "Diagnostic with stored boot list"
  • Click "OK" to save that change, then "OK" again to activate.
After above steps you will get the below screen on the AIX operating system monitor. If these below message you get that's means your operating system boot process is already start.

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

1 = SMS Menu 5 = Default Boot List
8 = Open Firmware Prompt 6 = Stored Boot List

You will see the normal AIX boot header, since you are booting from your system hard disk:

------------------------------------------------------------------------------------------------
                                Welcome to AIX.
                       boot image timestamp: 11:55 02/15
                 The current time and date: 15:35:02 02/15/2017
               number of processors: 2    size of memory: 4096MB
          boot device: /vdevice/v-scsi@70000007/disk@2300000000000000
                     kernel size: 15034876; 64 bit kernel
-----------------------------------------------------------------------------------------------

Now you will get the diagnostic license information page and their message on the screen which are describe as below. Several keys are used to control the diagnostics:
  • The Enter key continues the procedure or performs an action.
  • The Backspace key allows keying errors to be corrected.
  • The cursor keys are used to select an option.
Now, please press Enter. The next screen will show you Diagnostic Functions you can perform. On newer versions of firmware you will see Option 5 to start Single User Mode.

On older firmware you will have to go to, 3. Task selection and scroll way down and select 'Start Shell' or 'Single User Mode'

Function Selection:

1. Diagnostic Routines: This selection will test the machine hardware. Wrap plugs and other advanced functions will not be used.
2. Advanced Diagnostic Routines: This selection will test the machine hardware. Wrap plugs and other advanced functions will be used.
3. Task Selection(Diagnostics, Advanced Diagnostics, Service Aids, etc.): This selection will list the tasks supported by these procedures. Once a task is selected, a resource menu may be presented showing all resources supported by the task.
4. Resource Selection: This selection will list the resources in the system that are supported by the diagnostic programs. Once a resource is selected, a task menu will be presented showing all tasks that can be run on the resource(s).
5. Single User Mode: The system will enter single-user mode for software maintenance.

To make a selection, type the number and press Enter [1]: 5

Once you select the 5, you can find the below message on screen.

The system will now continue the boot process.  Please wait...
Saving Base Customize Data to boot disk
Starting the sync daemon
Starting the error daemon
System initialization completed.

It is asking for password , you may enter the password and login on single user mode, after login please check the mounted file system using "df" command.

If you want to exit single user mode and boot into multi user mode then you need to run the 
To exit single-user mode and boot into multiuser in RunLevel 2 use:

aix:/>telinit 2

Once you will press this command you can logout from single user mode to multi user mode. I hope you like my post and all the information which i have mention it.