Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
1924
views
Kernel support for HFS+ or APFS
What is the current status for the Linux kernel's support for APFS or HFS+ (filesystems used by MacOS)? Does it support write, journaling etc? I saw https://unix.stackexchange.com/questions/481949/is-an-apple-file-system-apfs-driver-for-linux-available-or-in-progress but the responses there mostly d...
What is the current status for the Linux kernel's support for APFS or HFS+ (filesystems used by MacOS)? Does it support write, journaling etc?
I saw https://unix.stackexchange.com/questions/481949/is-an-apple-file-system-apfs-driver-for-linux-available-or-in-progress but the responses there mostly deals with FUSE-solutions. I am, for performance reasons¹, interested in kernel based solutions.
¹ I am gonna run it on an embedded device with a slow CPU, low memory etc.
d-b
(2047 rep)
Mar 15, 2021, 05:35 PM
• Last activity: Jun 24, 2025, 02:02 AM
0
votes
1
answers
43
views
Bash, the -nt fails when comparing two rsynced files between APFS and HFS+
While writing a backup Bash script, I've copied files from an APFS file system to an external drive that is HFS+ (I don't want to convert it to APFS because sometimes I need to read/write files with Linux, and apparently, there is no open source support for that). I have used `--times` with rsync an...
While writing a backup Bash script, I've copied files from an APFS file system to an external drive that is HFS+ (I don't want to convert it to APFS because sometimes I need to read/write files with Linux, and apparently, there is no open source support for that).
I have used
--times
with rsync and stat -f %m
shows the same times at both ends.
However, when I compare copies of the same file via:
$ [[ "$src" -nt "$bkp" ]] && echo "$src was updated"`
I always get that the source file is newer, even though I hadn't touched it after the copy.
Another weird thing is that the older macos default Bash (v 3.x) works correctly.
zakmck
(143 rep)
May 13, 2025, 03:51 PM
• Last activity: May 13, 2025, 04:04 PM
0
votes
1
answers
40
views
MacOS: Can you rename APFS snapshots?
Snapshots can be renamed in "Disk Utility", but can you rename them in the terminal using a command? Also, can you name them on creation using `tmutil snapshot` (I don't even see this command listed in `tmutil -h`)? Will this impact restoration via Time Machine during maintenance boot (Command-R)? I...
Snapshots can be renamed in "Disk Utility", but can you rename them in the terminal using a command?
Also, can you name them on creation using
tmutil snapshot
(I don't even see this command listed in tmutil -h
)? Will this impact restoration via Time Machine during maintenance boot (Command-R)?
I'm concerned because I received the following dialog when trying to rename in Disk Utility
:
> Are you sure you want to rename the snapshot "com.apple.TimeMachine.2025-01-29-231822.local"? If you make this change, the snapshot may no longer be valid for its intended purpose. Don't Rename or Rename?
I want to rename to remember better system state, however I'm concerned this may impact Time Machine usage. I note the following tmutil
command depends on the date so I'm not sure if it's parsing the string of the local snapshot name.
tmutil deletelocalsnapshots {mount_point | date}
atod
(155 rep)
Jan 30, 2025, 04:35 AM
• Last activity: Jan 30, 2025, 06:42 AM
6
votes
1
answers
581
views
How can directories in a macOS APFS root directory be in other filesystems without being links or mountpoints?
I found a very unusual behaviour about the root file system `/` on modern macOS which are now all using the Apple propriatary file system `APFS`. With a basic set of filesystems defined through the Big Sur installation as follows: ``` ### 18:04 noether:/ # mount | grep disk1 /dev/disk1s5s1 on / (apf...
I found a very unusual behaviour about the root file system
/
on modern macOS which are now all using
the Apple propriatary file system APFS
.
With a basic set of filesystems defined through the
Big Sur installation as follows:
### 18:04 noether:/ # mount | grep disk1
/dev/disk1s5s1 on / (apfs, sealed, local, read-only, journaled)
/dev/disk1s4 on /System/Volumes/VM (apfs, local, noexec, journaled, noatime, nobrowse)
/dev/disk1s2 on /System/Volumes/Preboot (apfs, local, journaled, nobrowse)
/dev/disk1s6 on /System/Volumes/Update (apfs, local, journaled, nobrowse)
/dev/disk1s1 on /System/Volumes/Data (apfs, local, journaled, nobrowse)
/dev/disk1s5 on /Volumes/noether 1 250 Go 1 (apfs, sealed, local, journaled, nobrowse)
### 18:04 noether:/ #
I discovered that at the base of this file system, i.e. in /
directly there are files which belongs to the /
FS when some other belongs to the /System/Volumes/Data
FS:
### 18:14 noether:/ # ffs
--------------------------------------------
file volume
--------------------------------------------
.file /
.vol /
Applications /System/Volumes/Data
Library /System/Volumes/Data
System /
Users /System/Volumes/Data
Volumes /System/Volumes/Data
bin /
cores /System/Volumes/Data
dev /dev
etc /System/Volumes/Data
home
opt /System/Volumes/Data
private /System/Volumes/Data
sbin /
tmp /System/Volumes/Data
usr /
var /System/Volumes/Data
### 18:14 noether:/ #
( where ffs
is a small shell script¹ printing the FS a file belongs to in the working directory ).
How is this possible when there is only one FS which can be mounted on /
and some of these files are symbolic links toward /System/Volumes/Data
( like home
) but some others are plain directories ( like opt
and private
):
### 18:20 noether:/ # ls -alt
total 18
drwxr-xr-x 19 root wheel 608 Aug 3 18:50 Volumes
drwxrwxr-x 32 root admin 1024 Aug 3 12:33 Applications
drwxr-xr-x 15 root admin 480 Jul 19 15:54 Users
lrwxr-xr-x 1 root wheel 25 Jul 13 23:22 home -> /System/Volumes/Data/home
dr-xr-xr-x 3 root wheel 8886 Jul 13 23:22 dev
drwxr-xr-x 15 root wheel 480 Mar 26 21:47 opt
drwxr-xr-x 71 root wheel 2272 Jan 20 2024 Library
drwxr-xr-x 20 root wheel 640 Jan 1 2020 .
drwxr-xr-x 20 root wheel 640 Jan 1 2020 ..
lrwxr-xr-x 1 root admin 36 Jan 1 2020 .VolumeIcon.icns -> System/Volumes/Data/.VolumeIcon.icns
---------- 1 root admin 0 Jan 1 2020 .file
drwxr-xr-x 2 root wheel 64 Jan 1 2020 .vol
drwxr-xr-x@ 9 root wheel 288 Jan 1 2020 System
drwxr-xr-x@ 38 root wheel 1216 Jan 1 2020 bin
drwxr-xr-x 2 root wheel 64 Jan 1 2020 cores
lrwxr-xr-x@ 1 root wheel 11 Jan 1 2020 etc -> private/etc
drwxr-xr-x 6 root wheel 192 Jan 1 2020 private
drwxr-xr-x@ 65 root wheel 2080 Jan 1 2020 sbin
lrwxr-xr-x@ 1 root wheel 11 Jan 1 2020 tmp -> private/tmp
drwxr-xr-x@ 11 root wheel 352 Jan 1 2020 usr
lrwxr-xr-x@ 1 root wheel 11 Jan 1 2020 var -> private/var
### 18:20 noether:/
I know that this cannot work on any Unix.
This can only be related to APFS special features.
I am digging inside the Apple documentation about this
anomaly.
____
¹) ffs source:
#!/bin/sh
printf "--------------------------------------------\n%-20s\t%-32s\n--------------------------------------------\n" "file" "volume"
for _file in .* * ; do
if [ -e ${_file} ] ; then
_volume=df ${_file} | awk '/dev/ { print $NF}'
printf "%-20s\t%-32s\n" "${_file}" "${_volume}"
fi
done
athena
(1085 rep)
Aug 4, 2024, 05:25 PM
• Last activity: Aug 5, 2024, 05:51 AM
1
votes
0
answers
273
views
How to remove unwanted options ( nodev, nosuid, nobrowse ) on mount on recent macOS
On macOS Big Sur, how to get rid of unwanted mount options which are automagicaly added by the `diskutil` command: `nodev, nosuid, nobrowse`? On macOS Big Sur, I noticed that most of the mounted file system are mounted with `nodev, nosuid, nobrowse` mount options: ``` /dev/disk1s4 on /System/Volumes...
On macOS Big Sur, how to get rid of unwanted mount options which are automagicaly
added by the
diskutil
command: nodev, nosuid, nobrowse
?
On macOS Big Sur, I noticed that most of the mounted file system are mounted with
nodev, nosuid, nobrowse
mount options:
/dev/disk1s4 on /System/Volumes/VM (apfs, local, noexec, journaled, noatime, nobrowse)
/dev/disk1s2 on /System/Volumes/Preboot (apfs, local, journaled, nobrowse)
/dev/disk1s6 on /System/Volumes/Update (apfs, local, journaled, nobrowse)
/dev/disk1s1 on /System/Volumes/Data (apfs, local, journaled, nobrowse)
Even when I never set these options.
And I would like to be free to manage the mount options I want.
On trying some experiment, I built 2 APFS volumes, and noticed that mounting them
with diskutil
, both are mounted with nodev, nosuid, nobrowse
mount options.
But when I mount them with plain old mount -t apfs
I get a different results:
/dev/disk7s2 on /Volumes/clone_noether_S (apfs, local, journaled)
/dev/disk7s1 on /Volumes/clone_noether_D (apfs, local, journaled, nobrowse)
Then a direct mount
rather than the macOS diskutil
free us of the unwanted nodev, nosuid
.
How to further analyse this difference and how to now get rid of this unwanted
nobrowse
mount option?
athena
(1085 rep)
Aug 2, 2024, 09:53 PM
• Last activity: Aug 4, 2024, 03:58 PM
0
votes
0
answers
53
views
Is it possible for a filesystem type to be recognized differently or changed without reformatting a drive?
When running `sudo fdisk -l` my EXT4 formatted SamsungQVO USB SSD now identifies as APFS. ``` Device Start End Sectors Size Type /dev/sda2 409640 3907029127 3906619488 1.8T Apple APFS ``` The disk was previously formatted APFS on macOS before formatting on a Linux computer as EXT4, to copy data from...
When running
sudo fdisk -l
my EXT4 formatted SamsungQVO USB SSD now identifies as APFS.
Device Start End Sectors Size Type
/dev/sda2 409640 3907029127 3906619488 1.8T Apple APFS
The disk was previously formatted APFS on macOS before formatting on a Linux computer as EXT4, to copy data from another EXT4 drive and use on a Raspi5 OS.
Debian GNU/Linux 12 (bookworm) aarch64
Host: Raspberry Pi 5 Model B Rev 1.0
Kernel: 6.1.0-rpi6-rpi-2712
Not expecting the drive to be unrecognized, I created an entry in fstab and expected an error when running mount -a
however it did not and after rebooting, is still mounted but recognized as APFS. The only thing which I changed in between was to move data on the disk.
Is there any possible explanation for this behavior or is it likely that I have inexplicably done something I'm not aware of?
XJMZX
(85 rep)
Nov 26, 2023, 12:41 AM
0
votes
0
answers
410
views
rsync implications of ACL backups between different source & dest file systems
I'm having an issue using `rsyncd` (the daemon-ized version of rsync) to back up files from my macOS to my Synology server. Here's the command that fails: ``` % rsync -rlcAXtgoDiv --fake-super ~/scripts rsync://seamus@SynologyNAS-1/backups/scripts-backup/ > ~/scripts/log.txt 2>&1 ``` This is the err...
I'm having an issue using
rsyncd
(the daemon-ized version of rsync) to back up files from my macOS to my Synology server. Here's the command that fails:
% rsync -rlcAXtgoDiv --fake-super ~/scripts rsync://seamus@SynologyNAS-1/backups/scripts-backup/ > ~/scripts/log.txt 2>&1
This is the error: (in the logfile that I write and from command line):
rsync: [sender] write error: Broken pipe (32)
rsync error: error in socket IO (code 10) at io.c(848) [sender=3.2.7]
After some experimentation, I think I've narrowed the source of the problem to the use of the -A
option:
--acls, -A preserve ACLs (implies --perms)
--xattrs, -X preserve extended attributes
--fake-super store/recover privileged attrs using xattrs
As I understand it, the --fake-super
option allows rsync
to store ACLs as extended attributes without requiring sudo
... but I'm weak on the implications of all of the namespace business in man rsync
.
Further investigation led to the discovery that on the Synology server, this line was included in /etc/rsyncd.conf
:
refuse options = acls
And so I edited /etc/rsyncd.conf
, and commented the refuse options = acls
line. When I re-ran the rsync
command from earlier, it ran successfully :)
But hang on - I do have a question:
* The reported version of rsync
on SynologyNAS-1 is:
rsync version 3.1.2 protocol version 31
* In addition to the version difference (3.1.2 for Synology; 3.2.7 for macOS), the file system on Synology is btrfs
- which is as opaque to me as APFS!
My question is this: Am I actually backing up the correct (macos-compatible) ACLs that I hope - or have I simply silenced the guards? Any thoughts on this would be welcome.
FWIW:
I'd like to think I'm actually doing a correct backup ***because*** when I do the backup without rsyncd
I don't see these errors. I wanted to switch to rsyncd
to avoid the needless encryption step (this is all on my LAN) & hopefully streamline the backups.
Seamus
(3772 rep)
Mar 29, 2023, 12:10 AM
2
votes
1
answers
1801
views
Clone functionality for APFS
**2022 UPDATE:** Clonezilla supports the APFS file system I understand that Clonezilla does not list APFS as a supported file system. It is important to me to be able to create a clone back of a disk so that the many of work can be restored should there be a failure or significant user error. I have...
**2022 UPDATE:** Clonezilla supports the APFS file system
I understand that Clonezilla does not list APFS as a supported file system. It is important to me to be able to create a clone back of a disk so that the many of work can be restored should there be a failure or significant user error.
I have enjoyed Clonezilla's ability to back Ubuntu and Windows drives and restore them quickly. Backups are kept to a minimal size on disk. I would like to be able to do this with a Mojave APFS disk. What options (methods) exist that approach Clonezilla functionality? Any best practices are appreciated: thank you.
gatorback
(1522 rep)
Jul 10, 2020, 03:10 PM
• Last activity: Dec 17, 2022, 09:15 PM
1
votes
1
answers
933
views
Udev Detecting Partition like APFS FileSystem, Extracting Meta INFO
Previously, I made that [CentOS 8 is not auto mounting my APFS partition][1] I want to discover the partition info detecting functionality, in this operative system (*I made a new CentOS installation*) I have not installed `ExFAT`, neither `NTFS` nor `APFS` File Systems. The Linux kernel through dae...
Previously, I made that CentOS 8 is not auto mounting my APFS partition
I want to discover the partition info detecting functionality, in this operative system (*I made a new CentOS installation*) I have not installed
ExFAT
, neither NTFS
nor APFS
File Systems.
The Linux kernel through daemons has managed to detect relevant information from ExFAT
and NTFS
without having a driver installed for it, but it has not detected the same information for APFS
.
I was reading.
- Dynamic device management with Udev, HAL, and D-Bus
- understanding-mount-option-nodev-and-its-use-with-usb-flash-drives
- Mounting USB disks automatically (How it works)
and read Some About of:
- udev
1 , 2 , 3
- udisks
1 , 2 , 3
- dbus
1 , 2 , 3
I have a USB External SSD with 4 disk partitions.
The file system of partitions are
- APFS
- ExFAT
- ext4
- NTFS
I'm using kernel version
$ uname -r
4.18.0-193.6.3.el8_2.x86_64
I executed commands before and after my SSD
.
**BEFORE plug the USB External SSD
**
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 name,mountpoint,label,fstype,size,type,uuid,group,owner | grep sda
[joseluisbz@centos dev]$ lsblk -o name,mountpoint,label,fstype,size,type,uuid,group,owner | grep sda
[joseluisbz@centos dev]$
sudo blkid | grep -v loop | 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]$
**AFTER plug the USB External SSD
**
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 name,mountpoint,label,fstype,size,type,uuid,group,owner | 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]$
sudo blkid | grep -v loop | 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]$
udevadm info
[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]$
**RESULTS**
Checking in the /dev/disk/by-label:
and /dev/disk/by-uuid:
directory lists, the partition sda2
is hidden or is not detected.
**udevadm monitor**
[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]$
Supporting me in this tutorial and **Executing the command 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
**Lacking adaptation (development) of Udev in order to detect the new type of APFS file system ?** *, I think that yes*.
**How likely would AFPS partition detection be included in Kernel version 5.8?**
**I would like to get my hands on the code where should I start?** *apart from blog1 blog2 pdf1 *.
**How blkid
is interacting with these (services) daemons?**
I was trying to extract metainfo from 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]$
**The Apple question: https://apple.stackexchange.com/q/396301**
joseluisbz
(375 rep)
Jul 8, 2020, 05:26 AM
• Last activity: Dec 20, 2020, 08:40 AM
Showing page 1 of 9 total questions