[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to use btrfs as root?



On 2010-06-29 12:02 +0200, Boyd Stephen Smith Jr. wrote:

> On Monday 28 June 2010 21:14:32 Magicloud Magiclouds wrote:
>> Hi,
>>   I am trying to make a debian sid system with btrfs as root.
>
> Make sure it is Sid.  There were some changes made to dpkg in order to prevent 
> package meta-data corruption from occurring on btrfs.  Btrfs behaves 
> differently from most other file systems in the way dirents are returned while 
> the directory is being modified.  I can't remember the exact dpkg version 
> these changes were made.

That was in dpkg 1.15.7.  Both sid and squeeze have 1.15.7.2 now.

>>   I installed debian sid on ext3 root, compiled 2.6.34 kernel. Booted
>> to 2.6.34, it mounted a btrfs data partition right.
>>   Then I booted into debian live, converted the root to btrfs, rebooted.
>>   I got this:
>> FATAL: Error inserting btrfs
>> (/lib/modules/2.6.34/kernel/fs/btrfs/btrfs.ko): Unknown symbol in
>> module, or unknown parameter (see dmesg)
>> modprobe: FATAL: Error inserting btrfs
>> (/lib/modules/2.6.34/kernel/fs/btrfs/btrfs.ko): Unknown symbol in
>> module, or unknown parameter (see dmesg)
>>   Any idea? Thanks.
>
> Oh, yeah.  I ran into this as well.  The btrfs module needs to load then 
> crc32c module in order to resolve some symbols.  Unfortunately, this seems to 
> be done in a way that depmod does not detect, even in Sid.  Because of this, 
> your initramfs may not have the crc32c module available since it is not 
> detected as a dependency of the btrfs module.

To be fair, this is not a bug in btrfs.  Rather the problem is that
btrfs depends on libcrc32c but that module does not depend on crc32c (or
anything else).  Kernel developer Herbert Xu claims that this is because
libcrc32c can be used with optimized implementations¹.

> I believe you need a fairly recent initramfs-tools in order for it to 
> correctly include even the btrfs module, so it maybe be best to use my 
> /etc/initramfs-tools/modules in its entirety:
> btrfs
> libcrc32c
> zlib_deflate
> crc32c

Actually libcrc32c and zlib_deflate do not need to be spelled out,
because btrfs depends on them.

Sven


¹ http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=69c35efcf1576ab5f00cba83e8ca740923afb6c9


Reply to: