修改preseed文件定制ubuntu安装cd

针对一些常见需要手动配置的部分,进行修改使之自动。

不断完善中.................

1、跳过开始部分的语言和安装选项
所有ubuntu版本,均修改光盘根目录中isolinux/isolinux.cfg,修改timeout参数,如timeout 1

2、修改背景图片,替换isolinux中的splash.pcx

3、自动选择语言、键盘布局等,比较新的ubuntu版本,修改isolinux/text.cfg,接着seed文件,如下:
debian-installer/locale=en_US kbd-chooser/metuod=us console-setup/layoutcode=us

4、跳过网络选择和设置主机名那一步
# Network configuration.
d-i netcfg/choose_interface select auto
d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Do not configure the network at this time
d-i netcfg/get_hostname string keqi-server
d-i netcfg/get_domain string keqi-server

5、使用root登录并使用弱密码时取消提示
# Account setup
d-i passwd/root-login boolean root
d-i passwd/root-password password 123456
d-i passwd/root-password-again password 123456
d-i user-setup/allow-password-weak boolean true
d-i passwd/make-user boolean false
d-i user-setup/encrypt-home boolean false

######################################

我的seed文件如下:

 # Auto installation
d-i auto-install/enable boolean true
# Always install the server kernel.
d-i base-installer/kernel/override-image string linux-server
# Install the Ubuntu Server seed.
tasksel tasksel/force-tasks string server

# Locale sets language and country.
d-i debian-installer/locale string en_US

# Keyboard selection.
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us

# Network configuration.
d-i netcfg/choose_interface select auto
d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Do not configure the network at this time
d-i netcfg/get_hostname string keqi-server
d-i netcfg/get_domain string keqi-server    

# Clock and time zone setup
d-i clock-setup/utc boolean false
d-i time/zone string Asia/Shanghai

# Partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# Http proxy
d-i mirror/http/proxy string ""

# Account setup
d-i passwd/root-login boolean root
d-i passwd/root-password password Keqisoft1dx
d-i passwd/root-password-again password Keqisoft1dx
d-i user-setup/allow-password-weak boolean true
d-i passwd/make-user boolean false
d-i user-setup/encrypt-home boolean false

# Apt setup
d-i apt-setup/contrib boolean true

# Package selection
tasksel tasksel/first multiselect standard
d-i pkgsel/include string openssh-server vim

#d-i pkgsel/upgrade select none
d-i pkgsel/language-packs multiselect en, zh

d-i pkgsel/update-policy select none

# Boot loader installation
d-i grub-installer/only_debian boolean true

# CP hyper production
# d-i preseed/late_command string cp -r /cdrom/keqiInstall /target/opt/;chroot /target/ chmod +x /opt/keqiInstall/install.sh

# Finishing up the installation
# d-i finish-install/reboot_in_progress note

# Install hyper production
d-i preseed/late_command string \
    cp -a /cdrom/setup.exe /target/opt/setup.exe; \
    chroot /target chmod +x /opt/setup.exe; \
    echo "/opt/setup.exe" >> /target/etc/profile;

你可能感兴趣的:(ubuntu,职场,自动,休闲,preseed)