rootfs/btrfs -> kernel panic Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
dieitpi
Posts: 11
Joined: Sun Feb 18, 2018 9:05 am

rootfs/btrfs -> kernel panic

Post by dieitpi »

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

Code: Select all

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
Attachments
IMG_20190526_193030.jpg
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: rootfs/btrfs -> kernel panic

Post by MichaIng »

@dieitpi
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.
dieitpi
Posts: 11
Joined: Sun Feb 18, 2018 9:05 am

Re: rootfs/btrfs -> kernel panic

Post by dieitpi »

Here's cmdline.txt:

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 rootdelay=10 root=PARTUUID=000a14f5-01 rootfstype=btrfs elevator=deadline fsck.repair=yes rootwait
..and fstab from the usb stick:

Code: Select all

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
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
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=000a14f5-01 / auto defaults,noatime,rw 0 1
PARTUUID=b8ef7a27-01 /boot auto defaults,noatime,rw 0 1
dieitpi
Posts: 11
Joined: Sun Feb 18, 2018 9:05 am

Re: rootfs/btrfs -> kernel panic

Post by dieitpi »

Works with f2fs. So I gonna stick with that.
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: rootfs/btrfs -> kernel panic

Post by MichaIng »

@dieitpi
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: https://raspberrypi.stackexchange.com/q ... n-raspbian
- 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.
dieitpi
Posts: 11
Joined: Sun Feb 18, 2018 9:05 am

Re: rootfs/btrfs -> kernel panic

Post by dieitpi »

Thanks for clarification!
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: rootfs/btrfs -> kernel panic

Post by MichaIng »

Transferring RootFS to BTRFS is now denied by drive manager, since on Odroids the issue is the same: https://github.com/MichaIng/DietPi/comm ... cc57e379f4
Changelog: https://github.com/MichaIng/DietPi/comm ... e945828c2a

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