Skip to content

Instantly share code, notes, and snippets.

@davidbeijinho
Created July 6, 2021 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidbeijinho/9dabbd0d95eec4a756311a2411d2ea59 to your computer and use it in GitHub Desktop.
Save davidbeijinho/9dabbd0d95eec4a756311a2411d2ea59 to your computer and use it in GitHub Desktop.
arch linux
#!/bin/bash
set -e
disk="/dev/sda"
loadkeys us
ls /sys/firmware/efi/efivars
timedatectl set-ntp true
echo -e "\e[31m 2/${numSteps} - Create partition \e[0m"
(
echo g # create gpd partion partition table
# echo o # Create a new empty DOS partition table
echo n # Add a new partition
echo p # Primary partition
echo 1 # Partition number
echo # First sector (Accept default: 1)
echo +300M # Last sector (Accept default: varies)
echo t
echo 1
echo n
echo p
echo 2
echo # First sector (Accept default: 1)
echo # last sector (Accept default: 1)
echo w # Write changes
) | fdisk $disk
mkfs.ext4 /dev/sda1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment