我正在做Ubuntu Server(Saucy)13.10的全自动安装,也想包含自定义附加软件,Preseed.cfg的格式是:
di debian-installer/locale string en_US di debian-installer/language string en di debian-installer/country string NL di debian-installer/locale string en_GB.UTF-8 di console-setup/ask_detect boolean false di keyboard-configuration/modelcode string pc105 di keyboard-configuration/layoutcode string us di netcfg/choose_interface select auto di netcfg/dhcp_failed note di netcfg/dhcp_options select Configure network manually di netcfg/get_nameservers string 192.168.1.1 di netcfg/get_ipaddress string 192.168.1.42 di netcfg/get_netmask string 255.255.255.0 di netcfg/get_gateway string 192.168.1.1 di netcfg/confirm_static boolean true di netcfg/get_hostname string demo di netcfg/get_domain string www.demo.com di netcfg/wireless_wep string di mirror/country string manual di mirror/http/hostname string archive.ubuntu.com di mirror/http/directory string /ubuntu di mirror/http/proxy string di mirror/http/mirror select CC.archive.ubuntu.com di clock-setup/utc boolean true di time/zone string US/Eastern di clock-setup/ntp boolean true di clock-setup/ntp-server string ntp.example.com di partman-auto/disk string /dev/sda di partman-auto/method string regular di partman-auto/choose_recipe select atomic di partman-partitioning/confirm_write_new_label boolean true di partman/choose_partition select finish di partman/confirm boolean true di partman/confirm_nooverwrite boolean true di partman-md/confirm boolean true di partman-partitioning/confirm_write_new_label boolean true di partman/choose_partition select finish di partman/confirm boolean true di partman/confirm_nooverwrite boolean true di passwd/user-fullname string demo di passwd/username string demo di passwd/user-password password demo123 di passwd/user-password-again password demo123 di user-setup/allow-password-weak boolean true di user-setup/encrypt-home boolean false tasksel tasksel/first multiselect ubuntu-desktop di pkgsel/include string openssh-server build-essential juju ruby virtualbox kvm git openstack di pkgsel/update-policy select none di grub-installer/only_debian boolean true di grub-installer/with_other_os boolean true di finish-install/reboot_in_progress note
我试图把自定义软件包括juju,openstack写在%post后面,通过这种方式:
%post juju git openstack ruby
但是我得到了parsing错误,现在我试图将这些软件包含在pkgsel / include中,但是又出现错误,有没有办法解决这个问题?
相反,如果使用pkgsel / include我使用了晚命令,pkgsel将工作,如果这些软件包在Ubuntu存储库中列出,但作为所需的软件包不包括在Ubuntu官方回购,pkgsel将无法正常工作,所以最好使用晚命令。
“%post”用于运行安装后命令。 而不是“%post”你想使用“%packages”:
%packages juju git openstack ruby
您可以在预先configuration脚本中使用类似以下的内容。
di preseed/late_command string \ in-target apt-get install <packages>