File Copying

After mounting the SD card partition, the required files can be copied to the target partition. In this section, taking Debian202403 image as an example, after mounting the 4th partition of the SD card, copy the files to the /home/user directory of the Debian system:
Note: If you need to copy files to the 3rd and 4th partitions, please refer to Compile Kernel and Manually Replace Updated Files section.
  1. Execute the following command to create test file:
    $ echo "test message" > test_file.txt
  2. Execute the following command to copy the file to target path:
    $ sudo cp test_file.txt mount_path/home/user && sync
  3. Execute the following command to unmount partition:
    $ sudo umount /dev/sdb4
    Figure 1. File Copying
  4. Insert the SD card on VisionFive 2, start and execute the following command to check:
    ls /home/user
    Figure 2. Example Output

    Result: The file was correctly copied to the target path.