ps: Do a little preparation before starting: insert the SD card, if it is inserted, the SD card will be displayed on the ubuntu desktop:
1. View 256G hard disk information
sudo fdisk -lu
Generally, it should display something like this:
2. Modify the mode of sd card
sudo mkfs -t ext4 /dev/mmcblk1p1
Notice: mmcblk1p1 is the name of the sd card, replace it according to the above query results
3. Create a mount directory (location optional)
sudo mkdir ~/data
sudo chown nvidia:nvidia ~/data
Notice: The above nvidia: nvidia corresponding user name: password, replace it according to your own
4. Mount the sd card to the specified mount directory
sudo mount -t ext4 /dev/mmcblk1p1 ~/data/
5. Check whether the mount is successful
df -h
You can see that the size of the mount is more than 200 G
6. Set the boot to automatically mount
First open the target file:
sudo gedit /etc/fstab
Then add the following at the end:
/dev/mmcblk1p1 /home/nvidia/data/ ext4
defaults 1 2
Notice: The format of this place is more important, you can paste it directly. It should be noted that the first is your device name, and the second is the mount directory you set above
But at this time, the data file is locked, as follows:
execute the following command to unlock:
sudo chmod -R 777 ~/data
Then it can be accessed normally as follows: