I’ve been playing around with the idea of running OSMC on btrfs instead of ext4 and whilst I’ve got that working with an initramfs generated on the pi itself following this post I’d like to be able to do that with the official initramfs if I can so I have embarked on a project to rework that to be compatible.
There are a few changes that are needed for this that I think will benefit other scenarios also so I’ve submitted them here for review to be considered as a request in their own right.
The OSMC initramfs doesn’t currently respect the rootflags option in cmdline.txt (necessary in btrfs for setting the subvolid, but also useful in other cases to change mount options). I know that users can remount with new options in
/etc/fstabbut that shouldn’t be necessary the option were processed.
OSMC’s initramfs tries to fsck all filesystems with e3fsck without first checking the filesystem type. It’s possible I know that this can be stopped by adding
nofsckto the cmdline.txt file but it would be cleaner if the check were automatic. It would have solved this post for example.
I’ve made an attempt at resolving this here and would be really grateful of some feedback on the approach before I proceed further. The commit diff shows lots of changes to the init file, but most of them are just extra tabs to indent a block of code inside a new condition (there are actually only 9 new lines added incl comments).
I have followed this post by Sam regarding testing, but I’m not entirely sure where to put the generated initramfs to test it as the default is embedded in the kernel isn’t it?
Plus I only have Rpi1 and RPi2 so I can’t test this on the Vero hardware so I don’t know if it would break anything.
Like i said, any feedback (and help with testing) would be most appreciated.
If these pre-requisites are proven to work with no problems, I’ll look at the rest of the requirements to meet my ultimate goal which is