If needed, set the keyboard layout with setxkbmap us
beforehand. Adjust the country to your device's configuration.
- Use
lsblk
to know what's the disk path to be partitioned. - Launch parted on said disk path:
# Launches parted
sudo parted /dev/sda
- Partition:
# example w/ EFI
# Create a GPT partition table
mklabel gpt
# Create the EFI System Partition (ESP)
mkpart ESP fat32 1MiB 512MiB
set 1 esp on
name 1 EFI
# Create the root partition
mkpart primary ext4 512MiB -8GiB
name 2 root
# Create a swap partition
mkpart primary linux-swap -8GiB 100%
name 3 swap
quit
# Exits parted
- Format the partitioned areas:
sudo mkfs.fat -F32 -n EFI /dev/sda1
sudo mkfs.ext4 -L root /dev/sda2
sudo mkswap /dev/sda3
sudo swapon /dev/sda3
- Mount the system:
mount -L root /mnt
mkdir -p /mnt/boot/efi
mount -L EFI /mnt/boot/efi