![Cloud init 从 iso 复制文件不起作用](https://linux22.com/image/948324/Cloud%20init%20%E4%BB%8E%20iso%20%E5%A4%8D%E5%88%B6%E6%96%87%E4%BB%B6%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我正在寻找一种从 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)