在 ubuntu server 18.04 上使用 cubic 进行预安装自动化

在 ubuntu server 18.04 上使用 cubic 进行预安装自动化

我正在尝试创建一个具有预定义程序和设置的 ubuntu 服务器安装媒体。为此,我使用 Cubic。通过 chroot 终端,我可以安装我需要的所有软件,而且效果很好。

我还想使用一些预定义设置(例如用户和密码等)定制安装屏幕,并且希望在安装过程中不会请求这些信息。

为此,我创建了一个预置,其设置是我想要自动进​​行的,并在 grub 中添加了 FILE = / cdrom / preseed / mv.seed 和 auto = true 的启动参数,但是当我尝试安装时,这些设置仍会继续出现。

因为我使用 UEFI 启动,所以我知道提交的是文件 /boot/grub/grub.cfg 来选择我的安装,而不是 /isolinux/txt.cfg

有人知道为什么预种子没有加载吗?

grub.cfg:

if loadfont /boot/grub/font.pf2; then
set gfxmode = auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi

set menu_color_normal = white / blue
set menu_color_highlight = black / light-blue

set timeout = 5
menuentry "Install MultivisOs Server" {
set gfxpayload = keep
linux / casper / vmlinuz file = / cdrom / preseed / mv.seed boot = casper auto = true quiet splash ---
initrd / casper / initrd
}

menuentry "Check disc for defects" {
set gfxpayload = keep
linux / casper / vmlinuz boot = casper integrity-check quiet splash ---
initrd / casper / initrd
}

/preseed/mv.seed:

# select language
d-i debian-installer / language string en

# netcfg will choose an interface that has link if possible. This makes it
# skip displaying the list if there is more than one interface.
# d-i netcfg / choose_interface select auto


# If you want the preconfiguration file to work on both systems and
# without a dhcp server, uncomment these lines and the static network
# configuration below.
d-i netcfg / dhcp_failed note
d-i netcfg / dhcp_options select Configure network manually

# Static network configuration.
#
# IPv4 example
d-i netcfg / get_ipaddress string 192.168.1.237
d-i netcfg / get_netmask string 255.255.255.0
d-i netcfg / get_gateway string 192.168.1.1
d-i netcfg / get_nameservers string 192.168.1.1
d-i netcfg / confirm_static boolean true

# If you want to force hostname, regardless of what the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment
# and adjust the following line.
d-i netcfg / hostname string Multivis

# To create a normal user account.
d-i passwd / user-fullname string comtex
d-i passwd / username string comtex
# Normal user's password, either in clear text
d-i passwd / user-password password Comtex @ 457
d-i passwd / user-password-again password
# or encrypted using a crypt (3) hash.
# d-i passwd / user-password-crypted password [crypt (3) hash]
# Create the first user with the specified UID instead of the default.
# d-i passwd / user-uid string 1010
# The installer will warn you about weak passwords. If you are sure you know
# what you're doing and want to override it, uncomment this.
# d-i user-setup / allow-password-weak boolean true

# If the system has free space you can choose to only partition that space.
# This is only honored if partman-auto / method (below) is not set.
# Alternatives: custom, some_device, some_device_crypto, some_device_lvm.
# d-i partman-auto / init_automatically_partition select biggest_free

# Alternatively, you may specify a disk to partition. If the system has only
# one disk the installer will default to using that, but otherwise the device
# name must be given in traditional, non-devfs format (so eg / dev / sda
# and not e.g. / dev / discs / disc0 / disc).
# For example, to use the first SCSI / SATA hard disk:
# d-i partman-auto / disk string / dev / sda
# In addition, you'll need to specify the method to use.
# The presently available methods are:
# - regular: use the usual partition types for your architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
d-i partman-auto / regular string method

# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate / home partition
# - multi: separate / home, / var, and / tmp partitions
d-i partman-auto / choose_recipe select atomic


# If you just want to change the default filesystem from ext3 to something
# else, you can do that without providing a full recipe.
d-i partman / default_filesystem string ext4

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the above methods.
d-i partman-partitioning / 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

# Avoid that last message about the install being complete.
d-i finish-install / reboot_in_

答案1

相关内容