Monthly Archive: 4 月, 2025

OCLP 在老旧Mac上遇到 App 崩溃 Namespace SIGNAL, Code 4 Illegal instruction:4 的解决办法

OCLP 是一个允许老旧Mac允许不被支持的系统解决方案,目前,如果你的机器CPU不支持 AVX/AVX2指令集,在更新到 Sequioa 后一些App会崩溃,报错。Namespace SIGNAL, Code 4 Illegal instruction: 4,这是因为 JetEngine.JSStack.scheduler 需要 AVX/AVX2 支持,否则就会报错。

目前越来越多的App会调用 JIT,甚至JavaScriptCore也会调用,这就导致相当多的App无法启动或正常加载,包括 Safari,Music,App Store等,目前的的解决办法是:

  1. 在OCLP 中注入 no AVX/AVX2 kext, 具体名称为
    NoAVXFSCompressionTypeZlib.kext
    NoAVXFSCompressionTypeZlib-AVXpel.kext
  2. 重启机器后在命令行输入一下命令:
    launchctl setenv JSC_useJIT true; launchctl setenv __XPC_JSC_useJIT true
  3. 再次开启会崩溃的App,问题解决。

这个方法仅限目前有效,以后再更新到新的系统,可能会无法禁用 JIT 调用,方法会失效。

这个方法同样适用于老旧 CPU 架构的 X86 用户,通常2012年之前的CPU都不支持AVX/AVX2,具体可以用 MacCPUID 查看。

macOS 15 Sequoia 如何修改 read only 的系统只读文件

随着苹果越来越严格的系统文件权限限制,在 Sequoia 下想要修改 /System 下的文件变得越来越难,现在几乎已经不可能在系统中直接修改。本文将介绍如何在 Recovery 恢复模式下修改系统文件价。

注意:修改系统文件可能会引起系统严重错误,导致系统无法开机、数据顺坏或被木马病毒破坏,在操作之前请清楚的知道你在做什么,否则请停止。

另外,有些地方提到可以在 /etc/synctheri.conf 添加映射来修改系统文件,其实这个是不准确的,synctheri.conf 只能映射目录到 / 根文件夹,是不能修改 /System 下的文件的。

教程开始:

  1. 重启系统,启动系统到 Recovery 模式
  2. 关闭SIP
    在Recovery 模式下打开终端,输入以下命令
    csrutil disable
    OpenCore 用户NVRM 里添新增 7C436110-AB2A-4BBB-A880-FE41995C9F82,然后添加键值 csr-active-config, 类型 Data, 值 67000000
  3. 重启系统,再次进入Recovery Mode
  4. 验证 SIP 是否关闭,打开终端输入命令
    csrutil status
    确认所有SIP保护项均已关闭
  5. 挂载要修改的系统根目录为可读写,终端输入命令:
    mount -uw /Volumes/Macintosh\ HD # 确认你的系统卷名称
    cd /Volumes/Macintosh\ HD
  6. 编辑、修改要改动的系统文件,这里以替换一个Framework文件为例,输入复制命令
    # 备份原始文件(可选)
    cp -R System/Library/PrivateFrameworks/TargetFramework ./TargetFramework.backup
    # 替换文件
    cp -R /path/to/your/Framework System/Library/PrivateFrameworks/
  7. 重建系统快照(关键,没有这一步重启后修改就没了,但是如果你的文件有问题,你的系统可能就会崩溃)
    bless --folder /Volumes/Macintosh\ HD/System/Library/CoreServices --bootefi --create-snapshot
  8. 重启系统,进入系统验证文件是否添加成功。
  9. 验证文件添加成功后,一定一定要记得回到 Recovery 模式关闭SIP,以确保系统安全。
    csrutil enable
  10. 重启,进入正常系统,修改结束。

如果修改 OpenCore 启动选择器的磁盘名称

修改 /System/Volumes/Preboot/uuid/System/Library/CoreServices/.disk_label.contentDetails 文件里的磁盘名称即可。

sudo nano /System/Volumes/Preboot/uuid/System/Library/CoreServices/.disk_label.contentDetails

uuid 替换成你的系统里显示的 uuid 即可。

如果系统SIP不允许的话,先关闭SIP,设置完成后再打开即可。

解决 macOS Sequoia SSH无法连接:kex_exchange_identification: read: Connection reset by peer

从 Sonoma 升级到 Sequoia 遇到过各种各样的SSH连接问题,其中包括但不限于
1. 防火墙问题
2. WiFi 隐私问题
3. 加密协议不匹配问题
4. SSH 版本强制 2.0 的问题

但今天又遇到一个新问题,通过SSH连接报错,提示 kex_exchange_identification: read: Connection reset by peer,看起来连接被中断,通过 Verbose Mode 查看SSH连接提示如下:

$ ssh -v [email protected]
OpenSSH_9.2p1 Debian-2+deb12u5, OpenSSL 3.0.15 3 Sep 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 10.0.1.3 [10.0.1.3] port 22.
debug1: Connection established.
debug1: identity file /home/zhaoxitao/.ssh/id_rsa type -1
debug1: identity file /home/zhaoxitao/.ssh/id_rsa-cert type -1
debug1: identity file /home/zhaoxitao/.ssh/id_ecdsa type -1
debug1: identity file /home/zhaoxitao/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/zhaoxitao/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/zhaoxitao/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/zhaoxitao/.ssh/id_ed25519 type 3
debug1: identity file /home/zhaoxitao/.ssh/id_ed25519-cert type -1
debug1: identity file /home/zhaoxitao/.ssh/id_ed25519_sk type -1
debug1: identity file /home/zhaoxitao/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/zhaoxitao/.ssh/id_xmss type -1
debug1: identity file /home/zhaoxitao/.ssh/id_xmss-cert type -1
debug1: identity file /home/zhaoxitao/.ssh/id_dsa type -1
debug1: identity file /home/zhaoxitao/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u5
kex_exchange_identification: read: Connection reset by peer
Connection reset by 10.0.1.3 port 22

通过 debug1: Connection established. 判断连接没有问题,防火墙OK,WiFi 隐私没问题。但是SSH客户端没有匹配到任何一种加密模式,开始排查加密问题,于是在 /etc/ssh/sshd_config.d/100-macos.conf 里增加了更宽泛的加密协议:

Read more

ABOUT

老赵的个人博客,关于 Mac, iPhone, iPad, iPod等产品的软件和硬件技术交流。也讨论Linux/UNIX技术,服务器运维技术等。

2025 年 4 月
 12345
6789101112
13141516171819
20212223242526
27282930  

Powerd by WordPress on Xserve
Xserve 2009
@2012-2024 HelloMac Copyright