suck suck suck fsck.btrfs, fsck.

朝起きたら実はDebianがネタはもう一つあって、起動しなくなってた。
/sbin/fsck.btrfsが迷子になって、fsckできないからって/をroでマウントしてメンテナンスモードに落ちられた。

ioriveurは僕です。
IRCの#btrfsチャネルでちょっと愚痴をいったらreportbugしろっていわれて面倒くさかったからとりあえずブログに書くことにした。
以下経緯。

ioriveur> switching to wheezy from squeeze,
ioriveur> I was so confused caz it wont boot.
ioriveur> it's by renaming of fsck.btrfs to btrfsck.
cjb> file a debian bug
ioriveur> while the boot, It can't find fsck.btrfs, and so not boot.
ioriveur> yes, I will.
ioriveur> now, this ugly hack enable to boot:
ioriveur> cp /sbin/btrfsck /sbin/fsck.btrfs
ioriveur> but it says "can't find -a" or something like that.
darksatanic> Probably better, given what btrfsck does right now, to do ln -s /bin/true /sbin/fsck.btrfs
ioriveur> Where is the config file about fsck-ing in the boot stage?
darksatanic> /etc/fstab -- last column, change to 0
ioriveur> Oh, yes, but it won't fsck, will it?
darksatanic> Yes, but btrfsck doesn't do anything.
ioriveur> Really?
darksatanic> Yes.
darksatanic> It's read-only. It _can't_ fix anything...
darksatanic> All it can do is check consistency, and even then it's more likely to break than the kernel code.
ioriveur> so, what make it renamed fsck.btrfs to btrfsck?
darksatanic> (i.e. there are filesystems that fsck will segfault on that the kernel will mount happily).
cjb> ioriveur: something debian did
darksatanic> We ship btrfsck.
darksatanic> Debian have set it up as fsck.btrfs as well.
ioriveur> Oh, yes?
darksatanic> You'll probably find it's a hardlink.
ioriveur> well, in /sbin? My machine and I couldn't so I was in trouble.
cjb> darksatanic: or they had, before wheezy
ioriveur> Yes, that seems to be truth, I found it when it was squeeze.
ioriveur> So, I should reportbug? It is spam of question..... :-(
cjb> you should see whether someone else has reported it, and report it if they haven't
cjb> #debian is probably more ontopic for that
ioriveur> OK! Thanks, I'll move.

つーことで、btrfsをルートファイルシステムとして使ってる奇特な人間で、fsck.btrfsが見えなくなって困ったらfstabをいじってfsckフラグを0にするとか、ln -s /bin/true /sbin/fsck.btrfsするとか、そういうHackで切り抜ければいいらしいです。
なんていったってbtrfsckやfsck.btrfsはホントにチェックするだけで、直さないんだから別にいいだろ的な発想らしいです。