Using local mirror fails, preseed always hits us.archive.ubuntu.com

Bug #775670 reported by Adam Dorsey
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
preseed (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

At some point, using a preseed to select a local mirror has stopped working.
I'm attempting to use a preseed on Ubuntu 11.04 Natty Narwhal. Using the following preseed language:

d-i mirror/protocol string http
d-i mirror/country string US
d-i mirror/http/mirror string local-mirror.url
d-i mirror/http/hostname string local-mirror.url
d-i apt-setup/security_host string local-mirror.url
d-i mirror/http/directory string /ubuntu
d-i mirror/suite string natty
d-i mirror/http/proxy string

I still get us.archive.ubuntu.com as my mirror, which completely defeats the purpose of having a local mirror.

Revision history for this message
Alex L. Demidov (alexeydemidov) wrote :

I've finally got my local mirror working.
It seems that setting 'mirror/country' to country code overrides 'mirror/http/hostname'.
Setting it to 'manual' fixed it. There is my set of options which is working:

d-i mirror/country string manual
d-i mirror/http/hostname string local.mirror.fqdn
d-i mirror/http/directory string /ubuntu-11.04-server-i386
d-i mirror/http/proxy string
d-i apt-setup/security_host string local.mirror.fqdn

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in preseed (Ubuntu):
status: New → Confirmed
Revision history for this message
Leonardo Borda (lborda) wrote :

Hi Alex,

Could you send me the preseed file you're using.
I believe it does not work anymore on 12.04.

Leo

Revision history for this message
Malte S. Stretz (mss) wrote :

I can confirm that it looks like this doesn't work (anymore) in precise.

Revision history for this message
Zubin (zparihar) wrote :
Download full text (4.5 KiB)

Does anybody have an update on this?

I created a mirror repository of precise, both 32 bit and 64bit on one of my local servers using apt-mirror. I'm trying to do a preseed install from it, but it fails to work...

It says:

[!!] Download installer components

The installer failed to download a file from the mirror. This may be a problem with your network, or with the mirror. You can choose to retry the download, select a different mirror, or cancel and choose another installation method.

Downloading a file failed:

- Retry
- Change mirror
- Cancel

My Preseed file looks like this:

d-i debian-installer/locale string en_US
d-i console-keymaps-at/keymap select us

# NETWORK

# --- Turn on the following to do manual network config --- #
d-i netcfg/disable_autoconfig boolean true
# --------------------------------------------------------- #

d-i netcfg/get_nameservers string 64.28.104.51
d-i netcfg/get_ipaddress string 207.200.57.126
d-i netcfg/get_netmask string 255.255.255.224
d-i netcfg/get_gateway string 207.200.57.97
d-i netcfg/choose_interface select eth0
d-i netcfg/disable_dhcp boolean true
d-i netcfg/dhcp_options select Configure network manually
d-i netcfg/confirm_static boolean true
d-i netcfg/get_hostname string test
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain string virt-install

d-i mirror/protocol string http
d-i mirror/country string manual
d-i mirror/http/hostname string ubuntu.myserver.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string

d-i clock-setup/utc boolean true
d-i time/zone string America/Chicago
d-i clock-setup/ntp boolean true

# ---- Partitioning ---- #
d-i partman-auto/disk string /dev/vda
d-i partman-lvm/devide_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true

d-i partman-auto/method string regular
d-i partman-lvm/confirm boolean true

d-i partman-auto-lvm/guided_size string max

# --- Installation all in one partition --- #
#d-i partman-auto/choose_recipe select atomic

# --- Custom Partitioning --- #

# --- One Big Partition --- #

d-i partman-auto/expert_recipe string \
                condpart :: \
                1024 2048 10000000 ext4 \
                        $primary{ } $bootable{ } \
                        method{ format } format{ } \
                        use_filesystem{ } filesystem{ ext4 } \
                        mountpoint{ / } \
                . \
                2048 1024 2048 linux-swap \
                        method{ swap } format{ } \
                . \

d-i partman/default_filesystem string ext4

d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# ---- Users ---- #
d-i passwd/user-fullname string Hello World
d-i passwd/username string helloworld
d-i passw...

Read more...

Revision history for this message
Sebastien Clement (sclement) wrote :

This worked for me with Precise :

d-i mirror/country string manual
d-i mirror/http/hostname string local.mirror.fqdn
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string
d-i mirror/http/mirror select local.mirror.fqdn

Revision history for this message
Deekshith John Baby (johnbaby87) wrote :

I got my mirror working after adding this line for selecting the local mirror, by default the preseed file is selecting cc.archive.ubuntu.com by adding the below line we can redirect the control to our local mirror.

d-i mirror/http/mirror select my.local.mirror
d-i mirror/country string manual
d-i mirror/http/hostname string my.local.mirror
d-i mirror/http/directory string /my/local/mirror-path
d-i mirror/http/proxy string

Revision history for this message
Tamas Tarjanyi (tamas-tarjanyi) wrote :

My goal would be to install ubuntu in a kvm virtual machine totally automated.
Must be my fault but for some reason I am not able to make a fully automated installation.
Whatever I try to configure as an install mirror server at the end it always goes to 91.189.88.153 (cherufe.canonical.com)
But this server was reported to be down in many places and this breaks the whole installation.

I have attached a script and some config file to test this.
If you untar it into a directory than you can call

./net.sh simple

Please check the script - it is simple - before you run it. This will create a kvm virtual machine via libvirt and starts an installation. The installation should use hu.archive.ubuntu.com but wireshark shows it tries to use cherufe.canonical.com.

I tried many preseed configuration option in the *.cfg files. But none of these were working. All the tested ubuntu releases - precise, trusty, utopic - seems to be wrong. It seems debian squeeze is also bad however debian wheezy seems to be good.

If somebody could tell me what is wrong or could confirm that this is really a bug I would be grateful.

Note: Using debconf/priority=high gives me a chance to select a mirror. After I select Hungary as a mirror everything works fine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.