F2FS: Difference between revisions

From Alpine Linux
No edit summary
(Edit f2fs modules)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
''From [https://en.wikipedia.org/wiki/F2FS Wikipedia]:''
{{TOC right}}


F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux kernel.
F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux kernel.
Line 5: Line 5:
The motive for F2FS was to build a file system that, from the start, takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.
The motive for F2FS was to build a file system that, from the start, takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.


= Install =


Out of the box AlpineLinux doesnt support making F2FS partitions, that cant be added with:
{{Warning| Using F2FS for the rootfs will cause fsck service to fail, see https://gitlab.alpinelinux.org/alpine/aports/-/issues/17543}}


{{Cmd|# apk add f2fs-tools}}
== Installation ==


<br>
Out of the box Alpine Linux doesnt support making F2FS partitions, that can be added with:


= Formatting a partiton using F2FS =
{{Cmd|# apk add {{Pkg|f2fs-tools}}}}
 
 
== Formatting a partiton using F2FS ==


You can format a partition using F2FS with the following command:
You can format a partition using F2FS with the following command:


{{Note|'''/dev/sda1''' is used as a example}}
{{Note|'''<code>/dev/sda1</code>''' is used as a example}}
 
<br>


{{Cmd|# mkfs.f2fs /dev/sda1}}
{{Cmd|# mkfs.f2fs /dev/sda1}}


<br>


= Adding the f2fs module to initramfs =
== f2fs module ==
<code>f2fs</code> needs to be manually added to <code>/etc/mkinitfs/mkinitfs.conf</code> if you are using it for rootfs.


{{Expand}}
Otherwise add it to /etc/modules:
{{Cmd|echo f2fs >> /etc/modules}}
You need the module to mount partitions that are not rootfs.


'''f2fs''' may need to be manually added to '''/etc/mkinitfs/mkinitfs.conf'''
== See also ==


* [https://en.wikipedia.org/wiki/F2FS Wikipedia Entry on F2FS]


[[Category:Storage]]
[[Category:Storage]]
[[Category:Filesystems]]

Latest revision as of 17:36, 24 September 2025

F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux kernel.

The motive for F2FS was to build a file system that, from the start, takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.


Warning: Using F2FS for the rootfs will cause fsck service to fail, see https://gitlab.alpinelinux.org/alpine/aports/-/issues/17543


Installation

Out of the box Alpine Linux doesnt support making F2FS partitions, that can be added with:

# apk add f2fs-tools


Formatting a partiton using F2FS

You can format a partition using F2FS with the following command:

Note: /dev/sda1 is used as a example

# mkfs.f2fs /dev/sda1


f2fs module

f2fs needs to be manually added to /etc/mkinitfs/mkinitfs.conf if you are using it for rootfs.

Otherwise add it to /etc/modules:

echo f2fs >> /etc/modules

You need the module to mount partitions that are not rootfs.

See also