Hey all. At work we often need to install Ubuntu Server and several extra packages while offline. To make this faster, I'm creating a custom Ubuntu Server install via preseeding (following this documentation: https://help.ubuntu.com/community/In...DCustomization). Installing extra packages was easy and works well.
In addition to adding a few packages, I would like to add another repository to the default set. This is where it seems to get tricky. Remember that, at install time, these computers are offline. However, I need to add an online repository to the list along with adding its key. Adding the repo to the list is easy with
But the key NEEDS TO BE ADDED OFFLINE. I downloaded the key and added it to the ISO (I made a new "keys" directory), but I can't seem to be able to access /cdrom from the preseed file. The simplest test is a late_command:
d-i apt-setup/local0/repository string <repo url>
The server install tells me the above command exits with error code -1, and the only file out of those three that contains anything is the df, which looks like this:
d-i preseed/late_command string df > /target/home/df.txt; ls -Rl /cdrom > /target/home/cdrom.txt; ls -Rl /target/media/cdrom > /target/home/target_cdrom.txt
So obviously both /cdrom and /target/media/cdrom exist. Why can't I read them from the preseed file? Is there any other way to add this key without needing to download it like the following?
Filesystem 1K-blocks Used Available Use% Mounted on
none 205182 180 204992 0% /run
devtmpfs 1020212 8 1020204 0% /dev
/dev/sr0 1408470 1408470 0 100% /cdrom
/dev/mapper/ubuntu-root 18540428 3541660 14068568 20% /target
/dev/sda1 233191 24991 195759 11% /target/boot
/dev/mapper/ubuntu-root 18540428 3541660 14068568 20% /dev/.static/dev
devtmpfs 1020212 8 1020204 0% /target/dev
/dev/sr0 1408470 1408470 0 100% /target/media/cdrom
Thank you for your help.
d-i apt-setup/local0/key string <repo key url>