unix - badblocks:尝试确定设备大小时资源繁忙
问题描述
我正在尝试在 macOS High Sierra 10.13.6 上运行坏块。我使用 macports 安装了坏块。我在尝试运行它时不断遇到错误,我什至不知道如何让坏块运行
sudo badblocks -c 4096 -s -w -o /Users/mcbeav/Desktop/blocks.txt /dev/disk0s2
这不断返回错误
badblocks:尝试确定设备大小时资源繁忙
如果我尝试
sudo badblocks -c 4096 -s -w -o /Users/mcbeav/Desktop/blocks.txt /dev/disk0
我得到错误
badblocks:值太大,无法存储在数据类型无效的结束块(7813820416)中:必须是 32 位值
谁能帮帮我?
解决方案
我的建议是你:
a) 在恢复模式下通过 Mac OS X 控制台运行 badblocks
High Sierra (10.13+) 和 APFS(文件格式系统)可防止磁盘上的某些操作。您必须处于恢复模式或关闭磁盘保护才能按照您的建议进行操作。
Turn off your Mac (Apple > Shut Down).
Hold down Command-R and press the Power button. ...
Wait for OS X to boot into the OS X Utilities window.
Choose Utilities > Terminal.
Enter csrutil disable.
Enter reboot.
Mac OS X 解决方法:
根据过去的经验,我的感觉是您正在使用 MacOSX 的安全功能(磁盘保护和应用程序认证)。
引导到 Ubuntu(USB 记忆棒)并以这种方式运行 badblocks 测试会更容易。(在我看来)
我希望这能为您指明正确的方向。
推荐阅读
- c# - 阻止其他进程和用户访问文件
- angular - Angular隐藏具有特定索引的div
- javascript - VSCode jsconfig.json 无法识别窗口对象
- vba - 在vba中选择特定页面
- react-native - 如何在反应原生应用程序中更改文本输入的边框颜色
- python - 使用 lz4 + django + rest_framework 对 POST 和 GET 请求进行压缩和解压缩
- javascript - Jscript 语法错误 - 代码 800A03EA - Microsoft JScript 编译 - Sawtooth 供应链 - Windows 10
- javascript - 获取推送不是填充数组的函数
- php - 会话开始错误但不知道如何解决
- android - 根据用户ID显示json数据letest记录