Skip to main content
edited title
Link
user3085931
  • 966
  • 3
  • 15
  • 29

How can I startboot with a compressed rootfs?

Source Link
user3085931
  • 966
  • 3
  • 15
  • 29

How can I start compressed rootfs?

My problem is: I cannot use compressed rootfs (the kernel crashes during boot) but uncompressed ones work fine.

What I did: I'm using Buildroot 2013.11 to generate Images for my embedded Linux (2.6.39) ARM 9 system, booting from SD card.

I'm "dd"ing the Images (e.g. ext4) to the 2nd partition of the SD card with

sudo dd if=/path-to/rootfs.ext4 of=/dev/sdb2 bs=2048

and enable the driver in linux-menuconfig, that is

File systems
- <*> The Extended 4 (ext4) filesystem
- [*] Use ext4 for ext2/ext3 file systems
- [*] Ext4 extended attributes

Now when I like to use the compressed ext4 (e.g. with lzo), buildroot generates an rootfs.ext4.lzo when "dd"ing here with

sudo dd if=/path-to/rootfs.ext4.lzo of=/dev/sdb2 bs=2048

the command is executed without any error but from this point "sdb2" isn't accessible anymore until it is formated again. When using this SD to boot the system the kernel crashes telling me it was trying to interpret the partition with ext4 but he wasn't able to read it.

Where am I going wrong?