Monday, October 4, 2021

Differences Between Solaris 10 and Solaris 11.4

 

Differences Between Solaris 10 and Solaris 11.4

Abstract:

Sun Microsystems used to migrate between operating systems fairly regularly. A new trend had come to the software development community referred to as Continuous Delivery. Oracle purchased Sun Microsystems. Solaris 10 acquired many new features, the life expectancy was extended significantly, and Solaris 11 was released mid-way through the significantly lengthened support cycle. Instead of releasing Solaris 12, Oracle made the executive decision to roll all features of Solaris 12 into Solaris 11.4.

Solaris 11.4 aka Solaris 12

What are some of the differences between Solaris 10 and Solaris 11.4?

Oracle published a document summarizing the differences, with links to major documents.

Key Differences between Oracle Solaris 10 and Oracle Solaris 11

Upgrading from Oracle Solaris 10 to Oracle Solaris 11 requires a fresh installation of Oracle Solaris 11.

Tools to help you make the transition include the following:

  • Oracle Solaris 10 branded zones. Migrate Oracle Solaris 10 instances to Oracle Solaris 10 zones on Oracle Solaris 11 systems.

  • ZFS shadow migration. Migrate UFS data from an existing file system, either local or NFS, to a new local ZFS file system. Do not mix UFS directories and ZFS file systems in the same file system hierarchy.

    You can also remotely mount UFS file systems from an Oracle Solaris 10 system onto an Oracle Solaris 11 system, or use the ufsrestore command on an Oracle Solaris 10 system to restore UFS data (ufsdump) into an Oracle Solaris 11 ZFS file system.

  • ZFS pool import. Export and disconnect storage devices that contain ZFS storage pools on your Oracle Solaris 10 systems and then import them into your Oracle Solaris 11 systems.

  • NFS file sharing. Share files from an Oracle Solaris 10 system to an Oracle Solaris 11 system. Do not mix NFS legacy shared ZFS file systems and ZFS NFS shared file systems. Use only ZFS NFS shared file systems.

For the main Oracle Solaris documentation, see Oracle Solaris Documentation. For additional documentation and examples, select a technology on the Oracle Solaris 11 Technology Spotlights page.

Applications that run on Oracle Solaris 10 should also run on Oracle Solaris 11 if they use only public Oracle Solaris interfaces. Oracle Solaris Preflight Applications Checker 11.3 can determine the Oracle Solaris 11 readiness of an application by analyzing the working application on Oracle Solaris 10. A successful check with this tool strongly indicates that you can run the application without modification on Oracle Solaris 11.

Versions of FOSS and other software are updated. In some cases, a system can have more than one version of a command or tool simultaneously installed. If your application depends on a particular version, use the full path to the executable rather than depend on a link.

See End of Feature Notices for Oracle Solaris 11 for lists of commands and tools that are no longer available in Oracle Solaris 11. In most cases, Oracle Solaris 11 provides alternative commands and tools. The list also includes hardware that does not support newer Oracle Solaris 11 versions.

A graphical desktop is not included by default with some system installations. If you want a graphical desktop, install the group/system/solaris-desktop IPS package.

Installation and Upgrade Changes

The following are key changes from Oracle Solaris 10 to Oracle Solaris 11:

  • Installation and upgrade:

    • Instead of JumpStart, use Automated Installer.

    • Instead of Live Upgrade, use the text installer or Image Packaging System (IPS) pkg commands.

    • Software packages are delivered in package repositories, similar to Linux package repositories.

  • Archive and recovery: Instead of Flash Archives, use Unified Archives.

  • System services: More system configuration is done by setting Service Management Facility (SMF) service property values and not by directly editing configuration files. Look for comments in the configuration files and see the documentation for that configuration.

  • root user: By default, root is a role, not a user. Instead of doing privileged tasks as root, create and assign roles targeted to each set of related tasks.

  • Shell: The default shell for the root user is ksh. The default shell for other users is bash. Default user PATH also has changed.

Changes in How to Configure Oracle Solaris Features

More configuration is provided by partial configuration files in the /etc/system.d directory, where customer-specific system configuration files should also be stored. Routinely editing /etc/system should be avoided. In some cases, the partial configuration file is created by an SMF service using service property values that you provide.

For network configuration, Oracle Solaris 11 assigns generic names to each datalink on a system by using the net0, net1, netN naming convention. Configuration is also managed through SMF service property values rather than by directly editing configuration files. In addition, new commands for setting up datalinks and IP interfaces have been introduced to replace the commonly used commands in Oracle Solaris 10, such as ifconfig.

Networking in Oracle Solaris 11 has advanced to provide better network performance, efficient network resource management, higher network availability, and new technologies such as in the area of network virtualization. See the documentation in Administering Oracle Solaris Networks and Administering Network Services in Oracle Solaris.

Changes in User Environment

  • Default login and other shell changes - In Oracle Solaris 11, /bin/sh is the Korn shell (ksh93), and the default interactive shell is the Bourne-again (bash) shell. When used as a login shell, bash retrieves configuration information from the first instance of .bash_profile, .bash_login, or .profile file.

    • The legacy Bourne shell is available as /usr/sunos/bin/sh.

    • The legacy ksh88 is available as /usr/sunos/bin/ksh from the shell/ksh88 package.

    • Korn shell compatibility information is available in /usr/share/doc/ksh/COMPATIBILITY.

  • Default user path and PATH environment variable – The default user path is /usr/bin. The default path for the root role is /usr/bin:/usr/sbin. The default PATH environment variable for bash is /usr/bin:/usr/sbin

For more details about user environment in Oracle Solaris 11.4, see About the User Work Environment in Managing User Accounts and User Environments in Oracle Solaris 11.3.

Changes in Security

Security in Oracle Solaris 11 supports industry standards more closely. For an overview of security in Oracle Solaris 11, see Security: An Oracle Solaris Differentiator.

Other enhancements increase hardening, add compliance functionality, and enable remote administration of security:

Thursday, September 30, 2021

Solaris 11.4 - Differences Between ksh88 and ksh93


Solaris 11.4 - Differences between ksh88 and ksh93

Abstract:

People who have used UNIX systems for a long period of time, there is sometimes a question of shell compatibility, especially when software is being ported to newer platforms. Differences are noted in Solaris 11.4

Finding Differences

sun9999/root# ssh sun2581
Last login: Wed Sep 29 22:03:38 2021 from 192.168.234.5
Oracle Solaris 11.4.37.101.1                    Assembled August 2021

sun9999/root# uname -a
SunOS sun9999 5.11 11.4.37.101.1 sun4v sparc sun4v logical-domain


sun9999/root# cat /usr/share/doc/ksh/COMPATIBILITY

                KSH-93 VS. KSH-88


The following is a list of known incompatibilities between ksh-93 and ksh-88.
I have not include cases that are clearly bugs in ksh-88.  I also have
omitted features that are completely upward compatible.

1.      Functions, defined with name() with ksh-93 are compatible with
        the POSIX standard, not with ksh-88.  No local variables are
        permitted, and there is no separate scope.  Functions defined
        with the function name syntax, maintain compatibility.
        This also affects function traces.

2.      ! is now a reserved word.  As a result, any command by that
        name will no longer work with ksh-93.

3.      The -x attribute of alias and typeset -f is no longer
        effective and the ENV file is only read for interactive
        shells.  You need to use FPATH to make function definitions
        visible to scripts.

4.      A built-in command named command has been added which is
        always found before the PATH search.  Any script which uses
        this name as the name of a command (or function) will not
        be compatible.

5.      The output format for some built-ins has changed.  In particular
        the output format for set, typeset and alias now have single
        quotes around values that have special characters.  The output
        for trap without arguments has a format that can be used as input.

6.      With ksh-88, a dollar sign ($') followed by a single quote was
        interpreted literally.  Now it is an ANSI-C string.  You
        must quote the dollar sign to get the previous behavior.
        Also, a $ in front of a " indicates that the string needs
        to be translated for locales other than C or POSIX.  The $
        is ignored in the C and POSIX locale.

7.      With ksh-88, tilde expansion did not take place inside ${...}.
        with ksh-93, ${foo-~} will cause tilde expansion if foo is
        not set.  You need to escape the ~ for the previous behavior.

8.      Some changes in the tokenizing rules where made that might
        cause some scripts with previously ambiguous use of quoting
        to produce syntax errors.

9.      Programs that rely on specific exit values for the shell,
        (rather than 0 or non-zero) may not be compatible.  The
        exit status for many shell failures has been changed.

10.     Built-ins in ksh-88 were always executed before looking for
        the command in the PATH variable.  This is no longer true.
        Thus, with ksh-93, if you have the current directory first
        in your PATH, and you have a program named test in your
        directory, it will be executed when you type test; the
        built-in version will be run at the point /bin is found
        in your PATH.

11.     Some undocumented combinations of argument passing to ksh
        builtins no longer works since ksh-93 is getopts conforming
        with respect to its built-ins.  For example, typeset -8i
        previously would work as a synonym for typeset -i8.

12.     Command substitution and arithmetic expansion are now performed
        on PS1, PS3, and ENV when they are expanded.  Thus,  ` and $(
        as part of the value of these variables must be preceded by a \
        to preserve their previous behavior.

13.     The ERRNO variable has been dropped.

14.     If the file name following a redirection symbol contain pattern
        characters they will only be expanded for interactive shells.

15.     The arguments to a dot script will be restored when it completes.

16.     The list of tracked aliases is not displayed with alias unless
        the -t option is specified.

17.     The POSIX standard requires that test "$arg" have exit status
        of 0, if and only if $arg is null.  However, since this breaks
        programs that use test -t, ksh-93 treats an explicit test -t
        as if the user had entered test -t 1.

18.     The ^T directive of emacs mode has been changed to work the
        way it does in gnu-emacs.

19.     ksh-88 allowed unbalanced parenthes within ${name op val} whereas
        ksh-93 does not.  Thus, ${foo-(} needs to be written as ${foo-\(}
        which works with both versions.

20.     kill -l in ksh-93 lists only the signal names, not their numerical
        values.

21.     Local variables defined by typeset are statically scoped in
        ksh-93.  In ksh-88 they were dynamically scoped although this
        behavior was never documented.

22.     The value of the variable given to getopts is set to ? when
        the end-of-options is reached to conform to the POSIX standard.

23.     Since the POSIX standard requires that octal constants be
        recongnized, doing arithmetic on typeset -Z variables can
        yield different results that with ksh-88.  Most of these
        differences were eliminated in ksh-93o.  Starting in ksh-93u+, the
        let command no longer recognizes octal constants starting with 0
        for compatibility with ksh-88 unless the option letoctal is on.

24.     Starting after ksh-93l, If you run ksh name, where name does
        not contain a /, the current directory will be searched
        before doing a path search on name as required by the POSIX
        shell standard.

25.     In ksh-93, cd - will output the directory that it changes
        to on standard output as required by X/Open.  With ksh-88,
        this only happened for interactive shells.

26.     As an undocumented feature of ksh-88, a leading 0 to an
        assignment of an integer variable caused that variable
        to be treated as unsigned.  This behavior was removed
        starting in ksh-93p.

27.     The getopts builtin in ksh-93 requires that optstring contain
        a leading + to allow options to begin with a +.

28.     In emacs/gmacs mode, control-v will not display the version when
        the stty lnext character is set to control-v or is unset.
        The sequence escape control-v will display the shell version.

29.     In ksh-88, DEBUG traps were executed. after each command.  In ksh-93
        DEBUG traps are exeucted before each command.

30.     In ksh-88, a redirection to a file name given by an empty string was
        ignored.  In ksh-93, this is an error.

Monday, June 7, 2021

SPARC: OpenBoot - Disable Auto-Boot?

 

SPARC: OpenBoot - Disable Auto-Boot?

Abstract:

SPARC based platform have a level of firmware between the chassis hardware and the loaded OS called OpenBoot, The IEEE created a standard based upon it, IEEE 1275-1994, and it was called OpenFirmware. Sun Microsystem's OpenBoot was released as Open Source in 2006 under a BSD license, and other vendor implementations were also released. The persistent settings for OpenBoot are held in the environment, as well as defaults, and changes can be made to the EEPROM. The Auto-Boot? environment value is one typical value commonly adusted.

[Sun Microsystems T4-2 Chassis]

Achieve Console

Console can be achieved on a typical rack mount system via TCP/IP connection to the ILOM, with a command to grab the console to the OK prompt (assuming the autoboot flag is disabled.)

sun9876/root# ssh root@T4-2-ilom
Password:

Oracle(R) Integrated Lights Out Manager
Version 3.2.6.8 r128095
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
Warning: HTTPS certificate is set to factory default.
Hostname: ORACLESP-1207BDY086

->  

-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y

Serial console started.  To stop, type #.

{0} ok

The Environment

The environment consist of a series of label-value pairs. Those labels define the characteristics by which the behavior of the chassis can be modified during any changes.

Show OpenBoot Environment Values & Defaults

The printenv command shows a copy of all label-value pairs, as well as defaults.

{0} ok printenv
Variable Name           Value                          Default Value

ttya-rts-dtr-off        false                          false
ttya-ignore-cd          true                           true
keyboard-layout         US-English
reboot-command
security-mode           none                           No default
security-password                                      No default
security-#badlogins     0                              No default
verbosity               min                            min
diag-switch?            false                          false
local-mac-address?      true                           true
fcode-debug?            false                          false
scsi-initiator-id       7                              7
oem-logo                                               No default
oem-logo?               false                          false
oem-banner                                             No default
oem-banner?             false                          false
ansi-terminal?          true                           true
screen-#columns         80                             80
screen-#rows            34                             34
ttya-mode               9600,8,n,1,-                   9600,8,n,1,-
output-device           virtual-console                virtual-console
input-device            virtual-console                virtual-console
auto-boot-on-error?     false                          false
load-base               16384                          16384
auto-boot?              true                           true
os-root-device
network-boot-arguments
boot-command            boot                           boot
boot-file
boot-device             /pci@700/pci@1/pci@0/pci ...   disk net
multipath-boot?         false                          false
boot-device-index       0                              0
use-nvramrc?            false                          false
nvramrc                 ." ChassisSerialNumber 1 ...
error-reset-recovery    boot                           boot
{0} ok 

Set an AutoBoot Environment

The autoboot flag, in the above example, is currently enabled, which is also the default value.
This can be disabled, for the purpose of loading a new OS after a fresh reboot.

{0} ok printenv auto-boot?
auto-boot? =            true

{0} ok setenv auto-boot? false
auto-boot? =            false

{0} ok printenv auto-boot?
auto-boot? =            false

Conclusion:

Environment Label-Value pairs in OpenBoot drive the behavior of the firmware. This value can be set to true, to force boot on chassis power up, or to leave the OS at the "ok" prompt on power up. This is definitively helpful in an environment where a failure may take a chassis down unexpectedly, VM's were brought up on an alternate chassis, and repair of the failued chassis environment is not desirable to bring up the OS formerly running on the failed chassis until an orderly transition can be enabled.

Monday, May 31, 2021

Sun SPARC Enterprise T5120 - USB Boot

 

Sun SPARC Enterprise T5120 - USB Boot

Abstract

UNIX Systems Manufacturers originated their markets as workstations, during a time when they used 32 bit systems and the rest of the PC market was concentrating on 8 and 16 bit systems, and some CPU vendors like Intel use segmentation to keep their 16 bit software alive while struggling to move to 32 bit architectures. Some of the original servers were stacked workstations on a rack in a cabinet. The former high-powered video cards were merely ignored, as remote management needed command line interfaces. Engineering quickly determined that console access needed to be built into a new class of systems: rack mounted servers. These early servers offered boot functionality from Network and Disk. One such boot capability was from USB Disk..


Sun Enterprise T5120

The Sun Enterprise T5120 is a server with a second generation OpenSPARC processor. It comes with a Lights Out Management (LOM) capability referred to as Integrated Lights Out Management (ILOM.) The Advanced Lights Out Management (ALOM) shell may be it's default. Most remote systems management work can be done from the LOM. The system, when looking at the front of the chassis: the T5120 has 2x USB ports next to the DVD drive on the right and 2x USB ports located in the back left corner.

DVD Drive USB Ports

When a SanDisk USB Flash Sticks are plugged into the USB ports located to the right of the DVD drive, they can be seen at the OpenFirmware prompt, and can be selected into a copy-paste buffer, for easy use.

{0} ok show-disks
a) /pci@0/pci@0/pci@8/pci@0/pci@9/SUNW,emlxs@0,1/fp@0,0/disk
b) /pci@0/pci@0/pci@8/pci@0/pci@9/SUNW,emlxs@0/fp@0,0/disk
c) /pci@0/pci@0/pci@2/scsi@0/disk
d) /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk
e) /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@1/disk

f) /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/storage@2/disk
g) /iscsi-hba/disk
q) NO SELECTION
Enter Selection, q to quit: d
/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
         for creating devalias mydev for /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk
{0} ok 

Note: the USB stick in position "d" (this lettered position may change as new USB sticks are plugged or unplugged) has it's device name copied into a "copy-paste" buffer by selecting "d"

Failed Boot from a USB Stick

It looks like this when one boots from a USB stick with no operating system & boot environment on it:

{0} ok boot ^Y
{0} ok boot /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk
Boot device: /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk  File and args:
The file just loaded does not appear to be executable.
{0} ok

Creating a USB Boot Stick

The USB port can be used to create boot environment that the chassis is compatible with or even not compatible with! For example, creating a Solaris 11.4 USB Boot Stick from Solaris 11.3 after inserting a SanDisk USB stick into the front port next to the DVD Drive:

T5120/root# echo | format -e | grep -i SanDisk
       4. c7t0d0 <SanDisk'-Cruzer Fit-1.00 cyl 1945 alt 0 hd 255 sec 63>
       5. c8t0d0 <SanDisk'-Cruzer Fit-1.00 cyl 1945 alt 0 hd 255 sec 63>

T5120/root# ls -al *usb
-rw-r--r--   1 dh127087 staff    1217341440 May  3 19:38 sol-11_4-text-sparc.usb

T5120/root# time dd bs=16k if=sol-11_4-text-sparc.usb of=/dev/rdsk/c7t0d0s2
74300+1 records in
74300+1 records out

real    8m57.25s
user    0m0.47s
sys     0m13.99s

T5120/root# echo "par\nprint\n" | format -e c7t0d0 | tail -14 | nawk '$NF!="0" && !/partition/'
Total disk cylinders available: 148 + 0 (reserved cylinders)

Part      Tag    Flag     Cylinders       Size            Blocks
  0 unassigned    wm       0 - 147        1.13GB    (148/0/0) 2377620
  2 unassigned    wm       0 - 147        1.13GB    (148/0/0) 2377620

T5120/root#

This USB stick can now be tested from, from OpenBoot Firmware

Test Boot Solaris 11.4

After shutting down the OS, while on the console port, attempt to boot from 11.4, which is too new:

T5120/root# cd / ; sync ; sync ; init 0
svc.startd: The system is coming down.  Please wait.
svc.startd: 137 system services are now being stopped.
syncing file systems... done
Program terminated
ChassisSerialNumber BEL07492JB

SPARC Enterprise T5120, No Keyboard
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6.h, 16256 MB memory available, Serial #78384094.
Ethernet address 0:14:4f:ac:b:de, Host ID: 84ac0bde.

{0} ok show-disks
a) /pci@0/pci@0/pci@8/pci@0/pci@9/SUNW,emlxs@0,1/fp@0,0/disk
b) /pci@0/pci@0/pci@8/pci@0/pci@9/SUNW,emlxs@0/fp@0,0/disk
c) /pci@0/pci@0/pci@2/scsi@0/disk
d) /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk
e) /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@1/disk
f) /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/storage@2/disk
g) /iscsi-hba/disk
q) NO SELECTION
Enter Selection, q to quit: d
/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
         for creating devalias mydev for /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk

{0} ok boot ^Y
{0} ok boot /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk
Boot device: /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/storage@2/disk  File and args:
'cpu:SUNW,UltraSPARC-T2:SUNW,sun4v-cpu:sun4v' is not supported by this release of Solaris.
Program terminated
ChassisSerialNumber BEL07492JB

SPARC Enterprise T5120, No Keyboard
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6.h, 16256 MB memory available, Serial #78384094.
Ethernet address 0:14:4f:ac:b:de, Host ID: 84ac0bde.

{0} ok

Note: The OpenSPARC T2 processor is not supported by Oracle Solaris 11.4, but Sun Microsystems Solaris 10, OpenSolaris, and Oracle Solaris 11.0 - Solaris 11.3 are all supported on the chassis.



How to get to an OK prompt on a SPARC

[Logo of Sun Microsystems]

How to Get to an OK prompt on a SPARC

Abstract:

From the beginning of reasonable UNIX Workstation Time, the Workstation typically had a physical hardware layer, a firmware layer, and an OS layer. The Firmware layer used by UNIX workstations was Open-Sourced by Sun Microsystems as OpenBoot, given to the market for vendors like IBM, Apple, etc. The FORTH based environment was called OpenFirmware by the IEEE. One such feature is to boot the operating system directly, from a pre-selected disk, in a pre-selected order. When booting from a different boot environment, like a USB stick, this can be stopped. All of this can be achieved from the OpenBoot "OK" prompt.

[Sun Microsystems Type 5 Keyboard, courtesy Deskthority]

From a Physical Console

If you are lucky enough to have a real SUN Keyboard, Video Monitor, and Mouse (KVM), breaking out to OpenBoot is easily achieved by using the following key sequence "[L1] [A]". The "[L1]" key may be labeled "Stop" on some newer keyboards, but the position is the same, so the simultaneous key sequence would be "[Stop][A]".

{0} ok

From an ILOM Console

If one is not lucky enough to have a physical console, it can be accomplished from an ILOM Console. 

T5120/user$ ssh root@SUNT4-2-ilom
Password:

Oracle(R) Integrated Lights Out Manager
Version 3.2.6.8 r128095
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
Warning: HTTPS certificate is set to factory default.
Hostname: ORACLESP-1207BDY07F
-> 

Go Directly to OK from ILOM Console

If the system AutoBoot is not configured, the OK prompt will appear on a powered up chassis console

-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y

{0} ok

Go to OK from ILOM Console & Booted OS

If the system AutoBoot is configured, the OS prompt will appear on a powered up chassis console

-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y
 
sunt4-2 console login: root
password: ****
sunt4-2/root# cd / ; sync ; init 0

{0} ok

Go to OK from ILOM Console & Booted OS without root

If the system AutoBoot is configured, the OS prompt will appear on a powered up chassis console.
If there is no root password for the system and the intention is to perform a re-installation,
disable auto-boot from the ILOM and perform a reset.

-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y
sunt4-2 console login: #.
Serial console stopped.

-> set /HOST/domain/control auto-boot=disable
Set 'auto-boot' to 'disable' [disabled]

-> show /HOST/domain/control

 /HOST/domain/control
    Targets:

    Properties:
        auto-boot = disabled
        boot_guests = enabled

    Commands:
        cd
        reset
        set
        show

-> reset /HOST/domain/control
Are you sure you want to reset /HOST/domain/control (y/n)? y
Performing reset on /HOST/domain/control

-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y

Serial console started.  To stop, type #.

svc.startd: The system is down.
syncing file systems... done
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.

SPARC T4-2, No Keyboard
Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.38.16, 511.5000 GB memory available, Serial #99740538.
Ethernet address 0:21:28:f1:eb:7a, Host ID: 85f1eb7a.

{0} ok

Conclusions:

The SPARC Chassis, with various access methodologies, can achieve access to the OpenBoot / OpenFirmware prompt, for loading new operating systems, regardless of what was previously loaded on the chassis.

Monday, May 24, 2021

Oracle SPARC T4-4 - USB Boot & Install

[SPARC T4-4 Chassis Image, Courtesy Oracle]

Oracle SPARC T4-4 - USB Boot & Install

Abstract

UNIX Systems Manufacturers originated their markets as workstations, during a time when they used 32 bit systems and the rest of the PC market was concentrating on 8 and 16 bit systems, and some CPU vendors like Intel use segmentation to keep their 16 bit software alive while struggling to move to 32 bit architectures. Some of the original servers were stacked workstations on a rack in a cabinet. The former high-powered video cards were merely ignored, as remote management needed command line interfaces. Engineering quickly determined that console access needed to be built into a new class of systems: rack mounted servers. These early servers offered boot functionality from Network and Disk. One such boot capability was from USB Disk.This capability was later carried onto other chassis that Oracle would manufacture, such as the SPARC T4-4.

Creating a USB Boot Stick from Solaris

The USB port can be used to create a Solaris 11.4 USB Boot Stick from Solaris, after inserting a SanDisk USB stick into the front port next to the DVD Drive:

T5120/root# echo | format -e | grep -i SanDisk
       4. c7t0d0 <SanDisk'-Cruzer Fit-1.00 cyl 1945 alt 0 hd 255 sec 63>
       5. c8t0d0 <SanDisk'-Cruzer Fit-1.00 cyl 1945 alt 0 hd 255 sec 63>

T5120/root# ls -al *usb
-rw-r--r--   1 dh127087 staff    1217341440 May  3 19:38 sol-11_4-text-sparc.usb

T5120/root# time dd bs=16k if=sol-11_4-text-sparc.usb of=/dev/rdsk/c7t0d0s2
74300+1 records in
74300+1 records out

real    8m57.25s
user    0m0.47s
sys     0m13.99s

T5120/root# echo "par\nprint\n" | format -e c7t0d0 | tail -14 | nawk '$NF!="0" && !/partition/'
Total disk cylinders available: 148 + 0 (reserved cylinders)

Part      Tag    Flag     Cylinders       Size            Blocks
  0 unassigned    wm       0 - 147        1.13GB    (148/0/0) 2377620
  2 unassigned    wm       0 - 147        1.13GB    (148/0/0) 2377620

T5120/root#

This USB stick can now be tested from, from OpenBoot Firmware

Oracle SPARC T4-4

The Oracle SPARC T4-4 is a server with a 4th generation OpenSPARC processor. The SPARC T4 processor was manufactured to the same process size as the SPARC T3 CPU processor, but the core was upgraded, so equivalent throughput could be reached with half as many cores, at the same processor speed. The T4-4 Chassis comes with a Lights Out Management (LOM) capability referred to as Integrated Lights Out Management (ILOM.) Most remote systems management work can be done from the LOM. The system, when looking at the front of the chassis: the T5120 has 2x USB ports next to the DVD drive on the right and 2x USB ports located in the back left corner.

Attaching to the ILOM

The ILOM can be attached to via TCP/IP, if previously configured, or over a serial port.

T5120/user$ ssh root@sun1234-ilom
Password:

Oracle(R) Integrated Lights Out Manager
Version 3.2.6.8 r128095
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
Hostname: ORACLESP-1207BDY075

->

Insert USB Boot

The USB boot flash stick should be inserted into a powered down chassis, to boot from firmware.

-> show /system power_state actual_power_consumption

  /System
    Properties:
        power_state = Off
        actual_power_consumption = 37 watts

Power Up Chassis

After the USB boot stick is inserted, the chassis should be powered up from the ILOM.

-> start /SYS
Are you sure you want to start /SYS (y/n)? y
Starting /SYS

After the chassis is powered on, once the power usage increases, attach to the console

-> show /system power_state actual_power_consumption

  /System
    Properties:
        power_state = On
        actual_power_consumption = 1384 watts


-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y

Serial console started.  To stop, type #.

{0} ok

Note: If the chassis was recently started, the ability to access a prompt does not really occur until after the actual power consumption rises to an expected level.
Note: if the "ok" prompt does not appear, press [RETURN] or [ENTER] key

Select USB Port

When a SanDisk USB Flash Sticks are plugged into the USB ports located to the right of the DVD drive, they can be seen at the OpenFirmware prompt, and can be selected into a copy-paste buffer, for easy use.

{0} ok show-disks
a) /reboot-memory@0
b) /pci@700/pci@1/pci@0/pci@0/LSI,sas@0/disk
c) /pci@500/pci@1/pci@0/pci@1/pci@0/pci@3/SUNW,emlxs@0,1/fp@0,0/disk
d) /pci@500/pci@1/pci@0/pci@1/pci@0/pci@3/SUNW,emlxs@0/fp@0,0/disk
e) /pci@400/pci@2/pci@0/pci@1/pci@0/pci@3/SUNW,emlxs@0,1/fp@0,0/disk
f) /pci@400/pci@2/pci@0/pci@1/pci@0/pci@3/SUNW,emlxs@0/fp@0,0/disk
g) /pci@400/pci@1/pci@0/pci@8/pci@0/usb@0,2/hub@2/hub@3/storage@2/disk
h) /pci@400/pci@1/pci@0/pci@8/pci@0/usb@0,2/hub@2/storage@2/disk
i) /pci@400/pci@1/pci@0/pci@0/LSI,sas@0/disk
j) /iscsi-hba/disk
m) MORE SELECTIONS
q) NO SELECTION
Enter Selection, q to quit: h
/pci@400/pci@1/pci@0/pci@8/pci@0/usb@0,2/hub@2/storage@2/disk has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
         for creating devalias mydev for /pci@400/pci@1/pci@0/pci@8/pci@0/usb@0,2/hub@2/storage@2/disk
{0} ok

Note: the USB stick in position "h" (this lettered position may change as new USB sticks are plugged or unplugged) has it's device name copied into a "copy-paste" buffer by selecting "h"

Boot Solaris 11.4 from USB

After shutting down the OS, while on the console port, attempt to boot from 11.4, which is too new:

{0} ok boot ^Y
{0} ok boot /pci@400/pci@1/pci@0/pci@8/pci@0/usb@0,2/hub@2/storage@2/disk
Boot device: /pci@400/pci@1/pci@0/pci@8/pci@0/usb@0,2/hub@2/storage@2/disk  File and args:
/

Install Solaris 11.4

As the USB boot occurs, the Solaris 11.4 installer begins.

SunOS Release 5.11 Version 11.4.0.15.0 64-bit
Copyright (c) 1983, 2018, Oracle and/or its affiliates. All rights reserved.
Remounting root read/write
Probing for device nodes ...
Preparing image for use
Done mounting image
USB keyboard
 1. Arabic                        15. Korean
 2. Belgian                       16. Latin-American
 3. Brazilian                     17. Norwegian
 4. Canadian-Bilingual            18. Portuguese
 5. Canadian-French               19. Russian
 6. Danish                        20. Spanish
 7. Dutch                         21. Swedish
 8. Dvorak                        22. Swiss-French
 9. Finnish                       23. Swiss-German
10. French                        24. Traditional-Chinese
11. German                        25. TurkishQ
12. Italian                       26. UK-English
13. Japanese-type6                27. US-English
14. Japanese
To select the keyboard layout, enter a number [default 27]: 27

 1. Chinese - Simplified
 2. Chinese - Traditional
 3. English
 4. French
 5. German
 6. Italian
 7. Japanese
 8. Korean
 9. Portuguese - Brazil
10. Spanish
To select the language you wish to use, enter a number [default is 3]: 3

User selected: English
Configuring devices.
Hostname: solaris
 
 
Welcome to the Oracle Solaris installation menu

        1  Install Oracle Solaris
        2  Install Additional Drivers
        3  Shell
        4  Terminal type (currently xterm)
        5  Reboot

Please enter a number [1]: 1

                          Welcome to Oracle Solaris

   Thanks for choosing to install Oracle Solaris! This installer enables you
   to install the Oracle Solaris Operating System (OS) on SPARC or x86
   systems.

   The installation log will be at /system/volatile/install_log.

   How to navigate through this installer:
   - Use the function keys listed at the bottom of each screen to move from
     screen to screen and to perform other operations.
   - Use the up/down arrow keys to change the selection or to move between
     input fields.
   - If your keyboard does not have function keys, or they do not respond,
     press ESC; the legend at the bottom of the screen will change to show
     the ESC keys for navigation and other functions.

  F2_Continue  F6_Help  F9_Quit


                              Discovery Selection

   Select discovery method for disks

    Local Disks            Discover local disks

    iSCSI                  Discover iSCSI LUNs

 
F2_Continue  F3_Back  F6_Help  F9_Quit


                                     Disks

    Where should Oracle Solaris be installed?
    Minimum size: 4.1GB    Recommended minimum: 6.1GB

    Type     Size(GB) Boot  Device
    ----------------------------------------------------------------------
    scsi        279.4   +   SYS/MB/HDD4                  HITACHI
    scsi        279.4       SYS/MB/HDD0                  HITACHI
    usb           1.1       c2t0d0                       SanDisk'       <


    The following slices were found on the disk.

      Slice        #  Size(GB)             Slice        #  Size(GB)
      ------------------------             ------------------------
      rpool        0     279.4             Unused       5       0.0
      Unused       1       0.0             Unused       6       0.0
      Unused       3       0.0             Unused       7       0.0
      Unused       4       0.0             backup       2     279.4


 
F2_Continue  F3_Back  F6_Help  F9_Quit


                         Solaris Slices: 279.4GB scsi

   Oracle Solaris can be installed on the whole disk or a slice on the disk.

   The following slices were found on the disk.

     Slice        #  Size(GB)             Slice        #  Size(GB)
     ------------------------             ------------------------
     rpool        0     279.4             Unused       5       0.0
     Unused       1       0.0             Unused       6       0.0
     Unused       3       0.0             Unused       7       0.0
     Unused       4       0.0             backup       2     279.4

                              Use the whole disk
                            Use a slice on the disk

  F2_Continue  F3_Back  F6_Help  F9_Quit


                                System Identity

   Enter a name for this computer that identifies it on the network.
   It can contain letters, numbers, periods (.) and minus signs (-).  The
   name must start and end with an alphanumeric character and must contain
   at least one non-digit character.

   Computer Name: solaris

  F2_Continue  F3_Back  F6_Help  F9_Quit


                             Network Configuration

   Select a wired network connection to configure

     ^ net6 (e1000g4)
     | net7 (e1000g5)
     | net8 (e1000g6)
     | net9 (e1000g7)
     | net10 (e1000g8)
     | net11 (e1000g9)
     | net12 (e1000g10)
     | net13 (e1000g11)
     | net14 (e1000g0)
     | net15 (e1000g1)
     | net16 (nxge0)
     | net17 (nxge1)
     | net18 (nxge2)
     | net19 (nxge3)
     v net20 (nxge4)

  F2_Continue  F3_Back  F6_Help  F9_Quit


   Select how the network interface should be configured.

     DHCP              Allow DHCP to configure the interface

     Static            Configure the interface with a static IP address

  F2_Continue  F3_Back  F6_Help  F9_Quit


                              Time Zone: Regions

    Select the region that contains your time zone.

      Regions
      ----------------------------------------
      UTC/GMT
      Africa
      Americas
      Antarctica
      Asia
      Atlantic Ocean
      Australia
      Europe
      Indian Ocean
      Pacific Ocean

  F2_Continue  F3_Back  F6_Help  F9_Quit


                               Locale: Language

   Select the default language support and locale specific data format.
   These selections determine the language support, the default date and
   time, and other data formats.
   The language chosen automatically determines the available territories.

     Language
    ----------------------------------------
     No Default Language Support
     Chinese
     English
     French
     German
     Italian
     Japanese
     Korean
     Portuguese
     Spanish

  F2_Continue  F3_Back  F6_Help  F9_Quit


                               Locale: Territory

   Select the language territory

     Territory
    ----------------------------------------
     United States (en_US.ISO8859-1)
     United States (en_US.ISO8859-15)
     United States (en_US.ISO8859-15@euro)
     United States (en_US.UTF-8)

  F2_Continue  F3_Back  F6_Help  F9_Quit


                                 Date and Time

   Edit the date and time as necessary.
   Time shown is the system clock time in UTC and will be interpreted as
   such on installation.
   The time is in 24 hour format.

     Year:    2021 (YYYY)
     Month:     05 (1-12)
     Day:       22 (1-31)
     Hour:      05 (0-23)
     Minute:    46 (0-59)

  F2_Continue  F3_Back  F6_Help  F9_Quit


                                   Keyboard

   Select your keyboard.

   ^ German
   | Italian
   | Japanese-type6
   | Japanese
   | Korean
   | Latin-American
   | Norwegian
   | Portuguese
   | Russian
   | Spanish
   | Swedish
   | Swiss-French
   | Swiss-German
   | Traditional-Chinese
   | TurkishQ
   | UK-English
   - US-English

  F2_Continue  F3_Back  F6_Help  F9_Quit
 
 
                                     Users

    Define a root password for the system and user account for yourself.


    System Root Password (required)

     Root password:    solar1s
     Confirm password: solar1s

    Create a user account (optional)

     Your real name:
     Username:
     User password:
     Confirm password:

  F2_Continue  F3_Back  F6_Help  F9_Quit

 
                            Support - Registration

     Provide your My Oracle Support credentials to be informed of
     security issues, enable Oracle Auto Service Requests.

     See http://www.oracle.com/goto/solarisautoreg for details.

       Email: anonymous@oracle.com
              Easier for you if you use your My Oracle Support email
              address/username.

       Please enter your password if you wish to receive security
       updates via My Oracle Support.

              My Oracle Support password:

  F2_Continue  F3_Back  F6_Help  F9_Quit

 
                             Installation Summary

   Review the settings below before installing. Go back (F3) to make changes.

   - Software: Oracle Solaris 11.4 SPARC
   |
   | Root Pool Disk: 279.4GB scsi
   |
   | Computer name: solaris
   |
   | Network:
   | DHCP Configuration: net6/v4
   |
   | Time Zone: UTC
   | Locale:
   | Default Language: English
   | Language Support: English (United States)
   | Keyboard: US-English
   | No user account
   |
   v Support configuration:

  F2_Install  F3_Back  F6_Help  F9_Quit

 
                           Installing Oracle Solaris

               Preparing for Installation

              [                       (4%)                       ]

  F9_Quit

 
                             Installation Complete


   The installation of Oracle Solaris has completed successfully.

   Reboot to start the newly installed software or Quit if you wish to
   perform additional tasks before rebooting.

   The installation log is available at /system/volatile/install_log. After
   reboot it can be found at /var/log/install/install_log.


  F4_View Log  F7_Halt  F8_Reboot  F9_Quit
 

 May 22 06:22:23 solaris reboot: initiated by root
 

Welcome to the Oracle Solaris installation menu

        1  Install Oracle Solaris
        2  Install Additional Drivers
        3  Shell
        4  Terminal type (currently xterm)
        5  Reboot

Please enter a number [1]: syncing file systems... done
rebooting...
Resetting...
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.

SPARC T4-4, No Keyboard
Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.38.16, 1023.5000 GB memory available, Serial #99743488.
Ethernet address 0:21:28:f1:f7:0, Host ID: 85f1f700.
 
Boot device: /pci@400/pci@1/pci@0/pci@0/LSI,sas@0/disk@w5000cca0252bf86d,0:a  File and args:
/
SunOS Release 5.11 Version 11.4.0.15.0 64-bit
Copyright (c) 1983, 2018, Oracle and/or its affiliates. All rights reserved.
Loading smf(7) service descriptions: 238/238
Booting to milestone "svc:/milestone/config:default".
Configuring devices.
Loading smf(7) service descriptions: 2/2
Booting to milestone "all".
Hostname: solaris
May 22 06:35:06 solaris sendmail[1502]: My unqualified host name (solaris) unknown; sleeping for retry
May 22 06:35:06 solaris sendmail[1507]: My unqualified host name (solaris) unknown; sleeping for retry

solaris console login:

UnConfigure / Configure

Solaris 10, offered an option to perform a "sys-unconfig", to restore an OS back to factory settings. In Solaris 11, this has been replaced with another option called "sysconfig configure -s" or "sysconfig configure -s --destructive" to destroy the initial user home account to also be destroyed.

This option is good if moving a chassis to a different location.