How to Move Your Root File System from eMMC Flash to an SD Card

How to Move Your Root File System from eMMC Flash to an SD Card

What You Will Learn:

1- How to format the SD card as ext4?

2- How to copy the root file system?

3- How to assign SD card as root file system?


Why Move Your Root File System to an SD Card?

The main advantage of this updated method is faster boot-up speeds. In the previous version, the file system on the SD card was mounted after the file system on the eMMC via a service, which increased the boot time. In this method, the SD card's file system is mounted directly as the root, eliminating the dependency on additional services.

However, it's important to note that the Jetson module won’t boot without the SD card unless the extlinux.conf file is updated. To mitigate risks, we recommend backing up your Jetson module before making any changes.


Step 1: Formatting the SD Card as ext4

  1. Insert your SD card into the SD card slot and connect the basic peripherals (Ethernet, HDMI, keyboard, and mouse). Power on the Jetson module.

  2. Open a terminal and execute the following commands:

    sudo jetson_clocks
    gnome-disks
  • The sudo jetson_clocks command ensures optimal resource usage by the Jetson module.

  • The gnome-disks command launches the GNOME Disks application, which allows you to manage storage devices easily.

  1. In the GNOME Disks application:

    • Select your SD card.

    • Format the entire disk to clear its contents.

  • Create a new partition on the SD card Storage.
  • format it as ext4. Ensure the partition size is at least as large as the current root file system.
  1. After formatting, take note of the SD card partition’s name (e.g., /dev/mmcblk1p1).

Step 2: Copying the Root File System

  1.  Download the required script file from here and extract it.  

  2. Run the script using the following command:

    sudo ./change_rootfs_storage_direct-emmc_to_sdmmc.sh {EXTERNAL_STORAGE}

    Replace {EXTERNAL_STORAGE} with the path of your SD card partition. For example:

    sudo ./change_rootfs_storage_direct-emmc_to_sdmmc.sh /dev/mmcblk1p1
  1. The script will copy the entire root file system to the SD card and update the root path. This process may take some time.

  2. Once the process is complete, reboot the Jetson module.

Step 3: Assigning the SD Card as the Root File System

  1. After rebooting, open a terminal and verify the root file system's location by typing:

    df -h
  2. Ensure the root file system is now mounted from the SD card. If successful, your Jetson module is now booting directly from the SD card.

Conclusion

By following these steps, you can successfully move your root file system from eMMC flash to an SD card. This change can significantly improve boot times and system performance while offering the flexibility of using removable storage.

Thank you for reading our blog post! Feel free to share your thoughts or ask questions in the comments below.


Special thanks to our fellow Engineer and Colleague -Kishan &