packed-arch/scripts/10-disk.sh

21 lines
253 B
Bash
Raw Normal View History

2024-07-09 14:10:04 +00:00
#!/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