Advertisement
Guest User

archinstall.sh

a guest
May 19th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.12 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # setting the keyboard layout to UK
  4. loadkeys uk
  5. echo set keyboard layout to UK
  6.  
  7. #ensures that the system clock is accurate
  8. timedatectl set-ntp true
  9. clear
  10.  
  11. #disk partitioning
  12.  
  13. #displays all of the drives
  14. fdisk -l
  15. echo which drive would you like to install Arch on?
  16. read installDrive
  17. clear
  18.  
  19. #actual partitioning - presumes 250GB drive
  20. boot='1'
  21. swap='2'
  22. root='3'
  23.  
  24. bootPartition='$installDrive$boot'
  25. rootPartition='$installDrive$root'
  26. swapPartition='$installDrive$swap'
  27.  
  28. parted $installDrive
  29. mklabel gpt
  30.  
  31. #boot
  32. mkpart primary fat32 1MiB 551MiB
  33. set 1 esp on
  34.  
  35. #swap
  36. mkpart primary linux-swap 551MiB 17.5GiB
  37.  
  38. #root
  39. mkpart primary ext4 17.5GiB 100%
  40.  
  41. quit
  42.  
  43. #formatting
  44. mkswap $swapPartition
  45. swapon $swapPartition
  46.  
  47. mkfs.ext4 $rootPartition
  48.  
  49. #mounting
  50. mount $rootPartition /mnt
  51. mount $bootPartition /mnt/efi
  52.  
  53. #install
  54. pacstrap /mnt base base-devel
  55.  
  56. #config time!!!
  57.  
  58. #generating fstab
  59. genfstab -U /mnt >> /mnt/etc/fstab
  60.  
  61. #get into the newly installed OS
  62. arch-chroot /mnt
  63.  
  64. #set timezone
  65. ln -sf /usr/share/zoneinfo/GB
  66. hwclock --systohc
  67.  
  68. #locale shit
  69. nano /etc/locale.gen
  70. locale-gen
  71.  
  72. touch /etc/locale.conf
  73. echo LANG=en_GB.UTF-8 > /etc/locale.conf
  74.  
  75. echo KEYMAP=uk > /etc/vconsole.conf
  76.  
  77. #network config
  78. touch /etc/hostname
  79. echo myles-arch > /etc/hostname
  80.  
  81. echo 127.0.0.1 localhost > /etc/hosts
  82. echo ::1 localhost > /etc/hosts
  83. echo 127.0.0.1 myles-arch.localdomain myles-arch > /etc/hosts
  84.  
  85. #password
  86. echo set the root password:
  87. passwd
  88.  
  89. #installing reflector then getting fastest mirrors
  90. pacman -S reflector
  91. reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
  92.  
  93. #installing intel microcode for stability
  94. pacman -S intel-ucode
  95.  
  96. #installing bootloader
  97. pacman -S grub
  98. grub-install $installDrive
  99. grub-mkconfig -o /boot/grub/grub.cfg
  100.  
  101. #update system
  102. pacman -Syu
  103.  
  104. clear
  105.  
  106. #installing the DE and display server
  107. pacman -S xorg xorg-server
  108.  
  109. pacman -S budgie-desktop
  110. pacman -S lightdm
  111. systemctl start lightdm.service
  112. systemctl enable lightdm.service
  113.  
  114. #install nvidia driver
  115. pacman -S nvidia lib32-nvidia-utils
  116.  
  117. exit
  118. reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement