Omitting l4t name after connecting via USB to a host machine

I’m going to add this since others might be interested in details. Note that dosfslabel is a symbolic link to fatlabel. The two are interchangeable.


Some of the drive name is determined by the partition, and sometimes by the host using it. However, if you examine this command’s output on the running Jetson, then you’ll see the partition labels (not all have a label):
lsblk -f

Note that the loopback partition is a loop device, usually loop0 (the first loop device; the number increments after first use if a new loop device is added prior to the old one being recycled). One one TX2 I see this:

NAME         FSTYPE LABEL      UUID                                 MOUNTPOINT
loop0        vfat   L4T-README 3D81-AAFA              

For the label on the host using the device, do you see its label as “L4T-README”? If so, then this is part of the partition itself (following the rules for a VFAT partition type; sometimes you’ll see it as FAT32).

There is a tool called “fatlabel” for VFAT partition label manipulation. Check “which fatlabel”. If you don’t have this, then:
sudo apt-get install dosfstools

I’m not actually changing the label on my system, but most likely you cannot change the label when the partition is mounted or in use. So first:
sudo systemctl stop nv-l4t-usb-device-mode.service

You’ll see the loop0 device disappear. Now you’ll cover it with a loopback device again:
sudo losetup -f --show /opt/nvidia/l4t-usb-device-mode/filesystem.img

You’ll see it is now “loop0” (it could be loop1, doesn’t matter, but use whatever it shows up as).

Verify the device exists again with “lsblk -f”. You should see it as “loop0”, and no mount point. Since it is no longer in use by the USB device mode, and not mounted, ordinary partition tools should work on “/dev/loop0”.

You can query the current label without changing it:
sudo fatlabel /dev/loop0

I didn’t actually change mine, but you could give it a new label within the bounds of VFAT label conventions, e.g.:
sudo fatlabel /dev/loop0 JETSON
(then verify it with just “sudo fatlabel /devloop0”)

Once done you can either reboot, or detach the loopback device and restart the service:

sudo losetup -d /dev/loop0
sudo systemctl start nv-l4t-usb-device-mode.service