F2FS (Flash-Friendly File System) is a file system intended for NAND-based flash memory equipped with Flash Transition Layer. Unlike JFFS or UBIFS it relies on FTL to handle write distribution. It is supported from kernel 3.8 onwards.
Creating a F2FS partition
In order to create a F2FS partition, install .
Create the partition:
# mkfs.f2fs -l mylabel /dev/sdxY
/dev/sdxY is the target volume to format in F2FS. See for all available options.
Mounting a F2FS partition
The partition can then be mounted manually or via other mechanisms:
# mount /dev/sdxY /mnt/foo
Grow an F2FS partition
When the filesystem is unmounted, it can be grown if the partition is expanded. Shrinking is not currently supported.
First use a partition tool to resize the partition. This can be done, for example, by deleting the old partition and creating a new one with with the same type, the same start sector, and a new end position.
Then expand the filesystem to fill the new partition using:
# resize.f2fs /dev/sdxY
/dev/sdxY is the target F2FS volume to grow. See for supported options.
Install Arch Linux on F2FS partition
With the latest installation media it is possible to install Arch linux with root located on a F2FS filesystem:
- Create the root partition as F2FS as described in section #Creating a F2FS partition.
- If your bootloader does not support F2FS, create a separate
/bootpartition using a filesystem that it does.
- Continue from Installation guide#Mount the file systems until chrooted.
- Install on the newly installed system as well.
- Regenerate the initramfs while chrooted.
Be sure to also check out the Installing Arch Linux on a USB key page if you are installing Arch on a USB flash drive (in particular the part about editing
/etc/mkinitcpio.conf is important, otherwise your system will not boot).
Checking and repair
Checking and repairs to f2fs partitions are accomplished with
fsck.f2fs provided by . See for available switches.
GRUB with root on F2FS
When using GRUB your freshly installed system might not boot after reboot. As GRUB does not support F2FS it is not able to extract the UUID of your drive so it uses classic non-persistent
/dev/sdXx names instead. In this case you might have to manually edit
/boot/grub/grub.cfg and replace
root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. You can use the
blkid command to get the UUID of your device, see Persistent block device naming.