首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu20.04.3自动安装未能弹出虚拟CD

Ubuntu20.04.3自动安装未能弹出虚拟CD
EN

Ask Ubuntu用户
提问于 2022-03-03 03:12:05
回答 1查看 613关注 0票数 0

我正在安装ISO与嵌入式自动安装用户数据文件,以自动化Ubuntu安装在物理服务器上使用。引导模式是UEFI。在OS安装结束时,我期望自动安装过程在重新启动之前弹出cdrom。但是我看到从安装日志中弹出的操作失败了。因此,服务器正在无限期地循环安装。

我在自动安装YAML中有遗漏什么吗?这是它的副本:

代码语言:javascript
复制
#cloud-config
autoinstall:
  version: 1
  identity: {hostname: ubuntu, password: password,
    realname: Govind, username: bma}
  keyboard: {layout: us, toggle: null, variant: ''}
  locale: en_US.UTF-8
  early-commands:
    - echo "Nothing yet"
  network:
    ethernets:
      eno1: {dhcp4: true}
    version: 2
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  storage:
    config:
    - {ptable: gpt, serial: , wwn: '',
      path: /dev/sdb, wipe: superblock-recursive, preserve: false, name: '', grub_device: false,
      type: disk, id: disk-sdb}
    - {device: disk-sdb, size: 536870912, wipe: superblock, flag: boot, number: 1,
      preserve: false, grub_device: true, type: partition, id: partition-0}
    - {fstype: fat32, volume: partition-0, preserve: false, type: format, id: format-0}
    - {device: disk-sdb, size: 118914809856, wipe: superblock, flag: '', number: 2,
      preserve: false, grub_device: false, type: partition, id: partition-1}
    - {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-1}
    - {path: /, device: format-1, type: mount, id: mount-1}
    - {path: /boot/efi, device: format-0, type: mount, id: mount-0}
  late-commands:
    - ip_array=`ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | awk -F'/'  '{print $1}' `
    - iplist=""
    - for item in $ip_array; do iplist=`echo $item","$item1`; done
    - echo "curl -X POST -k --header 'Content-Type':' plain/text, Accept':' plain/text' -d '$iplist' %BMA_REST_URL%" > /tmp/confirm.sh
    - bash /tmp/confirm.sh
    - sleep 10
    - umount -f /cdrom

如果需要,我可以提供任何额外的日志。

EN

回答 1

Ask Ubuntu用户

发布于 2022-03-03 22:45:30

您看到哪些日志显示eject正在失败?为什么要在/cdrom中卸载late-commands

eject命令在安装程序退出后由casper运行。用于源代码脚本的casper-stop显示,如果没有挂载/cdrom,那么它将不会运行eject命令。

如果/cdrom没有挂载,不要试图弹出它

您还可能遇到一种情况,即curtin正在重新排序引导顺序,以便更喜欢cd-rom。安装期间的默认行为是将当前引导方法设置为第一个引导选项。

see也

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1395702

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档