Here’s a script to assist upgrading or replacing the hard drive in MyGig RHB 430n radios or ‘infotainment systems’ found in many Chrysler, Jeep, and Dodge vehicles from around 2010 through 2019. It might work with other MyGig models too, like the RBZ, which is similar to the RHB but without navigation. This utility will prepare a new hard drive or SSD and optionally migrate the data from your old one.
[Download Script] 11/2024 v1.0
Core Capabilities
- Prepare a drive for use with MyGig radios (wipe, partition, and format).
- Backup data from an existing MyGig drive and restore it to a new one.
- Supports SATA and PATA hard drives and SSD’s.
- Backup/Restore methods:
- Data Only (suggested)
- Permits restore to differing size drive.
- Allows increasing the music storage capacity.
- Backs up and restores to/from ZIP files (one for each partition)
- Much faster than cloning (under 8 minutes to build a drive via USB)
- Uses less space on your computer than cloning.
- Cloning
- Creates/Restores compressed or uncompressed dd images.
- Destination drive must be same size or larger than source.
- Data Only (suggested)
- Upgrade your current drive, increase capacity, and keep your data.
- Drive unlocking.
Requirements and Dependencies
- This script runs on Linux. You can boot Linux from a USB flash drive if you don’t normally use it.
- Dependent Packages are additional software required by the script. The script will prompt you can provide guidance to install these if needed but many are included in most Linux installations.
- hdparm for drive status and unlocking
- udisksctl (udisks2) to mount & get mount points
- dosfslabel (dosfstools) to label partitions
- smartctl (smartmontools) for retrieving drive power on hours
- A way to interface your hard drive, depending on type.
- USB to SATA adapter (I used a StarTech brand one)
- USB to PATA/IDE adapter (I used a generic old one)
Usage
USAGE: mygig.sh <device> <command> <option> <zippath>(optional)
ARGUMENTS:
device - drive (a block device such as /dev/sdx)
command - action to perform
zippath - path for data restore/backup zip files (default current dir)
COMMANDS:
-info - display drive information and status
-unlock - unlock drive (and set known master password '')
-unmount - unmount drive partitions
-mount - mount drive partitions
-wipe - unlock, wipe drive
-repart - unlock, wipe, partition, format
-build - unlock, wipe, partition, format, restore data from ZIP files
-backup - backup drive partitions to .zip files
-ibackup - backup drive (dd image), specify filename (.dd or .dd.gz)
-irestore - restore drive (dd image), specify filename (.dd or .dd.gz)
OPTIONS:
-blitz - default wipe/build, no questions asked! (use caution)
-nosetpass - disable setting a known master password after unlocking drive
EXAMPLES:
mygig.sh /dev/sdx -info (show drive information)
mygig.sh /dev/sdx -unlock (unlock drive)
mygig.sh /dev/sdx -backup (backup drive partitions to ZIPs)
mygig.sh /dev/sdx -ibackup file.dd.gz (create a drive image)
mygig.sh /dev/sdx -irestore file.dd.gz (restore a drive image)
mygig.sh /dev/sdx -build (build, restore ZIPs, current dir)
mygig.sh /dev/sdx -build <dir> (build, restore ZIPs, specified dir)
More Usage and Examples
How to determine your drive’s device name.
- Interface your drive (SATA or PATA) to the computer. I used a USB adapter but you can interface it internally if desired.
- Run ‘lsblk’ to determine the drive’s block device name (such as /dev/sdx)
TIP: If you’re unsure then run ‘lsblk’ to list block devices before and after interfacing the the drive. Observe the difference to determine the device.
NOTE: The rest of these notes will use /dev/sdx as the device name.
Scenario 1: Upgrade to a larger drive or SSD, optionally increase music capacity.
NOTE: The new drive can be same size, larger, or smaller than original. This is much faster than cloning, under 8 minutes during my testing.
- Backup orignal drive, creates ZIPs of all partitions
mygig.sh /dev/sdx -backup - Restore to new drive (Partitions, formats, restores the ZIP backups)
mygig.sh /dev/sdx -restore
Scenario 2: Replace current drive by cloning (doesn’t increase music capacity)
NOTE: New drive must be equal or larger capacity. Specifying a suffix of .gz will create a compressed image and save a lot of storage space on your computer.
- Make a compressed image of current drive.
mygig.sh /dev/sdx -ibackup file.dd.gz - Restore to new drive.
mygig.sh /dev/sdx -irestore file.dd.gz
Technical Details, Tips, and Other Things to Know
About the Various Partitions
- MUSIC
- User music file MP3/AAC (loaded from USB)
- Music ripped from CD’s (AAC format)
- Cover art (extracted from Gracenote database)
- NOTE: When music files are loaded to the hard drive their details are written to an SQlite database then the files are renamed numerically (such as 1.mp3, 2.mp3, etc.) and stored in folders also named with numbers.
- PICTURE
- User Pictures
- Cover Art
- Splash screen for all potential brands (Jeep, Dodge, etc.)
- Icons for Satellite radio stations
- Backup of the music database
- CDDB
- Gracenote database
NOTE: the radio won’t function properly without this
- Gracenote database
- ENGINEER
- Music databases for HDD and USB devices
- Equalizer data
- TravelLink databases (weather, movies, sports, etc.)
- Backups
- WORK
- Copies of certain firmware files
Seems to work without this data but unknown if it’s needed only under certain circumstances.
- Copies of certain firmware files
- LOG
- Log files, only writes logs if the proper directory structure exists.
(this script takes care of that)
- Log files, only writes logs if the proper directory structure exists.
Locked Drives
MyGig radios use an ATA password to lock the drive from being accessed outside the unit. I don’t understand the point of this, perhaps an anti-repair tactic? Upon power up the radio’s firmware checks if the drive is locked and unlocks it if needed. I first unlocked mine by letting the radio unlock it then hot swapping the SATA cable to a computer (USB adapter) while keeping the drive powered. I had it interfaced to the radio externally with a SATA extension cable to facilitate that.
A more graceful tactic is to use the OEM passwords which are stored in the firmware. Fortunately someone discovered those passwords long ago and decoded them, which this script utilizes.
Some people have indicated their drives aren’t locked, primarily with early model units and some SATA models. My experience with RHB’s manufactured in 2015 and 2018 are that they are locked and if I insert an unlocked drive the radio will lock it too. The drive being locked isn’t a big deal though since the password is known.
Drive Types (PATA vs. SATA)
FYI, they switched from PATA (IDE) hard drives to SATA mid-2016. I don’t know if that means 2016 model year (of the vehicle) or 2016 manufacture date of the radio. My 2016 Jeep has an RHB manufactured in 2015. The RHB I bought from a salvage 2019 Dodge Caravan was manufactured in 2018. To ensure I got one with a SATA drive I watched eBay for units with a date code of 2017 or newer (to be safe).
SATA SSD’s are very prevalent but there are also PATA (IDE) SSD’s that you can use in earlier models. I heard that the Kingwin brand ones don’t support ATA locking so I bought one and it’s true. It works fine in my 2015 MyGig RHB 430n and remains unlocked vs. any regular IDE hard drive I install becomes locked. Again though, this locking isn’t a big deal since we know the password (if you missed it see the earlier link or use this script to unlock).
The OEM hard drives are not typical, they’re designed to survive situations that would quickly destroy a typical hard drive, such as bouncing, vibration, and extreme temperatures.
Chrysler Radio Date Codes & High/Low Speed
There are date codes on the label on top of the radio. The most obvious one looks like a date but it’s only the manufacture date of the CD/DVD mechanism. Instead look for the 4 digit date code (clearly labeled ‘Date Code’). The last digit is the manufacture year of the radio.
Additionally there are low and high speed radios. This pertains to the communication speed of the vehicles CAN bus. Older models were low speed. If you’re shopping for a replacement be sure to determine whether you need high or low speed to ensure compatibility.
Security PIN Codes
The RHB 430n is locked to the original vehicle’s VIN. If moved to another vehicle or powered outside of a vehicle it will prompt for a 4 digit security PIN. It won’t prompt again unless it loses power (such as the vehicle battery being disconnected or going dead). Some MyGig models could be decoded with an algorithm but the RHB codes must be looked up in a dealer’s database, or so I’ve heard. The dealer I bought my Jeep from gave me the code for mine when I purchased it (at my request). When i bought a used RHB from eBay the same dealer was kind enough to give me that radio’s code too.
Retrieving the MP3 files currently stored in your MyGig RHB radio.
This is a question I saw posted numerous times… “How can I copy the music out of my radio?” The common answer was always that you can’t. Well, I’m here to say you can but it’s probably more work than you expect and the result won’t be what you want. Here are the steps.
- Remove the radio from the vehicle.
- Remove the hard drive from the radio.
- Interface the hard drive to a computer (I suggest a USB adapter)
- Unlock the hard drive (this script can do that)
- Copy the music (MP3 and AAC files) from the drive’s music partition. They will have unfriendly numeric names like 1.mp3, not the original names indicating what they are.
On a related note there is a service center (dealer) feature to backup/restore data with a USB hard drive. This feature is likely controlled by a dealer tool interfaced to the vehicles diagnostic port (commands sent over the CAN bus to the radio). I discovered this when analyzing the firmware.
Specifying custom data locations.
You can specify a directory or sub-directory at the command line. The script will search for ZIP files first in the current directory and then the path specified. Each ZIP is searched for individually.
The directory structure shown in the sample output (below) has a single Gracenote database (CDDB.zip) in the root and sub-directories containing files for various firmware versions. The command below partitions a drive then restores data for firmware 05.05.01 but uses the common Gracenote database (the newest Gracenote version I had).
- mygig.sh /dev/sdx -restore RHB_05.01.01/
Sample Output
For reference here's the layout of my project directory. All you need is mygig.sys, the various ZIP files will be generated by the script when you perform a backup of your original drive.
user@compy386:/Data/projects/mygig/buildkit$ tree
.
├── CDDB.zip
├── mygig.sh
├── RHB_05.01.01
│ ├── ENGINEER.zip
│ ├── LOG.zip
│ ├── MUSIC.zip
│ ├── PICTURE.zip
│ └── WORK.zip
├── RHB_50.00.07
│ └── WORK.zip
└── RHB_60.00.03
├── ENGINEER.zip
├── LOG.zip
├── MUSIC.zip
├── PICTURE.zip
└── WORK.zip
3 directories, 13 files
And Here's example output from building a functional drive...
user@compy386:/Data/projects/mygig/buildkit$ mygig.sh /dev/sdf -build RHB_05.01.01/
==================================================
=========[ MyGig 430n RHB Drive Utility ]=========
==================================================
Processing 'build' for device '/dev/sdf'
-----[ Checking Data Restoration Sources ]-----
Searching in '/Data/projects/mygig/buildkit'
FOUND: /Data/projects/mygig/buildkit/RHB_05.01.01/MUSIC.zip
FOUND: /Data/projects/mygig/buildkit/RHB_05.01.01/PICTURE.zip
FOUND: /Data/projects/mygig/buildkit/CDDB.Zip
FOUND: /Data/projects/mygig/buildkit/RHB_05.01.01/ENGINEER.zip
FOUND: /Data/projects/mygig/buildkit/RHB_05.01.01/WORK.zip
FOUND: /Data/projects/mygig/buildkit/RHB_05.01.01/LOG.zip
-----[ Checking Drive /dev/sdf ]-----
Device: /dev/sdf
Model: MKNSSDEC60GB, SN: ME150827AS2066913
Size: 60 GB (117,231,408 sectors)
Runtime: 565 days (13,573 hours)
SecureWipe: supported
LockStatus: supported, unlocked
WARNING: All drive data will be erased.
Do you wish to proceed with this drive? (y/n)? y
Set master password 'mast1234' (drive remains unlocked with no user password)
-----[ Calculating Partition Table ]-----
Specify desired size for MUSIC partition.
Entry Options:
- Size in GB (min 27, max 46, OEM is approx 28)
- 'oem' (or leave blank) to replicate orginal OEM size
- 'max' to use maximum drive capacity.
Enter desired music partition size: oem
Using original OEM size. (approx 28 GB)
Resizing extended partition (4) to 4723110 sectors.
Device Start End Sectors Size Id Type Drv/Label
/dev/sdf1 63 58717574 58717512 28.0G c FAT32(LBA) [J: MUSIC ]
/dev/sdf2 58717575 65015054 6297480 3.1G c FAT32(LBA) [K: PICTURE ]
/dev/sdf3 65015055 73400984 8385930 4.0G c FAT32(LBA) [L: CDDB ]
/dev/sdf4 73400985 78124094 4723110 2.3G f Ext'd(LBA) [ ]
/dev/sdf5 73401048 75505499 2104452 1.1G b FAT32 [M: ENGINEER]
/dev/sdf6 75505563 77610014 2104452 1.1G b FAT32 [N: WORK ]
/dev/sdf7 77610078 77995574 385497 188.3M b FAT32 [O: LOG ]
/dev/sdf8 77995638 78124094 128457 62.8M 6 FAT16 [ ]
Accept this new partition scheme? (y/n)? y
-----[ Unmounting Partitions ]-----
Select drive wipe method:
1. Secure (2 minutes)
2. Quick (instant)
3. Abort
Selection? 1
-----[ Performing Secure Wipe ]-----
security_password: "mast1234"
/dev/sdf:
Issuing SECURITY_ERASE command, password="mast1234", user=master
Waiting 2 minutes for secure wipe to complete...
00:00:00
-----[ Creating Partitions ]-----
Checking that no-one is using this disk right now ... OK
Disk /dev/sdf: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Disk model: 60GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0x564c08ee.
/dev/sdf1: Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 28 GiB.
/dev/sdf2: Created a new partition 2 of type 'W95 FAT32 (LBA)' and of size 3 GiB.
/dev/sdf3: Created a new partition 3 of type 'W95 FAT32 (LBA)' and of size 4 GiB.
/dev/sdf4: Created a new partition 4 of type 'W95 Ext'd (LBA)' and of size 2.3 GiB.
/dev/sdf5: Created a new partition 5 of type 'W95 FAT32' and of size 1 GiB.
/dev/sdf6: Created a new partition 6 of type 'W95 FAT32' and of size 1 GiB.
/dev/sdf7: Created a new partition 7 of type 'W95 FAT32' and of size 188.2 MiB.
/dev/sdf8: Created a new partition 8 of type 'FAT16' and of size 62.7 MiB.
/dev/sdf9: Done.
New situation:
Disklabel type: dos
Disk identifier: 0x564c08ee
Device Boot Start End Sectors Size Id Type
/dev/sdf1 63 58717574 58717512 28G c W95 FAT32 (LBA)
/dev/sdf2 58717575 65015054 6297480 3G c W95 FAT32 (LBA)
/dev/sdf3 65015055 73400984 8385930 4G c W95 FAT32 (LBA)
/dev/sdf4 73400985 78124094 4723110 2.3G f W95 Ext'd (LBA)
/dev/sdf5 73401048 75505499 2104452 1G b W95 FAT32
/dev/sdf6 75505563 77610014 2104452 1G b W95 FAT32
/dev/sdf7 77610078 77995574 385497 188.2M b W95 FAT32
/dev/sdf8 77995638 78124094 128457 62.7M 6 FAT16
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
-----[ Formatting Partitions ]-----
[MUSIC ] /dev/sdf1 formatting and labeling 'MUSIC' (type c)
[PICTURE ] /dev/sdf2 formatting and labeling 'PICTURE' (type c)
[CDDB ] /dev/sdf3 formatting and labeling 'CDDB' (type c)
[ENGINEER] /dev/sdf5 formatting and labeling 'ENGINEER' (type b)
[WORK ] /dev/sdf6 formatting and labeling 'WORK' (type b)
[LOG ] /dev/sdf7 formatting and labeling 'LOG' (type b)
[ ] /dev/sdf8 formatting and labeling '' (type 6)
-----[ Mounting Partitions ]-----
[MUSIC ] /dev/sdf1 mounted as /media/user/3FC8-BD0B
[PICTURE ] /dev/sdf2 mounted as /media/user/3FEC-01EF
[CDDB ] /dev/sdf3 mounted as /media/user/CDDB
[ENGINEER] /dev/sdf5 mounted as /media/user/ENGINEER
[WORK ] /dev/sdf6 mounted as /media/user/4008-AFF3
[LOG ] /dev/sdf7 mounted as /media/user/LOG
-----[ Restoring Partitions ]-----
Restoring from /Data/projects/mygig/buildkit
[MUSIC ] Restoring data from /Data/projects/mygig/buildkit/RHB_05.01.01/MUSIC.zip
[PICTURE ] Restoring data from /Data/projects/mygig/buildkit/RHB_05.01.01/PICTURE.zip
[CDDB ] Restoring data from /Data/projects/mygig/buildkit/CDDB.Zip
[ENGINEER] Restoring data from /Data/projects/mygig/buildkit/RHB_05.01.01/ENGINEER.zip
[WORK ] Restoring data from /Data/projects/mygig/buildkit/RHB_05.01.01/WORK.zip
[LOG ] Restoring data from /Data/projects/mygig/buildkit/RHB_05.01.01/LOG.zip
-----[ Exiting ]-----
Unmounting /dev/sdf for Removal
[EXIT:OK] build /dev/sdf
TASK DURATION: 7 minutes and 34 seconds.