Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

wraparch

By: Mr_Green on Sep 17th, 2012  |  syntax: Bash  |  size: 1.15 KB  |  views: 228  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. # by Mr Green
  3. # very much work in progress
  4. #
  5. # based on install.sh by Mario Aichinger
  6. #
  7. # wraparch v-0.01 base install
  8. # helper script based on arch-install-scripts
  9. # assumes you have created partitions and filesystems
  10. # and they are mounted.
  11.  
  12. # system set up variables
  13. # Change values to suit....
  14.  
  15. # Todo
  16. # test running as root
  17. # local.conf
  18. # locale
  19.  
  20. install_dir="/mnt" # where paritions are mounted
  21. bootloader="syslinux" # bootloader
  22. packages="base" # add base_devel if required
  23. host_name="arch" # name of host!
  24. local_zone="Europe/London" # Time zone
  25. console_keymap="uk" # console keymap
  26. _root="password" # password for root
  27.  
  28. function set_up_base()
  29. {
  30. pacstrap $install_dir "$packages" $bootloader
  31. genfstab -U -p $install_dir >> $install_dir/etc/fstab
  32. }
  33.  
  34. function config_sys()
  35. {
  36. arch-chroot $install_dir << EOF
  37. echo $host_name >> /etc/hostname
  38. echo "KEYMAP=\"${console_keymap}\"" >> /etc/vconsole.conf
  39. ln -s /usr/share/zoneinfo/$local_zone /etc/localtime
  40. locale-gen
  41. mkinitcpio -p linux
  42. /usr/sbin/syslinux-install_update -iam
  43. passwd << EOPF
  44. $_root
  45. $_root
  46. EOPF
  47. EOF
  48. }
  49.  
  50. # start install
  51. set_up_base
  52. config_sys
clone this paste RAW Paste Data