January 20, 201412 yr The other day I needed some very small linux while doing some testing with an efi boot loader and from a very quick google search just got Tiny Core... and... noticed an interesting thing on this small distro, that I think could be eventually interesting to get on unRaid: they use two initrd image files, one with main filesystem, and one with just kernel module files (i.e. /lib/modules), did searched a bit on this and it's not a new thing, kernel just supports initramfs being populates from multiple initrd files. Think this could be useful on unRaid to split kernel modules and any other kernel dependent files (/lib/modules/ and probably also... /usr/src/... not sure if something more?) to a different image file, this way it would make it really really easy for any user to swap kernel if/when required (for eg. swap to a custom kernel with more drivers, etc) without needing to touch the main unraid filesystem image at all, (for eg. tvheadend users instead of replacing kernel and whole bzroot would just need to replace kernel and modules image, simple) and eventually also allowing to update unraid (minor versions at least) without updating kernel, etc... you see my idea. Just for testing I did tested myself to split them for unRaid and can confirm it works as expected. The steps I used to test it: mkdir ~/aaa; cd ~/aaa xzcat /boot/bzroot | cpio -m -i -d -H newc --no-absolute-filenames mkdir ~/bbb cp -r --parents --preserve=timestamps lib/modules ~/bbb/ rm -rf lib/modules find . | cpio -o -H newc | xz --check=crc32 --x86 --lzma2=preset=9 > /boot/bzrootnm cd ~/bbb find . | cpio -o -H newc | xz --check=crc32 --x86 --lzma2=preset=9 > /boot/bzmodules And the entry on my syslinux config file with the two initrd image files: label unRAID OS kernel bzimage append initrd=bzrootnm,bzmodules After booting we have just a "merged" file system, exactly same as with a single image file.
January 20, 201412 yr I understand about every third word of this post, but I think I like it! Do you have to 'pick an initrd' when you boot up or can both initrd's load and run at the same time? Could there be multiple split kernels? One for each troublesome add-on, for example?
January 20, 201412 yr Great idea!!! For years I had always wished for the kernel to be built with all of the drivers, but allow loading only what you need on demand. This idea opens up new possibilities.
January 20, 201412 yr Author I understand about every third word of this post, but I think I like it! Do you have to 'pick an initrd' when you boot up or can both initrd's load and run at the same time? Could there be multiple split kernels? One for each troublesome add-on, for example? I'm not sure I understood correctly what you mean... you could surely easily setup multiboot on syslinux config with different kernels, just specify different kernel image and matching modules image, leaving main bzroot image intact and usable for multiple kernels... but if you mean multiple kernels running at same time this is obviously not possible, only with VM's you can achieve that.
Archived
This topic is now archived and is closed to further replies.