Sunday, September 28, 2014

So your SAMSUNG GALAXY S5 does not work with 4G LTE? Here's how to fix.

So you finally decided to purchase Samsung Galaxy S5 and upgrade your existing 3G connection to a blasting fast 4G only to find out that for some odd reason LTE 4G is not coming up on your phone? You've called your provider several times, their technical staff looked at your phone, turned it off and on, advised to reset to default, but nothing worked. You are puzzled: Is it a provider issue? Should I switch to another provider? Is it some sort of compatibility issue with SIM card and Mobile-ID? What is it? 

    These steps should help to clear the fog:
Verify firmware on your phone.
Apparently, phones that are purchased in a provider-neutral place, like an Internet store may have a bit of a different firmware than the one distributed by your MOBILE phone network provider. My experience is such, that provider-supplied phones are overpriced by a large margin. On the other hand, provider keeps track of the firmware on the phones they sell and make sure that they are compatible with options they offer. If that is the situation you are in, no worries, retrieve the firmware installed on your phone. Dial *#1234# on your phone



Visit www.sammobile.com, compare the latest available firmware for your phone, download it!

Once you click on the firmware download link, you will see instructions for using Odin software that will perform the firmware update. WARNING: Backup your phone prior to continuing with this step.

Turn off your phone -> Press Home key, Power Key and Volume Down -> Connect your phone via USB cable and launch Odin v3.09. Do not select Re-partition

  • Extract (unzip) the firmware file
  • Download Odin v3.09
  • Extract Odin zip-file
  • Open Odin v3.09
  • Reboot phone in Download Mode (press and hold Home + Power + Volume Down buttons)
  • Connect phone and wait until you get a blue sign in Odin
  • Add the firmware file to AP / PDA
  • Make sure re-partition is NOT ticked
  • Click the start button, sit back and wait a few minutes
Launch Odin and upgrade

Verify 4G







Tuesday, April 30, 2013

HOWTO Mirror HPUX Root Disk



Step 1: Make ensure you have the right disk 
# ioscan –fnC disk
# diskinfo /dev/rdsk/c0t4d0

The command below should fail if the disk is completely empty
confirming its the right disk to use as a mirror!
# pvdisplay –v /dev/dsk/c0t4d0  

Step 2: Create bootable physical volume
# pvcreate –B /dev/rdsk/c0t4d0

Step 3: Add disk to existing volume group i.e  vg03
# vgextend  /dev/vg03  /dev/dsk/c0t4d0

NOTE: Perform Steps 4 and 5 if it’s a boot disk 
      and not just a data disk.

Step 4: Place boot utilities in boot area of the disk
# mkboot  /dev/rdsk/c0t4d0

Step 5: Point disk to /stand dir
# mkboot  -a  “hpux –lq (;0)/stand/vmunix” /dev/rdsk/c0t4d0

NOTE: Switch "-lq" is needed only if 2 disks exist in the mirror.
Otherwise, when booting it will not boot if one of the disks is bad.
Perform: ISL >  hpux -lq

Confirm disk is part of volume group:
# vgdisplay –v   /dev/vg03
# pvdisplay –v /dev/dsk/c0t4d0  


Stp 6: CREATE the logical volume that exist in the current disk
       On the new disk in the SAME SEQUENCE – as they appear in the
       pvdisplay –v /dev/dsk/c0t6d0

 lvextend   -m  1  /dev/vg03/lvol1  /dev/dsk/c0t4d0
 lvextend   -m  1  /dev/vg03/lvol2  /dev/dsk/c0t4d0
 lvextend   -m  1  /dev/vg03/lvol4  /dev/dsk/c0t4d0
 lvextend   -m  1  /dev/vg03/lvol5  /dev/dsk/c0t4d0     ----      etc….

Step 7: Check with "lvlnboot  -v"  to see both disks
# lvlnboot -v /dev/vg03

Boot Definitions for Volume Group /dev/vg03:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c0t6d0 (10/0.6.0) -- Boot Disk
        /dev/dsk/c0t4d0 (10/0.4.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c0t6d0
                        /dev/dsk/c0t4d0
Root: lvol3     on:     /dev/dsk/c0t6d0
                        /dev/dsk/c0t4d0
Swap: lvol2     on:     /dev/dsk/c0t6d0
                        /dev/dsk/c0t4d0
Dump: lvol2     on:     /dev/dsk/c0t6d0, 0


Step 8: Check with lvdisplay  -v  /dev/vg03/lvol[ 1 ]
        which should show both disks available and should
        both be  ‘current’  and NOT  ‘stale’.

# lvdisplay -v /dev/vg03/lvol1 | pg
--- Logical volumes ---
LV Name                     /dev/vg03/lvol1
VG Name                     /dev/vg03
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               1
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            100
Current LE                  25
Allocated PE                50
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   off
Allocation                  strict/contiguous
IO Timeout (Seconds)        default

   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV
   /dev/dsk/c0t6d0    25        25
   /dev/dsk/c0t4d0    25        25

   --- Logical extents ---
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000 /dev/dsk/c0t6d0    00000 current  /dev/dsk/c0t4d0    00000 current
   00001 /dev/dsk/c0t6d0    00001 current  /dev/dsk/c0t4d0    00001 current
   00002 /dev/dsk/c0t6d0    00002 current  /dev/dsk/c0t4d0    00002 current
   00003 /dev/dsk/c0t6d0    00003 current  /dev/dsk/c0t4d0    00003 current
   00004 /dev/dsk/c0t6d0    00004 current  /dev/dsk/c0t4d0    00004 current
   00005 /dev/dsk/c0t6d0    00005 current  /dev/dsk/c0t4d0    00005 current
   00006 /dev/dsk/c0t6d0    00006 current  /dev/dsk/c0t4d0    00006 current
   00007 /dev/dsk/c0t6d0    00007 current  /dev/dsk/c0t4d0    00007 current
   00008 /dev/dsk/c0t6d0    00008 current  /dev/dsk/c0t4d0    00008 current

Step 9: Set the new disk to be secondary boot device 
        either in IPL  or at command level :

 setboot   = displays

# setboot
Primary bootpath : 10/0.6.0
Alternate bootpath : 10/0.4.0

Autoboot is ON (enabled)
Autosearch is OFF (disabled)
 
# setboot   -a  10/0.4.0      [  before this was the tape drive   10/12/5.0.0  ]


Step 10:
# Shutdown –r –y 0

Interact with ISL
BO ALT

Wednesday, April 24, 2013

HOWTO Reset HMC Password on IBM System p5 550

If you need to reset HMC password on IBM System p5 550, follow the steps outlined below:


 STEP 1

STEP 2

STEP 3

STEP 4

STEP 5

Friday, April 19, 2013

HOWTO fix Android device MTP driver installation error

Diagnosis

Problem connecting Android phone (Samsung Galaxy S3 or Galaxy Note 2) when Kaspersky Antivirus is installed.

Error message appears:

MTP Device Driver installation failed

Windows Device Manager complains:

"Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. To fix this problem you can first try running a Troubleshooting Wizard. If that does not work, you should uninstall and then reinstall the hardware device."

Solution

NOTE: (ALWAYS MAKE A BACKUP OF THE REGISTRY BEFORE MAKING CHANGES):

1. Uninstall Sumsung Kies

2. Start, Run, cmd, regedit

3. Remove the Upperfilters setting in the following registry key:

  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Class\{EEC5AD98-8080-425F-922A-DABF3DE3F69A}

“Upperfilters” = klfltdrv

(This key is related to Kaspersky AV USB filters.)

4. Reboot the system

5. Reinstall Samsung Kies

6. Start Kies and it will connect without a problem.

Wednesday, August 29, 2012

A little HOWTO for Software Testing Automation Framework (STAF)

Introduction

The Software Testing Automation Framework (STAF) is an open source, multi-platform, multi-language framework designed around the idea of reusable components, called services (such as process invocation, resource management, logging, and monitoring). STAF removes the tedium of building an automation infrastructure, thus enabling you to focus on building your automation solution. The STAF framework provides the foundation upon which to build higher level solutions, and provides a pluggable approach supported across a large variety of platforms and languages.

Download latest version of STAF.

About STAF

STAF can be leveraged to help solve common industry problems, such as more frequent product cycles, less preparation time, reduced testing time, more platform choices, more programming language choices, and increased National Language requirements. STAF can help in these areas since it is a proven and mature technology, promotes automation and reuse, has broad platform and language support, and provides a common infrastructure across teams. STAF services are also provided to help you to create an end-to-end automation solution. By using these services in your test cases and automated solutions, you can develop more robust, dynamic test cases and test environments.

STAF Commands samples

Description Command Details
Display STAF version staf local misc version Self explanatory
Display detailed local system information staf local var list Outputs details about the system: RAM, OS version, architecture, variables, et cetera.
Display STAF trust levels staf local trust list Outputs a list of other hosts, networks and/or protocols that the local STAF server trusts to execute STAF commands.
Grant STAF trust level staf local trust set machine tcp://10.31.*.* level 5 Local machine grants the highest permission level 5 to all machines with STAF installed on the subnet 10.31.x.x
Revoke STAF trust level staf local trust delete machine tcp://10.31.*.* Local machine revokes all permissions from hosts with STAF installed located on the subnet 10.31.x.x
Copy remote files/directories staf neptune fs copy file "C:\file.txt" todirectory /opt staf netra10ga fs copy directory /opt/scripts todirectory /opt/scripts Copy the file located in "C:\file.txt" from the host “neptune” to local directory “/opt” Copy the directory “/opt/scripts” with its content to local machine’s “/opt/scripts”. Creates the directory if it does not exist.
Execute commands remotely staf mercury process start command "\\\share\inc\Scripts\AutoIT\doit.exe" Launches program “doit.exe” on the host “mercury” from a UNC share located on host “share”
STAF startup nohup /usr/local/staf/bin/STAFProc& Universal command across all OS, to start STAF server daemon. Or use the following OS-specific commands: • HP /etc/rc.config.d/rc.staf start • ESX, RH service staf start • AIX /etc/rc.staf start • SUSE /etc/init.d/staf start • MAC /Library/StartupItems/STAF/STAF start • Solaris /etc/rc2.d/S99staf start
STAF stop staf local shutdown shutdown Universal command across all OS, to stop the STAF server daemon.

Saturday, August 18, 2012

ClusterSSH on steroids: tips and tricks

Today I would like to share a combination of  tips, tricks and gems that are possible with ClusterSSH. Duncan Ferguson, the creator of CSSH, came up with this invaluable tool that helps many system administrators and QA testers manage many systems in parallel.

Introduction

ClusterSSH controls a number of xterm windows via a single graphical console window to allow commands to be interactively run on multiple servers over an SSH connection. ClusterSSH (cssh) is written in PERL and easily allows modifications to the source code.

Demo


 About ClusterSSH

ClusterSSH (cssh) command opens an administration console and an xterm to all specified hosts. Any text typed into the administration console is replicated to all windows. All windows may also be typed into directly. Commands are performed all at once via this tool, which speeds up testing and allows for easy output comparison between tested nodes. Connections are opened via SSH, therefore a correctly installed and configured SSH installation is required. Extra caution should be taken when editing system files such as /etc/inet/hosts as lines may not necessarily be in the same order. Assuming line 5 is the same across all servers and modifying that is dangerous. Better to search for the specific line to be changed and double-check before changes are committed. Extra caution should be taken when executing destructive commands as root on a large number of physical servers.

About DevilsPie

DevilsPie (devilspie) is a program which can detect windows as they are created, and perform actions on them if they match as set of criteria. ClusterSSH is used in conjunction with DevilsPie to control the position of xterm windows, administration console and to hide windows decorations such as title bar, minimize / maximize / close buttons. This in return provides a clean look and a very efficient use of monitor space.

Devil's pie in action

Planning

To ensure the success of using ClusterSSH, please consider the recommendations below.
  1. Because ClusterSSH sorts xterm windows in alphabetical order it is recommended that hosts are given appropriate hostnames. This will ensure that sorting will group similar OS hosts together. For instance if hostnames of all Solaris machines start with “s” and RedHat machines start with “r”, once ClusterSSH is launched, all Solaris and RedHat machines will be grouped together. This simplifies the output comparison process across similar operating systems.
  2.  It is preferred that testing hosts have permanent IP addresses set and either entered in DNS or local /etc/hosts file on the operating system that will host ClusterSSH. Working with a large number of DHCP hosts can be inconvenient and time consuming because of changing IP addresses.
  3. ClusterSSH setup described in this document is installed on Ubuntu 9.04 Desktop OS running on VMware Workstation 6.5.2. ClusterSSH can also be used with other operating systems.

Installation process

1.        Install Virtual BOX
2.        Install Ubuntu 10 Desktop OS
a.        Note: Use bridged VMware network connection.
3.        Apply all latest updates and patches to Ubuntu 10 Desktop OS
a.        To check for updates from the KDE menu, go to:
 System à Administration à Update Manager
4.        Install Virtual BOX Guest Additions 
5.        Install SSH Server
a.        Execute: “sudo apt-get install ssh
b.        Create public keys, execute: “ssh-keygen –d” and respond with <ENTER> to questions.
6.        Install ClusterSSH
a.        Execute: “sudo apt-get install clusterssh
7.        Install DevilsPie
a.        Execute: “sudo apt-get install devilspie
8.        Perl module[1] XML::Simple
a.        To install:
                                                   i.      # perl –MCPAN –e shell
                                                  ii.      cpan[1]> install XML::Simple

9.     Create .cssrc and .csshrc_send_menu in your users home directory


[1] You may need additional PERL modules, just follow provided commands to install them

Important files

$HOME/Desktop/Launch Custom ClusterSSHv4 launch SHELL script Contains cssh command with a list of target hosts
$HOME/.csshrc Custom ClusterSSH configuration file Contains ClusterSSH configuration parameters
/etc/cssh/cssh.ds Custom DevilsPie configuration file Contains DevilsPie configuration parameters
$HOME/.csshrc_send_menu Menu XML configuration file Contains menu and folders populated with commands


ClusterSSH launch script “Launch”

This script contains list of servers to connect via SSH. Order is irrelevant, since launched CSSH sorts all windows by name in alphabetical order.

#!/bin/bash
CSSHPID="/tmp/cssh.pid" 

if [ -f $CSSHPID ]; then
 for pid in `cat $CSSHPID`
 do
     pkill -P $pid 
     pkill xterm
     pkill devilspie
 done
 rm -f $CSSHPID
fi

echo $$ >> $CSSHPID
devilspie /etc/cssh/cssh.ds& 

cssh -l root yourhost1 yourhost2 yourhost3 yourhost4 

pkill devilspie
rm -f $CSSHPID

ClusterSSH XML configuration file “.csshrc_send_menu“

$HOME/.csshrc_send_menu
 


ClusterSSH configuration file “.csshrc“

.csshrc

Devilspie configuration file “cssh.ds“

cssh.ds

 

Secure Shell (ssh) key-based authentication

ClusterSSH is using SSH protocol as its transport method to connect to remote test systems. In order to simplify the connection process and avoid being prompted for password every time ClusterSSH SHELL scripts are launched, users may setup an SSH key-based public key authentication. If public keys are already created on UBUNTU desktop, simply change directory to your home directory “.ssh”. From .ssh directory issue the following command: “ssh-copy-id root@<system>” where “<system>” is the target system you are planning to connect using ClusterSSH. Type-in root’s password and this command will copy public key from your UBUNTU desktop login to the remote system. Next time ClusterSSH is launched it will be able to connect directly to your test system(s) without prompting for password - saves time!

Saturday, July 28, 2012

How to implement physical servers snapshots on Apple MAC OS X 10.X

Concept

Here is how it works:
  • Mac OS X physical snapshots can be configured with a single disk 
  • Partition your disk to have at least 2 partitions  "MASTER" and "CLONE"
  • Install clean MAC OS X on MASTER. This will become your  disk.
  • Include required packages (see Prerequisites, below)
  • Perfect the OS, install any software that you would like to have as part of the standard OS
  • Setup snapshot scripts and create the snapshot

Banner text

Banner will be displayed during the reimaging process to anyone who will be trying to connect to the system via SSH, CONSOLE or TELNET prior to the end of the snapshot recovery process. Touch /etc/banner_default
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 
       THE SYSTEM IS BOOTED TO AN ORIGINAL SNAPSHOT DISK
               SNAPSHOT RECOVERY IS IN PROGRESS
 
       TO PRESERVE INTEGRITY OF THE SYSTEM DO NOT LOGIN!

Enable banner for SSH

To enable banner for SSH, simply uncomment "Banner" in /etc/ssh/sshd_config
# no default banner path
Banner /etc/banner
NOTE: During the reimaging process /etc/banner_default will be renamed to /etc/banner

Scripts and entries

You will need to add scripts and append standard configuration files as part of this process. Feel free to customize as you wish. Append /etc/profile. Simple notification mechanism if a user is trying to login to the system during the snapshot restore.
#…
PATH=$PATH:/usr/local/bin
export PATH
#…

#master (YOUR ORIGINAL SNAPSHOT DISK)
MASTER=”/dev/disk0s2”

if [ `/usr/sbin/bless --getBoot` == ${MASTER} ]; then
 clear
 cat /etc/banner_default
 while true
  do
   echo "Are you sure you still wish to login? (y or n) :\c"
   read CONFIRM
   case $CONFIRM in
     y|Y|YES|yes|Yes) break ;;
     n|N|no|NO|No)
     echo Aborting - you entered $CONFIRM
     exit
     ;;
    *) echo Please enter only y or n
   esac
  done
else
/bin/rm -f /etc/banner
fi

Create /usr/local/bin/restore_snapshot

Create file /usr/local/bin/restore_snapshot with execute permissions (500). This is the script that you will be executing to request snapshot restore.
#!/bin/sh
#master (YOUR ORIGINAL SNAPSHOT DISK)
MASTER=”/dev/disk0s2”
#clone  (YOUR TEST DISK)
CLONE=”/dev/disk0s3”

# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

if [ `/usr/sbin/bless --getBoot` == ${CLONE} ]
then
        echo "System is booted to the secondary disk"
        echo "Changing boot device priority to boot to the master disk for snapshot restore..."
        echo "INFO: Cancel by CRTL-C in 15 seconds..."
        sleep 15
        set -x
        /usr/sbin/bless --device ${MASTER} --setBoot
        set +x
        echo "Rebooting..."
        /sbin/reboot
else
        /usr/local/bin/resnapshot
fi

MAC OS X /usr/local/bin/resnapshot

Create /etc/rc.resnapshot (chmod 500). This script will be called during OS boot. It will check whether the snapshot restore must start after the reboot.
#!/bin/sh

#master (YOUR ORIGINAL SNAPSHOT DISK)
MASTER=”/dev/disk0s2”
#clone  (YOUR TEST DISK)
CLONE=”/dev/disk0s3”

# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

echo "INFO: You can still cancel by pressing CRTL-C within 15 seconds..."
sleep 15

if [ `/usr/sbin/bless --getBoot` == ${MASTER} ]
then
        echo "INFO: System is booted to the master image disk."
        echo "INFO: Placing banner."
        set -x
        cp /etc/banner_default /etc/banner
        set +x

        echo "INFO: Restoring snapshot. The system will reboot automatically, if successful."
        echo "INFO: Please wait..."
        echo "INFO: Placing FirstReboot into startup"
        /bin/mkdir -p /Library/StartupItems/FirstBoot
        echo "INFO: Creating FirstReboot script"
        /usr/bin/touch /Library/StartupItems/FirstBoot/FirstBoot
        echo "INFO: Changing Permissions on FirstReboot script"
        /bin/chmod +x /Library/StartupItems/FirstBoot/FirstBoot
        echo "INFO: Populating on FirstReboot script"
        echo "/bin/rm -rf /Library/StartupItems/FirstBoot" > /Library/StartupItems/FirstBoot/FirstBoot
        echo "/sbin/reboot" >> /Library/StartupItems/FirstBoot/FirstBoot
 /usr/sbin/asr -h 2>&1 | grep '\-\-erase'
if [ $? –eq 0 ]; then
        ASRCMD=”/usr/sbin/asr -source ${MASTER} -target ${CLONE} --erase --updatebless –noprompt”
  else
        ASRCMD=”/usr/sbin/asr -source ${MASTER} -target ${CLONE} -erase -updatebless –noprompt”
fi

echo $ASRCMD
set -x
${ASRCMD}

        if [ $? -eq 0 ]; then
                echo "INFO: Restore succeeded! Setting boot to clone..."
                /usr/sbin/bless --device ${CLONE} --setBoot
                /usr/sbin/bless --getBoot
                echo "INFO: Removing Local FirstReboot directory"
                /bin/rm -rf /Library/StartupItems/FirstBoot
                echo "Rebooting Now..."
                /sbin/reboot
        else
                echo "INFO: Snapshot restore failed. Aborting..."
                exit 1
        fi
else
        echo "INFO: System is booted to the clone. Exiting..."
        set -x
        /bin/rm -f /etc/banner
        /usr/sbin/diskutil unmount ${MASTER}
        set +x
fi

Mac OS X job scheduling

defaults write /Library/LaunchDaemons/com.globalitadmins.resnapshot Label com.symantec.resnapshot
defaults write /Library/LaunchDaemons/com.globalitadmins.resnapshot ProgramArguments -array "/usr/local/bin/resnapshot" 
defaults write /Library/LaunchDaemons/com.globalitadmins.resnapshot RunAtLoad -bool true

Create first snapshot

To initiate the first cloning process, simply execute:

/usr/local/bin/restore_snapshot
Mac OS X Restore Snapshot Sample Output
mini106-4:bin root# restore_snapshot 
INFO: You can still cancel by pressing CRTL-C within 15 seconds...
INFO: System is booted to the master image disk.
INFO: Placing banner.
+ cp /etc/banner_default /etc/banner
+ set +x
INFO: Restoring snapshot. The system will reboot automatically, if successful.
INFO: Please wait...
INFO: Placing FirstReboot into startup
INFO: Creating FirstReboot script
INFO: Changing Permissions on FirstReboot script
INFO: Populating on FirstReboot script
+ /usr/sbin/asr -source /dev/disk0s2 -target /dev/disk0s3 --erase --updatebless --noprompt
        Validating target...done
        Validating source...done
        Erasing target device /dev/disk0s3...done
        Validating sizes...done
        Copying    ....10....20....30....40....50....60....70....80....90....100
+ '[' 0 -eq 0 ']'
+ echo 'INFO: Restore succeeded! Setting boot to clone...'
INFO: Restore succeeded! Setting boot to clone...
+ /usr/sbin/bless --device /dev/disk0s3 --setBoot
+ /usr/sbin/bless --getBoot
/dev/disk0s3
+ echo 'INFO: Removing Local FirstReboot directory'
INFO: Removing Local FirstReboot directory
+ /bin/rm -rf /Library/StartupItems/FirstBoot
+ echo 'Rebooting Now...'
Rebooting Now...
+ /sbin/reboot

And you are all set!

Important commands

#CURRENT BOOT DISK: bless –getBoot
#ALL DISKS PARTITIONS: diskutil list

#PARTITION WITH GUI: USE DISKUTILITY  
#MOUNT MASTER WHEN BOOTED ON TEST:
#diskutil mount /dev/disk0s2
#UNMOUNT MASTER WHEN BOOTED ON TEST:
#diskutil unmount /dev/disk0s2

Helpful links