图为T600工控机系统ubuntu18.04升级到20.04流程

设备准备

x86架构主机,需要主板带usb3.0接口,安装ubuntu20.04系统
图为T600工控机(被升级)
usb3.0 A to C 线

该款工控机主控为Jetson AGX Xavier Module,因此刷机过程参考NVIDIA Jetson嵌入式开发板通用刷机教程

安装过程

升级包准备

工控机厂家版本

工控机厂家售后提供的升级包下载链接,解压后务必检查system.img是否存在

通过百度网盘分享的文件:T600_JP5.1GA
链接:https://pan.baidu.com/s/1fB0gPq3kC2Xwy4VbIH-ASw?pwd=eb3e 
提取码:eb3e 
--来自百度网盘超级会员V6的分享

包含四个拆分的压缩包,需要进行合并再解压

把网盘文件下载到X86主机电脑上,建议使用物理机,空间预留60G 以上。

合并解压文件(不要再外部移动储存介质上进行,如U盘):

$cat T600_JP5.1GA.tar.gz* >  T600_JP5.1GA.tar.gz
$sudo tar -zxvf  T600_JP5.1GA.tar.gz

使设备进入刷机模式,USB线连接电脑和T600,在T506S上按键《按住REC不放,再按RES,再依次松开RES 、REC》:
lsusb显示 APX Corp 表示已经进入recovery了,需要确保进入刷机模式再执行下面的操作!
$cd  T600_JP5.1GA/
$sudo  ./xavier.t600.v1.3.flash.sh

nvidia官方版本

获取nvidia官方刷机包,也可以提前用网页先下载好,指令中注意修改名称
应得到两个文件,Jetson_Linux_R35.2.1_aarch64.tbz2Tegra_Linux_Sample-Root-Filesystem_R35.2.1_aarch64.tbz2

mkdir T600_JP5.1

cd T600_JP5.1/

wget https://developer.nvidia.com/downloads/jetson-linux-r3521-aarch64tbz2

wget https://developer.nvidia.com/downloads/linux-sample-root-filesystem-r3521aarch64tbz2

tar xf Jetson_Linux_R35.2.1_aarch64.tbz2

sudo tar xf Tegra_Linux_Sample-Root-Filesystem_R35.2.1_aarch64.tbz2 -C Linux_for_Tegra/rootfs/

连接检查

usb3.0 A to C 线 A口连接x86主机,C口连接工控机前面OTG接口
按下REC,按下RES,2秒后松开RES,再松开REC,(右左左右)进入刷机模式,此时x86主机打开terminal输入lsusb应该显示有Nvidia Corp .APX
进入刷机模式后,

补充依赖项并执行安装

cd Linux_for_Tegra/

sudo ./tools/l4t_flash_prerequisites.sh

sudo ./apply_binaries.sh

上述每个步骤执行顺序不可替换,如果缺少组件将会出现文本提示安装,两个文件具体内容如下

./tools/l4t_flash_prerequisites.sh
#!/bin/bash

# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
#    contributors may be used to endorse or promote products derived from
#    this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

sudo apt-get update && \
sudo apt-get install -y abootimg \
			binfmt-support \
			binutils \
			cpp \
			device-tree-compiler \
			dosfstools \
			lbzip2 \
			libxml2-utils \
			nfs-kernel-server \
			python \
			python3-yaml \
			qemu-user-static \
			sshpass \
			udev \
			uuid-runtime \
			whois \
			openssl \
			cpio

# Install lz4c utility required for compressing bpmp-fw-dtb.
# For Ubuntu 18.04 and older version, run "sudo apt-get install liblz4-tool".
# For Ubuntu 20.04 and newer version, run "sudo apt-get install lz4".
SYSTEM_VER="$(grep "DISTRIB_RELEASE" </etc/lsb-release | cut -d= -f 2 | sed 's/\.//')"
if [ "${SYSTEM_VER}" -lt 2004 ]; then
	sudo apt-get install -y liblz4-tool
else
	sudo apt-get install -y lz4
fi

./apply_binaries.sh
#!/bin/bash

# Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#  * Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#  * Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#  * Neither the name of NVIDIA CORPORATION nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#
# This script applies the binaries to the rootfs dir pointed to by
# LDK_ROOTFS_DIR variable.
#

set -e

# show the usages text
function ShowUsage {
    local ScriptName=$1

    echo "Use: $1 [--bsp|-b PATH] [--root|-r PATH] [--target-overlay] [--help|-h]"
cat <<EOF
    This script installs tegra binaries
    Options are:
    --bsp|-b PATH
                   bsp location (bsp, readme, installer)
    --dgpu
                   only install packages that are suitable for dGPU use
    --root|-r PATH
                   install toolchain to PATH
    --rootless
                   don't require root privilege
    --target-overlay|-t
                   untar NVIDIA target overlay (.tbz2) instead of
				   pre-installing them as Debian packages
    --help|-h
                   show this help
EOF
}

function ShowDebug {
    echo "SCRIPT_NAME     : $SCRIPT_NAME"
    echo "DEB_SCRIPT_NAME : $DEB_SCRIPT_NAME"
    echo "LDK_ROOTFS_DIR  : $LDK_ROOTFS_DIR"
    echo "BOARD_NAME      : $TARGET_BOARD"
}

function ReplaceText {
	sed -i "s/$2/$3/" $1
	if [ $? -ne 0 ]; then
		echo "Error while editing a file. Exiting !!"
		exit 1
	fi
}

function AddSystemGroup {
	# add $1 as a system group and search unused gid decreasingly from
	# SYS_GID_MAX to SYS_GID_MIN
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	if [ -z $(grep "^${1}:" ./etc/group) ]; then
		gids=($(cut -d: -f3 ./etc/group))
		for gid in {999..100}; do
			if [[ ! " ${gids[*]} " =~ " ${gid} " ]]; then
				echo "${1}:x:${gid}:" >> ./etc/group
				echo "${1}:!::" >> ./etc/gshadow
				break
			fi
		done
	fi
	popd > /dev/null 2>&1
}

# script name
SCRIPT_NAME=`basename $0`

# apply .deb script name
DEB_SCRIPT_NAME="nv-apply-debs.sh"

# empty root and no debug
DEBUG=

# flag used to switch between legacy overlay packages and debians
# default is debians, but can be switched to overlay by setting to "true"
USE_TARGET_OVERLAY_DEFAULT=

# parse the command line first
TGETOPT=`getopt -n "$SCRIPT_NAME" --longoptions help,bsp:,debug,dgpu,target-overlay,root:,rootless -o b:dhr:b:t: -- "$@"`

if [ $? != 0 ]; then
    echo "Terminating... wrong switch"
    ShowUsage "$SCRIPT_NAME"
    exit 1
fi

eval set -- "$TGETOPT"

while [ $# -gt 0 ]; do
    case "$1" in
	--dgpu) DGPU="true" ;;
	-r|--root) LDK_ROOTFS_DIR="$2"; shift ;;
	-h|--help) ShowUsage "$SCRIPT_NAME"; exit 1 ;;
	-d|--debug) DEBUG="true" ;;
	-t|--target-overlay) TARGET_OVERLAY="true" ;;
	-b|--bsp) BSP_LOCATION_DIR="$2"; shift ;;
	--rootless) ROOTLESS="true" ;;
	--) shift; break ;;
	-*) echo "Terminating... wrong switch: $@" >&2 ; ShowUsage "$SCRIPT_NAME"; exit 1 ;;
    esac
    shift
done

if [ $# -gt 0 ]; then
    ShowUsage "$SCRIPT_NAME"
    exit 1
fi

if [ "${ROOTLESS}" == "true" ]; then
    INSTALL_ROOT_OPTS=""
    FIND_ROOT_OPTS=""
else
    INSTALL_ROOT_OPTS="--owner=root --group=root"
    FIND_ROOT_OPTS="-user root -group root"

    # if the user is not root, there is not point in going forward
    if [ $(id -u) -ne 0 ]; then
        echo "This script requires root privilege"
        exit 1
    fi
fi

# done, now do the work, save the directory
LDK_DIR=$(cd `dirname $0` && pwd)

# use default rootfs dir if none is set
if [ -z "$LDK_ROOTFS_DIR" ]; then
    LDK_ROOTFS_DIR="${LDK_DIR}/rootfs"
fi

echo "Using rootfs directory of: ${LDK_ROOTFS_DIR}"

install ${INSTALL_ROOT_OPTS} -m 0755 -d "${LDK_ROOTFS_DIR}"

# get the absolute path, for LDK_ROOTFS_DIR.
# otherwise, tar behaviour is unknown in last command sets
TOP=$PWD
cd "${LDK_ROOTFS_DIR}"
LDK_ROOTFS_DIR="$PWD"
cd "$TOP"

if [ ! `find "$LDK_ROOTFS_DIR/etc/passwd" ${FIND_ROOT_OPTS}` ]; then
	echo "||||||||||||||||||||||| ERROR |||||||||||||||||||||||"
	echo "-----------------------------------------------------"
	echo "1. The root filesystem, provided with this package,"
	echo "   has to be extracted to this directory:"
	echo "   ${LDK_ROOTFS_DIR}"
	echo "-----------------------------------------------------"
	echo "2. The root filesystem, provided with this package,"
	echo "   has to be extracted with 'sudo' to this directory:"
	echo "   ${LDK_ROOTFS_DIR}"
	echo "-----------------------------------------------------"
	echo "Consult the Development Guide for instructions on"
	echo "extracting and flashing your device."
	echo "|||||||||||||||||||||||||||||||||||||||||||||||||||||"
	exit 1
fi

# assumption: this script is part of the BSP
#             so, LDK_DIR/nv_tegra always exist
LDK_NV_TEGRA_DIR="${LDK_DIR}/nv_tegra"
LDK_KERN_DIR="${LDK_DIR}/kernel"
LDK_TOOLS_DIR="${LDK_DIR}/tools"
LDK_BOOTLOADER_DIR="${LDK_DIR}/bootloader"
DEB_EXTRACTOR="${LDK_TOOLS_DIR}/l4t_extract_deb.sh"

if [ "${DEBUG}" == "true" ]; then
	START_TIME=$(date +%s)
fi

if [ -f "${LDK_BOOTLOADER_DIR}/extlinux.conf" ]; then
	echo "Installing extlinux.conf into /boot/extlinux in target rootfs"
	mkdir -p "${LDK_ROOTFS_DIR}/boot/extlinux/"
	install ${INSTALL_ROOT_OPTS} --mode=644 -D "${LDK_BOOTLOADER_DIR}/extlinux.conf" "${LDK_ROOTFS_DIR}/boot/extlinux/"
fi

TAR_ROOTFS_DIR_OPTS="--keep-directory-symlink -I lbzip2 -xpmf"

if [ "${TARGET_OVERLAY}" != "true" ] &&
	[ "${USE_TARGET_OVERLAY_DEFAULT}" != "true" ]; then
	if [ ! -f "${LDK_NV_TEGRA_DIR}/${DEB_SCRIPT_NAME}" ]; then
		echo "Debian script ${DEB_SCRIPT_NAME} not found"
		exit 1
	fi
	if [ "${DGPU}" == "true" ]; then
		DGPU_OPTIONS="--dgpu"
	fi
	echo "${LDK_NV_TEGRA_DIR}/${DEB_SCRIPT_NAME}";
	eval "${LDK_NV_TEGRA_DIR}/${DEB_SCRIPT_NAME} -r ${LDK_ROOTFS_DIR}" ${DGPU_OPTIONS};
else
	# --dgpu option is not supported with "tar" installation and it is
	# only applicable for "debian" installation.
	if [ "${DGPU}" == "true" ]; then
		echo "Error: --dgpu option is not supported with tar installation"
		exit 1
	fi
	# install standalone debian packages by extracting and dumping them
	# into the rootfs directly for .tbz2 install flow
	pushd "${LDK_TOOLS_DIR}" > /dev/null 2>&1
	debs=($(ls *.deb))
	for deb in "${debs[@]}"; do
		"${DEB_EXTRACTOR}" --dir="${LDK_ROOTFS_DIR}" "${deb}"
	done
	popd > /dev/null 2>&1

	AddSystemGroup gpio
	AddSystemGroup crypto
	AddSystemGroup trusty

	echo "Extracting the NVIDIA user space components to ${LDK_ROOTFS_DIR}"
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_NV_TEGRA_DIR}/nvidia_drivers.tbz2"
	popd > /dev/null 2>&1

	echo "Extracting the BSP test tools to ${LDK_ROOTFS_DIR}"
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_NV_TEGRA_DIR}/nv_tools.tbz2"
	popd > /dev/null 2>&1

	echo "Extracting the OP-TEE target files to ${LDK_ROOTFS_DIR}"
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_NV_TEGRA_DIR}/nv_optee.tbz2"
	popd > /dev/null 2>&1

	echo "Extracting the NVIDIA gst test applications to ${LDK_ROOTFS_DIR}"
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_NV_TEGRA_DIR}/nv_sample_apps/nvgstapps.tbz2"
	popd > /dev/null 2>&1

	echo "Extracting Weston to ${LDK_ROOTFS_DIR}"
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_NV_TEGRA_DIR}/weston.tbz2"
	popd > /dev/null 2>&1

	echo "Extracting the configuration files for the supplied root filesystem to ${LDK_ROOTFS_DIR}"
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_NV_TEGRA_DIR}/config.tbz2"
	popd > /dev/null 2>&1

	echo "Extracting graphics_demos to ${LDK_ROOTFS_DIR}"
	pushd "${LDK_ROOTFS_DIR}" > /dev/null 2>&1
	tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_NV_TEGRA_DIR}/graphics_demos.tbz2"
	popd > /dev/null 2>&1

	echo "Extracting the firmwares and kernel modules to ${LDK_ROOTFS_DIR}"
	( cd "${LDK_ROOTFS_DIR}" ; tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_KERN_DIR}/kernel_supplements.tbz2" )

	if [ -f "${LDK_KERN_DIR}/kernel_display_supplements.tbz2" ]; then
		echo "Extracting display kernel modules to ${LDK_ROOTFS_DIR}"
		( cd "${LDK_ROOTFS_DIR}" ; tar ${TAR_ROOTFS_DIR_OPTS} "${LDK_KERN_DIR}/kernel_display_supplements.tbz2" )
	fi

	echo "Extracting the kernel headers to ${LDK_ROOTFS_DIR}/usr/src"
	# The kernel headers package can be used on the target device as well as on another host.
	# When used on the target, it should go into /usr/src and owned by root.
	# Note that there are multiple linux-headers-* directories; one for use on an
	# x86-64 Linux host and one for use on the L4T target.
	EXTMOD_DIR=ubuntu20.04_aarch64
	KERNEL_HEADERS_A64_DIR="$(tar tf "${LDK_KERN_DIR}/kernel_headers.tbz2" | grep "${EXTMOD_DIR}" | head -1 | cut -d/ -f1)"
	KERNEL_VERSION="$(echo "${KERNEL_HEADERS_A64_DIR}" | sed -e "s/linux-headers-//" -e "s/-${EXTMOD_DIR}//")"
	KERNEL_SUBDIR="kernel-$(echo "${KERNEL_VERSION}" | cut -d. -f1-2)"
	install ${INSTALL_ROOT_OPTS} -m 0755 -d "${LDK_ROOTFS_DIR}/usr/src"
	pushd "${LDK_ROOTFS_DIR}/usr/src" > /dev/null 2>&1
	# This tar is packaged for the host (all files 666, dirs 777) so that when
	# extracted on the host, the user's umask controls the permissions.
	# However, we're now installing it into the rootfs, and hence need to
	# explicitly set and use the umask to achieve the desired permissions.
	(umask 022 && tar -I lbzip2 --no-same-permissions -xmf "${LDK_KERN_DIR}/kernel_headers.tbz2")
	if [ "${ROOTLESS}" != "true" ]; then
		chown -R root:root linux-headers-*
	fi
	# Link to the kernel headers from /lib/modules/<version>/build
	if [ ! -d "${LDK_ROOTFS_DIR}/usr/src/${KERNEL_HEADERS_A64_DIR}/${KERNEL_SUBDIR}" ] && \
			[ -d "${LDK_ROOTFS_DIR}/usr/src/${KERNEL_HEADERS_A64_DIR}/stable" ]; then
		KERNEL_SUBDIR=stable
	fi
	KERNEL_MODULES_DIR="${LDK_ROOTFS_DIR}/lib/modules/${KERNEL_VERSION}"
	if [ -d "${KERNEL_MODULES_DIR}" ]; then
		echo "Adding symlink ${KERNEL_MODULES_DIR}/build --> /usr/src/${KERNEL_HEADERS_A64_DIR}/${KERNEL_SUBDIR}"
		[ -h "${KERNEL_MODULES_DIR}/build" ] && unlink "${KERNEL_MODULES_DIR}/build" && rm -f "${KERNEL_MODULES_DIR}/build"
		[ ! -h "${KERNEL_MODULES_DIR}/build" ] && ln -s "/usr/src/${KERNEL_HEADERS_A64_DIR}/${KERNEL_SUBDIR}" "${KERNEL_MODULES_DIR}/build"
	fi
	popd > /dev/null

	# Copy kernel related files to rootfs
	"${LDK_DIR}/nv_tools/scripts/nv_apply_kernel_files.sh" "${LDK_KERN_DIR}" \
		"${LDK_ROOTFS_DIR}" "${INSTALL_ROOT_OPTS}"
fi

# Customize rootfs
"${LDK_DIR}/nv_tools/scripts/nv_customize_rootfs.sh" "${LDK_ROOTFS_DIR}"

if [ "${DEBUG}" == "true" ]; then
	END_TIME=$(date +%s)
	TOTAL_TIME=$((${END_TIME}-${START_TIME}))
	echo "Time for applying binaries - $(date -d@${TOTAL_TIME} -u +%H:%M:%S)"
fi
echo "Success!"

依次执行成功过后,系统会出现如下提示,表示Jetson系统刷机环境搭建成功。

L4T BSP package installation completed!
Disabling NetworkManager-wait-online.service
Disable the ondemand service by changing the runlevels to ‘K’
Success!

执行安装语句,等待解包并发送完成

sudo ./flash.sh jetson-xavier mmcblk0p1

x86主机端操作结束后画面
2026-06-20 20-56-24屏幕截图

系统配置

工控机部分升级后重启,配置系统内容(和ubuntu一般安装流程一样),需要联网(wifi和有线网络均可)
如果系统没有问题,会自行重启并进入系统界面,升级完成

2026-06-21 15-14-23屏幕截图

异常解决(仅供参考)

以下为刷机包内容不正常使得系统完成配置后无法自主关机或重启的解决措施,使用agent辅助调试完成,不代表标准操作。

点击查看详细信息
修复日期:2026-06-20  
设备主机名:`nvidia-desktop`  
系统版本:Ubuntu 20.04.5 LTS / Jetson Linux R35.2.1  
修复后可用 IP:`192.168.1.134`、`192.168.1.132`  
账户:`nvidia`  

1. 问题现象
设备刷机并完成账户初始化后,进入桌面仍然像没有初始化完成:

  • 屏幕停在 Ubuntu/NVIDIA 桌面或初始化界面。
  • 桌面看起来空荡荡,部分按钮或关机菜单无响应。
  • RES 重启后,又回到系统配置/初始化流程。
  • 一开始无法通过 SSH 连接设备。

2. 根因
这次的实际根因不是刷机失败,也不是 Ubuntu 20.04 不能用,而是系统仍然停留在 NVIDIA 的 OEM 首次启动配置模式。
也就是说,NVIDIA OEM 初始化流程已经创建了 nvidia 用户,但收尾脚本没有成功把系统切回正常图形桌面目标,导致每次启动都会继续跑初始化链路。
另外还有两个伴随问题:

  • SSH 服务最初启动失败,需要生成 SSH host key 并创建 /run/sshd
  • 切回正常 GDM 桌面后,GNOME 自己的 gnome-initial-setup 首次登录向导又弹出,需要标记为已完成。

3. 本机屏幕上先恢复 SSH

如果设备还不能远程连接,先在设备屏幕上按 Ctrl + Alt + T 打开终端。

如果已经是 root 提示符,直接执行:

ssh-keygen -A
mkdir -p /run/sshd
chmod 755 /run/sshd
systemctl restart ssh
systemctl status ssh --no-pager -l
hostname -I

如果是 nvidia 普通用户提示符,执行:

sudo ssh-keygen -A
sudo mkdir -p /run/sshd
sudo chmod 755 /run/sshd
sudo systemctl restart ssh
sudo systemctl status ssh --no-pager -l
hostname -I

注意最后一条是:

hostname -I

hostname-I 中间有空格,I 是大写 i。

看到 IP 后,就可以从同一局域网电脑 SSH:

ssh nvidia@192.168.1.134

或:

ssh nvidia@192.168.1.132

4. 远程修复 OEM 初始化卡住

SSH 进入设备后执行以下命令。

sudo systemctl stop nv-oem-config-gui.service nv-oem-config.service || true
sudo systemctl disable nv-oem-config.service nv-oem-config-gui.service || true
sudo systemctl disable nv-oem-config.target || true

sudo rm -f /var/lib/oem-config/run
sudo rm -f /etc/systemd/system/nv-oem-config.target.wants/nv-oem-config.service
sudo rm -f /etc/systemd/system/default.target
sudo ln -s /lib/systemd/system/graphical.target /etc/systemd/system/default.target

sudo systemctl set-default graphical.target

sudo systemctl disable ubiquity.service || true
sudo rm -f /etc/systemd/system/graphical.target.wants/ubiquity.service

sudo systemctl enable ssh.service
sudo ssh-keygen -A
sudo mkdir -p /run/sshd
sudo chmod 755 /run/sshd

sudo systemctl daemon-reload
sudo systemctl reset-failed nv-oem-config.service nv-oem-config-gui.service fwupd-refresh.service || true
sudo systemctl start ssh.service
sudo systemctl restart gdm3.service

5. 禁用 GNOME 首次登录向导

切回正常桌面后,如果出现 Welcome to UbuntuOnline Accounts 等 GNOME 初始设置窗口,执行:

mkdir -p /home/nvidia/.config/autostart

printf 'yes\n' > /home/nvidia/.config/gnome-initial-setup-done

cat > /home/nvidia/.config/autostart/gnome-initial-setup-first-login.desktop <<'EOF'
[Desktop Entry]
Type=Application
Name=GNOME Initial Setup
Hidden=true
EOF

cat > /home/nvidia/.config/autostart/gnome-initial-setup-copy-worker.desktop <<'EOF'
[Desktop Entry]
Type=Application
Name=GNOME Initial Setup Copy Worker
Hidden=true
EOF

chmod 600 /home/nvidia/.config/gnome-initial-setup-done
pkill -x gnome-initial-setup 2>/dev/null || true

6. 固定小屏幕桌面体验

本设备实际小屏幕识别为:

HDMI-0 1024x600

可用以下命令确认:

DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority xrandr --query

为了让左侧 Dock 一直可见,执行:

export DISPLAY=:0
export XAUTHORITY=/run/user/1000/gdm/Xauthority
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true
gsettings set org.gnome.shell.extensions.dash-to-dock autohide false
gsettings set org.gnome.shell.extensions.dash-to-dock intellihide false
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position 'LEFT'
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height true
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 36

7. 重启验证

执行:

sudo reboot

重启后重新 SSH 进入,验证:

hostname
cat /etc/nv_tegra_release
systemctl get-default
systemctl is-active gdm3
systemctl is-active ssh
systemctl --failed --no-pager
ps -eo pid,user,comm,args | egrep -i 'gnome-initial|oem|ubiquity|ToDesk'
DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority xrandr --query

期望结果:

systemctl get-default -> graphical.target
gdm3 -> active
ssh -> active
failed services -> 0 loaded units listed
gnome-initial/oem/ubiquity/ToDesk -> 不应有有效进程
xrandr -> HDMI-0 connected primary 1024x600

8. 接口注意事项

TW-T600 的两个 Type-C 口含义不同:

  • DEBUG Type-C:调试串口,Windows 会显示类似 Silicon Labs CP210x USB to UART Bridge (COM10)
  • OTG Type-C:USB 数据/刷机/设备模式接口,正常系统下可能出现 192.168.55.1 USB 网卡。

只看到 COM10 说明接到了 DEBUG 串口,这不能直接用于 SSH 或文件系统操作。

刷机 Recovery 模式进入方式:

  1. OTG 口连接主机 USB 3.0。
  2. 按住 REC
  3. 再按 RES 约 2 秒。
  4. 松开 RES
  5. 再松开 REC
  6. 主机侧 lsusb 应看到 NVIDIA 设备。

注意:Recovery 模式下系统不会正常启动,也不会有普通桌面。

posted on 2026-06-21 14:56  fmix  阅读(33)  评论(0)    收藏  举报

导航