Filesystems: Difference between revisions

From Alpine Linux
(→‎Install: Improve filesystem names)
(moved Swap related content to its own page)
 
(40 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Storage]]
This page documents the Alpine Linux supported filesystems needed for various storage media.  
Documentation how to use the Alpine distro to format HD/Floppy/Other.


== Install ==
== Overview ==
Alpine has multiple storage media formatting packages available. Different packages/programs are used to format different types of filesystems.
* {{Pkg|dosfstools}} - For FAT12/FAT16/FAT32
* reiserfsprogs - For ReiserFS (Note: not available in Alpine repositories yet)
* {{Pkg|e2fsprogs}} - For ext3/ext4
* {{Pkg|xfsprogs}} - For XFS
* {{Pkg|jfsutils}} - For JFS
* {{Pkg|ntfs-3g}} - For NTFS (Note: ntfs-3g is a FUSE driver)


In our example we want to format the floppy as vfat.
The following table lists the packages related to various filesystems available in Alpine Linux along with the '''command''' to format.
{{Cmd|apk add dosfstools}}
<onlyinclude>
{| class="wikitable" align="center" style="width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;"
|-style="background:#333333; color:#ffffff; font-size: 1.2em; text-align:center;"
|width="18%" | Tool
|width="18%"| Filesystem
|width="15%"|Formatting command
|Brief Notes
|-
|{{Pkg|btrfs-progs}}||[[Btrfs]]||mkfs.btrfs|| combines copy-on-write and volume management
|-
|{{Pkg|dosfstools}} ||FAT12/FAT16/FAT32||mkfs.vfat||also used for [[UEFI|EFI]] partition
|-
|{{Pkg|e2fsprogs}} ||ext2/ext3/ext4||mkfs.ext4||ext4 is current default in Linux
|-
|{{Pkg|exfatprogs}} ||exfat||mkfs.exfat||Commonly used on USB flash drives and SD cards
|-
|{{Pkg|f2fs-tools}} ||[[F2FS]]||mkfs.f2fs||
|-
|{{Pkg|hfsprogs}} ||HFS/HFS+||mkfs.hfsplus||Apple/Mac products
|-
|{{Pkg|jfsutils}} ||JFS||mkfs.jfs||
|-
|{{Pkg|ntfs-3g}} ||NTFS ||mkfs.ntfs||Full-featured, Microsoft/Windows FUSE driver
|-
|{{Pkg|squashfs-tools}} ||[[SquashFS]]||mksquashfs||compressed read-only file system
|-
|{{Pkg|xfsprogs}} ||XFS||mkfs.xfs||
|}</onlyinclude>


== Format ==
== Filesystem tools ==
Here are some examples on how to use the formatting tools:


=== dosfstools ===
Different packages/programs are used to format different types of filesystems. The filesystem tools and the formatting commands are listed [[#Overview|above]].
{{Cmd|mkfs.vfat /dev/fd0}}


=== e2fsprogs ===
== See also ==
{{Cmd|mkfs.ext2 /dev/fd0
* [[Setting_up_disks_manually#Manual_partitioning|Manual partitioning]]
mkfs.ext3 /dev/fd0}}
* [https://www.nico.schottelius.org/blog/2024-10-10-how-to-enable-encrypted-swap-in-alpine-linux/ How to enable encrypted swap in Alpine Linux]


== Other devices ==
[[Category:Storage]]
In our case we want to format a floppy disk. (/dev/fd0) You can change /dev/fd0 to the device you want to format.
[[Category:Installation]]
 
[[Category:Filesystems]]
== Partitions ==
If you need to change or make a partition table on a Hard Drive you want to format, you can use:
 
=== fdisk ===
{{Cmd|fdisk /dev/hdc}}

Latest revision as of 06:28, 2 April 2025

This page documents the Alpine Linux supported filesystems needed for various storage media.

Overview

The following table lists the packages related to various filesystems available in Alpine Linux along with the command to format.

Tool Filesystem Formatting command Brief Notes
btrfs-progs Btrfs mkfs.btrfs combines copy-on-write and volume management
dosfstools FAT12/FAT16/FAT32 mkfs.vfat also used for EFI partition
e2fsprogs ext2/ext3/ext4 mkfs.ext4 ext4 is current default in Linux
exfatprogs exfat mkfs.exfat Commonly used on USB flash drives and SD cards
f2fs-tools F2FS mkfs.f2fs
hfsprogs HFS/HFS+ mkfs.hfsplus Apple/Mac products
jfsutils JFS mkfs.jfs
ntfs-3g NTFS mkfs.ntfs Full-featured, Microsoft/Windows FUSE driver
squashfs-tools SquashFS mksquashfs compressed read-only file system
xfsprogs XFS mkfs.xfs

Filesystem tools

Different packages/programs are used to format different types of filesystems. The filesystem tools and the formatting commands are listed above.

See also