Managed to jail break and SIM unlock my iPhone 3GS (iOS 5.0.1, FW=06.15.00)

After many hours of effort, I finally managed to get my iPhone 3GS SIM unlocked so that I could use it in Europe with a Lebara SIM. I am not reporting the detailed instructions here because there are so many good descriptions already on the web. I just want to report the overall experience in the hope that it might save someone else the trouble that I had.
Continue reading Managed to jail break and SIM unlock my iPhone 3GS (iOS 5.0.1, FW=06.15.00)

C++ class that interfaces to OpenSSL ciphers

I have developed a class named Cipher that allows you to encrypt and decrypt files or strings using the OpenSSL AES-256-CBC cipher and SHA1 digest algorithms. It is interoperable with the openssl command line tool which makes it a good introduction to using OpenSSL for ciphers.

The project has been moved to github: https://github.com/jlinoff/openssl-aes-cipher. The latest version is 1.3. It has been updated to work with the opaque contexts that were introduced in openssl-1.1.

I am re-releasing version 1.2 into the public domain on 2013-11-21 because I wish that I had found something like it when I was starting out with OpenSSL.
Continue reading C++ class that interfaces to OpenSSL ciphers

Bash script to install gcc 4.7.0 and boost 1.49

I recently wanted to build gcc 4.7.0 on CentOS 5.5 to get access to more C++11 features so I put together this script to do all of the work. It is released in text mode so that you can cut-n-paste it from the web page. The shell version is also available: http://projects.joelinoff.com/gcc-4.7.0/bld.sh if you want to download it directly using a tool like wget.

The full installation of gcc-4.7.0 and boost-1.49 requires about 4GB of disk space. After the build is complete you can delete the archives, bld and src directory trees to reclaim about 3.4GB of disk space.
Continue reading Bash script to install gcc 4.7.0 and boost 1.49

Bash script to download, build and install gcc 4.6.3 and boost 1.49

I recently had to build gcc 4.6.3 on CentOS 5.5 so I put together this script to do all of the work. It is released in text mode so that you can cut-n-paste it from the web page. The shell version is also available: http://projects.joelinoff.com/gcc-4.6.3/bld.sh if you want to download it directly using a tool like wget.

The full installation of gcc-4.6.3 and boost-1.49 requires about 4GB of disk space. After the build is complete you can delete the archives, bld and src directory trees to reclaim about 3.4GB of disk space.
Continue reading Bash script to download, build and install gcc 4.6.3 and boost 1.49

OpenIndiana 151a NIC Aggregation

My colleagues and I recently built a filer using OI 151a/ZFS and wanted to increase the throughput by aggregating multiple NICs to a common IP address that is dedicated for data. We did it by physically adding a card with 4 NICs, aggregating the ports on server and then updating the switch to enable link aggregation (port trunking) on the 2 connections.
Continue reading OpenIndiana 151a NIC Aggregation

RAID Configuration Analysis Tool in Python

I have written a RAID configuration analysis tool to help me configure filers. It reports the mean time to data loss (MTTDL), the amount of storage available in a JBOD, the number of possible spares and a other useful information. I am releasing it on the hope that other folks that are trying to figure out how many disks to bundle in a RAID configuration (vdev) will find it useful.

Download

File Size Checksum Version Type
raid.py 23K 60577 27 1.2 Python source code

Continue reading RAID Configuration Analysis Tool in Python

Bootable USB to Flash IT Mode for LSI SAS 9211-8i and 9200-8e Controllers

I have created a FreeDOS 1.1 bootable USB that allows you to flash IT mode for LSI SAS 92100-8i and 9200-8e controllers.

To use it, download the lsifw.img archive, unpack it and flash to your USB. Then flash the controller using the LSI\SAS\9211_8i\flash.bat file or the LSI\SAS\9200_8e\flash.bat file.

Downloads

File Size Sum Unpack Command
lsifw.tar.bz2 29M 55925 29689 tar jxf lsifw.tar.bz2
lsifw.zip 34M 42642 34190 unzip lsifw.tar.bz2

On linux you can flash it to your USB using this command:
    dd if=lsifw.img of=/dev/ bs=1M.

I used it to flash the SAS/SATA controller on a Dell PowerEdge R610 that is used as the head server for a ZFS filer that I am building with a colleague because I wanted to upgrade to a newer version of the firmware.

The flash.bat script assumes that the sasaddhi address is 500605B so before executing it, run sas2flsh -o -listsasadd as specified in the readme.txt file. If the address is different, edit the flash.bat file and insert the new address.

Here is what the flash.bat file looks like for the 9211-8i controller:

Here are the basic steps.
Continue reading Bootable USB to Flash IT Mode for LSI SAS 9211-8i and 9200-8e Controllers

USB Image for SuperMicro SAS Firmware Updates

I have created a USB image for SuperMicro SAS firmware updates to help me with converting SAS controllers to I/T (Initiator/Target) mode instead of the default IR (Integrated RAID) mode. This USB contains all of the SAS firmware downloads available from SuperMicro.

See this post for details about how to flash a USB.

Downloads

URL Format Size Checksum Extraction
flshfw10.tar.bz2 tar, gzip 68MB 39222 69242 tar jvxf flshfw10.tar.bz2
flshfw10.tar.gz tar, bzip2 72MB 39754 73500 tar zvxf flshfw10.tar.gz
flshfw10.zip zip 72MB 10292 73497 unzip flshfw10.zip

Continue reading USB Image for SuperMicro SAS Firmware Updates

FreeDOS 1.1 Bootable USB Image

Here is the FreeDOS image file. It can be used to create a bootable USB. At the end of this post I describe, in detail, how I created the image file from the FreeDOS ISO.

1 Download

Here are the download options.

URL Format Size Checksum Extraction
fdos11.tar.bz2 tar, gzip 28MB 25175 27686 tar jvxf fdos11.tar.bz2
fdos11.tar.gz tar, bzip2 32MB 25477 32340 tar zvxf fdos11.tar.gz
fdos11.zip zip 32MB 28567 32337 unzip fdos11.zip

Once you have downloaded and unzipped it, you need to flash it to your USB.
Continue reading FreeDOS 1.1 Bootable USB Image

Simple C++ text file parser class

This class defines a very simple line oriented parser that tokenizes the data on each line while discarding comments. I created it because the need for parsing very simple files with comments came up over and over again but the traditional istream and fscanf approaches would not allow me to handle comments.
Continue reading Simple C++ text file parser class

How to fix stale NFS mounts on linux without rebooting

I have often noticed that some folks reboot systems to fix stale NFS mount problems which can be disruptive.

Fortunately, that often isn’t necessary. All you have to do is restart nfs and autofs services. However that sometimes fails because user processes have files open on the stale partition or users are cd’ed to the stale partition.

Both conditions are easy to fix. The steps to fix stale mounts by addressing the previously described conditions are described below.
Continue reading How to fix stale NFS mounts on linux without rebooting

How to change the firefox address line (urlbar) font size

I have always found the default font size for the address bar in firefox to be too small but, unlike almost all other aspects of firefox, it was a bit of a challenge to change. You had to manually edit a file called userChrome.css that lived under your home directory tree in a firefox configuration directory. That directory was named ~/.mozilla/firefox/*.default/chrome under linux. On windows it was in the user AppData directory tree.

Each time a new version of firefox was released I would go to that directory and edit the file to describe the font characteristics that I liked.

Unfortunately, when I installed firefox 10, the chrome part of subdirectory was not present.
Continue reading How to change the firefox address line (urlbar) font size

Added a table that presents the same commands in bash and tcsh

I put together a table that presents the same commands in bash and tcsh because I sometimes have to switch between shells and needed a handy reference. It was built up over time by as I came across tidbits that I wanted to remember.

In some cases there are different ways of doing the same thing so I simply chose my preferred approach (such as [[]] expressions rather than [] in the if statements).

I hope that you find it useful.

NX password scrambling and unscrambling algorithms in python 2.7

The NX web page entitled “The password scrambling algorithm in NX client” describes their password scrambling algorithm in C++ and perl but it does not describe it in python. Nor does it describe how to unscramble the data.

This blog describes how I implemented both algorithms in python. I was surprised that NX didn’t use a standard symmetrical key algorithm like blowfish or DES for storing the keys but they must have some good reason.
Continue reading NX password scrambling and unscrambling algorithms in python 2.7

Bash script to download, build and install gcc 4.6.2 and boost 1.48

I recently had to build gcc 4.6.2 on CentOS 5.5 and found it to be quite painful so I put together this script to do all of the work: http://projects.joelinoff.com/gcc-4.6.2/bld.sh.txt. I am releasing it in text mode so that you can cut-n-paste it from the web page.

The shell version is also available: http://projects.joelinoff.com/gcc-4.6.2/bld.sh if you want to download it directly using something like wget.
Continue reading Bash script to download, build and install gcc 4.6.2 and boost 1.48

Edit multiple files at once using change.py

For many years I have used a home grown tool that allows me to make simple changes to multiple files with one command. It is called change and has existed as csh, bash and perl incarnations over the years. I recently rewrote it in python and thought that it might be useful to others so I am publishing it. Here is an example of how it works:

I suspect that lots of you have written your own, similar tools. If that is the case, please look it over send me suggestions for improvements.
Continue reading Edit multiple files at once using change.py