Filesystems: Difference between revisions

From Alpine Linux
Line 20: Line 20:


=== dosfstools ===
=== dosfstools ===
{{Cmd|mkfs.vfat /dev/fd0}}
{{Cmd|mkfs.vfat /dev/sda}}


=== e2fsprogs ===
=== e2fsprogs ===
{{Cmd|mkfs.ext2 /dev/fd0
{{Cmd|mkfs.ext2 /dev/sda
mkfs.ext3 /dev/fd0
mkfs.ext3 /dev/sda
mkfs.ext4 /dev/fd0}}
mkfs.ext4 /dev/sda}}


=== btrfs-progs ===
=== btrfs-progs ===
{{Cmd|mkfs.btrfs /dev/fd0}}
{{Cmd|mkfs.btrfs /dev/sda}}


== Other devices ==
== Other devices ==

Revision as of 18:53, 28 December 2021

Documentation how to use the Alpine distro to format HD/Floppy/Other.

Install

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


In our example we want to format the floppy as vfat.

apk add dosfstools

Format

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

dosfstools

mkfs.vfat /dev/sda

e2fsprogs

mkfs.ext2 /dev/sda mkfs.ext3 /dev/sda mkfs.ext4 /dev/sda

btrfs-progs

mkfs.btrfs /dev/sda

Other devices

In our case we want to format a floppy disk. (/dev/fd0) You can change /dev/fd0 to the device you want to format.

Partitions

If you need to change or make a partition table on a Hard Drive you want to format, you can use:

fdisk

fdisk /dev/hdc