I'm using Buildroot to generate an embedded Linux with a kernel v. 2.6.39, which in the end starts busybox. Everything works fine when building with Initramfs as "rootfs". But Initramfs isn't the best for my needs, so i want to switch to other fs like SquashFS or even better not compressing it at all.

Anyways i can't figure out how to tell the kernel it shall boot for instance the SquashFS file. What i do know, is that this is done by some kernel command line parameters. Unfortunately i can't find more about this with different search engines or here. And so it doesn't work. It always ends, as expected, with a kernelpanic.

And how is it done if I haven't got it compressed and therefor it just has to be copied from Flash to RAM ?


Make sure you build what ever file system you want directly into the kernel and not as a module.

SquashFS is readonly so you can't use that alone. You may be better off booting from initramfs then loading root from an image, but that's your call.

|improve this answer|||||
  • thanks but the initramfs is too slow. I want to have a running system as quick as possible. – user3085931 Jan 17 '14 at 14:41
  • 1
    Are you sure loading from flash to RAM is really going to be faster than decompressing an image in RAM? You could try building the initramfs into the kernel and make it very minimal, just enough for init to mount the fs, then copy the initramfs into the fs and switchroot... – goldilocks Jan 17 '14 at 14:48
  • As far as i know is building with initramfs is copying the stuff twice, once as part of the kernel and second the data is copied from the image into buffer cache in kernel, which is just waste of time. Even more initramfs seems to contain complete files, so there's always time unnecessarily spent when it comes to reading, uncompressing, copying a whole library if only a few functions or pages are used. However I'd like to know what the kernel needs to execute different file systems – user3085931 Jan 17 '14 at 14:58
  • The way I understand it is the initramfs is uncompressed into cache without a backing store, which keeps it in the cache. WRT the contents, that's up to you. Build a static stand-alone init, etc. What the kernel needs to use various filesystems can be built into it based on your configuration, easy-peasy. If it is possible to mount the fs from flash, then just use the appropriate device node as the root. If not, you need an initramfs userspace to do whatever... – goldilocks Jan 17 '14 at 15:10
  • 1
    You could try root=iso:/dev/whatever/fsimage rootfstype=whatever, there are a few references to this online, but I could not find any real docs for it. Easy enough to test, I guess. – goldilocks Jan 17 '14 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.