mount sd card into jetson

Hi i am pretty new to the ubuntu, so i am not familiar with the command line
i am looking for the command line command that can format the sd card
and mount and automount on reboot
does anyone have nice tutorial link for it?

Normally one would partition with gdisk (in many cases you’d have to run it with sudo for permission reasons). See “man gdisk”. The SD card as a whole would be “/dev/mmcblk1”, while the eMMC would be “/dev/mmcblk0”. To see the existing partitions and types of the SD card you’d use “gdisk -l /dev/mmcblk1” (writing is when you might need sudo, read probably won’t require sudo). The older fdisk also works, but it uses old style BIOS partitions instead of GPT partitions.

The first partition of the SD is mmcblk1p1, and this is what you would be formatting and mounting (usually an SD card comes formatted with type VFAT, you may want to use ext4 instead…see “mkfs.ext4”, e.g., “sudo mkfs.ext4 /dev/mmcblk1p1”).

When mounting manually you would use “sudo mount /dev/mmcblk1p1 <some_mount_point_like_/mnt>”. If you want to manually edit a file and set up some sort of permanent mount this would be from the file “/etc/fstab” (see “man fstab”), but for auto mount you probably won’t use this.

I’ve never tried to set up the udisks/udev/systemd system for automatic control (see “man udisks”), but for cases where dynamic rules are to automate some disk task over the D-Bus (which passes messages between user and kernel or between the user’s programs) this is probably what is used. I’m not sure how practical this would be to customize, I’ve only used fstab.

If you have an exact and specific SD card you want mounted in a particular place, then check the output of “blkid” to get the UUID for putting in fstab. This is interchangeable with the device special file name, but specific to the device special file with a particular disk in it.

I’m sure this doesn’t answer your question, but it’ll give you a place to start to ask questions.

gparted is handy for a portion of your task, initialization of the SD card.