[DragonFlyBSD - Bug #3401] mount(8) doesn't detect filesystem type in raw GPT partition
sigttou
bugtracker-admin at leaf.dragonflybsd.org
Mon Sep 28 22:53:27 PDT 2026
Issue #3401 has been updated by sigttou.
File mount-gpt-fstype.patch added
mount(8) only guesses the filesystem from the legacy disklabel fstype.
gpt_setslice() puts the GPT partition type UUID in partinfo.fstype_uuid
(DIOCGPART), but mount(8) never looks at it. A raw GPT slice has fstype
0, so mount warns and falls back to ufs.
Fix: in checkdisklabel(), if the legacy fstype does not map, look the
fstype_uuid up in a table of GPT partition types (EFI -> msdos, the
DragonFly/FreeBSD native types -> ufs/hammer/hammer2). Unknown types
keep the old warning and ufs fallback.
Repro:
vnconfig vn0 img
gpt create vn0
gpt add -t efi vn0
newfs_msdos /dev/vn0s0
mount /dev/vn0s0 /mnt
before: warning, "attempting to mount with -t ufs", mount_ufs fails
after: mounts as msdos
----------------------------------------
Bug #3401: mount(8) doesn't detect filesystem type in raw GPT partition
http://bugs.dragonflybsd.org/issues/3401#change-14715
* Author: liweitianux
* Status: New
* Priority: Normal
* Category: Userland
* Target version: 6.6
* Start date: 2026-02-23
----------------------------------------
mount(8) tries to guess/detect the FS type for a partition within a BSD disklabel. However, it doesn't guess the FS type for a raw GPT partition, e.g.,
<pre>
% sudo gpt show vn4
Disk vn4: 2048MB (4194304 512-byte sectors)
Start Sectors Size Index Contents
0 1 512B - PMBR
1 1 512B - Pri GPT header
2 32 16.0KB - Pri GPT table
34 2014 1007KB - Unused
2048 2000896 977MB 0 GPT part - EFI System
2002944 2191327 1070MB - Unused
4194271 32 16.0KB - Sec GPT table
4194303 1 512B - Sec GPT header
% sudo newfs_msdos vn4s0
/dev/vn4s0: 2000352 sectors in 62511 FAT16 clusters (16384 bytes/cluster)
BytesPerSec=512 SecPerClust=32 ResSectors=1 FATs=2 RootDirEnts=512 Media=0xf0 FATsecs=245 SecPerTrack=32 Heads=64 HiddenSecs=0 HugeSectors=2000896
% sudo mount /dev/vn4s0 /mnt/tmp
mount: warning: fstype in disklabel not set to anything I understand
attempting to mount with -t ufs
mount_ufs: /dev/vn4s0 on /mnt/tmp: incorrect super block
</pre>
---Files--------------------------------
mount-gpt-fstype.patch (2.43 KB)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list