Problem:
I am able to use internet repo to install Ubuntu 18.04 on my systems using Foreman. That works just fine. However, I download Ubuntu repo (using apt-mirror) to my local shared storage and want to use that repo to build Ubuntu systems. This is where I am getting error. The only part I am changing is OS media URL and keeping everything else same. I also tried to download server version of Ububtu DVD image, copied ISO content to publicly available web server - still error and can not build Ubuntu.
Expected outcome:
Ubuntu 18.04 should be able to install - but not the case when I use my downloaded Ubuntu repo.
Foreman and Proxy versions:
Foreman 1.20.1
Foreman and Proxy plugin versions:
Other relevant data:
Error I am getting is: “Failure parsing Preseed default PXELinux: undefined method medium_uri for nil:NilClass”
I found solution to my problem and here it goes: (hope it will help someone looking for similar solution for Ubuntu)
With apt-mirror command, it downloads/replicates only “dists” & “pool” directory - however to make Foreman work for installing Ubuntu as Guest OS, one need to have “dists/xenial/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/” directory also located at same level. From this directory, Foreman picks initrd.gz and linux files and store it on TFTP proxy for initial boot. This was missing in my configuration - the moment it got fixed, it worked like a charm!