nix-config/sh/002-partitions
2018-08-31 15:26:19 -04:00

22 lines
586 B
Bash

#!/bin/sh
#
# Make a DOS partition table with one primary ext4 partition and
# enable boot for it. Then, create a primary swap partition with
# the remaining disk space.
#
# For example, if your hard drive is 512GB then you'd allocate
# just under that for the ext4 partition and the remaining GB to
# swap, depending on how much you think you'll need.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
parted /dev/sda mklabel msdos
parted /dev/sda mkpart primary ext4 1MiB 60GiB
parted /dev/sda set 1 boot on
parted /dev/sda mkpart primary linux-swap 60GiB 100%