Hi everyone,
I’m trying to handle the mounting of a NTFS usb key in Torizon OS. Current setup:
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 5.15.148-6.6.0-devel-6.6.0-devel+git.23a8e831749d #1-TorizonCore SMP PREEMPT Thu Feb 29 20:25:21 UTC 2024
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/cc0ef91894079e4feee54bcbbd00fa84f6a72325a6ce51d9ba99437ab56b6a94/0
Distro name: NAME="TorizonCore"
Distro version: VERSION_ID=6.6.0-devel-20240313-build.529
Distro variant: VARIANT="Docker"
Hostname: verdin-imx8mp-15128331
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin iMX8M Plus WB on Yavia Board
Toradex version: 0064 V1.1A
Serial number: 15128331
Processor arch: aarch64
------------------------------------------------------------
When I plug a fat
usb key, it is correctly recognized and auto-mounted under /media
.
Output of lsblk
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 28.6G 0 disk
`-sda1 8:1 1 28.6G 0 part /var/rootdirs/media/UBUNTU 18_0
mmcblk2 179:0 0 14.6G 0 disk
`-mmcblk2p1 179:1 0 14.6G 0 part /var
/usr
/boot
/
/sysroot
mmcblk2boot0 179:32 0 4M 1 disk
mmcblk2boot1 179:64 0 4M 1 disk
zram0 253:0 0 0B 0 disk
In this case, I can read and write my /media/UBUNTU\ 18_0/
directory
When I plug a NTFS usb I see these messages in dmsg
:
[ 3664.893749] usb 1-1.1: new high-speed USB device number 6 using xhci-hcd
[ 3665.029549] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[ 3665.030994] scsi host0: usb-storage 1-1.1:1.0
[ 3666.076037] scsi 0:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[ 3666.077633] sd 0:0:0:0: [sda] 120176640 512-byte logical blocks: (61.5 GB/57.3 GiB)
[ 3666.079063] sd 0:0:0:0: [sda] Write Protect is off
[ 3666.079080] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 3666.079432] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 3666.087797] sda: sda1
[ 3666.090468] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 3666.370180] ntfs: driver 2.1.32 [Flags: R/W MODULE].
[ 3666.371679] ntfs: (device sda1): parse_options(): Unrecognized mount option windows_names.
and the Usb is not auto-mounted:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 57.3G 0 disk
`-sda1 8:1 1 57.3G 0 part
mmcblk2 179:0 0 14.6G 0 disk
`-mmcblk2p1 179:1 0 14.6G 0 part /var
/usr
/boot
/
/sysroot
mmcblk2boot0 179:32 0 4M 1 disk
mmcblk2boot1 179:64 0 4M 1 disk
zram0 253:0 0 0B 0 disk
If I manually mount it via sudo mount /dev/sda1 /media/ntfs-usb
, I can access the usb under /media/ntfs-usb
, I can read from it but I cannot write; a write operation throws Read-only file system
Searching online and in the forum seems that ntfs-3g
is required to mount read/write a NTFS usb. However, I find no way to add it in Torizon OS.
My final goal is to access the mounted usb in a container but following this topic, I was able to access all directories mounted in /media
so my problem here is how to access with write access a NTFS usb.
thanks in advance