IRIX XLV Plexing (RAID1)

[Published on , last updated on ]

Modifying the XLV binaries to ignore licence checks

This article will show you how to modify the XLV binaries on IRIX to ignore licence checks, which will enable support for XLV plexing (software RAID1, a.k.a. mirroring).

I am publishing this because IRIX is now dead and no longer supported by SGI (it was discontinued in 2013). Every commercial user of IRIX that had wanted to get a plexing licence already has one by now, so publishing this doesn't hurt SGI financially. This information is intended for hobbyists that wouldn't have had the money to purchase a licence, even if it was still possible to do so. If anyone from SGI is reading this and has any objections, send me an e-mail and I'll remove the article.

Result:

Prerequisites:

NB: Tested on IRIX 6.5.30, offsets may differ on XLV binaries shipped with other versions of IRIX (or if any XLV patches have been applied).

Instructions:

  1. Make backup copies of xlv_mgr and xlv_assemble:
    # cd /sbin
    # cp xlv_mgr xlv_mgr.original
    # cp xlv_assemble xlv_assemble.original
    
  2. Locate the offset of the function check_plexing_license() in xlv_mgr and xlv_assemble:
    # dis -F check_plexing_license xlv_mgr | head | tail -4
    check_plexing_license:
           0x100166f4:  3c 02 00 07  lui v0,7
           0x100166f8:  27 bd fe 50  addiu sp,sp,-432
           0x100166fc:  24 42 24 98  addiu v0,v0,9368
    
    Offset in this case is 0x166f4.
    # dis -F check_plexing_license xlv_assemble | head | tail -4
    check_plexing_license:
           0x10009d98:  3c 02 00 04  lui v0,4
           0x10009d9c:  27 bd fe 50  addiu sp,sp,-432
           0x10009da0:  24 42 42 44  addiu v0,v0,16964
    
    Offset in this case is 0x9d98.
  3. Open xlv_mgr in hexedit:
    # hexedit xlv_mgr
    
  4. Go to position 0x166f4 (this is the entry point of the function check_plexing_license()):
    return 166f4
  5. Replace 3C 02 00 07 27 BD FE 50 with 03 E0 00 08 24 02 00 01.
    This replaces the first two instructions in the function with a "return 1;" equivalent — this causes the licence check to always succeed.
  6. Press ctrl X to save the file and exit.
  7. Open xlv_assemble in hexedit:
    # hexedit xlv_assemble
    
  8. Go to position 0x9d98 (again, this is the entry point of the function check_plexing_license()):
    return 9d98
  9. Replace 3C 02 00 04 27 BD FE 50 with 03 E0 00 08 24 02 00 01.
    Same idea as before.
  10. Press ctrl X to save the file and exit.
  11. Enjoy! :)

See Creating a Plexed XLV Logical Volume for Root for instructions on how to create a mirror of your root drive using XLV.