Skip to content

Instantly share code, notes, and snippets.

@InfamousStarFox
Last active February 16, 2025 10:18
Show Gist options
  • Save InfamousStarFox/a41e582dc71dc347f06fed217f37843f to your computer and use it in GitHub Desktop.
Save InfamousStarFox/a41e582dc71dc347f06fed217f37843f to your computer and use it in GitHub Desktop.
Formatting a disk in Alpine

Formatting a disk in Alpine

Use fdisk -l to find the correct index

RUN fdisk /dev/sda

Delete the existing filesystem d

Create a new partition n

Primary partition p

Partition number 1

Set the system type to Linux t 83

Press return to skip the start and end cylinders

Write the changes to disk w

Reboot

Reboot for the kernel to detect the new partition

Format the partition as EXT4

mkfs.ext4 /dev/sda1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment