Difference between revisions of "F2FS"

From ArchWiki
Jump to: navigation, search
(Creating a F2FS partition: distinguish between newer CPU and old CPU)
(Mounting a F2FS partition: no need to modprobe)
Line 33: Line 33:
== Mounting a F2FS partition ==
== Mounting a F2FS partition ==
Users will likely need to manually load the F2FS kernel module before mounting. Issue as root:
The partition can then be mounted manually or via other mechanisms:
# modprobe f2fs
  # mount /dev/sdxY /mnt/foo
The partition can then be mounted:
  # mount -t f2fs /dev/sdxY /mnt
== Install Arch Linux on F2FS partition ==
== Install Arch Linux on F2FS partition ==

Revision as of 21:11, 21 November 2016

F2FS (Flash-Friendly File System) is a file system intended for NAND-based flash memory. It is supported from kernel 3.8 onwards.

Creating a F2FS partition

In order to create a F2FS partition, install f2fs-tools from the official repositories.

Create the partition:

# mkfs.f2fs -l mylabel /dev/sdxY

where /dev/sdxY is the target volume to format in F2FS.

Warning: If using F2FS as your root partition, you will need to add the following modules to the MODULES line in your /etc/mkinitcpio.conf file [1]:

For newer CPU (having PCLMUL acceleration):

MODULES="f2fs libcrc32c crc32c-intel crc32-pclmul"

For old CPU:

MODULES="f2fs libcrc32c crc32_generic crc32c_generic"

Mounting a F2FS partition

The partition can then be mounted manually or via other mechanisms:

# mount /dev/sdxY /mnt/foo

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:

  1. Create the root partition as F2FS as described in section #Creating a F2FS partition.
  2. If your bootloader does not support F2FS, create a separate /boot partition using a filesystem that it does.
  3. Continue with the installation procedure as per Installation guide#Mount the partitions until chrooted.
  4. Install f2fs-tools on the newly installed system as well.
  5. Regenerate the initramfs while chrooted.

The driver included in the kernel 4.6 or higher uses Crypto API for computing CRC32. Add crc32_generic and crc32-pclmul to the MODULES array in /etc/mkinitcpio.conf and regenerate the initramfs if the driver fails to load a CRC32 module at boot.