Filesystems: Difference between revisions

From Alpine Linux
(cleaned up the page with headings and referenes)
Line 1: Line 1:
Documentation how to use the Alpine distro to format HD/Floppy/Other.
Alpine Linux supports a number of filesystems.  
 
== Filesystem Tools ==


= Install =
Alpine has multiple storage media formatting packages available. Different packages/programs are used to format different types of filesystems.
Alpine has multiple storage media formatting packages available. Different packages/programs are used to format different types of filesystems.
* {{Pkg|btrfs-progs}} - For [[Btrfs]]
* {{Pkg|btrfs-progs}} - For [[Btrfs]]
Line 11: Line 12:
* {{Pkg|xfsprogs}} - For XFS
* {{Pkg|xfsprogs}} - For XFS


= Format =
== Formatting Partitions ==
Here are some examples on how to use the formatting tools:
 
{{Note|'''/dev/sda1''' is used as a example}}
 
==== btrfs-progs ====
{{Cmd|# mkfs.btrfs /dev/sda1}}


==== dosfstools ====
Whenever a partition is [[Setting_up_disks_manually#Manual_partitioning|created]], the partition must be formatted first before using it. Depending on the filesystem to be used, the necessary formatting tool(s) of the filesystem must be used. Here are some examples on how to use the formatting tools for different filesystems:
{{Cmd|# mkfs.vfat /dev/sda1}}


==== e2fsprogs ====
{{Warning|The {{Path|/dev/sdXY}} is only an example. Make sure you choose the right partition to format!  If you choose the wrong partition, your data will be gone. Make a backup first if you are unsure.}}
{{Cmd|# mkfs.ext2 /dev/sda1}}
{{Cmd|# mkfs.ext3 /dev/sda1}}
{{Cmd|# mkfs.ext4 /dev/sda1}}


==== f2fs-tools ====
=== btrfs-progs ===
{{Cmd|# mkfs.btrfs /dev/sdaXY}}


{{Cmd|# mkfs.f2fs /dev/sda1}}
=== dosfstools ===
{{Cmd|# mkfs.vfat /dev/sdaXY}}


= Partitions =
=== e2fsprogs ===
If you need to change or make a partition table on a Hard Drive you want to format, you can use:
{{Cmd|# mkfs.ext2 /dev/sdaXY}}
{{Cmd|# mkfs.ext3 /dev/sdaXY}}
{{Cmd|# mkfs.ext4 /dev/sdaXY}}


==== fdisk ====
=== f2fs-tools ===
{{Cmd|# fdisk /dev/sda}}
{{Cmd|# mkfs.f2fs /dev/sdaXY}}


==== cfdisk ====
For creating partitions refer [[Setting_up_disks_manually#Manual_partitioning|Manual partitioning]]
{{Cmd|# cfdisk /dev/sda}}


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

Revision as of 15:00, 12 September 2024

Alpine Linux supports a number of filesystems.

Filesystem Tools

Alpine has multiple storage media formatting packages available. Different packages/programs are used to format different types of filesystems.

Formatting Partitions

Whenever a partition is created, the partition must be formatted first before using it. Depending on the filesystem to be used, the necessary formatting tool(s) of the filesystem must be used. Here are some examples on how to use the formatting tools for different filesystems:

Warning: The /dev/sdXY is only an example. Make sure you choose the right partition to format! If you choose the wrong partition, your data will be gone. Make a backup first if you are unsure.


btrfs-progs

# mkfs.btrfs /dev/sdaXY

dosfstools

# mkfs.vfat /dev/sdaXY

e2fsprogs

# mkfs.ext2 /dev/sdaXY

# mkfs.ext3 /dev/sdaXY

# mkfs.ext4 /dev/sdaXY

f2fs-tools

# mkfs.f2fs /dev/sdaXY

For creating partitions refer Manual partitioning