Difference between revisions of "F2FS"

From ArchWiki
Jump to: navigation, search
m (added Japanese)
(remove beginners' guide link, see Talk:Installation guide#The Great Merge)
 
(25 intermediate revisions by 16 users not shown)
Line 1: Line 1:
 
[[Category:File systems]]
 
[[Category:File systems]]
[[ja:F2fs]]
+
[[it:F2FS]]
 +
[[ja:F2FS]]
 +
[[ko:F2FS]]
 +
[[ru:F2FS]]
 +
{{Related articles start}}
 +
{{Related|File systems}}
 +
{{Related articles end}}
 +
 
 
[[Wikipedia:F2FS|F2FS]] (Flash-Friendly File System) is a file system intended for NAND-based flash memory. It is supported from kernel 3.8 onwards.
 
[[Wikipedia:F2FS|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 ==
+
== Creating a F2FS partition ==
In order to create a f2fs partition, you need to [[Pacman|install]] package {{Pkg|f2fs-tools}} from [[Official Repositories]].
+
  
Create the partition:
+
In order to create a F2FS partition, [[install]] {{Pkg|f2fs-tools}} from the [[official repositories]].
# mkfs.f2fs /dev/sdxY
+
  
== Mounting a f2fs partition ==
+
Create the partition:
You may need to load the f2fs kernel module before mounting. Issue as root:
+
# mkfs.f2fs -l mylabel ''/dev/sdxY''
 +
where {{ic|''/dev/sdxY''}} is the target volume to format in F2FS.
 +
 
 +
{{Warning|1=If using F2FS as your root partition, you will need to add the following modules to the {{ic|MODULES}} line in your {{ic|/etc/mkinitcpio.conf}} file [https://bbs.archlinux.org/viewtopic.php?id=210673]:
 +
<pre>
 +
MODULES="f2fs crc32 libcrc32c crc32c_generic crc32c-intel crc32-pclmul"
 +
</pre>
 +
}}
 +
 
 +
== Mounting a F2FS partition ==
 +
 
 +
Users will likely need to manually load the F2FS kernel module before mounting. Issue as root:
  
 
  # modprobe f2fs
 
  # modprobe f2fs
  
Then you can mount the partition:
+
The partition can then be mounted:
  
 
  # mount -t f2fs /dev/sdxY /mnt
 
  # mount -t f2fs /dev/sdxY /mnt
  
== Install Arch Linux on f2fs partition ==
+
== Install Arch Linux on F2FS partition ==
With the latest installation media (2013.04.01) it is possible to install system on f2fs partition:
+
 
 +
With the latest [https://www.archlinux.org/download/ 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 {{ic|/boot}} partition using a filesystem that it does.
 +
# Continue with the installation procedure as per [[Installation guide#Mount the partitions]] until [[Change root|chrooted]].
 +
# Install {{Pkg|f2fs-tools}} on the newly installed system as well.
 +
# Regenerate the [[initramfs]] while chrooted.
  
#Install {{Pkg|f2fs-tools}} from [[Official Repositories]] while running arch from installation media.
+
The driver included in the kernel 4.6 or higher uses Crypto API for computing CRC32. Add {{ic|crc32_generic}} and {{ic|crc32-pclmul}} to the {{ic|MODULES}} array in {{ic|/etc/mkinitcpio.conf}} and regenerate the initramfs if the driver fails to load a CRC32 module at boot.
#Load f2fs kernel module as described above.
+
#Create root partition as f2fs as described above.
+
#Create boot partition as ext4 (or any other supported filesystem).
+
#Mount, install and chroot system as per [[Beginners'_Guide#Mount_the_partitions|official installation guide]].
+
#(On installed sytem) add {{ic| f2fs}} to modules section in {{ic|/etc/mkinitcpio.conf}} and remove {{ic| fsck}} from hooks section since f2fs doesn't have fsck implementation yet.
+
#Don't forget to regenerate the initramfs image after that:
+
# mkinitcpio -p linux
+

Latest revision as of 23:50, 26 August 2016

Related articles

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]:
MODULES="f2fs crc32 libcrc32c crc32c_generic crc32c-intel crc32-pclmul"

Mounting a F2FS partition

Users will likely need to manually load the F2FS kernel module before mounting. Issue as root:

# modprobe f2fs

The partition can then be mounted:

# mount -t f2fs /dev/sdxY /mnt

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.