Repartitioning a CompactFlash Disk for Linux
Many embedded systems require writing to persistent storage during routine operation. While the journaling filesystems used on EMAC OE systems are tolerant of power failures during a write to the filesystem, it is still advantages to leave the root filesystem mounted read-only as often as possible to prevent any possibility of data loss or corruption on the root filesystem. One method to accomplish this is using a separate disk (such as an SD card) or secondary partitions on the primary storage device for any application-specific data that needs to be written to disk. This article describes the process of creating and utilizing an additional partition for data storage.
CompactFlash Partitioning
The majority of EMAC's x86-based systems utilize CompactFlash as the primary storage device. By default, EMAC OE is provided with a single ext3 partition on the CompactFlash holding the root filesystem. The most efficient method for repartitioning this type of device is using a CompactFlash card reader on a Linux PC. While command-line tools can be utilized, the application gparted
is a graphical application that works very well for resizing existing partitions. Follow the procedure below to resize the existing partition and create a secondary partition on a CompactFlash.