How to backup TV firmware

From Openlgtv
Jump to: navigation, search

Theory of operation

TV's firmware is stored in multiple flash memory 'partitions' (see for an introduction). These partitions or so called mtd partitions contain all the code and data that firmware consist of. You should backup it before you do any (firmware) modification on TV.


  • Busybox shell access to TV. To do that, see Debug mode connection and especially Debug mode connection#sh.
  • An USB drive that is formated FAT16/FAT32 (not NTFS or EXT2/3/4) with write access to it when using in TV. Because the number of partitions varies for the different platforms (Broadcom, Saturn), you should have enough free space on the USB drive (upto 1,5GByte is needed for Broadcoms).

What to backup

You can list all partitions in TV's NAND flash memory using the following command:

cat /proc/mtd

You should see something like this after that:

dev:   size    erasesize  name
mtd0:  000c0000 00020000 "boot"
mtd1:  00040000 00020000 "mtdinfo"
mtd2:  00040000 00020000 "crc32info"
mtd3:  00300000 00020000 "rootfs"
mtd4:  00040000 00020000 "lginit"
mtd27: 00040000 00020000 "lginit"
mtd40: 20000000 00020000 "total"

The first column lists the '/dev/mtdXX' devices (partitions) and last one the assigned names of the partitions. This example is taken from a Broadcom based TV, so your partition names and numbers may be different.

As you may notice there are some partitions named the same twice ('lginit' for example). These are backup partitions, which keep the last used firmware before the latest firmware upgrade.

The 'total' partition contains all the data from other partitions.

The number of the partitions varies for different platforms. So on Saturn 6 LCD TV's there are 19 partitions, on Saturn 6 plasmas - 21 partitions from /dev/mtd0 to /dev/mtd20 and on Broadcom based models (LD750, LE5500, LE7500,...) there are 41 partitions - up to /dev/mtd40.


  • Plug USB drive into the first USB port on the TV, it should be mounted at /mnt/usb1/Drive1
  • Copy each mtd partition to the USB drive. For each mtd partition you should do:
cat /dev/mtd0 > /mnt/usb1/Drive1/0_boot

Where '0_boot' is the name of the file that will be created on the USB drive.

Alternatively, you can copy & paste following shell script to the serial console to do backup of all partitions automatically (it can take up to few minutes, then get back to shell):

for i in `cat /proc/mtd | grep -v erasesize | awk '{gsub(/[":]/,"");print $1 "_" $4}'`; do echo \
Backup of $i ...; cat /dev/`echo $i | awk '{gsub(/_/," ");print $1}'` > /mnt/usb1/Drive1/$i; done

While script is running you should see something like that:

Backup of mtd0_boot ...
Backup of mtd1_mtdinfo ...
Backup of mtd2_crc32info ...
  • Wait for all this to finish (it could take a while, please be patient)
  • Enter the following command to be sure that all writes to the USB drive are really synced:
  • Unmount USB drive:
umount /dev/sda1
  • Connect USB drive to the PC and copy all mtd* files to the safe place. These files are the backup of your firmware.