特殊:Badtitle/NS100:InstallCDCustomization/PreseedExamples
![]() |
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/InstallCDCustomization/PreseedExamples }} |
![]() |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/af | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Afrikaans| [[::InstallCDCustomization/PreseedExamples/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ar | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|العربية| [[::InstallCDCustomization/PreseedExamples/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/az | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|azərbaycanca| [[::InstallCDCustomization/PreseedExamples/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/bcc | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|جهلسری بلوچی| [[::InstallCDCustomization/PreseedExamples/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/bg | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|български| [[::InstallCDCustomization/PreseedExamples/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/br | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|brezhoneg| [[::InstallCDCustomization/PreseedExamples/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ca | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|català| [[::InstallCDCustomization/PreseedExamples/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/cs | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|čeština| [[::InstallCDCustomization/PreseedExamples/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/de | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Deutsch| [[::InstallCDCustomization/PreseedExamples/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/el | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Ελληνικά| [[::InstallCDCustomization/PreseedExamples/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/es | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|español| [[::InstallCDCustomization/PreseedExamples/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/fa | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|فارسی| [[::InstallCDCustomization/PreseedExamples/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/fi | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|suomi| [[::InstallCDCustomization/PreseedExamples/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/fr | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|français| [[::InstallCDCustomization/PreseedExamples/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/gu | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|ગુજરાતી| [[::InstallCDCustomization/PreseedExamples/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/he | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|עברית| [[::InstallCDCustomization/PreseedExamples/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/hu | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|magyar| [[::InstallCDCustomization/PreseedExamples/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/id | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Bahasa Indonesia| [[::InstallCDCustomization/PreseedExamples/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/it | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|italiano| [[::InstallCDCustomization/PreseedExamples/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ja | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|日本語| [[::InstallCDCustomization/PreseedExamples/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ko | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|한국어| [[::InstallCDCustomization/PreseedExamples/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ksh | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Ripoarisch| [[::InstallCDCustomization/PreseedExamples/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/mr | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|मराठी| [[::InstallCDCustomization/PreseedExamples/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ms | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Bahasa Melayu| [[::InstallCDCustomization/PreseedExamples/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/nl | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Nederlands| [[::InstallCDCustomization/PreseedExamples/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/no | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|norsk| [[::InstallCDCustomization/PreseedExamples/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/oc | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|occitan| [[::InstallCDCustomization/PreseedExamples/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/pl | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|polski| [[::InstallCDCustomization/PreseedExamples/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/pt | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|português| [[::InstallCDCustomization/PreseedExamples/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ro | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|română| [[::InstallCDCustomization/PreseedExamples/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/ru | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|русский| [[::InstallCDCustomization/PreseedExamples/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/si | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|සිංහල| [[::InstallCDCustomization/PreseedExamples/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/sq | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|shqip| [[::InstallCDCustomization/PreseedExamples/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/sr | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|српски / srpski| [[::InstallCDCustomization/PreseedExamples/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/sv | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|svenska| [[::InstallCDCustomization/PreseedExamples/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/th | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|ไทย| [[::InstallCDCustomization/PreseedExamples/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/tr | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Türkçe| [[::InstallCDCustomization/PreseedExamples/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/vi | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|Tiếng Việt| [[::InstallCDCustomization/PreseedExamples/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/yue | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|粵語| [[::InstallCDCustomization/PreseedExamples/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/zh | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|中文| [[::InstallCDCustomization/PreseedExamples/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/zh-hans | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|中文(简体)| [[::InstallCDCustomization/PreseedExamples/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples | UbuntuHelp:InstallCDCustomization/PreseedExamples | {{#if: | :}}InstallCDCustomization/PreseedExamples}}/zh-hant | • {{#if: UbuntuHelp:InstallCDCustomization/PreseedExamples|中文(繁體)| [[::InstallCDCustomization/PreseedExamples/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:InstallCDCustomization/PreseedExamples|:InstallCDCustomization/PreseedExamples|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :InstallCDCustomization/PreseedExamples/zh | | {{#ifexist: InstallCDCustomization/PreseedExamples/zh | | {{#ifeq: {{#titleparts:InstallCDCustomization/PreseedExamples|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:InstallCDCustomization/PreseedExamples|1|-1|}} | zh | | }}
{{https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png%7D%7D These are debconf seed files to help you customize an Ubuntu installation CD. For more information, see UbuntuHelp:InstallCDCustomization.
100% automatic installation script
This preseed file was written by CraigBox for his employer, IT Partners. It automatically partitions and installs a machine, including a complex setup script that is run on first boot.
# If you're remastering a CD, you could use this: # preseed/file=/cdrom/preseed/firewall.seed # # While you're at it, you may want to throw a debconf/priority=critical in # there, to avoid most questions even if the preseeding below misses some. # And you might set the timeout to 1 in syslinux.cfg to avoid needing to hit # enter to boot the installer. # # Language, country, and keyboard selection cannot be preseeded from a file, # because the questions are asked before the preseed file can be loaded. # Instead, to avoid these questions, pass some more parameters to the kernel: # # debian-installer/locale=en_NZ # kbd-chooser/method=us # # Always install the server kernel. d-i base-installer/kernel/override-image string linux-server # Don't install usplash. d-i base-installer/kernel/linux/extra-packages-2.6 string # Desktop system not installed; don't waste time and disk space copying it. d-i archive-copier/desktop-task string ubuntu-standard d-i archive-copier/ship-task string # Only install the standard system and language packs. d-i pkgsel/install-pattern string ~t^ubuntu-standard$ d-i pkgsel/language-pack-patterns string # No language support packages. base-config base-config/install-language-support boolean false # itp: copy the install script from the CD to the HDD, and set it # in /etc/rc.local so it runs on first boot. d-i preseed/late_command string cp -a /cdrom/preseed/install.sh /target/root; sed -i 's_exit 0_sh /root/install.sh_' /target/etc/rc.local; # netcfg will choose an interface that has link if possible. This makes it # skip displaying a list if there is more than one interface. d-i netcfg/choose_interface select auto # Note that any hostname and domain names assigned from dhcp take # precedence over values set here. However, setting the values still # prevents the questions from being shown even if values come from dhcp. d-i netcfg/get_hostname string unassigned-firewall d-i netcfg/get_domain string unassigned-domain # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string d-i mirror/country string New Zealand d-i mirror/http/hostname string nz.archive.ubuntu.com d-i mirror/http/directory string /ubuntu d-i mirror/suite string dapper d-i mirror/http/proxy string # Partition the first disc found d-i partman-auto/disk string /dev/discs/disc0/disc # Create a small /boot partition, suitable swap, and uses the rest of the space # for the root partition: d-i partman-auto/expert_recipe string boot-root :: 100 50 100 ext3 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ /boot } . 500 10000 1000000000 ext3 method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ / } . 64 512 2048 linux -swap method{ swap } format{ } . # For reference, here is that same recipe in a more readable form: # boot-root :: # 100 50 100 ext3 # $primary{ } $bootable{ } # method{ format } format{ } # use_filesystem{ } filesystem{ ext3 } # mountpoint{ /boot } # . # 500 10000 1000000000 ext3 # method{ format } format{ } # use_filesystem{ } filesystem{ ext3 } # mountpoint{ / } # . # 64 512 2048 linux-swap # method{ swap } format{ } # . # (Craig changed this from 300%). # This makes partman automatically partition without confirmation. d-i partman/confirm_write_new_label boolean true d-i partman/choose_partition select Finish partitioning and write changes to disk d-i partman/confirm boolean true # This is fairly safe to set, it makes grub install automatically to the MBR # if no other operating system is detected on the machine. d-i grub-installer/only_debian boolean true # This one makes grub-installer install to the MBR if if finds some other OS # too, which is less safe as it might not be able to boot that other OS. d-i grub-installer/with_other_os boolean true # Avoid that last message about the install being complete. d-i prebaseconfig/reboot_in_progress note # Controls whether or not the hardware clock is set to GMT. d-i clock-setup/utc boolean true d-i time/zone string Pacific/Auckland # To preseed the root password, you have to put it in the clear in this # file. That is not a very good idea, use caution! passwd passwd/root-password password whatever passwd passwd/root-password-again password whatever passwd passwd/root-login boolean true # If you want to skip creation of a normal user account. passwd passwd/make-user boolean false # More flexibly, this runs a shell command and if it outputs the names of # preseed files, includes those files. For example, to switch configs based # on a particular usb storage device (in this case, a built-in card reader): d-i preseed/include string debconf/exim.cfg debconf/clamav.cfg debconf/mailgraph.cfg debconf/ntop.cfg debconf/samba.cfg debconf/ssh.cfg
In the 'debconf' directory I keep answers for packages that would otherwise ask questions at installation time. I built these from the output of `debconf-get-selections`. For example, exim.cfg contains:
exim4-config exim4/dc_noalias_regenerate boolean false exim4-config exim4/dc_smarthost string exim4-config exim4/dc_relay_domains string exim4-config exim4/dc_relay_nets string exim4-base exim4/purge_spool boolean false exim4-config exim4/mailname string localhost.localdomain exim4-config exim4/dc_local_interfaces string exim4-config exim4/dc_minimaldns boolean false exim4-config exim4/exim3_upgrade boolean true exim4-config exim4/dc_other_hostnames string exim4-config exim4/dc_eximconfig_configtype select internet site; mail is sent and received directly using SMTP exim4-config exim4/no_config boolean true exim4-config exim4/hide_mailname boolean exim4-config exim4/dc_postmaster string exim4-config exim4/dc_readhost string exim4-config exim4/use_split_config boolean true # Move yet undelivered mails from exim(v3) to exim4 spool? exim4-base exim4/move_exim3_spool boolean false
In install.sh, you can put anything you want to run at first boot. I wanted finer grained control over what installed, in the way I had with base-config (which was removed with Ubuntu 6.06). This file runs once, called from /etc/rc.local, and then modifies the rc.local script so it will not run again:
INSTALL="apt-get install -y" REMOVE="apt-get remove -y" apt-get update # email $INSTALL exim4-daemon-heavy mailx mailgraph # etc - loads cut sed -i 's_sh /root/install.sh_exit 0_' /etc/rc.local echo "Installation complete."
- Return to UbuntuHelp:InstallCDCustomization.