safe boot and ZEVO

Moderators: jhartley, MSR734, nola

safe boot and ZEVO

Post by grahamperrin » Thu Mar 21, 2013 8:06 pm

At viewtopic.php?p=4301#p4301

raattgift wrote:… safe boot and then launchctl load /System/Library/Launch*/*greenbytes*


With ZEVO Community Edition 1.1.1 on OS X 10.8.3:

Code: Select all
bash-3.2$ date
Wed 20 Mar 2013 12:43:44 GMT
bash-3.2$ sudo launchctl load /System/Library/Launch*/*greenbytes*
launchctl: Couldn't stat("/System/Library/Launch*/*greenbytes*"): No such file or directory
nothing found to load


Additional information:

Code: Select all
bash-3.2$ sudo kextstat | grep -v com.apple.
Index Refs Address            Size       Wired      Name (Version) <Linked Against>
   95    0 0xffffff7f811e8000 0x14000    0x14000    com.kaspersky.kext.klif (3.0.0d23) <13 5 4 3 1>


Code: Select all
bash-3.2$ pwd
/System/Library/Extensions/ZFSFilesystem.kext
bash-3.2$ cd ..
bash-3.2$ sudo kextload ZFSFilesystem.kext
/System/Library/Extensions/ZFSFilesystem.kext failed to load - (libkern/kext) operation/kext not allowed at current boot level; check the system/kernel logs for errors or try kextutil(8).


Maybe not relevant to safe boot, but for the record:

Code: Select all
bash-3.2$ defaults read /System/Library/Filesystems/zfs.fs/Contents/Resources/launchd/zfs_loader
{
    EnableTransactions = 1;
    KeepAlive =     {
        PathState =         {
            "/dev/zfs" = 0;
        };
    };
    Label = "com.getgreenbytes.zfs.loader";
    ProgramArguments =     (
        "/System/Library/Filesystems/zfs.fs/Contents/MacOS/zfs_loader"
    );
    RunAtLoad = 0;
}
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: safe boot and ZEVO

Post by raattgift » Thu Mar 21, 2013 10:33 pm

D'oh! The 1.1.1 installer put the launchd.plist files in /Library/Launch*/*greenbytes*, as it should, and not /System/Library/Launch*/*greenbytes*, as it should not. My mistake. Just drop the "/System" part.

The important bits are:

launchctl load /Library/LaunchDaemons/com.getgreenbytes.zfs.loader.plist
launchctl load /Library/LaunchDaemons/com.getgreenbytes.zfs.delegate.plist
launchctl load /Library/LaunchAgents/com.getgreenbytes.zfs.notifier.plist

launchd has a preconfigured set of safe launchctl.plist files that it will loaded in safe boot mode; these won't be part of that set, obviously, so have to be loaded by hand.

I have not actually tested this (yet); it may fail because of restrictions on which kexts are allowed in safe boot too. There may also be a dependency that is not satisfied in Safe Boot.
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm

Results from a few days ago

Post by grahamperrin » Fri Mar 29, 2013 7:44 am

From a safe boot on 2013-03-23:

Code: Select all
bash-3.2$ sudo launchctl load /Library/Launch*/*greenbytes*
Password:
bash-3.2$ sudo launchctl list | grep -v com.apple
PID   Status   Label
324   -   0x7fb6b2c443f0.anonymous.xpcd
1   -   0x7fb6b2c44100.anonymous.launchd
324   -   0x7fb6b2c40ee0.anonymous.xpcd
1   -   0x7fb6b2c40bf0.anonymous.launchd
264   -   0x7fb6b2c40900.anonymous.launchd
295   -   0x7fb6b2c40610.anonymous.Dock
324   -   0x7fb6b2c39a90.anonymous.xpcd
1   -   0x7fb6b2c397a0.anonymous.launchd
326   -   0x7fb6b2c3a440.anonymous.QuickLookSatell
324   -   0x7fb6b2d025d0.anonymous.xpcd
1   -   0x7fb6b2d022e0.anonymous.launchd
264   -   0x7fb6b2d06ba0.anonymous.launchd
319   -   0x7fb6b2d03960.anonymous.quicklookd
368   -   0x7fb6b2c4b050.anonymous.sudo
370   -   0x7fb6b2c4ad60.anonymous.launchctl
367   -   com.getgreenbytes.zfs.loader
-   0   com.getgreenbytes.zfs.delegate
-   0   com.getgreenbytes.zevo.forum.satadru.zpadmin
-   0   com.getgreenbytes.zevo.forum.satadru.zpadmin-scrub
336   -   0x7fb6b2c4bf10.anonymous.Terminal
338   -   0x7fb6b2c4bc20.anonymous.login
340   -   0x7fb6b2c4b930.anonymous.bash
348   -   0x7fb6b2c4b640.anonymous.su
350   -   0x7fb6b2c4b350.anonymous.bash
1   -   0x7fb6b2d0bab0.anonymous.launchd
326   -   0x7fb6b2d0b7c0.anonymous.QuickLookSatell
272   -   0x7fb6b2d070a0.anonymous.lsregister
235   -   0x7fb6b2d02ee0.anonymous.lsregister
88   -   0x7fb6b2c21460.anonymous.dynamic_pager
-   0   com.openssh.sshd
-   0   org.postfix.master
111   -   org.ntp.ntpd
-   0   org.cups.cupsd
113   -   com.vix.cron
bash-3.2$ sudo launchctl list | grep greenbytes
367   -   com.getgreenbytes.zfs.loader
-   0   com.getgreenbytes.zfs.delegate
-   0   com.getgreenbytes.zevo.forum.satadru.zpadmin
-   0   com.getgreenbytes.zevo.forum.satadru.zpadmin-scrub
bash-3.2$ sudo launchctl load /Library/LaunchAgents/com.getgreenbytes.zfs.notifier.plist
nothing found to load


I guess that as with the earlier attempt, such things are:

> not allowed at current boot level

I don't know the details of how Apple makes a boot safe, but I'm glad that third party stuff such as KEXTs for ZEVO don't load in this boot mode.

(When I see KEXTs from Kaspersky, and occasionally from Objective Development, load in safe mode – however briefly – I wonder whether they're bending or breaking Apple's 'rules'.)
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron