Catalina Boot from ZFS

All your general support questions for OpenZFS on OS X.

Catalina Boot from ZFS

Postby monkeyvoodoo » Tue Oct 22, 2019 3:35 pm

Greetings,

I've followed the instructions and created an rpool on a USB drive to boot Catalina from. I used a clean install of Catalina in a VM, and also used the updated Catalina package from 2019-10-21. Attached is a photo of the error I'm getting on boot.

After getting the error, to be absolutely sure the updated files in the package from the 21st were on the rpool, I extracted the package contents with Pacifist onto the pool.

Any ideas where to go from here?
Attachments
IMG_1563.jpg
IMG_1563.jpg (1.76 MiB) Viewed 3228 times
monkeyvoodoo
 
Posts: 12
Joined: Tue Oct 22, 2019 3:27 pm

Re: Catalina Boot from ZFS

Postby monkeyvoodoo » Tue Oct 22, 2019 9:23 pm

I just tried again from nothing to make absolutely sure I wasn't missing anything:

  • Create new VM, install Catalina from new App Store installer
  • Shut down VM, set boot args to boot into recovery partition; disable SIP
  • Shut down, remove boot args, boot normally
  • Download and install 2019-10-21 build of ZFS; reboot
  • Create rpool and necessary ROOT and HOME volumes; mount at /Volumes/ZFSBoot, rsync everything per instructions (but adding an exception for System/Volumes, to avoid duplication of APFS /System/Volumes/Data)
  • Mount Apple Boot partition at /Volumes/boot; add necessary pieces per instructions
  • For good measure, run kextcache, per instructions, using /Volumes/ZFSBoot as source

This process results in code signature validation errors for libraries needed to mount ZFS volumes
monkeyvoodoo
 
Posts: 12
Joined: Tue Oct 22, 2019 3:27 pm

Re: Catalina Boot from ZFS

Postby lundman » Wed Oct 23, 2019 5:04 pm

Right, so this comes down to that "mount_zfs" is codesigned. I don't know if there is some official way to
"pre-approve" a TeamID before boot...

But, I took the route of not codesigning "mount_zfs". So after installing the 1022.pkg, you should have:

Code: Select all
# ls -l /Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs
-rwxr-xr-x  1 root  wheel  116180 Oct 21 15:53 /Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs


Or perhaps, more accurately if you boot "normal" OsX:
Code: Select all
# ls -l /Volumes/ZFSBoot/Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs
-rwxr-xr-x  1 root  wheel  116180 Oct 21 15:53 /Volumes/ZFSBoot/Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs


This should be a static compile:

.... aaaand I see that it isn't. Let me do another pkg..
User avatar
lundman
 
Posts: 1030
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Catalina Boot from ZFS

Postby lundman » Wed Oct 23, 2019 6:13 pm

Ok, if you grab the updated pkg, the only thing changed is the
Code: Select all
# ls -l /Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs
-rwxr-xr-x  1 root  wheel  2942232 Oct 24 10:21 /Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs


A bit larger, static, and not signed.

Code: Select all
# otool -L  /Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs
/Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs:
   /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1875.0.0)
   /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
   /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
   /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1065.2.0)
   /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
   /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1670.10.0)
   /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1670.10.0)
   /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
(Ie, not linked against any /usr/local/lib/libzfs* libraries)

# codesign -dv  /Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs
/Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs: code object is not signed at all


Since that is the only file different, you can install .pkg, then just copy it to your ZFSBoot:
Code: Select all
# mkdir /Volumes/ZFSBoot
# zpool import rpool
# /Library/Filesystems/zfs.fs/Contents/Resources/mount_zfs rpool/ROOT/Catalina /Volumes/ZFSBoot
# rsync -ar /Library/Filesystems/zfs.fs/ /Volumes/ZFSBoot/Library/Filesystems/zfs.fs/
# reboot (and hold Alt to pick boot device)


OpenZFS_on_OS_X_1.9.2_Boot_REPACK_Catalina.pkg
(12.3 MiB) Downloaded 245 times
User avatar
lundman
 
Posts: 1030
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Catalina Boot from ZFS

Postby monkeyvoodoo » Wed Oct 23, 2019 10:42 pm

IT WORKED!! Much thanks! Next up: macOS and Ubuntu booting from the same pool with shared home folder! :3
monkeyvoodoo
 
Posts: 12
Joined: Tue Oct 22, 2019 3:27 pm

Re: Catalina Boot from ZFS

Postby jbelper » Sat Jan 23, 2021 4:42 pm

I hate to revive a year plus old dormant thread, but I'm experiencing the exact same issue. Is there any chance an unsigned mount_zfs compatible with 1.9.4 can be repackaged for both Catalina and High Sierra? In the former case I'm on a mid-2012 Mac Book Pro and the later case I'm nursing along a Mac Pro 5,1.

I'm happy to contribute to the beverage fund. Please let me know how. :)

Thank you so much!

John
jbelper
 
Posts: 2
Joined: Sat Jan 23, 2021 4:03 pm

Re: Catalina Boot from ZFS

Postby pat » Thu May 06, 2021 3:58 am

I am also getting the code signature validation error on a fresh Catalina install, with the latest ZFS for Catalina (1.9.4?)

What is the fix?
pat
 
Posts: 12
Joined: Mon May 03, 2021 11:58 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 5 guests

cron