You are not logged in.

#1 2016-09-12 12:39:04

gen2arch
Member
Registered: 2013-05-16
Posts: 182

SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

Hi,

I am no longer able to boot my custom built kernel 4.7.2 I built and installed via ABS.

This is an efi stub enabled kernel and I boot it directly from the EFI shell (without a boot manager).

Shortly after starting the efi kernel, boot hangs with the message "unknown filesystem type: btrfs", and I am dropped to an emergency shell. My root filesystem is btrfs.

This is weird as I didn't change anything in my setup and my initrams contain the "filesystems" hook.

The default Arch kernel (same version) does boot though.


Help anyone?

Thanks

Last edited by gen2arch (2016-09-20 15:06:37)

Offline

#2 2016-09-12 14:22:13

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

Check if the btrfs module is included in the initramfs if you didn't compile it to be included in the kernel.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2016-09-12 14:39:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

Are you using the same initramfs for both kernels?  When last did you update the main line kernel? From which version to which version?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2016-09-12 20:36:35

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

R00KIE wrote:

Check if the btrfs module is included in the initramfs if you didn't compile it to be included in the kernel.

actually, I think it doesn't have to; btrfs normally is covered by the "filesystem" hook in mkinitcpio.conf; I tried though to put "btrfs" explicitly in the "modules" entry of this configuration file, rebuilt the initramfs ("lsinitcpio -a" showing now the "explicit" flag behind the "btrfs" entry), but the same error occurred!

thanks!

Last edited by gen2arch (2016-09-12 20:49:19)

Offline

#5 2016-09-12 20:46:51

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

ewaller wrote:

Are you using the same initramfs for both kernels?  When last did you update the main line kernel? From which version to which version?

No: the initramfs are different. But I checked both of them them with "lsinitcpio -a" command and they were very similar, the only difference being a couple of "crc"-related modules that were in the official arch initramfs, but not in mine, or at least none of the differences seemed to be related to filesystems.

I updated the kernel via ABS today; there was a long time between this kernel and the one I built before (which was mid-June, so almost 3 months); I probably updated from a 4.5 (or 4.6?) to a 4.7 kernel.

BTW I configure my custom kernels via the modeprobe.db mechanism.

Thanks for your help!

Offline

#6 2016-09-12 22:17:53

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

A few quick thoughts:

- Having the filesystem hook in your hooks line will only include the modules that are available, that is the ones you have built, given that you have built the kernel yourself I was just trying to make sure the module was there, that's the first thing I would check.

- Those crc related modules might be needed but not included automatically, I remember that some time back for f2fs you needed to explicitly include them, otherwise if the root fs was f2fs it would just not mount, maybe you are having a similar problem.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2016-09-13 18:20:46

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

That is the beauty of modprobed-db -- it keeps track of all modules you have had loaded over time, and makes sure you don't accidentally exclude them.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2016-09-13 19:50:27

kihanos
Member
Registered: 2012-08-06
Posts: 13

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

I've had exactly the same issue today, with a custom kernel and using modprobed-db.

Rookie's advice actually worked. I forced crc32c-intel and crc32c_generic into the initramfs (in the modules section) and it finally booted. Maybe only one of the two is needed, I haven't tested it yet. I don't really understand why mkinitcpio's "autodetect" doesn't see that crc is needed, but anyway.

Offline

#9 2016-09-13 23:12:28

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

Maybe because btrfs does not say explicitly that it depends on crc32c{-intel,_generic}? I have never looked into how the filesystems hook works but that should be where all the answers can be found.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2016-09-14 05:55:12

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

Hi everyone,

thanks for the input, that is very helpful, I'll check R00kies tip with explicitely including crc tomorrow when back in office, kihanos post that it actually does work is promising.

The weird thing for me remains: what triggered this disfunction? I didn't change my setup, btrfs was always included in the kernel config, so between June and now something must have changed in btrfs, in modeprobed_db or in the kernels "make localmodconfig" target.

Offline

#11 2016-09-14 10:12:27

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

I don't recall exactly what triggered this but I believe it was a kernel update, at least for f2fs.

Regarding modeprobed_db, as far as I know it has nothing to do with the initramfs, and you don't want it to have anything to do with the initramfs as only the modules needed to boot should be included.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#12 2016-09-16 13:25:32

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

This is just to confirm: system boots again after explicitly including crc32c-intel in the modules section of  /etc/mkinitcpio.conf.
Kernel 4.7.3. Only crc32c-intel is needed. But without it the system won't boot.

Thanks for everyone's input!

Offline

#13 2016-09-16 17:23:17

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: SOLVED: Custom kernel boot failure: "unknown filesystem type: btrfs"

Please edit your first post and add solved to the title[1].

[1] https://wiki.archlinux.org/index.php/Co … ow_to_post


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB