rootfs/btrfs -> kernel panic

Tried to install rootfs on an USB stick (64GB) via dietpi-drive manager. Formated the drive with btrfs but getting kernel panic during reboot:

end Kernel panic not syncing: VFS: Unable to mount root fs on unknown-block(0,1)

detailed messages see attachement

What did I do wrong? How can I fix it?
Running latest dietpi on Raspberry Pi 3

Can you plug the SDcard into external system and paste content of cmdline.txt.
If you have an external Linux system, then /etc/fstab from the USB stick would be also good to know.

Here’s cmdline.txt:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 rootdelay=10 root=PARTUUID=000a14f5-01 rootfstype=btrfs elevator=deadline rootwait

…and fstab from the usb stick:

tmpfs /tmp tmpfs defaults,size=487M,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /DietPi tmpfs defaults,size=10m,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /var/log tmpfs defaults,size=50m,noatime,nodev,nosuid,mode=1777 0 0

# MISC: encryptfs, vboxsf (VirtualBox shared folder), bind mounts


PARTUUID=000a14f5-01 / auto defaults,noatime,rw 0 1
PARTUUID=b8ef7a27-01 /boot auto defaults,noatime,rw 0 1

Works with f2fs. So I gonna stick with that.

Okay entries are correct, so it seems on RPi root on BTRFS is not supported. Although strange since it’s core part of the kernel. Will do some research and in case add an abort to the drive manager.

Okay quick find:

  • BTRFS is NOT part of the kernel on RPi but needs to be enabled as kernel module. I could verify it’s a module on my RPi2 with Linux 4.19.
  • To load rootfs itself from BTRFS, the module needs to be loaded by the bootloader from boot partition. This can be achieved via initramfs.
  • initramfs-tools assures that the initramfs is updated automatically in case of a kernel update, but in case of RPi there are always two versions auto-created, one for ARMv6 (RPi1/Zero/Zero W) and one for ARMv7 (all other RPi models). This then is too large for the /boot partition (it seems), so it fails. Then (re)boot fails on bootloader level since initramfs is broken.
  • So all this should only be done by experienced users which know how to fix possible issues and in case can create/handle initramfs manually when a kernel update has occurred. So we need to block moving RootFS to BRTFS on RPi for now.

Thanks for clarification!

Transferring RootFS to BTRFS is now denied by drive manager, since on Odroids the issue is the same:

Creating/Manipulating the initramfs savely is another topic that we might have a look at in the feature.