macOS

您所在的位置:网站首页 mac的nvram macOS

macOS

#macOS | 来源: 网络整理| 查看: 265

本文总结如何在 macOS 上设置 boot-args 以及 boot-args 的作用。

Update: 2022 / 10 / 18

macOS | nvram boot-args的作用及设置方式 debug=0x144问题iokit/common not permitted进入 recovery partition 参考链接

debug=0x144

参考这里 1

sudo nvram boot-args="debug=0x144"

这是内核调试功能的组合,将向您显示有关内核进程的额外信息,如果系统遇到内核崩溃,这将非常有用。

另一种选择是使用 debug=0x14e,它将显示更多的日志记录选项。这样做的主要用途是它启用旧式内核恐慌,在屏幕上显示有关系统恐慌原因的滚动文本,而不是显示灰色背景和仅重新启动系统的消息。

替代调试选项如下,尽管这些可能只对内核程序员有用:

0x01 - Stop at boot time and wait for the debugger to attach 0x02 - Send kernel debugging output to the console 0x04 - Drop into debugger on a nonmaskable interrupt 0x08 - Send kernel debugging information to a serial port 0x10 - Make ddb the default debugger 0x20 - Output diagnostics information to the system log 0x40 - Allow the debugger to ARP and route 0x80 - Support old versions of gdb on newer systems 0x100 - Disable the graphical panic dialog screen Source: Boot argument options in OS X

ddb 只是一个调试器。一旦遇到系统问题,启用这些模式来收集信息是绝对安全的。

问题 iokit/common not permitted

当遇到如下的报错时 2:

% sudo nvram boot-args="debug=0x144" Password: Sorry, try again. Password: nvram: Error setting variable - 'boot-args': (iokit/common) not permitted

因为从 macOS Sierra 开始,您必须启动到 recovery partition 才能运行 nvram 命令来正确设置 boot-args NVRAM 变量。

此外,SIP 适用于 Mac 上的所有用户,包括管理员和 root。 在 recovery patition 下使用 csrutil disable 来禁用 SIP 将允许您在正常的启动中设置引导参数。

警告:除非确实需要,否则不应禁用 SIP。

进入 recovery partition 非苹果芯片 PC 3 通过重新启动并按住 ⌘+R 进入恢复模式,直到出现 Apple 标志。 在顶部菜单中单击实用程序 > 终端。 在终端窗口中输入 csrutil disdable 。然后重新启动 Mac。 苹果芯片 PC 4 启动 Mac 并继续按住电源按钮,直至您看到启动选项窗口。选择“选项”,然后点按“继续”。 参考链接

What does "sudo nvram boot-args=“debug=0x10"” do to my Mac? ↩︎

How to overcome Error Setting Variable - ‘boot-args’ : (iokit/common) not permitted ↩︎

Trying to set boot-args with nvram gets “general error” on Sierra ↩︎

Mac电脑进入恢复模式详细教程 ↩︎



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3