Not booting after upgrade to Buster - using btrfs

First off thanks for the great work, I have been enjoying osmc for years.

My system: RPi2b.
I have converted the rootfs to btrfs 2-3 years ago using recipe at this post and all was perfect through many upgrades, provided for every new kernel I updated initrd file. Not this time, I very early in the boot process end up on a console complaining about missing init files:

[2.25....] Failed to execute /init (error -2)
can't run '/etc/init.d/rcS : No such file or directory

Please press Enter to activate this console.   <I press Enter at this point>
can't run '/bin/sh': No such file or directory

Restoring the previous /boot partition, which still has the 4.19.122-1 kernel on, allows me to boot and all is good. The second error, after I pressed “Enter”, made me suspicious, so I compared content of initrd.img-4.19.122-2-osmc vs. initrd.img-4.19.122-1-osmc, and it became clear that many files in the initrd got moved to usr/ directory.

Content of initrd.img-4.19.122-1-osmc, working fine for both Stretch and Buster [cut short to comply with size limitations]:

.
bin
bin/kmod
bin/btrfs
bin/btrfs-zero-log
bin/udevadm
bin/ntfs-3g
bin/chroot
bin/fstype
bin/halt
bin/ipconfig
bin/losetup
bin/minips
bin/nfsmount
bin/nuke
bin/pivot_root
bin/poweroff
bin/reboot
bin/resume
bin/run-init
conf
conf/conf.d
conf/arch.conf
conf/initramfs.conf
etc
etc/fstab
etc/mtab
etc/modprobe.d
etc/modprobe.d/blacklist-rc6.conf
etc/udev
etc/udev/udev.conf
etc/ld.so.conf
etc/ld.so.conf.d
etc/ld.so.conf.d/arm-linux-gnueabihf.conf
etc/ld.so.conf.d/libc.conf
etc/ld.so.conf.d/000-rbp.conf
etc/ld.so.cache
lib
lib/modules
lib/modules/4.19.122-1-osmc
lib/modules/4.19.122-1-osmc/modules.builtin
lib/modules/4.19.122-1-osmc/modules.order
lib/modules/4.19.122-1-osmc/kernel
lib/modules/4.19.122-1-osmc/kernel/drivers
lib/modules/4.19.122-1-osmc/kernel/drivers/hid
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-apple.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-aureal.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-belkin.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-cherry.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-chicony.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-ezkey.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-gembird.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-holtek-kbd.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-holtek-mouse.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-keytouch.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-led.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-logitech-dj.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-logitech-hidpp.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-logitech.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-microsoft.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-monterey.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-ortek.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-plantronics.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-roccat-common.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-roccat.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-roccat-arvo.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-roccat-isku.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-roccat-lua.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-roccat-ryos.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-roccat-savu.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-samsung.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-sjoy.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-steam.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-sunplus.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-topseed.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/hid-xinmo.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/hid/wacom.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/input
lib/modules/4.19.122-1-osmc/kernel/drivers/input/ff-memless.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/clk
lib/modules/4.19.122-1-osmc/kernel/drivers/clk/clk-allo-dac.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/clk/clk-hifiberry-dachd.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/clk/clk-hifiberry-dacpro.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/gpio
lib/modules/4.19.122-1-osmc/kernel/drivers/gpio/gpio-arizona.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/i2c
lib/modules/4.19.122-1-osmc/kernel/drivers/i2c/busses
lib/modules/4.19.122-1-osmc/kernel/drivers/i2c/busses/i2c-bcm2708.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/i2c/busses/i2c-bcm2835.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/i2c/busses/i2c-gpio.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/i2c/algos
lib/modules/4.19.122-1-osmc/kernel/drivers/i2c/algos/i2c-algo-bit.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/arizona-ldo1.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/arizona-micsupp.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/da9210-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/da9211-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/fan53555.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/fixed.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/gpio-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/isl6271a-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/isl9305.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/lp3971.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/lp3972.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/lp872x.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/lp8755.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/ltc3589.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/ltc3676.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/max1586.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/max8649.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/max8660.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/max8952.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/max8973-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/mt6311-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/pfuze100-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/pv88060-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/pv88080-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/pv88090-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/tps51632-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/tps62360-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/tps65023-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/tps6507x-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/tps65132-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/tps6524x-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/regulator/vctrl-regulator.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/rtc
lib/modules/4.19.122-1-osmc/kernel/drivers/rtc/rtc-bq32k.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/rtc/rtc-ds1305.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/rtc/rtc-ds1307.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/rtc/rtc-ds1374.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/rtc/rtc-ds1390.ko
lib/modules/4.19.122-1-osmc/kernel/drivers/rtc/rtc-ds1672.ko

[NB: cut short to comply with size limitations of post]

Content of initrd.img-4.19.122-2-osmc, not booting [cut short to comply with size limitations]:

.
bin
conf
conf/arch.conf
conf/conf.d
conf/initramfs.conf
conf/modules
etc
etc/fstab
etc/ld.so.cache
etc/ld.so.conf
etc/ld.so.conf.d
etc/ld.so.conf.d/000-rbp.conf
etc/ld.so.conf.d/arm-linux-gnueabihf.conf
etc/ld.so.conf.d/libc.conf
etc/modprobe.d
etc/modprobe.d/blacklist-rc6.conf
etc/mtab
etc/udev
etc/udev/udev.conf
init
lib
lib64
run
sbin
scripts
scripts/functions
scripts/init-bottom
scripts/init-bottom/ORDER
scripts/init-bottom/udev
scripts/init-top
scripts/init-top/ORDER
scripts/init-top/all_generic_ide
scripts/init-top/blacklist
scripts/init-top/keymap
scripts/init-top/udev
scripts/local
scripts/local-bottom
scripts/local-bottom/ORDER
scripts/local-bottom/ntfs_3g
scripts/local-premount
scripts/local-premount/ORDER
scripts/local-premount/btrfs
scripts/local-premount/ntfs_3g
scripts/local-premount/resume
scripts/nfs
usr
usr/bin
usr/bin/btrfs
usr/bin/chroot
usr/bin/fstype
usr/bin/halt
usr/bin/ipconfig
usr/bin/kmod
usr/bin/losetup
usr/bin/minips
usr/bin/nfsmount
usr/bin/ntfs-3g
usr/bin/pivot_root
usr/bin/poweroff
usr/bin/reboot
usr/bin/run-init
usr/bin/udevadm
usr/lib
usr/lib/arm-linux-gnueabihf
usr/lib/arm-linux-gnueabihf/ld-2.28.so
usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3
usr/lib/arm-linux-gnueabihf/ld-linux.so.3
usr/lib/arm-linux-gnueabihf/libacl.so.1
usr/lib/arm-linux-gnueabihf/libacl.so.1.1.2253
usr/lib/arm-linux-gnueabihf/libattr.so.1
usr/lib/arm-linux-gnueabihf/libattr.so.1.1.2448
usr/lib/arm-linux-gnueabihf/libblkid.so.1
usr/lib/arm-linux-gnueabihf/libblkid.so.1.1.0
usr/lib/arm-linux-gnueabihf/libc-2.28.so
usr/lib/arm-linux-gnueabihf/libc.so.6
usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1
usr/lib/arm-linux-gnueabihf/libdevmapper.so.1.02.1
usr/lib/arm-linux-gnueabihf/libdl-2.28.so
usr/lib/arm-linux-gnueabihf/libdl.so.2
usr/lib/arm-linux-gnueabihf/libgcc_s.so.1
usr/lib/arm-linux-gnueabihf/libkmod.so.2
usr/lib/arm-linux-gnueabihf/libkmod.so.2.3.4
usr/lib/arm-linux-gnueabihf/liblzma.so.5
usr/lib/arm-linux-gnueabihf/liblzma.so.5.2.4
usr/lib/arm-linux-gnueabihf/liblzo2.so.2
usr/lib/arm-linux-gnueabihf/liblzo2.so.2.0.0
usr/lib/arm-linux-gnueabihf/libm-2.28.so
usr/lib/arm-linux-gnueabihf/libm.so.6
usr/lib/arm-linux-gnueabihf/libntfs-3g.so.883
usr/lib/arm-linux-gnueabihf/libntfs-3g.so.883.0.0
usr/lib/arm-linux-gnueabihf/libpcre.so.3
usr/lib/arm-linux-gnueabihf/libpcre.so.3.13.3
usr/lib/arm-linux-gnueabihf/libpthread-2.28.so
usr/lib/arm-linux-gnueabihf/libpthread.so.0
usr/lib/arm-linux-gnueabihf/libresolv-2.28.so
usr/lib/arm-linux-gnueabihf/libresolv.so.2
usr/lib/arm-linux-gnueabihf/librt-2.28.so
usr/lib/arm-linux-gnueabihf/librt.so.1
usr/lib/arm-linux-gnueabihf/libselinux.so.1
usr/lib/arm-linux-gnueabihf/libssl.so.1.1
usr/lib/arm-linux-gnueabihf/libudev.so.1
usr/lib/arm-linux-gnueabihf/libudev.so.1.6.13
usr/lib/arm-linux-gnueabihf/libuuid.so.1
usr/lib/arm-linux-gnueabihf/libuuid.so.1.3.0
usr/lib/arm-linux-gnueabihf/libz.so.1
usr/lib/arm-linux-gnueabihf/libz.so.1.2.11
usr/lib/arm-linux-gnueabihf/libzstd.so.1
usr/lib/arm-linux-gnueabihf/libzstd.so.1.3.8
usr/lib/klibc-Tm5Kcygh62Zsrgmh7J5q50y2Vn8.so
usr/lib/ld-linux-armhf.so.3
usr/lib/libarmmem.so
usr/lib/modprobe.d
usr/lib/modprobe.d/aliases.conf
usr/lib/modprobe.d/fbdev-blacklist.conf
usr/lib/modprobe.d/systemd.conf
usr/lib/modules
usr/lib/modules/4.19.122-2-osmc
usr/lib/modules/4.19.122-2-osmc/kernel
usr/lib/modules/4.19.122-2-osmc/kernel/arch
usr/lib/modules/4.19.122-2-osmc/kernel/arch/arm
usr/lib/modules/4.19.122-2-osmc/kernel/arch/arm/lib
usr/lib/modules/4.19.122-2-osmc/kernel/arch/arm/lib/xor-neon.ko
usr/lib/modules/4.19.122-2-osmc/kernel/crypto
usr/lib/modules/4.19.122-2-osmc/kernel/crypto/arc4.ko
usr/lib/modules/4.19.122-2-osmc/kernel/crypto/xor.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block/cryptoloop.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block/drbd
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block/drbd/drbd.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block/nbd.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block/pktcdvd.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block/zram
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/block/zram/zram.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/cdrom
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/cdrom/cdrom.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/clk
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/clk/clk-allo-dac.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/clk/clk-hifiberry-dachd.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/clk/clk-hifiberry-dacpro.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/dax
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/dax/dax.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/gpio
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/gpio/gpio-arizona.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-apple.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-aureal.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-belkin.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-cherry.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-chicony.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-ezkey.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-gembird.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-holtek-kbd.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-holtek-mouse.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-keytouch.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-led.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-logitech-dj.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-logitech-hidpp.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-logitech.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-microsoft.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-monterey.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-ortek.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-plantronics.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-roccat-arvo.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-roccat-common.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-roccat-isku.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-roccat-lua.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-roccat-ryos.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-roccat-savu.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-roccat.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-samsung.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-sjoy.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-steam.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-sunplus.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-topseed.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/hid-xinmo.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/hid/wacom.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/i2c
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/i2c/algos
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/i2c/algos/i2c-algo-bit.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/i2c/busses
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/i2c/busses/i2c-bcm2708.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/i2c/busses/i2c-bcm2835.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/i2c/busses/i2c-gpio.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/input
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/input/ff-memless.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/input/keyboard
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/input/keyboard/gpio_keys.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/input/keyboard/matrix_keypad.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/input/matrix-keymap.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/md
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/md/dm-mod.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mfd
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mfd/arizona-i2c.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mfd/arizona-spi.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mfd/rpisense-core.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mfd/wl1273-core.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mmc
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mmc/host
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mmc/host/mmc_spi.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/mmc/host/of_mmc_spi.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/netconsole.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/phy
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/phy/mdio-bitbang.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/bsd_comp.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/ppp_async.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/ppp_deflate.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/ppp_generic.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/ppp_mppe.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/ppp_synctty.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/pppoe.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/ppp/pppox.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/slip
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/slip/slhc.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/net/slip/slip.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/arizona-ldo1.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/arizona-micsupp.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/da9210-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/da9211-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/fan53555.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/fixed.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/gpio-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/isl6271a-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/isl9305.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/lp3971.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/lp3972.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/lp872x.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/lp8755.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/ltc3589.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/ltc3676.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/max1586.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/max8649.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/max8660.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/max8952.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/max8973-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/mt6311-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/pfuze100-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/pv88060-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/pv88080-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/pv88090-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/tps51632-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/tps62360-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/tps65023-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/tps6507x-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/tps65132-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/tps6524x-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/regulator/vctrl-regulator.ko
usr/lib/modules/4.19.122-2-osmc/kernel/drivers/rtc

[NB: cut short to comply with size limitations for posts]

This suggests to me that there has been a change in initramfs-tools package in Buster that broke compatibility with osmc, but I am not proficient enough to find a fix. Any ideas?

On a separate but related note, I know that in the past there has been some attempt to have osmc support btrfs (see e.g. this thread) and I would be really thrilled if that got implemented…

Thanks in advance for any help

Hi

We don’t use initramfs-tools in OSMC.
We have our own initramfs system.

I’d be happy to accept a PR for this.

Sam

Sam you will have to forgive me, I don’t even know what a PR is…
I know osmc doesn’t use initramfs-tools, but it was the only way I could find to make a btrfs work. I am not skilled enough to tinker with osmc own initramfs

It looks like BTRFS doesn’t support swap files (until kernel 5.x); which could be a bit of a pain…

indeed using btrfs for my other machines that run 5.x kernels but ive tried it on rpis and with a 4.19 kernel with swapping its just a pain to work with.

other then that if it could be supported in the future it would be great cause it is a good filesystem.

OSMC is the only linux machine that is running ext4 in my house

swap is not the issue, I don’t think I ever used swap on osmc (surely am not now) and I don’t see the need for it, happily running kodi and a few other services without any problems. In case, one could use a separate partition for swap. Going off topic here and it is not my intent to start a thread on swap and btrfs, the question really is about issues with initramfs-tools.

I understand osmc doesn’t use this tool as default, but it still is a package available and it used to work perfectly until upgrade to buster.

I am not a newbie but also not a developer by any stretch of imagination, I don’t know enough to start trying to fix this, happy to chip in but I unfortunately I would need guidance, how init works is out of my depth

Thanks

I’ll take a look this evening (UK time).

The link provided by the OP shows ext4 being used for swap.

Edit: To get me up and running, can you provide me with the configuration you used (eg cmdline.txt, fstab, whatever) and details of how you ported the OSMC root partition to btrfs?

Edit 2: Tried following the instructions you linked to above on a fresh Buster image. No luck so far: “Default I/O scheduler not found”. Still awaiting details of your config.

It’s been a few years since I did the switch to btrfs (2016), so not very fresh in my memory, but in any case I pretty much followed the instructions in the post. For a few weeks I kept both the ext4 and btrfs partitions, just to be able to revert back if any issues. I have since deleted the ext4 partition completeley. I don’t use swap so I didn’t have to follow step 8. As I said, this has worked perfectly for years and many upgrades now, even wrote a script to automate initrd image and config.txt every time there is a kernel upgrade.

In regards to your test, I wouldn’t expect you to be able to succeed on a Buster image (although that is not the error I get), but it should work on a Stretch image.

My config files below, let me know if you need anything else.
/boot/cmdline.txt:

root=/dev/mmcblk0p2 rootflags=subvol=/rootfs rootfstype=btrfs rootwait quiet osmcdev=rbp2

/boot/config.txt

disable_overscan=0
disable_splash=0
start_x=1
gpu_mem_1024=256
hdmi_ignore_cec_init=1
cec_osd_name=Kodi
initramfs initrd.img-4.19.122-1-osmc followkernel
gpu_mem_256=112
gpu_mem_512=144
sdtv_mode=2
sdtv_aspect=3

/etc/fstab (you can see commented out what was the original ext4 root):

/dev/mmcblk0p1  /boot    vfat     defaults,noatime    0   0
#/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0
UUID=57439c96-78df-430e-8da1-0099a9312ac9  /        btrfs    defaults,noatime,subvol=/rootfs   0   0
UUID=57439c96-78df-430e-8da1-0099a9312ac9  /home    btrfs    defaults,noatime,subvol=/home     0   0
UUID=57439c96-78df-430e-8da1-0099a9312ac9  /media/btrfs.root    btrfs    auto,defaults,noatime,subvol=/     0   0

I just downgraded initramfs-tools to v=0.130 and it all works again, also with new kernel 4.19.122-2-osmc. Just for comparison, I also have a RPi4 running raspbian buster on kernel 5.4.51-v7l+, and there are no issues there (same btrfs setup, same procedure for creating initrd). The raspbian initrd file also has things moved to the /usr directory, but it creates no issues there.

Just FYI although technically off-topic here, I may have managed to find a way to support btrfs in the native osmc initramfs, which would negate the need to have a separate initrd built with initrafs-tools.

However, IMHO the issue in this thread should still be fixed, as somewhere there is a break in the upgrade to Buster.

This would be a matter for Debian, as it’s an upstream package.

We can work on getting btrfs support in our initramfs

You can see the Debian initramfs-tools changelog here. As you can see, there’s a reasonably large number of changes between v130 and v133, so pinning down the issue isn’t going to be easy. If you can successfully sidestep the issue with the native OSMC initramfs, that has to be the most sensible way forward.

And I once again tried to get btrfs running, using your code as a template, and once again failed dismally. :frowning:

To get this to work, we need to:

  • Add support for mounting BTRFS file systems to the initramfs.
  • Add support for filesystem checking BTRFS file systems (optional)
  • Add support so that swap files do not get configured by the performance_tuner on low memory systems and are ignored if the user tries to enable swap
  • Ensure that BTRFS is enabled as a built-in kernel module for all devices.

First of all, thanks a lot to @sam_nazarko for all the efforts brought into this project.

For others, who might be interested in having BTRFS root on the latest version I would like to share a solution, which is working for me. You will need to have your OSMC bootable somehow or try to directly edit your ramdrive with cpio (which is harder) to successfully boot and then automate the flow.

First, you need to get rid of the init script supplied with initramfs-tools, so that the init script of OSMC will be used osmc/init at master · osmc/osmc · GitHub

rm /usr/share/initramfs-tools/init

You will see an error later when generating the ramdrive, that this file is missing, but it does not matter. Then the OSMC’s init can be customized by supplying this file osmc/init at master · osmc/osmc · GitHub . It should be in the root of the ramdrive. To achieve this I created initramfs-tools hooks:

/etc/initramfs-tools/hooks/osmc (make it executable):

    #!/bin/sh

    set -e

    PREREQ=""

    prereqs()
    {
    	echo "${PREREQ}"
    }

    case "${1}" in
    	prereqs)
    		prereqs
    		exit 0
    		;;
    esac

    . /usr/share/initramfs-tools/hook-functions

    SCRIPT=`realpath $0`
    SCRIPTPATH=`dirname $SCRIPT`

    if [ -f $SCRIPTPATH/init-device ]
    then
        cp -p $SCRIPTPATH/init-device $DESTDIR/
    fi

/etc/initramfs-tools/hooks/init-device:

#!/bin/busybox sh

# Fix kmod and module symlinks
ln -s /usr/bin/kmod /bin/kmod
ln -s /usr/lib/modules /lib/modules

. ./scripts/functions

load_modules

for option in $(/bin/busybox cat /proc/cmdline); do
    case $option in
      rootfstype=*)
        OPTION_FILESYSTEM="${option#*=}"
        ;;
      rootflags=*)
        OPTION_MOUNT_OPTIONS=",${option#*=}"
        ;;
     esac
done

echo "Root mount options: $OPTION_MOUNT_OPTIONS"

if [ "$OPTION_FILESYSTEM" = "btrfs" ]
then
    echo "Disabling FSCK for btrfs..."
    OPTION_DO_FSCK="0"
fi

Symlinks are solving the problem with Buster having binaries and modules in /usr, the ramdrive is still a bit messy, but you can load any driver though, list of the drivers is defined in /etc/initramfs-tools/modules as usual and embedded into the ramdrive automatically, alternatively you can modprobe the needed module.

So after this you can just update-initramfs if you are booted, or manually edit the existing one.

./scripts/functions is coming from initramfs-tools package, if you manually hack the ramdrive, you will need to copy over these scripts or at least the load_modules function.