Add 00x scripts

This commit is contained in:
Donovan Glover 2018-08-31 15:26:19 -04:00
parent 33f9dbfbf0
commit ce41936d10
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
6 changed files with 78 additions and 0 deletions

11
sh/001-checks Normal file
View File

@ -0,0 +1,11 @@
#!/bin/sh
#
# Sync the time with one online so we have the proper
# time before doing anything. Make sure you're connected
# to the internet first.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
timedatectl set-ntp true

21
sh/002-partitions Normal file
View File

@ -0,0 +1,21 @@
#!/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%

14
sh/003-format Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
#
# Format sda1 with an ext4 partition and sda2 with a swap partition.
# Then, enable swap for sda2.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
mkfs -t ext4 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2

9
sh/004-mount Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
#
# Mount the newly created filesystem (/dev/sda1) to /mnt.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
mount /dev/sda1 /mnt

13
sh/005-pacstrap Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
#
# Install the base packages to the mounted partition (the newly
# created filesystem).
#
# We also install grub and fish since grub is the boot loader
# and fish is the preferred shell.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
pacstrap /mnt base base-devel grub fish

10
sh/006-fstab Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# Generate the fstab file so that the filesystem is
# automatically mounted on boot.
#
# https://wiki.archlinux.org/index.php/Installation_guide
set -xe
genfstab -U /mnt > /mnt/etc/fstab