- Insert the product media for the same version and level as the current installation into the appropriate drive.
- Power on the server.
- Boot the server into SMS mode and Choose Start Maintenance Mode for System Recovery.
- Select Access a Root Volume Group. A message displays explaining that you will not be able to return to the Installation menus without rebooting if you change the root volume group at this point.
- Type the number of the appropriate volume group from the list.
- Select Access this Volume Group and start a shell.
- At the prompt, type the passwd command to reset the root password.
- To write everything from the buffer to the hard disk and reboot the system, type the following:
# sync;sync;sync;reboot
Topics: AIX, System Admin↑
Converting HEX to DEC
Here's a simple command to convert a hexadecimal number to decimal. For example if you wish to convert hexadecimal "FF" to decimal:
# echo "ibase=16; FF" | bc
255
Topics: AIX, Security, System Admin↑
Password-less SSH Login
On occasion I have the need to establish trust relationships between Unix boxes so that I can script file transfers. In short, here's how you leverage SSH to do that. Using the example of trying to connect from server "a" to get a file on "b" follow this example:
- Connect to "a".
- Type: ssh-keygen -t rsa
- The default directory for keyfiles will be ~/.ssh/ (if you do not want to be prompted, leave passphrase blank).
- Copy the contents of .ssh/id_rsa.pub (there should only be one line).
- Place this line on "b", in ~/.ssh/authorized_keys.
When you have a lot of Putty screens, or if you frequently login to a host through a jump server, it's very easy to set the title of the Putty window, for exmaple to the hostname of the server you're currently logged into. This way, you'll easily recognize each telnet screen, and avoid entering -possibly destructive- commands in the wrong window:
echo "\033]0;`hostname`\007"For example, you can add this line to /etc/profile, and have the hostname of the PuTTY title set automatically.
HACMP is capable of using an alternative MAC address in combination with its service address. So, how do you set this MAC address without HACMP, just using the command line? (Could come in handy, in case you wish to configure the service address on a system, without having to start HACMP).
And if you wish to remove it again:# ifconfig enX down # ifconfig enX detach # chdev -l entX -a use_alt_addr=yes # chdev -l entX -a alt_addr=0x00xxxxxxxxxx # ifconfig enX xxx.xxx.xxx.xxx # ifconfig enX up
# ifconfig enX down # ifconfig enX detach # chdev -l entX -a use_alt_addr=no # chdev -l entX -a alt_addr=0x00000000000
This is a short procedure how to creat an AIX DVD from a base set of 8 AIX 5.3 CD's:
- Copy all CD's using "cp -hRp" to a directory, start with the last CD and work towards the first one. You can do this on either an AIX or a Linux system.
- Check that <directory>/installp/ppc contails all install images.
- If not already, remove <directory>/usr/sys/inst.images. This directory also might contain all installation images.
- Create a link <directory>/usr/sys/inst.images pointing to <directory>/installp/ppc.
- Find all .toc files in the directory structure and, if necessary, change all vol%# entries to vol%1 (There should be at least 2 .toc files that need these updates). You have to change vol%2 to vol%1, vol%3 to vol%1, etcetera, up till vol%8.
- Create an ISO image with RockRidge extentions:
# mkisofs -R -o
Some specific information on burning this ISO image on AIX to a DVD-RAM:
Burning a DVD-RAM is somewhat more difficult than burning a CD. First, it depends if you have a slim-line DVD-RAM drive in a Power5 system or a regular DVD-RAM drive in Power4 systems (not slimline).
Use DLPAR to move the required SCSI controller to a LPAR, in order to be able to use the DVD-RAM drive.
After the DLPAR action of the required SCSI controller is complete, execute: cfgmgr.
After the configuration manager has run, you will end up with either 1 or 2 DVD drives (depending on the actual drives in the hardware frame):
As you can see, the first is the DVD-RAM, the second is a DVD-ROM. Therefor, we will use the first one (in this sample).# lsdev -Cc cdrom cd0 Available 3F-09-00-0,0 SCSI DVD-RAM Drive cd1 Available 3F-09-00-5,0 16 Bit LVD SCSI DVD-ROM Drive
Place a DVD-RAM single sided 4.7 GB Type II disc (partnumber 19P0862) in the drive. DO NOT USE ANY OTHER TYPE OF DVD-RAM DISCS. OTHER TYPE OF DISCS ARE NOT SUPPORTED BY IBM.
In case you have a POWER4 system:
Be sure to use a use the case of the DVD-RAM in order to burn the DVD. DVD-RAM drives in Power4 systems will NOT burn if you removed the DVD-RAM from its case.
Also, be sure to have the latest firmware level on the DVD-RAM drive (see website http://www14.software.ibm.com/webapp/set2/firmware for the correct level of the firmware for your drive). Without this firmware level these DVD-RAM drives are unable to burn Type II DVD-RAM discs. Using lscfg -vl cd0 you can check the firmware level:
# lscfg -vl cd0
cd0 U1.9-P2-I1/Z2-A0 SCSI DVD-RAM Drive (4700 MB)
Manufacturer................IBM
Machine Type and Model......DVRM00203
ROS Level and ID............A132
Device Specific.(Z0)........058002028F000010
Part Number.................04N5272
EC Level....................F74471
FRU Number..................04N5967
The firmware level of this DVD-RAM drive is "A132". This level is too low in order to be able to burn Type II discs. Check the website for the latest level. The description on this webpage on how to install the DVD-RAM firmware was found to be inaccurate.
Install firmware as follows:
Download the firmware file and place it in /tmp on the server. You will get a filename with a "rpm" extension. Run:
# rpm -ihv --ignoreos <filename>Example:
(Beware of the double dash before "ignoreos"!!). This command will place the microcode in /etc/microcode.# rpm -ihv --ignoreos /tmp/ibm-scsi-dvdram.dvrm00203-A151.rpm ibm-scsi-dvdram.dvrm00203 #############################
Run:
# diag -d cd0 -c -T "download -s /etc/microcode -f"This will install the firmware. Use the correct DVD-RAM drive (in this case cd0) to install the firmware!!
Use the following command to burn the DVD-RAM:# diag -d cd0 -c -T "download -s /etc/microcode -f" Installation of the microcode has completed successfully. The current microcode for cd0 is IBM-DVRM00203.A151. Please run diagnostics on the device to ensure that it is functioning properly.
# /usr/sbin/burn_cd -d /dev/cd0 /install/aix53ml4dvd.isoBurning a DVD-RAM can take a long time. Variable burn times from 1 to 7 hours were seen!!! A DVD-RAM made in a slim-line DVD drive on a Power5 system can be read in a regular DVD drive on a Power4 system, if the latest firmware is installed on the DVD drive.
On a Linux system you can use a tool like K3B to write the ISO image to a regular DVD+R disc.
Permanently change hostname for inet0 device in the ODM by choosing one of the following:
Command line method:
# chdev -l inet0 -a hostname=[newhostname]SMIT fastpath method:
# smitty hostnameChange the name of the node which changes the uname process by choosing one of the following:
Command line method:
# uname -S [newhostname]Or run the following script:
# /etc/rc.netChange the hostname on the current running system:
# hostname [newhostname]Change the /etc/hosts file to reflect the new hostname. Change DNS name server, if applicable.
Topics: AIX, Installation, System Admin↑
Installation history
A very easy way to see what was installed recently on your system:
# lslpp -h
Topics: AIX, Networking, System Admin↑
SCP Stalls
When you encounter an issue where ssh through a firewall works perfectly, but when doing scp of large files (for example mksysb images) the scp connection stalls, then there's a solution to this problem: Add "-l 8192" to the scp command.
The reason for scp to stall, is because scp greedily grabs as much bandwith of the network as possible when it transfers files, any delay caused by the network switch of the firewall can easily make the TCP connection stalled.
Adding the option "-l 8192" limits the scp session bandwith up to 8192 Kbit/second, which seems to work safe and fast enough (up to 1 MB/second):
# scp -l 8192 SOURCE DESTINATION
Topics: AIX, System Admin↑
Duplicate errpt entries
By default, AIX will avoid logging duplicate errpt entries. You can see the default settings using smitty errdemon, which will be set to checking duplicate entries within a 10000 milliseconds time interval (10 seconds). Also, the default duplicate error maximum is set to 1000, so after 1000 duplicates, an additional entry will be made, depending on which is reached earlier, the duplicate time interval of 10 seconds or the duplicate error maximum.


