Summary: | gpart: Shows exFat as NTFS | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Brian Zou <zoujiaqing> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Open --- | ||||||
Severity: | Affects Only Me | CC: | ae, freebsd, georg.lastname, grahamperrin, portmaster, tatsuki_makino | ||||
Priority: | --- | Keywords: | needs-qa | ||||
Version: | Unspecified | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Brian Zou
2020-02-27 06:35:22 UTC
(In reply to Brian Zou from comment #0) whats the output from: gpart list da0 It might be that the exfat part is inside an ntfs. The gpart command I suggested above will remove any doubt(s). :) --Chris I also want a kind display like ntfs/exfat . Why exfat used the same partition ID as ntfs? :) (In reply to Brian Zou from comment #0) You haven't forgotten kldload fuse.ko, have you? (In reply to Tatsuki Makino from comment #3) No. But *you* might have. :) I suggested using: gpart list da0 so you would know what your currently running system sees on that drive. You get very detailed output. --Chris What version of FreeBSD (uname -a) is running on the effected system? I think they have the same label, at least for MBR? Created attachment 212014 [details]
This device on macOS.
[zoujiaqing@freebsd ~]$ uname -a FreeBSD freebsd 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r358133: Thu Feb 20 04:41:10 UTC 2020 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 [zoujiaqing@freebsd /usr/home/zoujiaqing]$ sudo kldload fusefs kldload: can't load fusefs: module already loaded or in kernel [zoujiaqing@freebsd /usr/home/zoujiaqing]$ sudo mount /dev/da0s1 /mnt mount: /dev/da0s1: No such file or directory [zoujiaqing@freebsd /usr/home/zoujiaqing]$ gpart show da0 => 63 125829057 da0 MBR (60G) 63 385 - free - (193K) 448 125828672 1 ntfs (60G) [zoujiaqing@freebsd ~]$ gpart list da0 Geom name: da0 modified: false state: OK fwheads: 255 fwsectors: 63 last: 125829119 first: 63 entries: 4 scheme: MBR Providers: 1. Name: da0s1 Mediasize: 64424280064 (60G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 229376 Mode: r0w0e0 efimedia: HD(1,MBR,00000000,0x1c0,0x77ffe40) rawtype: 7 length: 64424280064 offset: 229376 type: ntfs index: 1 end: 125829119 start: 448 Consumers: 1. Name: da0 Mediasize: 64424509440 (60G) Sectorsize: 512 Mode: r0w0e0 [zoujiaqing@freebsd ~]$ sudo ntfs-3g /dev/da0s1 /mnt NTFS signature is missing. Failed to mount '/dev/da0s1': Invalid argument The device '/dev/da0s1' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around? 1. gpart(8) doesn't detect type of used file system. It just reports partition type used in partition table for specific partition. It is NTFS for MBR. 2. Probably, you just need to load fusefs kernel module. Isn't this just a report that says, "If partition type ID of MBR is 7, you can't determine whether it's NTFS or exFAT (or HPFS)." ? :) The following commands should have been a little more detailed about what is missing. But, you need to umount it by turning it to background or using another terminal. mount.exfat-fuse -d -o ro /dev/da0s1 /mnt On my device, da0 may appear immediately, but da0s1 may not. It can be restored with the following command in 10 (.4-STABLE) but not in 12.1-STABLE I am using now. camcontrol reset da0 && camcontrol reprobe da0 (In reply to Tatsuki Makino from comment #10) gpart(8) is not that utilite, that should determine file system type. I think fstyp(8) is more appropriate for this purpose. (In reply to Andrey V. Elsukov from comment #11) Thank you for introducing useful command. In other words, I want to be guided to use fstyp by manpages and handbook when gpart returns ntfs. Although manpage of gpart says "A partition that contains a NTFS or exFAT filesystem.". (In reply to Brian Zou from comment #0) I'm sorry to digress from your original problem. Ntfs - one word for two different things. ntfs exists as a partition type (gpart add -t ntfs ..). But it can also be a file system (fstyp shows it, or create it with mkntfs from pkg ntfs-3g) I don't think there is a bug. Man file of gpart says: "ntfs - A partition that contains a NTFS or exFAT filesystem." This does not mean that there is necessarily a file system on the partition. It just means that you can create only those two file system types on a ntfs partition. I would consider it a bug. Documenting ambiguous behavior does not make it any less of a problem. This affects more than "only me" as reported in the bug; see https://lists.freebsd.org/archives/freebsd-questions/2024-January/004631.html It affects anyone who attempts to mount a usb stick with >32GB of storage. However, I can't seem to find a way to change that status. If gpart can tell that a partition is exFAT, it should report it as such to avoid confusion. Then I suggest we change the documentation. "a ntfs partition that can contain either a ntfs or a exfat partition". And add a hint somewhere, that gpart doesn't care/know about the file system on a partition. For file system checks, use fstyp and the likes.. I meant: "a ntfs partition that contains either a ntfs or a exfat file system." :-) |