Actually I have an issue by running Ubuntu 20.04 Server, if we
customize the user-data file, I'm getting only the prompt by installation Ubuntu 20.04.
Case:
We would like to build an Ubuntu 20.04 image with Packer for qemu vm. The std. configuration work fine, but if we changing something in the user-data file and restart the build again, we getting the installation prompt, which we must select user language etc.
Solution:
We would like to change the efibootmgr order, because our Installation running in looping, after successfully installation of ubuntu, booting the machine from iso and not from Disk. The Installation running again with errors. I´m Testing to edit the command by
late_command or user-data -> runcmd section, but if i add the line, the ubuntu installer not found the user-data file and starting the installation with prompt.
My user-data File:
#cloud-config
autoinstall:
version: 1
early-commands:
- systemctl stop ssh
locale: en_US
apt:
geoip: true
keyboard:
layout: en
variant: us
network:
network:
version: 2
ethernets:
ens33:
dhcp4: true
storage:
layout:
name: lvm
identity:
hostname: ubuntu
username: ubuntu
# pass is ubuntu
password: #########
ssh:
install-server: yes
allow-pw: true
packages:
- vim
- tmux
- curl
user-data:
disable_root: false
late-commands:
- 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml'
- echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
- echo 'test123' > /target/root/test.txt
If I add - curtin in-target --target=/target -- efibootmgr -o 0007
by late-commands the user data not be found by installer
If I add under user-data section the runcmd [efibootmgr -o 0007] not be found by installer
Have you some ideas? If you need any more information, please ask me.