nix-config/sh/install/002-partitions
Donovan Glover 4e81aab657
Move installation steps to install directory
This helps separate the installation process from the other scripts that
are usually ran after a reboot, although this may change in the future
if chroot is preferred over executing the commands later.
2018-09-06 15:18:39 -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%