1

I'm looking for a way to copy file from the automate installation of ubuntu20/ubuntu22 LTS. I created special ISO with user-data commands but the last I am trying to do is to copy a file to a specific directory. Thanks in advanced
Update: I try to add the commands to this section but it didn't work

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 &gt;&gt;&gt; in this line I can see the files of the iso but the cp dont work ( I didn't sow any issues) 

enter image description here

HELLBOY
  • 57

0 Answers0