我正在寻找一种方法来从 ubuntu20/ubuntu22 LTS 的自动安装中复制文件。我使用用户数据命令创建了特殊的 ISO,但我最后尝试做的是将文件复制到特定目录。提前致谢 更新
:我尝试将命令添加到此部分,但没有成功
late-commands:
- |
sudo mkdir /mnt/lp1
sudo mount -o loop /dev/cdrom /mnt/lp1
ls -lha /mnt/lp1
sudo cp /mnt/lp1/katello_server-host-cert.crt /usr/local/share/ca-certificates/katello_server-host-cert.crt
sudo umount /mnt/lp1
sudo update-ca-certificates
cat <<EOF > /target/etc/cloud/cloud.cfg.d/80_my.cfg
hostname: ubuntu-$(openssl rand -hex 3)
manage_etc_hosts: true
preserve_hostname: false
EOF
ls -lha /mnt/lp1 >>> in this line I can see the files of the iso but the cp dont work ( I didn't sow any issues)