Guest User

Untitled

a guest
May 26th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #Pre-Installation
  4.  
  5. # Connect to the Internet
  6. # wifi-menu
  7.  
  8. # Update the system clock
  9. timedatectl set-ntp true
  10.  
  11. # Partition the disks
  12. echo "mklabel gpt
  13. mkpart ESP fat32 1MiB 513MiB
  14. set 1 boot on
  15. mkpart primary ext4 513MiB 100%
  16. quit
  17. " | parted /dev/sda
  18.  
  19. # Format the partitions
  20. mkfs.fat -F32 /dev/sda1
  21. mkfs.ext4 /dev/sda2
  22.  
  23. # Mount the partitions
  24. mount /dev/sda2 /mnt
  25. mkdir -p /mnt/boot
  26. mount /dev/sda1 /mnt/boot
  27.  
  28. # Select the mirrors
  29. cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
  30. grep -E -A 1 ".*Germany.*$" /etc/pacman.d/mirrorlist.bak | sed '/--/d' > /etc/pacman.d/mirrorlist
  31.  
  32. # Install the base packages
  33. pacstrap -i /mnt base base-devel
  34.  
  35. # Configure the system
  36. genfstab -U /mnt > /mnt/etc/fstab
  37.  
  38. # Copy the scripts to the new system
  39. cp -r ~/Installation/ /mnt/
  40.  
  41. # Change root into the new system and start second Script
  42. echo "Execute Arch-Installation.sh"
  43. arch-chroot /mnt /bin/bash
Add Comment
Please, Sign In to add comment