8,367
edits
Changes
→The method of using the dd command to burn
<li><p>First, you need to prepare an NVMe SSD. The PCIe supported by the M.2 slot of the development board is PCIe2.0x1, and the theoretical maximum speed is 500MB/s. PCIe3.0 and PCIe4.0 NVMe SSDs are also available, but the highest speed is only PCIe2.0x1.</p>
<ol style="list-style-type: lower-alpha;">
<li>The M.2 2230 SSD is as follows</li></ol></li></ol>
[[File:pi3b-img73.png]]
</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>The M.2 2242 SSD is as follows</li></ol>
[[File:pi3b-img74.png]]
</ol></li></ol>
<ol start="2" style="list-style-type: decimal;">
<li>Then insert the NVMe SSD into the M.2 PCIe interface of the development board and fix it</li></ol>
[[File:pi3b-img75.png]]
</ol>
<ol start="3" style="list-style-type: decimal;">
<li>The position of SPI Flash on the development board is shown in the figure below, no other settings are required before starting to burn</li></ol>
[[File:pi3b-img76.png]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li><p>Burning the Linux image to SPIFlash+NVMe SSD requires a TF card, so first you need to burn the Linux image to the TF card, and then use the TF card to start the development board to enter the Linux system. For the method of burning the Linux image to the TF card, please refer to the instructions in the two sections of [[\lOrange Pi 3B#Method of burning Linux image to TF card based on Windows PC|Method of burning Linux image to TF card based on Windows PC]] and [[\lOrange Pi 3B#Method of burning Linux image to TF card based on Ubuntu PC|'''the method of burning the Linux image to the TF card based on the Ubuntu PC''']].</p></li>
<li><p>After using the TF card to start the Linux system, we first burn the u-boot image into the SPI Flash</p>
<ol style="list-style-type: lower-alpha;">
<li>Run nand-sata-install first, '''<span style="color:#FF0000">ordinary users remember to add sudo permission</span>'''</li></ol></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo nand-sata-install'''
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>Then select '''7 Install/Update the bootloader on SPI Flash'''</li></ol>
<div class="figure">
[[File:pi3b-img86.png]]
</div></ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Then select '''<Yes>'''</li></ol>
<div class="figure">
[[File:pi3b-img87.png]]
</div></ol>
<ol start="4" style="list-style-type: lower-alpha;">
<li>Then please wait patiently for the burning to complete. After the burning is completed, the display will be as follows (a '''Done''' will be displayed in the lower left corner):</li></ol>
<div class="figure">
[[File:pi3b-img88.png]]
</div></ol></li></ol>
<ol start="6" style="list-style-type: decimal;">
<li><p>Then upload the Linux image file (Debian or Ubuntu image downloaded from the official website) to the TF card. For the method of uploading the Linux image file to the development board, please refer to the description in the section of [[\lOrange Pi 3B#The method of uploading files to the Linux system of the development board|'''the method of uploading files to the development board Linux system''']].</p></li><li><p>After uploading the image to the Linux system of the development board, we enter the storage path of the image file in the command line of the Linux system of the development board. For example, I store the Linux image of the development board in the '''/home/orangepi/Desktop''' directory Download it, and then enter the '''/home/orangepi/Desktop''' directory to see the uploaded image file.</p></li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''cd /home/orangepi/Desktop'''
Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img
|}
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''How to enter the command line of the development board Linux system?'''
'''1. For the method of using the serial port to log in to the terminal, please refer to the instructions in the section on [[Orange Pi 3B#How to enter use the command line of debugging serial port|how to use the development board Linux system?debugging serial port]].'''
'''3. If HDMI, LCD and other display screens are connected, you can open a command line terminal on the desktop.'''</big>
|}
</ol>
<!-- -->
<ol start="8" style="list-style-type: decimal;">
<li>Next, let's confirm that the NVMe SSD has been recognized by the development board's Linux. If the NVMe SSD is recognized normally, use the '''sudo fdisk -l''' command to see '''nvme''' related information</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~/Desktop$ '''sudo fdisk -l | grep "nvme0n1"'''
Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
|}
Use the '''lspci''' command to see an NVMe-related PCI device
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~/Desktop$ '''lspci'''
01:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. Device 5765 (rev 01)
|}</ol>
<ol start="9" style="list-style-type: decimal;">
<li>Then we can use the dd command to clear the NVMe SSD (optional)</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi3b:~/Desktop$ '''sudo dd bs=1M if=/dev/zero of=/dev/nvme0n1 count=2000 status=progress'''
orangepi@orangepi3b:~/Desktop$ '''sudo sync'''
|}</ol>
<ol start="10" style="list-style-type: decimal;">
<li>Then you can use the dd command to burn the Linux image of the development board to the NVMe SSD</li></ol>
<!-- -->
<ol style="list-style-type: lower-alpha;">
<li><p>In the following command, the if= parameter is followed by the full > path where the Linux image is stored + the name of the Linux image > (such as '''the name of /home/orangepi/Desktop/Linux image'''). > Because we have entered the path of the Linux image above, we only > need to fill in the name of the Linux image.</p></li>
<li><p>Please do not copy the Linux image name in the following command, > but replace it with the actual image name (because the version > number of the image may be updated).</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
'''sudo dd bs=1M if=Orangepi3b_x.x.x_debian_bullseye_desktop_xfce_Linux5.10.160.img of=/dev/nvme0n1 status=progress'''
'''sudo''' '''sync'''
|}
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''<span style="color:#FF0000">Note, if you upload a .7z or .xz or .gz Linux image compressed file, please remember to decompress it before using the dd command to burn.</span>'''
'''The detailed description of all parameters of the dd command and more usage can be viewed by executing the man dd command in the Linux system.'''</big>
|}
</ol>
</ol>
<ol start="11" style="list-style-type: decimal;">
<li><p>After successfully burning the Linux image of the development board to the NVMe SSD, you can use the poweroff command to shut down. Then please pull out the TF card, and then short press the power button to turn on, then the Linux system in SPIFlash+NVMe SSD will be started.</p></li>
<li><p>After starting the system in the NVMe SSD, use the '''df -h''' command to see the actual hard disk capacity</p>
<ol style="list-style-type: lower-alpha;">
<li>128GB NVMe SSD</li></ol></li></ol> orangepi@orangepi:~$ '''df -h''' Filesystem Size Used Avail Use% Mounted on udev 3.8G 8.0K 3.8G 1% /dev tmpfs 769M 1.4M 768M 1% /run '''/dev/nvme0n1p2 118G 5.8G 111G 5% /''' tmpfs 3.8G 0 3.8G 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.8G 16K 3.8G 1% /tmp '''/dev/nvme0n1p1 256M 90M 166M 36% /boot''' /dev/zram1 194M 9.9M 170M 6% /var/log tmpfs 769M 60K 769M 1% /run/user/1000 tmpfs 769M 48K 769M 1% /run/user/0
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''df -h'''</p>
<span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br>
<span style="margin-right: 110px;">udev</span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">8.0K </span><span style="margin-right: 70px;">3.8G </span><span style="margin-right: 90px;">1% /dev</span><br>
<span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 30px;">1.4M </span><span style="margin-right: 70px;">768M </span><span style="margin-right: 90px;">1% /run</span><br>
<span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p2'''</span><span style="margin-right: 50px;color:#FF0000">'''118G '''</span><span style="margin-right: 35px;color:#FF0000">'''5.8G '''</span><span style="margin-right: 80px;color:#FF0000">'''111G '''</span><span style="margin-right: 90px;color:#FF0000">'''5% /'''</span><br>
<span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">0</span><span style="margin-right: 50px;">3.8G </span><span style="margin-right: 90px;">0% /dev/shm</span><br>
<span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">5.0M </span><span style="margin-right: 50px;">4.0K </span><span style="margin-right: 50px;">5.0M </span><span style="margin-right: 90px;">1% /run/lock</span><br>
<span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">16K </span><span style="margin-right: 50px;">3.8G </span><span style="margin-right: 90px;">1% /tmp</span><br>
<span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p1'''</span><span style="margin-right: 50px;color:#FF0000">'''256M '''</span><span style="margin-right: 35px;color:#FF0000">'''90M '''</span><span style="margin-right: 80px;color:#FF0000">'''166M '''</span><span style="margin-right: 90px;color:#FF0000">'''36% /boot'''</span><br>
<span style="margin-right: 65px;">/dev/zram1</span><span style="margin-right: 60px;">194M </span><span style="margin-right: 50px;">9.9M </span><span style="margin-right: 50px;">170M </span><span style="margin-right: 90px;">6% /var/log</span><br>
<span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">60K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/1000</span><br>
<span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">48K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/0</span><br>
|}
</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>2TB NVMe SSD</li>{| class="wikitable" style="width:800px;"|-|</olp> orangepi@orangepi:~$ '''df -h'''</p> <span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail </span><span style="margin-right: 50px;">Use% Mounted on</span><br> <span style="margin-right: 110px;">udev </span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">8.0K </span><span style="margin-right: 70px;">3.8G </span><span style="margin-right: 90px;">1% /dev</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 30px;">1.4M </span><span style="margin-right: 70px;">768M </span><span style="margin-right: 90px;">1% /run</span><br> <span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p2 '''</span><span style="margin-right: 50px;color:#FF0000">'''1.9T '''</span><span style="margin-right: 35px;color:#FF0000">'''4.1G '''</span><span style="margin-right: 80px;color:#FF0000">'''1.8T '''</span><span style="margin-right: 90px;color:#FF0000">'''1% /'''</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">3.8G </span><span style="margin-right: 50px;">0 </span><span style="margin-right: 50px;">3.8G </span><span style="margin-right: 90px;">0% /dev/shm</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">5.0M </span><span style="margin-right: 50px;">4.0K </span><span style="margin-right: 50px;">5.0M </span><span style="margin-right: 90px;">1% /run/lock</span><br> <span style="margin-right: 65px;">/dev/zram2 </span><span style="margin-right: 60px;">3.7G </span><span style="margin-right: 50px;">76K </span><span style="margin-right: 50px;">3.5G </span><span style="margin-right: 90px;">1% /tmp</span><br> <span style="margin-right: 25px;color:#FF0000">'''/dev/nvme0n1p1 '''</span><span style="margin-right: 50px;color:#FF0000">'''256M '''</span><span style="margin-right: 35px;color:#FF0000">'''90M '''</span><span style="margin-right: 80px;color:#FF0000">'''166M '''</span><span style="margin-right: 90px;color:#FF0000">'''36% /boot'''</span><br> <span style="margin-right: 65px;">/dev/zram1 </span><span style="margin-right: 60px;">194M 15M 165M </span><span style="margin-right: 50px;">9.9M </span><span style="margin-right: 50px;">170M </span><span style="margin-right: 90px;">6% /var/log</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">60K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/1000</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">769M </span><span style="margin-right: 50px;">48K </span><span style="margin-right: 50px;">769M </span><span style="margin-right: 90px;">1% /run/user/0</span><br>|}</ol></li></ol>
<ol start="13" style="list-style-type: decimal;">
<li>When the same system is programmed in the TF card and NVMe SSD, '''if both the TF card and NVMe SSD are inserted into the development board, then power on and start the development board, and u-boot will give priority to starting the system in the TF card.''' However, since the systems in the TF card and the NVMe SSD are exactly the same, the UUIDs of the /'''boot''' partition and the '''rootfs''' partition in the two storage devices are also the same, which may cause the partition in the NVMe SSD to be loaded when the TF card starts. Running the script below resolves this issue.</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo fix_mmc_ssd.sh'''
|}
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''Exactly the same system means that the image name is exactly the same. Even if they are all Debian11 systems, the versions are different.'''</big>
|}
</ol>
<span id="how-to-use-balenaetcher-software-to-burn"></span>
=== How to use balenaEtcher software to burn ===