Partitioning SD cards

Andy Pont


I am working on a custom platform where U-Boot will be programmed into an SPI NOR flash device and the ext4 file systems will be in a removable microSD card.  The Linux kernel itself will be stored in the /boot directory of the root file system.

The customer wants the (16GB) microSD card formatted as 1GB to mount at / and the remaining 15GB mounted as /home.

In the recipe for my image I have defined the following to try to create a suitable image for writing to the microSD card:

IMAGE_FSTYPES_append = " wic"

The image file that is being created is bigger than 1GB even though the root file system is only a little over 450MB.  Looking at the contents of what gets written to the microSD card this looks as though it is, in part, because it also includes the ~20MB “boot” partition containing the boot files.

A couple of questions…

How do I stop the wic generation process including the FAT formatted “boot” partition?

What is the best strategy for partitioning / formatting / mounting the second partition as /home?  Should it be part of the image build process or a one-time task run at first boot?


Join to automatically receive all group messages.