From nobody Thu Jan 11 00:42:15 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9QrB5H4qz56cR3 for ; Thu, 11 Jan 2024 00:43:06 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9QrB0PBKz4K2y for ; Thu, 11 Jan 2024 00:43:05 +0000 (UTC) (envelope-from freebsd@edvax.de) Authentication-Results: mx1.freebsd.org; none Received: from terra.edvax.de ([178.12.45.217]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1M8yso-1rHfP81YZS-0065AQ; Thu, 11 Jan 2024 01:42:28 +0100 Received: from r56.edvax.de (r56 [10.200.1.11]) (authenticated bits=0) by terra.edvax.de (8.17.1/8.17.1) with ESMTPA id 40B0gKTI008207; Thu, 11 Jan 2024 01:42:20 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 11 Jan 2024 01:42:15 +0100 From: Polytropon To: freebsd@dreamchaser.org Cc: Souji Thenria , FreeBSD Mailing List Subject: Re: Problem mounting new Sandisk 1TB USB drive Message-Id: <20240111014215.d25a19f3.freebsd@edvax.de> In-Reply-To: <1d60d68a-3569-4054-a460-41c5dd422a42@dreamchaser.org> References: <746cd0fe-9de8-414b-8b5d-7030d423fa7f@dreamchaser.org> <85758e7a-f9bb-4568-a863-53c2439045ce@souji-thenria.net> <20240110233304.7a8b7f10.freebsd@edvax.de> <1d60d68a-3569-4054-a460-41c5dd422a42@dreamchaser.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:fgr/kMy2HHXJBVL87a6xOgLNxeKhIy4UFWJCNY8vONpd71pZn3g N5rvMozfEtFqDXR/4kggkdh7sCOc2j5zcgtURAnzp1nHnKGdce1oPaGe84tIZt1DglWXhwe p8ks3esuO4vuT1WFqe98wsRcMzxp86y4dZqVSpBFjdJVl7+9GjwBpbTjlS1IwJYtsd9ngCh gFcQX8RAmd2eGVPcPjCzA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:+iiUuiX2PZk=;WTJ0mZ1uZPFf5chye4yotHGizBS 8KZ7HyKM65f2M1cJxNKfPS22vl0T+K6Y0O82lPVhqRyAk60HDvstO3TU4oXPsHC/dna4RnEYR VUYz4v8S/KXXAGzygLGmQ5loluLGn26vnfylE+wZpFY25MOV68uzO/5hai+NEpRzRn2S7JZn0 249M/6pJWklkDCe9z2P5RisFOwRBqSetcuISoWEDmM5yXjeaECzhl8W344J0KBoJxE0Jcb6pq AKoyy2f/ZOY0eRkI2fQgApSFoPUitbF9MoMDGDVtnb74mPyh7+8DPALA/zWuHTTR950XjLBR3 ZRyYzBLiNQCAA3xo8l1gWq49jMMrYfxxqlQqM868YZNla6FPlW5AiJe5tLCOxQSFN07eFZsYD cXpgTcZpjwWHqzEnaJ6/3aqiIM7uuiUHJ6r/uOlkMbJVV9hn4hBH2+KEUHe9OeVWjGws08xFO vcJW47dElAwjSx6ZIOhDxWl1dv8UbH3MBF1lZl1rdKxz7vsHkkiI0stuQjWVy0QmeVYQPL8Kl XLRqwOupWXUCn7Pvn7uZtaKVvZYErSejEHrEmnXCrbQd+6nOYSHAc/ALYSdwpXjYr3Capw3WQ XoaxGux74rXUL1phqT7d/smXUTNq49opPJMOb8hI4fzQeyFJvq6NudW7W9k6V0AmWkz6Z16QF 5jKbfacaWZnd5KwDObNhTrQwFbDFrxts7t0ThV3OjcFv/sVXRZzZ9pbIMhw/oIyCmH0jNwBob b4KYiZ9UllOkiEPV1j3BdJe0MqJ0ri1mA2cuc0hoB2soewhM48xLFDJwdZlKiRWK9uK7CtR9D IXskKjC/6LmvH9KxymwbIS3VF7JTEnoohao/rveaTx/RN8ta5wgDtzbv946zKZRd1FGsXtnSA w/Pf4Imqgbz0zrw== X-Rspamd-Queue-Id: 4T9QrB0PBKz4K2y X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE] On Wed, 10 Jan 2024 16:42:22 -0700, Gary Aitken wrote: > On 1/10/24 15:33, Polytropon wrote: > > On Wed, 10 Jan 2024 13:03:28 -0700, Gary Aitken wrote: > >> The stick has been plugged into an android phone since it was first > >> tried on the fbsd and ubuntu systems, before I installed ntfs-3g. > >> Mounting it on ubuntu, I see two suspect files, 'Install SanDisk Software.dmg' and 'Install SanDisk Software.exe', plus a pdf that > >> says to run the appropriate file to get "valuable software..." > >> I'm thinking / hoping neither of those got automagically run, since > >> it's never been plugged into a microsoft or mac system. I've since > >> renamed them away. > > > > This observation leads to the following assumption: > > > > The stick is actually pre-formatted with exFAT. > > > > Problem here: exFAT disguises itself as an NTFS partition, > > but it does not have NTFS metadata and content, so ntfs-3g > > cannot mount it, even though tools like gpart or fdisk > > show a NTFS partition. > > > > So here is what you should check: > > > > 1. /boot/loader.conf contains: > > > > fuse_load="YES" > > /boot/loader.conf.local: > # added and commented out amdtemp; no longer needed? > #amdtemp="YES" > verbose_loading="YES" > # Enable FUSE functionality for exfat filesystem mounting > fuse_enable="YES" > fuse_load="YES" THe _enable settings belong to /etc/rc.conf; /boot/loader.conf uses the _load settings. > > 2. Mount device manually, read-only, perform checks, then > > unmount again: > > > > # mount.exfat -o ro /dev/da0s1 /mnt/memstick > > # df -f /mnt/memstick > > # ls -R /mnt/memstick > > # umount /mnt/memstick > > What was the intent of the df -f (-f => invalid option)? Should have been "df -h". :-) Intention: Compare "dmesg" entry (device reporting size) with filesystem size, and then compare to what's written on the device itself. > That seemed to work, although it was properly umounted on a ubuntu > system; or at least I think so. It was automagically mounted when > plugged in, not written to, and then sync ; umount. That sounds correct. The "eject device" in most GUI file managers (including that of Gnome) performs those steps. However, just be sure, and _know_ better than guess. :-) > A series of mount.exfat / umount / mount.exfat on fbsd seemed to > clear it up. There are also fsck tools for most filesystems, and there probably is one for exFAT, just in case. > > NB: mount.exfat does not have a manpage or help option. > > $ apropos exfat > mount.exfat-fuse(8) - mount an exFAT file system Okay, thanks for that pointer. It's not obvious that you need the manpage of "mount.exfat-fuse" when you want to know the options of "mount.exfat" though... > > Why don't you simply run newfs on the stick, with the > > filesystem *you* _want_ to use? You can use UFS it you > > want to, works perfectly well. ;-) > > I want to be able to read it from an android phone, and I was/am > concerned reformatting may make it unreadable by the phone. In worst case, let the target deivce format the stick. I've once been bitten by that because I "knew better" and preformatted a SD card with FAT, just to discover that my digital camera doesn't like it - it wanted the old 8.3 type format instead of the -F 32 one. In your specific case, exFAT (or FAT with the -F 32 format - see "man newfs_msdos") is probably the safest way for data exchange here. > It appears the problem was not having fusefs.ko loaded, but > continuing trying ntfs-3g instead of retrying mount.exfat. That's a trap to easily fall into: exFAT does not identify itself as exFAT or FAT, but as NTFS, but it is not NTFS. > So all is well, thanks, but one question not addressed: > Given that FUSE_ENABLE="YES" is present in rc.conf, > why is kldlist="fusefs" still needed? Personally, I am explicit instead of relying on "chains" here: I put fuse_enable="YES" in /boot/loader.conf and have the correct module loaded. Simple things need to be simple and kept boring. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...