Showing posts with label boot. Show all posts
Showing posts with label boot. Show all posts

Monday, May 8, 2017

How to find the boot disk from HP-UX operating system

In this article , I would explain to you how we find which disk are used to boot the running HP-UX operating system. This is a bit tricky because its depending on the version of HP-UX, and whether it is using LVM or the less common choice.

For LVM disk layouts:

For 11.11 and earlier, use the below command to check which disk is in used.

# echo “boot_string/S” | adb -k /stand/vmunix /dev/kmem
    boot_string:
    boot_string:    disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix

For 11.23, there are different ways for PARISC versus IA64:

PARISC:

# echo “boot_string/S” | adb -o /stand/vmunix /dev/kmem
    boot_string:
    boot_string:    disk(1/0/0/3/0.6.0.0.0.0.0;0)/stand/vmunix

IA64 (Itanium/Integrity):

# echo “bootdev/x” | adb -n /stand/vmunix /dev/kmem
    bootdev:
        0x100001c

Now to find the actual path, you’ll have to match the 0x100001c value to a minor number in the /dev/disk directory. Compare only the last 6 digits of the number (00001c) to find the device file. Then by using lssf, you can decode the hardware path:

    # DSK=$(ll /dev/disk | awk ‘/00001c/{print $NF}’)
    # echo $DSK
    disk11_p2

    # HWPATH=$(lssf /dev/disk/$DSK | awk ‘{print $(NF-1)}’)
    # echo “$DSK path = $HWPATH”
    disk11_p2 path = 64000/0xfa00/0xa

You can also use ioscan -m dsf to map agile device file names to legacy (CTD) style.

For VxVM disk layouts:

# echo “raw_root/X” | adb -o /stand/vmunix /dev/kmem
     raw_root:
     raw_root:       0x3000002

This value is the minor number for the disk that was used to boot the current system. The minor number is found in the /dev/vx/dmp directory.

     # DSK=$(ll /dev/vx/dmp | awk ‘/000002/{print $NF}’)
     # echo $DSK
    c2t1d0s2

     # HWPATH=$(lssf /dev/dsk/$DSK | awk ‘{print $(NF-1)}’)
     # echo “$DSK path = $HWPATH”
     c2t1d0s2 path = 0/1/1/0.1.0

For completeness, I should mention that 11.31 will report the boot disk path in syslog.log (LVM or VxVM) like this:

vmunix: Boot device’s HP-UX HW path is: 0/1/1/0.0×1.0x0

However, syslog.log is a catch-all for a lot of items and often needs to be truncated when it grows too large. As a result, it can’t be relied on to always contain the current boot disk.

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.