diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d7439e022..efe0d525f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -296,3 +296,6 @@ en/zero/zero/radxa-os/remote-access.md @CodeChenL static/img/rock3/3c/rock3c-8hd-overlay.webp @Radxa-Alvin docs/nio/nio12l/install-yocto-system.md @Radxa-Alvin i18n/en/docusaurus-plugin-content-docs/current/nio/nio12l/install-yocto-system.md @Radxa-Alvin +static/img/common/nvme/writing_mtd.webp @nascs +i18n/en/docusaurus-plugin-content-docs/current/common/dev/_nvme.mdx @nascs +static/img/common/nvme/success.webp @nascs diff --git a/docs/common/dev/_nvme.mdx b/docs/common/dev/_nvme.mdx new file mode 100644 index 000000000..b0cd5d7fe --- /dev/null +++ b/docs/common/dev/_nvme.mdx @@ -0,0 +1,90 @@ +import { Image } from "@site/src/utils/docs"; +import { PreView } from "@site/src/utils/docs"; + +### 整体步骤: + +- 准备一张 SD 卡或者 eMMC Module, 充当启动盘 + +- 使用系统工具 rsetup 刷 SPI + +- 将系统镜像刷到 NVME SSD 里面 + +- 拔掉 SD 卡/eMMC Module, 从 NVME 启动 + +### 准备一张 SD 卡或者 eMMC Module, 充当启动盘 + +参考安装操作系统部分将系统安装在 SD 卡/eMMC Module 当中。 + +这里 SD 卡/eMMC Module 的作用相当于 x86 的启动盘,目的是拿到 spi.img, 将 spi.img 刷到 spi flash 中。 + +从 SD 卡/eMMC Module 启动后,执行一下命令以更新系统: + +``` +sudo apt-get update +sudo apt-get full-upgrade +``` + +### 使用系统工具 rsetup 刷 SPI + +system maintenance + +update spi bootloader + + + +writing to mtd + +success + +### 将系统镜像刷到 NVME SSD 里面 + +确认 NVME 是否被系统识别, + + + {` + radxa@#model#:~$ lsblk + NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT + mmcblk0 179:0 0 14.5G 0 disk + ├─mmcblk0p1 179:1 0 16M 0 part /config + └─mmcblk0p2 179:2 0 14.4G 0 part / + mmcblk0boot0 179:32 0 4M 1 disk + mmcblk0boot1 179:64 0 4M 1 disk + zram0 254:0 0 3.8G 0 disk [SWAP] + nvme0n1 259:0 0 238.5G 0 disk + `} + + +如上所示系统已经识别到 NVME SSD 即 nvme0n1。 + +将系统镜像拷贝到当前系统下, + + + {` + PC Host: scp /path/to/img radxa@boardIP:/home/radxa/ + 例如: + scp ~/Download/#model#_debian_bullseye_xfce_#release_num#.img.xz radxa@192.168.2.66:/home/xxa/ + `} + + +然后在**板子**上将系统镜像 dd 到 NVME 中。 + + + sudo xzcat /home/radxa/#model#_debian_bullseye_xfce_#release_num#.img.xz | dd + of=/dev/nvme0n1 bs=1M status=progress + + +### 拔掉 SD 卡/eMMC Module, 从 NVME 启动 diff --git a/docs/rock3/rock3c/low-level-dev/install-os-on-nvme.md b/docs/rock3/rock3c/low-level-dev/install-os-on-nvme.md new file mode 100644 index 000000000..213ab5238 --- /dev/null +++ b/docs/rock3/rock3c/low-level-dev/install-os-on-nvme.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 22 +--- + +# 从 NVME 启动系统 + +import NVME from '../../../common/dev/\_nvme.mdx' + + diff --git a/docs/rock5/rock5b/low-level-dev/install-os-on-nvme.md b/docs/rock5/rock5b/low-level-dev/install-os-on-nvme.md index f6ba97f59..0af939c2b 100644 --- a/docs/rock5/rock5b/low-level-dev/install-os-on-nvme.md +++ b/docs/rock5/rock5b/low-level-dev/install-os-on-nvme.md @@ -2,75 +2,8 @@ sidebar_position: 22 --- -import Etcher from '../../../common/general/\_etcher.mdx' +# 从 NVME 启动系统 -# 安装系统到 NVME 固态硬盘上 +import NVME from '../../../common/dev/\_nvme.mdx' -## 方案 1:使用 NVME 转 USB3.0 读卡器或带有 NVME 插槽的电脑 - -#### 准备工作 - -- ROCK 5B 主板 -- 1x 5V 电源适配器(推荐 [Radxa Power PD30W](../accessories/pd-30w)) -- 一个 M.2 NVME 固态硬盘 -- NVME 转 USB3.0 读卡器或带 NVME 插槽的 PC - -### 镜像下载 - -请前往 [资源下载摘要](/rock5/rock5b/getting-started/download.md) 下载相应的镜像文件。 - -### 使用 etcher 将镜像写入 M.2 NVME 固态硬盘 - - - -### 方案 2: 写入 ROCK 5B 上的 NVME 固态硬盘 - -### 准备工作 - -- ROCK 5B 主板 -- 1x 5V 电源适配器(推荐 [Radxa Power PD30W](../accessories/pd-30w) -- 一个 M.2 NVME 固态硬盘 -- NVME 转 USB3.0 读卡器或带 NVME 插槽的 PC -- SD 卡或 eMMC 模块 - -### 将 Debian Linux 镜像安装到 SD 卡或 eMMC 模块中 - -请参考[SD 卡/eMMC 系统安装指南](../getting-started/install-os) 将系统安装到 SD 卡/eMMC。 - -### 从连接有 NVME 固态硬盘的 ROCK 5B 上的 SD 卡或 eMMC 模块启动 - -### 在 ROCK 5B 上运行 Debian 时,下载 ROCK 5B 镜像 - -### 检查是否检测到 NVME 固态硬盘 - -在 ROCK 5B 上 - -``` -sudo fdisk -l -``` - -你可以看到这样的输出信息: - -``` -Disk /dev/nvme0n1: 232.9 GiB, 250059350016 bytes, 488397168 sectors #The '/dev/nvme0n1' is your NVME SSD devicpath -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / 512 bytes -``` - -#### 写镜像 - -在 ROCK 5B 上: - -``` -sudo sudo xzcat 'your compressed image path' | dd of='your NVME SSD device path' bs=1M status=progress -#例如: sudo xzcat rock-5b-debian-bullseye-xfce4-arm64-20220906-0626-gpt.img.xz | dd of=/dev/nvme0n1 bs=1M status=progress -``` - -## 方案 3:擦除 M.2 NVME 固态硬盘 - -当 M.2 NVME 固态硬盘之前使用安卓(或Linux)镜像写入时,现在我们改用Linux(或安卓)。建议先擦除 M.2 NVME SSD。然后写入目标镜像。 - -## 从 NVME 固态硬盘启动 - -将镜像写入 NVME SSD 后,要从 NVME SSD 启动,需要将引导加载程序写入 SPI 闪存。选中[安装到 SPI 以从 NVME SSD 启动](./bootloader_spi_flash)。 + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_nvme.mdx b/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_nvme.mdx new file mode 100644 index 000000000..995e0144c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_nvme.mdx @@ -0,0 +1,90 @@ +import { Image } from "@site/src/utils/docs"; +import { PreView } from "@site/src/utils/docs"; + +### Overall steps: + +- Prepare an SD card or eMMC Module as a boot disk. + +- Use the system utility rsetup to flash the SPI. + +- Flush the system image to the NVME SSD. + +- Unplug the SD card/eMMC Module and boot from NVME. + +### Prepare an SD card or eMMC Module as a boot disk. + +Refer to the Installing the OS section to install the system on the SD card/eMMC Module. + +Here the SD card/eMMC Module acts as a boot disk for x86, the purpose is to get the spi.img, and flush the spi.img to the spi flash. + +After booting from the SD card/eMMC Module, execute the following command to update the system. + +``` +sudo apt-get update +sudo apt-get full-upgrade +``` + +### Use the system utility rsetup to flush the SPI. + +system maintenance + +update spi bootloader + + + +writing to mtd + +success + +### Flashing the system image to the NVME SSD + +Verify that NVME is recognized by the system. + + + {` + radxa@#model#:~$ lsblk + NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT + mmcblk0 179:0 0 14.5G 0 disk + ├─mmcblk0p1 179:1 0 16M 0 part /config + └─mmcblk0p2 179:2 0 14.4G 0 part /config + mmcblk0boot0 179:32 0 4M 1 disk + mmcblk0boot1 179:64 0 4M 1 disk + zram0 254:0 0 3.8G 0 disk [SWAP] + nvme0n1 259:0 0 238.5G 0 disk + `} + + +As shown above the system has recognized the NVME SSD as nvme0n1. + +Copy the system image to the current system. + + + {` + PC Host: scp /path/to/img radxa@boardIP:/home/radxa/ + Example: + scp ~/Download/#model#_debian_bullseye_xfce_#release_num#.img.xz radxa@192.168.2.66:/home/xxa/ + `} + + +Then dd the system image into NVME on the **board**. + + + sudo xzcat /home/radxa/#model#_debian_bullseye_xfce_#release_num#.img.xz | dd + of=/dev/nvme0n1 bs=1M status=progress + + +### Unplug SD card/eMMC Module, boot from NVME diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock3/rock3c/low-level-dev/install-os-on-nvme.md b/i18n/en/docusaurus-plugin-content-docs/current/rock3/rock3c/low-level-dev/install-os-on-nvme.md new file mode 100644 index 000000000..05ddbb160 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock3/rock3c/low-level-dev/install-os-on-nvme.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 22 +--- + +# Boot the system from NVME + +import NVME from '../../../common/dev/\_nvme.mdx' + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5b/low-level-dev/install-os-on-nvme.md b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5b/low-level-dev/install-os-on-nvme.md index 6faf8f5e6..f701085ae 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5b/low-level-dev/install-os-on-nvme.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5b/low-level-dev/install-os-on-nvme.md @@ -2,75 +2,8 @@ sidebar_position: 22 --- -import Etcher from '../../../common/general/\_etcher.mdx' +# Boot the system from NVME -# Install the system to NVME SSD +import NVME from '../../../common/dev/\_nvme.mdx' -## Option 1: with NVME to USB3.0 reader or PC with NVME slot - -### Preparation - -- ROCK 5B main board -- 1x 5V power adapter (recommended [Radxa Power PD30W](../accessories/pd-30w)) -- One M.2 NVME SSD -- NVME to USB3.0 reader or a PC with NVME slot - -### Image Download - -Please go to [Resource Download Summary](/rock5/rock5b/getting-started/download.md) to download the corresponding image file. - -### Write the image to M.2 NVME SSD with etcher - - - -## Option 2: Write to NVME SSD on ROCK 5B - -### Preparation - -- ROCK 5B main board -- 1x 5V power adapter (recommended [Radxa Power PD30W](../accessories/pd-30w)) -- One M.2 NVME SSD -- NVME to USB3.0 reader or a PC with NVME slot -- SD card or eMMC module - -### Install Debian Linux image to SD card or eMMC module - -Please refer to the [System Installation Guide for SD Card/eMMC](../getting-started/install-os) to install the system to SD Card/eMMC. - -### Boot from SD card or eMMC module on ROCK 5B with NVME SSD attached - -### Download the ROCK 5B image when running Debian on ROCK 5B - -### Check if NVME SSD is detected - -On ROCK 5B: - -``` -sudo fdisk -l -``` - -You can see the output message just like this: - -``` -Disk /dev/nvme0n1: 232.9 GiB, 250059350016 bytes, 488397168 sectors #The '/dev/nvme0n1' is your NVME SSD devicpath -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / 512 bytes -``` - -### Write Image - -On ROCK 5B: - -``` -sudo sudo xzcat 'your compressed image path' | dd of='your NVME SSD device path' bs=1M status=progress -#such as: sudo xzcat rock-5b-debian-bullseye-xfce4-arm64-20220906-0626-gpt.img.xz | dd of=/dev/nvme0n1 bs=1M status=progress -``` - -## Option 3: Erase M.2 NVME SSD - -When M.2 NVME SSD is written with Android (or Linux) images before, now we change to Linux (or Android). It's recommended that you erase M.2 NVME SSD first. Then write the target images. - -## Boot from NVME SSD - -After you write the image to NVME SSD, to boot from the NVME SSD, you need to write the bootloader to SPI flash. Check [Install to SPI to boot from NVME SSD](./bootloader_spi_flash). + diff --git a/static/img/common/nvme/rsetup-select-bootloader-rock-3c.webp b/static/img/common/nvme/rsetup-select-bootloader-rock-3c.webp new file mode 100644 index 000000000..b27c28ff5 Binary files /dev/null and b/static/img/common/nvme/rsetup-select-bootloader-rock-3c.webp differ diff --git a/static/img/common/nvme/rsetup-select-bootloader-rock-5b.webp b/static/img/common/nvme/rsetup-select-bootloader-rock-5b.webp new file mode 100644 index 000000000..4ffa3bdc4 Binary files /dev/null and b/static/img/common/nvme/rsetup-select-bootloader-rock-5b.webp differ diff --git a/static/img/common/nvme/success.webp b/static/img/common/nvme/success.webp new file mode 100644 index 000000000..124e9f541 Binary files /dev/null and b/static/img/common/nvme/success.webp differ diff --git a/static/img/common/nvme/system_maintenance.webp b/static/img/common/nvme/system_maintenance.webp new file mode 100644 index 000000000..d3a73a300 Binary files /dev/null and b/static/img/common/nvme/system_maintenance.webp differ diff --git a/static/img/common/nvme/update_spi_bootloader.webp b/static/img/common/nvme/update_spi_bootloader.webp new file mode 100644 index 000000000..71129b45a Binary files /dev/null and b/static/img/common/nvme/update_spi_bootloader.webp differ diff --git a/static/img/common/nvme/writing_mtd.webp b/static/img/common/nvme/writing_mtd.webp new file mode 100644 index 000000000..5247165f7 Binary files /dev/null and b/static/img/common/nvme/writing_mtd.webp differ