Advertisement
Mr_Green

wraparch

Sep 17th, 2012
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.15 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement