packed-arch/scripts/10-disk.sh
2024-07-09 16:10:04 +02:00

21 lines
253 B
Bash

#!/bin/bash
# Partition
echo -e 'g\nn\n1\n2048\n+300M\nn\n2\n\n\np\nw' | fdisk /dev/sda
sync
# Format
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
sync
# Mount
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
sync
# Display
df -h
mount