Data Migration for Persistent Partitions#

If the persistent partition data is not compatible in certain cases to migrate from one flashing to another (such as across OS flashing from QNX<->Linux), use the following steps to manually migrate the data to avoid erasing via --init_persistent_partitions.

Manual Data Migration Steps for Special Cases#

Setting Up to Migrate Data

  1. Enable a WAR in /usr/sbin/nv_init.sh script before it launches driveos-persistence.sh.

#!/bin/bash
...
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'

/bin/bash # \<== Please add root shell HERE

# Persistence service setup
 /bin/bash $DBG_OPTS /usr/sbin/driveos-persistence.sh
sync
....
systemctl --no-block isolate graphical.target || true
  1. Reboot the system.

  2. Wait for the root shell by pressing ENTER until you see the root prompt.

Migrating Persistent Metadata Partition

  1. Mount the persistent metadata partition.

mkdir -p /tmp/tmp_mdata
mount /dev/vblkdev1 /tmp/tmp_mdata
mv /tmp/tmp_mdata/driveos/security/etc/ /tmp/tmp_mdata/
  1. Remove the old persistent partition directories after migration.

rm -rf /tmp/tmp_mdata/driveos/security/
  1. Unmount the partition.

umount /tmp/tmp_mdata

Migrating Persistent Data Partition

  1. Format data partition.

mkfs.ext4 /dev/vlbkdev3 # (input y if any prompt comes up)
  1. Mount the persistent data partition.

mkdir -p /tmp/tmp_data
mount /dev/vblkdev3 /tmp/tmp_data
  1. Move the data in the home directory.

mv /home /tmp/tmp_data/
  1. Unmount the partition.

umount /tmp/tmp_data

After Migration

Flash the NVIDIA DriveOS™ platform with the 7.0 SDK.