预置自动安装在 20.04 上不起作用

预置自动安装在 20.04 上不起作用

尝试使用预置文件自动安装桌面。

得到这个答案:

root@ubuntu:/var/log# cat casper.log 
Begin: Running /scripts/casper-premount ... done.
done.
mount: mounting /cow on /root/cow failed: No such file or directory
done.
Begin: Creating debconf-communicate fifo mechanism ... done.
Begin: Running /scripts/casper-bottom ... Connecting to plymouth: Connection refused
Begin: Moving mount points... ... done.
Begin: Configuring fstab... ... done.
Begin: Setting up swap... ... done.
Begin: Setting up locales... ... Generating locales (this might take a while)...
Generation complete.
done.
Begin: Setting up automatic login... ... done.
Begin: Disabling systemd's GPT auto generator... ... done.
Begin: Setting hostname... ... done.
Begin: Setting up console keyboard... ... done.
Begin: Applying desktop settings... ... done.
Begin: Regenerating SSL certificate... ... done.
Begin: Loading preseed file... ... done.
Begin: Adding live session user... ... passwd: password expiry information changed.
dbus-daemon[2458]: [session uid=999 pid=2458] Activating service name='org.gtk.vfs.Daemon' requested by ':1.0' (uid=999 pid=2459 comm="" label="unconfined")
dbus-daemon[2458]: [session uid=999 pid=2458] Successfully activated service 'org.gtk.vfs.Daemon'
dbus-daemon[2458]: [session uid=999 pid=2458] Activating service name='org.gtk.vfs.Metadata' requested by ':1.0' (uid=999 pid=2459 comm="" label="unconfined")
fuse: device not found, try 'modprobe fuse' first
dbus-daemon[2458]: [session uid=999 pid=2458] Successfully activated service 'org.gtk.vfs.Metadata'
A connection to the bus can't be made
done.
Begin: Setting up init... ... done.
Begin: Configuring accessibility options... ... done.
Begin: Disabling update-notifier... ... done.
Begin: Configuring power management... ... done.
Begin: Enabling detection of crashes... ... done.
Begin: Disabling unnecessary KDE services... ... done.
Begin: Fixing language selector... ... done.
Begin: Disabling trackerd... ... done.
Begin: Adding APT-CDROM source... ... Using CD-ROM mount point /cdrom/
Identifying... [b0f8b03c0b3a665e1f04d8fe925b7e90-2]
Scanning disc for index files...
Found 2 package indexes, 0 source indexes, 0 translation indexes and 1 signatures
Found label 'Ubuntu 20.04.0 2020.05.12 LTS amd64 _Custom Focal Fossa_ (20200512)'
This disc is called: 
'Ubuntu 20.04.0 2020.05.12 LTS amd64 _Custom Focal Fossa_ (20200512)'
Copying package lists...gpgv: Signature made Thu Apr 23 07:51:19 2020 UTC
gpgv:                using RSA key D94AA3F0EFE21092
gpgv: Good signature from "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>"
Reading Package Indexes... Done
Writing new source list
Source list entries for this disc are:
deb cdrom:[Ubuntu 20.04.0 2020.05.12 LTS amd64 _Custom Focal Fossa_ (20200512)]/ focal main restricted
Repeat this process for the rest of the CDs in your set.
done.
Begin: Possibly disabling update-initramfs (useless on a live CD)... ... done.
Begin: Grant administrative PolicyKit privileges to default user... ... done.
Begin: Configuring jackd2... ... done.
Begin: Disabling unity8's first run wizard... ... done.
Begin: Disabling gnome-initial-setup... ... done.
Begin: Disabling security unattended-upgrades... ... done.
Begin: Disabling snap refresh... ... done.
Begin: Overriding 71-nvidia.rules... ... done.
Begin: Configuring pollinate... ... done.

并且启动时无需自动安装。我尝试修改 grub 和 isolinux,目前:grub.cfg:

menuentry "IMT" {
    set gfxpayload=keep
    linux   /casper/vmlinuz boot=casper file=/cdrom/preseed/imt.seed auto=true priority=critical locale=fr_FR quiet ---
    initrd  /casper/initrd
}

isolinux/txt.cfg:

default imt
label imt
  menu label ^IMY
  kernel /casper/vmlinuz
  append  boot=casper file=/cdrom/preseed/imt.seed vga=788 initrd=/casper/initrd auto=true priority=critical locale=fr_FR quiet ---

和 .seed 文件

### Automatic Installation
d-i auto-install/enable boolean true
d-i debconf/priority select critical

### Localization
d-i debian-installer/locale string fr_FR
d-i localechooser/supported-locales multiselect en_US.UTF-8, fr_FR.UTF-8
# Keyboard
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select fr

### Network
d-i netcfg/choose_interface select auto
d-i netcfg/link_wait_timeout string 10
d-i netcfg/dhcp_timeout string 30
d-i netcfg/get_hostname string imt-test
d-i netcfg/get_domain string imt
#d-i netcfg/hostname string $hostname
#d-i netcfg/domain string $domaine
d-i hw-detect/load_firmware boolean true

### Apt
d-i mirror/http/mirror select fr.archive.ubuntu.com

### Account
d-i passwd/root-login boolean true
d-i passwd/root-password-crypted password $6$Tlc9BpTSuN0WUJC7$UcrBQBEKfP99ExtCU4WA5pXryCnU0veQpduz9XVgaYiVtjs1C9K.nrbgxFBG3zGa2Ihie41GbswPehLsoDw4v/
# User
d-i passwd/user-fullname string imt
d-i passwd/user-password-crypted $6$ZRTZsEZm6Z9Y3Jfq$sGXB4Ao3EPLwLR8jJ3U4CQZNmygYyVmPP45m/id3.W45EbNfFISsRwoTTGtPIBySoCjFGiX7jtfdvW/Lz4yT1/
d-i user-setup/allow-password-weak boolean true

### Time
d-i clock-setup/utc-auto boolean true
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.laas.fr

### Disk
d-i partman-auto/method string crytpo
d-i partman-crypto/passphrase toto
d-i partman-crypto/passphrase-again toto
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-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
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

# Base system installation (voir B.4.9)
# Apt
## Repo
d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true
d-i apt-setup/multiverse boolean true
d-i apt-setup/backports boolean true
d-i apt-setup/services-select multiselect security
d-i apt-setup/security_host string security.ubuntu.com
d-i apt-setup/security_path string /ubuntu

tasksel tasksel/first multiselect ubuntu-desktop
d-i pkgsel/include string openssh-server build-essential vim
## Whether to upgrade packages after debootstrap.
#d-i pkgsel/upgrade select safe-upgrade
d-i pkgsel/language-packs multiselect fr, en
d-i pkgsel/update-policy select unattended-upgrades

d-i pkgsel/updatedb boolean true

d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev  string default

d-i finish-install/reboot_in_progress note

在 ubuntu 20.04 更新中使用 cubic 生成 iso

需要帮助=)

答案1

这似乎是 Ubuntu 服务器操作系统的预置文件,通过它安装桌面操作系统软件包集。它因以下节而引人注目:

### Apt
d-i mirror/http/mirror select fr.archive.ubuntu.com
# Base system installation (voir B.4.9)
# Apt
## Repo

预先安装是一种回答用户安装问题提示的方法,允许他们自动配置他们的安装。

Ubuntu 服务器和 Ubuntu 桌面使用不同的系统安装方法,因此预植入的类型也不同。

尽管 Ubuntu 桌面版确实支持预置,但就预置内容而言,它要少得多,并且支持的选项也比 Ubuntu 服务器安装少得多。因此,您在此处输入的许多参数和命令都与安装程序无关,并且安装程序不会读取它们。这就是为什么人们试图欺骗服务器安装程序安装一组桌面软件包的原因。 过去,使用这种方法曾经有效,但据我所知,20.04 版本不支持它。

我还没有尝试预先安装 Ubuntu 20.04 来测试新功能,但我非常确定这不是正确的格式。

此外,该线程及其参考资料也可能为您提供更多信息:如何预先安装 ubuntu 20.04 桌面?

相关内容