![Udev 检测 APFS 文件系统等分区,提取元信息](https://linux22.com/image/176597/Udev%20%E6%A3%80%E6%B5%8B%20APFS%20%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E7%AD%89%E5%88%86%E5%8C%BA%EF%BC%8C%E6%8F%90%E5%8F%96%E5%85%83%E4%BF%A1%E6%81%AF.png)
以前,我做了这样的CentOS 8 不会自动挂载我的 APFS 分区
我想在这个操作系统中发现分区信息检测功能(我安装了新的 CentOS)我还没有安装ExFAT
,也NTFS
没有安装APFS
文件系统。
Linux 内核通过守护进程已成功检测到安装驱动程序ExFAT
和NTFS
未安装驱动程序的相关信息,但尚未检测到APFS
.
我正在读书。
并阅读一些关于:
我有一个带有 4 个磁盘分区的 USB 外部 SSD。分区的文件系统是
APFS
ExFAT
ext4
NTFS
我使用的是内核版本
$ uname -r
4.18.0-193.6.3.el8_2.x86_64
我在SSD
.
插入之前USB External SSD
ls -alR /dev/ | ls -alR /dev/ | grep -E "/dev/block:|sda|/by-|/dev/:"
[joseluisbz@centos dev]$ ls -alR /dev/ | grep -E "/dev/block:|sda|/by-|/dev/:"
/dev/:
/dev/block:
/dev/disk/by-id:
/dev/disk/by-label:
/dev/disk/by-partlabel:
/dev/disk/by-partuuid:
/dev/disk/by-path:
/dev/disk/by-uuid:
/dev/dri/by-path:
/dev/input/by-id:
/dev/input/by-path:
/dev/snd/by-path:
/dev/v4l/by-id:
/dev/v4l/by-path:
[joseluisbz@centos dev]$
lsblk -o 名称、挂载点、标签、fstype、大小、类型、uuid、组、所有者 | grep sda
[joseluisbz@centos dev]$ lsblk -o name,mountpoint,label,fstype,size,type,uuid,group,owner | grep sda
[joseluisbz@centos dev]$
须藤 blkid | grep -v 循环 | grep /dev/sda
[joseluisbz@centos dev]$ sudo blkid | grep -v loop | grep /dev/sda
[joseluisbz@centos dev]$
df-aTh | grep sda
[joseluisbz@centos dev]$ df -aTh | grep sda
[joseluisbz@centos dev]$
插入后USB External SSD
ls -alR /dev/ | ls -alR /dev/ | grep -E "/dev/block:|sda|/by-|/dev/:"
[joseluisbz@centos dev]$ ls -alR /dev/ | grep -E "/dev/block:|sda|/by-|/dev/:"
/dev/:
brw-rw----. 1 root disk 8, 0 Jul 8 01:32 sda
brw-rw----. 1 root disk 8, 1 Jul 8 01:32 sda1
brw-rw----. 1 root disk 8, 2 Jul 8 01:32 sda2
brw-rw----. 1 root disk 8, 3 Jul 8 01:32 sda3
brw-rw----. 1 root disk 8, 4 Jul 8 01:32 sda4
brw-rw----. 1 root disk 8, 5 Jul 8 01:32 sda5
/dev/block:
lrwxrwxrwx. 1 root root 6 Jul 8 01:32 8:0 -> ../sda
lrwxrwxrwx. 1 root root 7 Jul 8 01:32 8:1 -> ../sda1
lrwxrwxrwx. 1 root root 7 Jul 8 01:32 8:2 -> ../sda2
lrwxrwxrwx. 1 root root 7 Jul 8 01:32 8:3 -> ../sda3
lrwxrwxrwx. 1 root root 7 Jul 8 01:32 8:4 -> ../sda4
lrwxrwxrwx. 1 root root 7 Jul 8 01:32 8:5 -> ../sda5
/dev/disk/by-id:
lrwxrwxrwx. 1 root root 9 Jul 8 01:32 ata-KINGSTON_SA400S37960G_50026B76830DD5C0 -> ../../sda
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 ata-KINGSTON_SA400S37960G_50026B76830DD5C0-part1 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 ata-KINGSTON_SA400S37960G_50026B76830DD5C0-part2 -> ../../sda2
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 ata-KINGSTON_SA400S37960G_50026B76830DD5C0-part3 -> ../../sda3
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 ata-KINGSTON_SA400S37960G_50026B76830DD5C0-part4 -> ../../sda4
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 ata-KINGSTON_SA400S37960G_50026B76830DD5C0-part5 -> ../../sda5
lrwxrwxrwx. 1 root root 9 Jul 8 01:32 wwn-0x50026b76830dd5c0 -> ../../sda
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 wwn-0x50026b76830dd5c0-part1 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 wwn-0x50026b76830dd5c0-part2 -> ../../sda2
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 wwn-0x50026b76830dd5c0-part3 -> ../../sda3
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 wwn-0x50026b76830dd5c0-part4 -> ../../sda4
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 wwn-0x50026b76830dd5c0-part5 -> ../../sda5
/dev/disk/by-label:
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 EFI -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 ExFAT -> ../../sda4
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 EXT4 -> ../../sda3
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 NTFS -> ../../sda5
/dev/disk/by-partlabel:
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 EFI\x20System\x20Partition -> ../../sda1
/dev/disk/by-partuuid:
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 57527f55-2ebb-4624-8a05-0253c1ea744b -> ../../sda2
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 759e06ee-9a30-4e51-81a4-41ee8ebfecd3 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 93480588-2497-4c06-8aff-5d218f6a5260 -> ../../sda3
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 a0c6c246-9f36-43f2-acd6-fd6214852fa1 -> ../../sda4
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 b26baae4-6b53-4358-b707-18bfde5679f4 -> ../../sda5
/dev/disk/by-path:
lrwxrwxrwx. 1 root root 9 Jul 8 01:32 pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part4 -> ../../sda4
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part5 -> ../../sda5
/dev/disk/by-uuid:
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 5F00-07F7 -> ../../sda4
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 67E3-17ED -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 AA00430E0042E145 -> ../../sda5
lrwxrwxrwx. 1 root root 10 Jul 8 01:32 ce8c8777-e073-4f0a-8faa-361c6136154f -> ../../sda3
/dev/dri/by-path:
/dev/input/by-id:
/dev/input/by-path:
/dev/snd/by-path:
/dev/v4l/by-id:
/dev/v4l/by-path:
[joseluisbz@centos dev]$
lsblk -o 名称、挂载点、标签、fstype、大小、类型、uuid、组、所有者 | grep sda
[joseluisbz@centos dev]$ lsblk -o name,mountpoint,label,fstype,size,type,uuid,group,owner | grep sda
sda 894.3G disk disk root
├─sda1 EFI vfat 200M part 67E3-17ED disk root
├─sda2 223.5G part disk root
├─sda3 /run/media/joseluisbz/EXT4 EXT4 ext4 223.5G part ce8c8777-e073-4f0a-8faa-361c6136154f disk root
├─sda4 ExFAT exfat 223.5G part 5F00-07F7 disk root
└─sda5 NTFS ntfs 223.5G part AA00430E0042E145 disk root
[joseluisbz@centos dev]$
须藤 blkid | grep -v 循环 | grep sda
[joseluisbz@centos dev]$ sudo blkid | grep -v loop | grep sda
/dev/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="759e06ee-9a30-4e51-81a4-41ee8ebfecd3"
/dev/sda3: LABEL="EXT4" UUID="ce8c8777-e073-4f0a-8faa-361c6136154f" TYPE="ext4" PARTUUID="93480588-2497-4c06-8aff-5d218f6a5260"
/dev/sda4: LABEL="ExFAT" UUID="5F00-07F7" TYPE="exfat" PARTUUID="a0c6c246-9f36-43f2-acd6-fd6214852fa1"
/dev/sda5: LABEL="NTFS" UUID="AA00430E0042E145" TYPE="ntfs" PARTUUID="b26baae4-6b53-4358-b707-18bfde5679f4"
/dev/sda2: PARTUUID="57527f55-2ebb-4624-8a05-0253c1ea744b"
[joseluisbz@centos dev]$
df-aTh | grep sda
[joseluisbz@centos dev]$ df -aTh | grep sda
/dev/sda3 ext4 220G 61M 208G 1% /run/media/joseluisbz/EXT4
[joseluisbz@centos dev]$
乌德瓦德姆信息
[joseluisbz@centos dev]$ udevadm info --query=path -n /dev/sda
/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda
[joseluisbz@centos dev]$ udevadm info --query=path -n /dev/sda1
/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1
[joseluisbz@centos dev]$ udevadm info --query=path -n /dev/sda2
/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2
[joseluisbz@centos dev]$ udevadm info --query=path -n /dev/sda3
/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3
[joseluisbz@centos dev]$ udevadm info --query=path -n /dev/sda4
/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda4
[joseluisbz@centos dev]$ udevadm info --query=path -n /dev/sda5
/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda5
[joseluisbz@centos dev]$
结果
检查/dev/disk/by-label:
和/dev/disk/by-uuid:
目录列表,分区sda2
被隐藏或未被检测到。
udevadm 监视器
[joseluisbz@centos dev]$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[77069.521440] add /devices/pci0000:00/0000:00:14.0/usb2/2-2 (usb)
KERNEL[77069.522640] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0 (usb)
KERNEL[77069.522813] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0 (scsi)
KERNEL[77069.522821] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/scsi_host/host0 (scsi_host)
KERNEL[77069.522833] bind /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0 (usb)
KERNEL[77069.522846] bind /devices/pci0000:00/0000:00:14.0/usb2/2-2 (usb)
UDEV [77069.526612] add /devices/pci0000:00/0000:00:14.0/usb2/2-2 (usb)
UDEV [77069.527772] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0 (usb)
UDEV [77069.528281] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0 (scsi)
UDEV [77069.528922] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/scsi_host/host0 (scsi_host)
UDEV [77069.529477] bind /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0 (usb)
UDEV [77069.530400] bind /devices/pci0000:00/0000:00:14.0/usb2/2-2 (usb)
KERNEL[77070.560967] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0 (scsi)
KERNEL[77070.560994] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[77070.561008] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
KERNEL[77070.561023] bind /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[77070.561032] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
KERNEL[77070.561155] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[77070.561278] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0 (bsg)
UDEV [77070.562061] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0 (scsi)
KERNEL[77070.562354] add /devices/virtual/bdi/8:0 (bdi)
UDEV [77070.562884] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV [77070.563104] add /devices/virtual/bdi/8:0 (bdi)
UDEV [77070.563500] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
UDEV [77070.563861] bind /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV [77070.567553] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
UDEV [77070.568227] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg0 (scsi_generic)
UDEV [77070.568461] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0 (bsg)
KERNEL[77070.569086] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
KERNEL[77070.569104] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
KERNEL[77070.569118] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
KERNEL[77070.569130] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 (block)
KERNEL[77070.569141] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda4 (block)
KERNEL[77070.569151] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda5 (block)
UDEV [77070.592807] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV [77070.675152] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 (block)
UDEV [77070.675266] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda4 (block)
UDEV [77070.675361] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV [77070.675630] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda5 (block)
UDEV [77070.685401] add /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
^C[joseluisbz@centos dev]$
在本教程中支持我和执行命令udevadm info /dev/sda(#:number partition)
/dev/sda2
E: ID_FS_... (REALLY THIS TYPE INFORMATION IS MISSING)
/dev/sda3
E: ID_FS_LABEL=EXT4
E: ID_FS_LABEL_ENC=EXT4
E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=ce8c8777-e073-4f0a-8faa-361c6136154f
E: ID_FS_UUID_ENC=ce8c8777-e073-4f0a-8faa-361c6136154f
E: ID_FS_VERSION=1.0
/dev/sda4
E: ID_FS_LABEL=ExFAT
E: ID_FS_LABEL_ENC=ExFAT
E: ID_FS_TYPE=exfat
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=5F00-07F7
E: ID_FS_UUID_ENC=5F00-07F7
E: ID_FS_VERSION=1.0
/dev/sda5
E: ID_FS_LABEL=NTFS
E: ID_FS_LABEL_ENC=NTFS
E: ID_FS_TYPE=ntfs
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=AA00430E0042E145
E: ID_FS_UUID_ENC=AA00430E0042E145
缺乏 Udev 的适配(开发)来检测新型 APFS 文件系统? , 我想是的。
AFPS 分区检测包含在内核版本 5.8 中的可能性有多大?
我想获得代码,我应该从哪里开始? 除了博客1 博客2 pdf1。
如何blkid
正在与这些(服务)守护进程交互?
我试图从中提取元信息APFS
[joseluisbz@centos Documents]$ sudo hexdump -s 0 -n 16384 -C /dev/sda2
00000000 df 82 aa 66 bf 6e 98 66 01 00 00 00 00 00 00 00 |...f.n.f........|
00000010 75 00 00 00 00 00 00 00 01 00 00 80 00 00 00 00 |u...............|
00000020 4e 58 53 42 00 10 00 00 80 0e 7e 03 00 00 00 00 |NXSB......~.....|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 02 00 00 00 00 00 00 00 7c 10 fe 73 2a cb 41 b4 |........|..s*.A.|
00000050 9f 7a ff c9 d6 3e 7f ab 1a 04 00 00 00 00 00 00 |.z...>..........|
00000060 76 00 00 00 00 00 00 00 18 01 00 00 20 6c 00 00 |v........... l..|
00000070 45 81 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |E...............|
00000080 8c 00 00 00 49 01 00 00 8a 00 00 00 02 00 00 00 |....I...........|
00000090 43 01 00 00 06 00 00 00 0f 04 00 00 00 00 00 00 |C...............|
000000a0 10 7e 09 00 00 00 00 00 01 04 00 00 00 00 00 00 |.~..............|
000000b0 00 00 00 00 64 00 00 00 02 04 00 00 00 00 00 00 |....d...........|
000000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000003d0 00 00 00 00 00 00 00 00 e4 07 00 00 00 00 00 00 |................|
000003e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000520 01 00 04 00 08 00 00 00 00 00 00 00 00 00 00 00 |................|
00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000560 00 00 00 00 00 00 00 00 80 74 19 cf 50 04 05 00 |.........t..P...|
00000570 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00001000 9e 47 b2 7f 8d a4 4d 00 01 04 00 00 00 00 00 00 |.G....M.........|
00001010 30 00 00 00 00 00 00 00 11 00 00 80 00 00 00 00 |0...............|
00001020 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00001030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00001040 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00001050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00001060 00 00 00 00 00 00 00 00 00 00 00 00 90 0f 00 00 |................|
00001070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00002000 9e 6d 33 59 59 cb 0f 17 05 04 00 00 00 00 00 00 |.m3YY...........|
00002010 30 00 00 00 00 00 00 00 02 00 00 80 09 00 00 00 |0...............|
00002020 07 00 00 00 01 00 00 00 00 00 40 02 20 00 30 0d |..........@. .0.|
00002030 00 00 10 00 08 00 08 00 10 00 10 00 00 00 08 00 |................|
00002040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00002270 00 00 00 00 00 00 00 00 ff ff 10 00 00 00 00 00 |................|
00002280 79 58 01 00 00 00 00 00 30 00 00 00 00 00 00 00 |yX......0.......|
00002290 03 c2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000022a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00002fc0 00 00 00 00 00 00 00 00 9e 97 00 00 00 00 00 00 |................|
00002fd0 ff ff 08 00 00 00 00 00 0e 00 00 00 00 10 00 00 |................|
00002fe0 10 00 00 00 08 00 00 00 10 00 00 00 08 00 00 00 |................|
00002ff0 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
00003000 97 e1 f1 56 27 4a c3 21 0f 04 00 00 00 00 00 00 |...V'J.!........|
00003010 30 00 00 00 00 00 00 00 05 00 00 80 00 00 00 00 |0...............|
00003020 00 10 00 00 00 80 00 00 7e 00 00 00 fb 01 00 00 |........~.......|
00003030 80 0e 7e 03 00 00 00 00 fd 06 00 00 00 00 00 00 |..~.............|
00003040 0f 00 00 00 00 00 00 00 93 f3 7c 03 00 00 00 00 |..........|.....|
00003050 08 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00003060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00003080 80 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00003090 01 00 00 00 10 00 00 00 24 15 00 00 00 00 00 00 |........$.......|
000030a0 01 00 00 00 10 00 00 00 5d 82 00 00 00 00 00 00 |........].......|
000030b0 21 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |!l..............|
000030c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000030e0 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000030f0 9e 97 00 00 00 00 00 00 05 04 00 00 00 00 00 00 |................|
00003100 30 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 |0...............|
00003110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00003140 01 00 0f 00 d8 09 00 00 e0 09 00 00 e8 09 00 00 |................|
00003150 01 00 00 00 d8 09 00 00 00 00 00 00 00 00 00 00 |................|
00003160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000039d0 00 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 |........0.......|
000039e0 00 00 00 00 00 00 00 00 ff ff 02 00 03 00 04 00 |................|
000039f0 05 00 06 00 07 00 08 00 09 00 0a 00 0b 00 0c 00 |................|
00003a00 0d 00 0e 00 0f 00 ff ff 21 6c 00 00 00 00 00 00 |........!l......|
00003a10 22 6c 00 00 00 00 00 00 23 6c 00 00 00 00 00 00 |"l......#l......|
00003a20 24 6c 00 00 00 00 00 00 25 6c 00 00 00 00 00 00 |$l......%l......|
00003a30 26 6c 00 00 00 00 00 00 27 6c 00 00 00 00 00 00 |&l......'l......|
00003a40 28 6c 00 00 00 00 00 00 29 6c 00 00 00 00 00 00 |(l......)l......|
00003a50 2a 6c 00 00 00 00 00 00 2b 6c 00 00 00 00 00 00 |*l......+l......|
00003a60 2c 6c 00 00 00 00 00 00 2d 6c 00 00 00 00 00 00 |,l......-l......|
00003a70 2e 6c 00 00 00 00 00 00 2f 6c 00 00 00 00 00 00 |.l....../l......|
00003a80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00004000
[joseluisbz@centos Documents]$
答案1
基本上所有用户空间工具都使用 (lib)blkid (来自 util-linux)来检测块设备上的文件系统。 UDisks 使用来自 UDev 的数据,并且 UDev 在其规则中运行 blkid。
内核与此无关,您不需要内核模块来检测文件系统签名(blkid 直接从磁盘/块设备读取数据并将签名(二进制数据)与其内部数据库进行比较)。仅在实际安装设备时才需要内核模块(或熔丝模块)。
支持 APFS已添加到 util-linux 2.33 中和CentOS 8 只有 2.32因此,如果不手动升级 util-linux UDisk 就无法自动挂载您的 APFS 驱动器。