Popular Posts

Mar 9, 2020

SPARC Soalris OpenBoot PROM (OBP) Commands

SPARC Solaris OpenBoot PROM (OBP) Commands

APPLIES TO :  SPARC Solaris Servers

ISSUE :  NIL

GOAL : SPARC Solaris Useful OK Prompt or OBP commands

SOLUTION :  SPARC Solaris Useful OK Prompt or OBP commands

Prerequisites :  NIL

OK Prompt or OBP commands

  1. To show the disks
               OK> show-disks

  2. To search the scsi devices attached to the primary scsi controller
               OK> probe-scsi

  3. To search all the scsi devices
               OK> probe-scsi-all

  4. To list device alias names
               OK> devalias

  5. To temporarily create a device alias
               OK> devalias <alias> <path>

  6. To view the current NVRAM settings
               OK> printenv

  7. To set the envirement variables
               OK> setenv <env> <value>

  8. To set the open boot prompt settings to the factory default
               OK> set-defaults

  9. To set the device alias permanently to NVRAM
               OK> nvalias <alias> <path>

  10. To remove the nvalias 'cdrom1' from NVRAMRC
               OK> nvunalias cdrom1

  11. To find out the Open boot prompt version
               OK> .version

  12. To find out the ethernet MAC address
               OK> .ent_addr

  13. To find out the CPU and PCI bus speeds
               OK> .speed

  14. To display the Model, Architecture, processor, openboot version, ethernet address, hostid and etc
               OK> banner

  15. To reset variable values to the factory defaults
               OK> set-defaults

  16. To reboot the system from OK Prompt
               OK> reset-all

  17. To show the PCI devices
               OK> show-devs

  18. Boot the system from the default boot devices
               OK> boot

  19. To boot from cdrom
               OK> boot cdrom

  20. Boots the system from device as specified by the disk device alias
               OK> boot disk

  21. Boot from the full device mentioned
               OK> boot device-path

  22. Betwork boot .boots from a TFTP boot server or Jumpstart server
               OK> boot net

  23. Jumpstart boot.
               OK> boot net -install

  24. Tape boot.boots off a SCSI tape if available
               OK> boot tape

  25. Boot halted .boot into a halted state(ok prompt) interesting for troubleshooting boot at the lowest level
               OK> boot -h

  26. Reconfiguration boot.Boot and search for all attached device.useful when new device attached to the system
               OK> boot -r

  27. Single user.boots the system to run level 1
               OK> boot -s

  28. Verbose boot.show good debugging information.
               OK> boot -v

  29. To boot the server to failsafe mode
               OK> boot -F failsafe

Displaying System Information

  30. Display ID PROM contents
               OK> .idprom

  31. Display a list of processor-dependent trap types
               OK> .traps

  32. Display list of installed and probed devices
               OK> show-devs

  33. Eject the floppy
               OK> eject floppy

  34. Eject the cdrom
               OK> eject cdrom

  35. Call the operating system to write information to hard disk
               OK> sync

Emergency Keyboard Commands

  36. Bypass POST .(This command does not depend on security-mode)
               OK> Stop

  37. Abort.(This will also stop a running system. You can resume normal operations if you enter go at the prompt. Enter anything else and you will stay halted)
               OK> Stop-A

  38. Enter diagnostic mode(set diag-switch?to true) 
               OK> Stop-D

  39. Reset NVRAM contents to default values.
               OK> Stop-N




~Judi~




How to disable IPv6 in Soalris

How to disable IPv6 in Soalris

APPLIES TO :  Disable IPv6 in Solaris, Solaris Operating System - Version 8 6/00 U1 to 10 8/11 U10 [Release 8.0 to 10.0]

ISSUE :  Currently no ISO images available with IPS repositories for Oracle Solaris Studio, nor with patches for Oracle Solaris Studio.

GOAL :  This document describes what files to remove or edit to disable IP Version 6 on Solaris[TM] 8,9,10 on systems that only require IPv4 (IPv6 configuration is no longer needed)

SOLUTION :  This document describes what files to remove or edit to disable IP Version 6 on Solaris[TM] 8,9,10 on systems that only require IPv4 (IPv6 configuration is no longer needed)

Prerequisites :   It is not recommended to disable IPv6 on Solaris 11.

               1. Make a backup of the IPv6 NDP daemon's configuration file, (if it exists),
by using;
                      # cp /etc/inet/ndpd.conf /etc/inet/ndpd.conf.`date +%Y%m%d`

               2. Remove any lines from the IPv6 NDP Daemon's configuration file. Then
add these 2 lines;
                      StatefulAddrConf false
                      StatelessAddrConf false
                              These lines will prevent remote and automatic IPv6 address assignments.

               3. Stop and restart the NDP Daemon;
                      svcadm restart ndp

               4. Delete any IPv6 interfaces, for example using "net0/v6";
                      ipadm show-addr
                      ipadm delete-addr net0/v6
                      ipadm show-addr

               5. Disable the following services;
                      # svcadm disable svc:/network/routing/legacy-routing:ipv6
                      # svcadm disable svc:/network/dhcp/server:ipv6
                      # svcadm disable svc:/network/dhcp/relay:ipv6

               6. Reboot to verify IPv6 remains off



Oracle SupportDocument 1010562.1 How to disable IPv6  




~Judi~






















How to Install Oracle Developer Studio 12.6

How to Install Oracle Developer Studio 12.6

APPLIES TO :  Solaris 10 and Solaris 11

ISSUE :  Currently no ISO images available with IPS repositories for Oracle Solaris Studio, nor with patches for Oracle Solaris Studio.

GOAL :  Install Oracle Developer Studio 12.6

SOLUTION :  Install Oracle Solaris Studio 12.6 From a Tar File 

Prerequisites :   Solaris 10 and Solaris 11

               1. Download Oracle Developer Studio 12.6.
                       Download Link

               2. Extract the tar file using the appropriate command for your platform:
                       bzcat download-directory/SolarisStudio12.6-solaris-sparc-bin.tar.bz2 | tar -xf -
                       The contents are unpacked in a directory named: SolarisStudio12.4-OS-platform-bin where OS is solaris or linux

               3. Install the operating system patches as described below. (Oracle Solaris 10 only)
                       installation-directory/install_patches.sh

               4How to Create a Local IPS Repository for Oracle Solaris Studio (Doc ID 2100640.1)
                       There currently are no ISO images available with IPS repositories for Oracle Solaris Studio, nor with patches for Oracle Solaris Studio., This is the topic of BUG:22099153.


Part I: Get the certificates

If the certificates have already been downloaded, there is no need to download them again.
1.) Go to https://pkg-register.oracle.com
2.) Select Oracle Solaris Studio Support -> Show Details
3.) Click on the link to the "certificate page", currently at https://pkg-register.oracle.com/register/certificate
4.) Download both Key and Certificate
5.) Give the downloaded files recognizable names, for example:
solarisstudio-support-pkg.oracle.com.certificate.pem
solarisstudio-support-pkg.oracle.com.key.pem

Part II: Setting up the Repository Server

The repository server needs to be able to connect to https://pkg-register.oracle.com.
No Solaris packages or Oracle Solaris Studio packages will be installed on the repository server.
Only the local IPS repository will be created and populated.
How exactly the repository is created should not matter; steps 7 and 8
are examples, but if you prefer a different approach, use your own preferred method
to create the local IPS repository.
6.) Transfer Key and Certificate to the repository server, into a directory where the superuser can access the pem files
7.) Create a zfs pool for the rlocal IPS epository:
The example instructions below put the repository under rpool/export/local/solarisstudio
$ sudo zfs create rpool/export/local
$ sudo zfs create -o compression=on -o atime=off rpool/export/local/solarisstudio
Check:
$ zfs get -r compression,atime rpool/export/local
NAME PROPERTY VALUE SOURCE
rpool/export/local compression off default
rpool/export/local atime on default
rpool/export/local/solarisstudio compression on local
rpool/export/local/solarisstudio atime off local
8.) Create the repository:
$ sudo pkgrepo create /export/local/solarisstudio
9) Create a file update-studio-124 which looks like this:
$ cat update-studio-124
DIRECTORY=<DIR_CONTAINING_CERTS>
PRODUCT=solarisstudio-support-pkg.oracle.com
KEY=${DIRECTORY}/${PRODUCT}.key.pem
CERT=${DIRECTORY}/${PRODUCT}.certificate.pem
# if the certificates do not cover Oracle Solaris Studio Support,
# use the https://pkg.oracle.com/solarisstudio/release repository instead.
SOURCE=https://pkg.oracle.com/solarisstudio/support/
TARGET=/export/local/solarisstudio
pkgrecv -s $SOURCE -d $TARGET --key $KEY --cert $CERT -r \
developer/solarisstudio-124
# "-m all-timestamps" is default in Solaris 11.2.
# Add "-m latest" option to download only the most recent version of each patch
pkgrecv -s $SOURCE -d $TARGET --key $KEY --cert $CERT -r \
developer/solarisstudio-124/*
[ $? -eq 0 ] && pkgrepo refresh -s $TARGET

10) Run this script:
$ sudo sh -x update-studio-124
+ DIRECTORY=<DIR_CONTAINING_CERTS>
+ PRODUCT=solarisstudio-support-pkg.oracle.com
+ KEY=<DIR_CONTAINING_CERTS>/solarisstudio-support-pkg.oracle.com.key.pem
+ CERT=<DIR_CONTAINING_CERTS>/solarisstudio-support-pkg.oracle.com.certificate.pem
+ SOURCE=https://pkg.oracle.com/solarisstudio/support/
+ TARGET=/export/local/solarisstudio
+ pkgrecv -s https://pkg.oracle.com/solarisstudio/support/ -d /export/local/solarisstudio --key <DIR_CONTAINING_KEY>/solarisstudio-support-pkg.oracle.com.key.pem --cert <DIR_CONTAINING_CERT>/solarisstudio-support-pkg.oracle.com.certificate.pem -r developer/solarisstudio-124
Processing packages for publisher solarisstudio ...
Retrieving manifests for dependency evaluation ...
PROCESS ITEMS GET (MB) SEND (MB)
Completed 36/36 1448/1448 4231/4231
+ pkgrecv -s https://pkg.oracle.com/solarisstudio/support/ -d /export/local/solarisstudio --key <DIR_CONTAINING_KEY>/solarisstudio-support-pkg.oracle.com.key.pem --cert <DIR_CONTAINING_CERT>/solarisstudio-support-pkg.oracle.com.certificate.pem -r 'developer/solarisstudio-124/*'
Processing packages for publisher solarisstudio ...
Retrieving manifests for dependency evaluation ...
PROCESS ITEMS GET (MB) SEND (MB)
developer/solarisstudio-124/backend 0/37 44/1315 15/4579
[...]
+ [ 0 -eq 0 ]
+ pkgrepo refresh -s /export/local/solarisstudio
Initiating repository refresh.
$

At this point, the local IPS repository has been created, and populated with Oracle Solaris Studio 12.4. It is now possible to create a copy of the repository and move that
to another server, for example via an ISO image, or by transferring a tarball.

11.) Create Repository Server.
The example sets up an HTTP server
$ sudo svccfg -s application/pkg/server setprop pkg/inst_root=/export/local/solarisstudio
$ sudo svccfg -s application/pkg/server setprop pkg/readonly=true
$ svcprop -p pkg/inst_root application/pkg/server
/export/local/solarisstudio
$ sudo svcadm refresh application/pkg/server
$ sudo svcadm enable application/pkg/server

At this point, the repository server is completely set up.

Part III: Client setup

The client must have a working solaris publisher to add Solaris packages.
On any client on which the compilers are supposed to be installed:
12.) Configure the publisher for solarisstudio:
$ sudo pkg set-publisher -G '*' -M '*' -g http://<repository server>:80 solarisstudio
$ pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://pkg.oracle.com/solaris/release/
solarisstudio origin online F http://<repository server>:80/
Check:
$ sudo pkg refresh solarisstudio
$ pkg list -af 'pkg://solarisstudio/*'
NAME (PUBLISHER) VERSION IFO
developer/solarisstudio-124 (solarisstudio) 12.4-1.0.0.1 ---
developer/solarisstudio-124 (solarisstudio) 12.4-1.0.0.0 ---
developer/solarisstudio-124/backend (solarisstudio) 12.4-1.0.6.0 ---
developer/solarisstudio-124/backend (solarisstudio) 12.4-1.0.5.0 ---
developer/solarisstudio-124/backend (solarisstudio) 12.4-1.0.4.0 ---
developer/solarisstudio-124/backend (solarisstudio) 12.4-1.0.3.0 ---
developer/solarisstudio-124/backend (solarisstudio) 12.4-1.0.2.0 ---
developer/solarisstudio-124/backend (solarisstudio) 12.4-1.0.1.0 ---
developer/solarisstudio-124/backend (solarisstudio) 12.4-1.0.0.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.10.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.9.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.7.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.5.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.4.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.2.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.1.0 ---
developer/solarisstudio-124/c++ (solarisstudio) 12.4-1.0.0.0 ---
developer/solarisstudio-124/cc (solarisstudio) 12.4-1.0.4.0 ---
developer/solarisstudio-124/cc (solarisstudio) 12.4-1.0.3.0 ---
[...]

13.) Install the packages:
$ sudo pkg install solarisstudio-124

4. How to Create a Copy of a Solaris Studio IPS Repository (Doc ID 2101537.1)


~Judi~

Mar 6, 2020

Solaris SVM mirroring root disks with Solaris volume manager

Solaris SVM mirroring root / boot disks with Solaris volume manager

APPLIES TO :  Oracle Solaris 8, 9, 10

ISSUE :  NIL

GOAL :  Mirror the Solaris root disk

SOLUTION :  Find below steps to mirror the root disk of Solaris 10 server.  

Prerequisites :   NIL


               1. Copy Partition table from root to mirror disk..
                       prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t0d1s2

               2. Create the metadb state databases
                       metadb -afc 3 /dev/dsk/c0t0d0s7 /dev/dsk/c0t0d1s7

               3. To see the new state database replicas we just created :
                       metadb

               4. Create two submirrors for the root volume
                       metainit -f d11 1 1 c0t0d0s0
                       metainit d12 1 1 c0t0d1s0

                       metainit -f d21 1 1 c0t0d0s1
                       metainit d22 1 1 c0t0d1s1

                       metainit -f d31 1 1 c0t0d0s3
                       metainit d32 1 1 c0t0d1s3

                       metainit -f d41 1 1 c0t0d0s4
                       metainit d42 1 1 c0t0d1s4

                       metainit -f d51 1 1 c0t0d0s5
                       metainit d52 1 1 c0t0d1s5

                       metainit -f d61 1 1 c0t0d0s6
                       metainit d62 1 1 c0t0d1s6

               5. Setup one way mirror OR create main mirror with primary disk's sub mirror
                       metainit -f d100 -m d11
                       metainit d200 -m d21
                       metainit d300 -m d31
                       metainit d400 -m d41
                       metainit d500 -m d51

                       metainit d600 -m d61

               6. Backup the configuration files
                       cp /etc/vfstab /etc/vfstab.premirr
                       cp /etc/system /etc/system.premirr

               7. Activiate the Mirror using the metaroot command which will update the /etc/system and /etc/vfstab files
                       metaroot d100
               8. Verify the configuration  file /etc/system and /etc/vfstab
                       cat /etc/system|grep "md"
                              rootdev:/pseudo/md@0:0,10,blk --> This extra line reflects the mirror configuration


                       cat /etc/vfstab|grep -i md
              dev/md/dsk/d100 /dev/md/rdsk/d100        /       ufs     1    --> the root volume entry in vfstab modified.                                        

               9. Modify the system file
                       echo "set md:mirrored_root_flag=1" >> /etc/system

               10. Modify the vfstab for other metadevice entries
                       /dev/md/dsk/d200 - - swap - no -
                       /dev/md/dsk/d100 /dev/md/rdsk/d100 / ufs 1 no -
                       /dev/md/dsk/d400 /dev/md/rdsk/d400 /usr ufs 1 no -
                       /dev/md/dsk/d300 /dev/md/rdsk/d300 /var ufs 1 no -
                       /dev/md/dsk/d500 /dev/md/rdsk/d500       /opt    ufs     2       yes     -
                       /dev/md/dsk/d600 /dev/md/rdsk/d600 /oracle ufs 2 yes logging

               11. Before rebooting, run the sync command multiple times and lockfs -fa command to flush the data to file system
                       sync
                       sync
                       sync

                       lockfs -fa

               12. Now we can reboot the system.
                       shutdown -i6 -g0 -y

               13. Attaching the other submirror to the main mirror and sync the data
                       metattach d100 d12
                       metattach d200 d22
                       metattach d300 d32
                       metattach d400 d42
                       metattach d500 d52
                       metattach d600 d62

               14. Change the swap partition from slice device to meta device
                       swap -l
                       swap -d /dev/dsk/c0t0d0s1
                       swap -a /dev/md/dsk/d0

               15. if the dump device shows any disk slice path change it to meta device path.
                       dumpadm
                       dumpadm -d /dev/md/dsk/d1

               16. The sync will start now. To check the status of the mirror 
                       metastat -cp

               17. Install the boot block on the mirror disk
                       installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d1s0

               18. Reboot the server with both primary and secondary disks to check the stability of the mirror functionality. 



~ Judi ~

Popular Posts