How to use m.2(nvme) disk?

Dear sir:

The m.2 disk is detected successfully. The result of lsblk is as following:
root@tegra-ubuntu:/etc# lsblk
loop0 7:0 0 16M 1 loop
mtdblock0 31:0 0 32M 0 disk
mmcblk0 179:0 0 14.7G 0 disk
├─mmcblk0p1 179:1 0 14G 0 part /
├─mmcblk0p2 179:2 0 64M 0 part
├─mmcblk0p3 179:3 0 64M 0 part
├─mmcblk0p4 179:4 0 448K 0 part
├─mmcblk0p5 179:5 0 448K 0 part
├─mmcblk0p6 179:6 0 63M 0 part
├─mmcblk0p7 179:7 0 512K 0 part
├─mmcblk0p8 179:8 0 256K 0 part
├─mmcblk0p9 179:9 0 256K 0 part
├─mmcblk0p10 179:10 0 300M 0 part
└─mmcblk0p11 179:11 0 199.1M 0 part
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk
mmcblk0rpmb 179:96 0 4M 0 disk
zram0 252:0 0 971.5M 0 disk [SWAP]
zram1 252:1 0 971.5M 0 disk [SWAP]
zram2 252:2 0 971.5M 0 disk [SWAP]
zram3 252:3 0 971.5M 0 disk [SWAP]
nvme0n1 259:0 0 119.2G 0 disk

How to mount the disk by modify the fstab?

This question sounds not related to jetson itself.

So let me put an online search result to you.

Sorry for late reply!

My actually intention is how bring up the nvme disk. My design is emmc disk is used for boot disk, the nvme disk is just used for data disk. How to bring up the nvme disk?

Actually, you just need to give “root=your_nvme disk_drive_path” to the kernel cmdline.


I have read the topic. It is used for booting from nvme. But i just used nvme for data disk.

Change the cboot boot order and let emmc be the first option.


I tested this on the Jetson AGX Xavier developer kit, and Samsung Evo 970 Plus NVMe.

# make sure if /dev/nvme0n1 exists

$ sudo parted /dev/nvme0n1 
(parted) mklabel gpt
Yes/No? yes
(parted) mkpart primary ext4 0 100%
Ignore/Cancel? Ignore 
(parted) quit

$ sudo mkfs.ext4 -j /dev/nvme0n1p1
Proceed anyway? (y,N)

$ sudo mkdir -p /mnt
$ sudo mount /dev/nvme0n1p1 /mnt

jax@jax-desktop:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1   28G   17G   10G  62% /
none            7.7G     0  7.7G   0% /dev
tmpfs           7.7G  404K  7.7G   1% /dev/shm
tmpfs           7.7G   46M  7.7G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
tmpfs           1.6G  144K  1.6G   1% /run/user/1000
/dev/nvme0n1p1  458G   73M  435G   1% /mnt
  • to modify /etc/fstab, you may find a blkid as follow:
    $ blkid /dev/nvme0n1p1 -s UUID -o value

G’luck and leave a note for any mistakes what I did.


Dear MtHiker and WayneWWW, if i want to do these operations in bash script at booting up, how to do?
Especially, the mount operation can be modified in fstab. But the part and format operation is done only one time, how to do?

parted command needs to be run just one time for a device.
And if you add a list in a /etc/fstab, the point will be mounted automatically at boot up time.

How about make and run a simple script to init it?

parted command needs to be run just one time for a device.------- Can this executed automatically by script?

Dear friend:

Do you have any idea?