FreeBSD下zfs: failed with error 6错误解决
环境:
重编译完内核,安装后重启,显示:zfs: failed with error 6,然后就是mountroot>提示了。这是一种很少见的zfs错误代码,一般2或19居多。
追踪:
看最后一行,仍然显示一串guid号,所以怀疑问题仍然出在gpt上面。在loader.conf里面加上两行后仍然不行:
kern.geom.label.gptid.enable="0"
kern.geom.label.disk_ident.enable="0"
加这两行的原因是安装的时候,是以adap3为zfs目标,如果没有这两行,会把磁盘显示为guid的格式,导致zfs pool找不到磁盘,从而产生错误2。
加上下面一行,显示zfs调试信息,但是由于USB键盘不能使用,所以只能看到最后一行,仍然为guid格式。
vfs.zfs.debug="1"
boot_pause="YES"
最后重新过滤了一遍kernel配置,发现有三项被注释掉了:
options GEOM_PART_GPT # GUID Partition Tables.
#options GEOM_RAID # Soft RAID functionality.
options GEOM_LABEL # Provides labelization
这三项跟guid紧密相联的,怀疑是跟它们有关,于是先加下面两行到loader.conf,重启:
geom_label_load="YES"
geom_part_gpt_load="YES"
竟然顺利启动了!
原因:
在内核中禁用了GEOM相关的选项,导致geom系统不正常工作。解决:
去掉注意,重新编译内核:
options GEOM_PART_GPT # GUID Partition Tables.
#options GEOM_RAID # Soft RAID functionality.
options GEOM_LABEL # Provides labelization

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
