1

I'm trying to compile a custom kernel with BTRFS support under Ubuntu 18.04. When I compile and install 4.20.70-generic everything's fine and the system starts without any problem. Btw, I can't use anything newer, because I also need a custom driver (later) that won't compile on anything newer than 4.x.

When I compile the same kernel source using a customized Kernel config file for 4.17.4 (make oldconfig) and answer all the questions, then the same system can't find the BTRFS root volume. Showing the following error:

Begin: Running /scripts/init-premount ... done
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done
Begin: Running /scripts/local-premount ... Btrfs loaded, crc32c=crc32c-generic
Scanning for Btrfs filesystems
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done
done.
Gave up waiting for root file system device
ALERT! UUID=a7ff8aa1-5518-4cd3-992f-eab4ed909443 does not exist. Dropping to a shell!

The kernel cmdline is the same for both kernel and the UUID is valid and both .config files (make menuconfig -> make install) have the same BTRFS module included:

CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y

linux   /@/boot/vmlinuz-4.18.0-15-generic root=UUID=a7ff8aa1-5518-4cd3-992f-eab4ed909443 ro rootflags=subvol=@

linux   /@/boot/vmlinuz-4.18.0-15-mykernel root=UUID=a7ff8aa1-5518-4cd3-992f-eab4ed909443 ro rootflags=subvol=@

So there must be something else that needs to be enabled when compiling the kernel. What am I missing?

9
  • How did you create the btrfs volume?
    – pipe
    Nov 9, 2023 at 9:01
  • I used gparted from the Ubuntu 18.04 install iso, then did a minimal Ubuntu installation. There are currently no other partitions or volumes.
    – Dude
    Nov 9, 2023 at 9:07
  • 1
    It's probably not a btrfs problem, but a block device problem: if the system can't find the disk, it won't find the (partition and) filesystem on it. Can't tell with information available in the question.
    – A.B
    Nov 9, 2023 at 13:43
  • It obviously found the kernel and initrd image in the /boot directory, which are on the same device/Btrfs volume.
    – Dude
    Nov 9, 2023 at 14:04
  • 1
    "It" is first time GRUB 2nd time the Linux kernel: not the same "It". What runs is provided in RAM to the kernel.
    – A.B
    Nov 9, 2023 at 14:09

1 Answer 1

0

I finally figured it out based on trial and error, and also cross-verified the issue. The kernel was missing:

CONFIG_FUSION: Fusion MPT device support

Incidentally, I'm running the installation under VMware Fusion (MacOS), and for the last 10 years it used to stay out of the picture, but when building your own kernel, the above is required. Also required is SCSI support.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .