Advertisement
Guest User

linux_debian_template_preseed.cfg -- vbox-unattended-v0.5.1

a guest
Jan 2nd, 2012
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. d-i debian-installer/locale string en_US
  2. d-i console-keymaps-at/keymap select us
  3.  
  4. # network config
  5. d-i netcfg/choose_interface select auto
  6. d-i netcfg/get_hostname string localhost
  7. d-i netcfg/get_domain string localdomain
  8. d-i netcfg/disable_dhcp boolean false
  9.  
  10. # time & clock
  11. d-i clock-setup/ntp boolean false
  12. d-i clock-setup/utc boolean true
  13. d-i time/zone select US/Eastern
  14.  
  15. # HDD partitioning + format
  16. d-i partman-auto/method string regular
  17. d-i partman-auto/choose_recipe select atomic
  18. d-i partman/confirm_write_new_label boolean true
  19. d-i partman/choose_partition select finish
  20. d-i partman/confirm boolean true
  21. d-i partman/confirm_nooverwrite boolean true
  22.  
  23. # users
  24. d-i passwd/root-login boolean true
  25. d-i passwd/root-password password $password
  26. d-i passwd/root-password-again password $password
  27. d-i passwd/user-fullname string $user
  28. d-i passwd/username string $user
  29. d-i passwd/user-password password $password
  30. d-i passwd/user-password-again password $password
  31.  
  32. # packages
  33. tasksel tasksel/first multiselect standard, desktop
  34. tasksel tasksel/desktop multiselect kde
  35. d-i pkgsel/include string openssh-server build-essential autoconf dkms synaptic
  36. d-i pkgsel/upgrade select none
  37. popularity-contest popularity-contest/participate boolean true
  38.  
  39. # silence extra repositories, grub and reboot
  40. d-i apt-setup/security_host string
  41. d-i apt-setup/volatile_host string
  42. d-i apt-setup/services-select multiselect
  43. d-i grub-installer/only_debian boolean true
  44. d-i finish-install/reboot_in_progress note
  45.  
  46. # custom scripts; Step is done in d-i after installed all packages, but before guest OS reboot:
  47. # It is generating "rc.local" file, which will act as first-boot script, after reboot:
  48. d-i preseed/late_command string \
  49. mv /target/etc/rc.local /target/etc/rc.local.backup; \
  50. echo false > /target/etc/X11/default-display-manager; \
  51. echo '#!/bin/bash' > /target/etc/rc.local;\
  52. echo 'mkdir /mnt/cdrom' >> /target/etc/rc.local;\
  53. echo 'echo' >> /target/etc/rc.local;\
  54. echo 'echo "Installing VirtualBox Guest Additions..."' >> /target/etc/rc.local;\
  55. echo 'mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom' >> /target/etc/rc.local;\
  56. echo 'bash /mnt/cdrom/VBoxLinuxAdditions.run' >> /target/etc/rc.local;\
  57. echo 'eject /dev/cdrom' >> /target/etc/rc.local;\
  58. echo 'usermod -a -G vboxsf $user' >> /target/etc/rc.local;\
  59. echo 'echo "/usr/bin/kdm" >/etc/X11/default-display-manager' >> /target/etc/rc.local;\
  60. echo 'mv /etc/rc.local.backup /etc/rc.local' >> /target/etc/rc.local;\
  61. echo '/etc/init.d/kdm start &' >> /target/etc/rc.local;\
  62. echo 'exit 0' >> /target/etc/rc.local;\
  63. chmod a+rx /target/etc/rc.local
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement