3

Without customising the Ubuntu live image, is it possible to select a mirror during installation? If not, what are the options available? I can think of customising the image, or somehow using preseeding with Ubiquity.

The annoying thing is that I am booting live Ubuntu over the network (via PXE booting), so the network connectivity is assumed. This causes Ubiquity to try to fetch some things from the mirror, even though, by its admission, it doesn't have "internet connectivity", since we are behind a campus proxy. Because of this, it spends a lot of time trying to fetch something and we have to manually skip that part. We do have a (official) mirror within campus, so we would like to use that.

I'd like a way that doesn't involve customising the live environment, so that I can suggest that as a way for students who use their own USB drives.

(Here is, for example, a question about another problem from live booting over the network that I am facing: Ubuntu Live over PXE Boot sets manual config for networking)

Here are a couple of screenshots from a test on a VM:

Disabled update selection for a VM Fetching mirror information fails

Here are a couple of screenshots from a test on a laptop:

Note the usage of in.archive.ubuntu.com, even though, following @noleti's advice, I had set ftp.iitb.ac.in as the mirror:
Disabled update selection for a laptop Fetching mirror info fails on laptop apt-update and sources.list

10
  • Do you already have ubuntu installed and are upgrading?
    – Tim
    Jul 28, 2014 at 10:51
  • @Tim I haven't tried upgrading yet, this is just fresh installing. Does upgrading use the sources.list from the installed Ubuntu?
    – muru
    Jul 28, 2014 at 10:53
  • Yes, I believe so.
    – Tim
    Jul 28, 2014 at 10:57
  • @Tim Thanks, but I'd like a way for fresh installing as well.
    – muru
    Jul 28, 2014 at 11:00
  • 1
    @Rinzwind this is done via "Try", as you may see from the running Unity launcher in the VM screenshot. Unity is not seen in the laptop screenshots since I could now take screenshots of only the relevant window - indeed, without Unity, I wouldn't be able to run Gnome Terminal.
    – muru
    Jul 28, 2014 at 14:47

2 Answers 2

2

This is currently on the wishlist for ubuntu, since 2008, it has been reported on lauchpad, it is bug #202052.

It is also unassigned, so I wouldn't expect it any time soon.

Sorry for it not being better news, but without customising your Live image, it isn't possible.

2
  • My Google Fu has seriously let me down. Thanks, Tim. I'll leave the bounty open for a couple more days to see if anyone can come up with a trick.
    – muru
    Jul 28, 2014 at 14:49
  • 1
    Yeah, it took me a few, I went for ubiquity mirrors in the end to get it :) I also find that because I do so much Ubuntu searching (and nothing else really), I get much more relevant results :) (#CreepyGoogle)
    – Tim
    Jul 28, 2014 at 14:51
2
+50

Updated: includes more info from comments discussion:

It depends on whether ubiquity is using /etc/apt/sources.list for the install

Possible solution: manipulate /etc/apt/sources.list

During installation, you should be able to edit the /etc/apt/sources.list (as root) to redirect to your mirror.

deb ftp://ftp.iitb.ac.in/distributions/ubuntu/archives  trusty main restricted
deb-src ftp://ftp.iitb.ac.in/distributions/ubuntu/archives  trusty main restricted

More info here. Then, run an sudo apt-get update.

By redirecting the call to the mirror

It might be possible to redirect the hard-coded communication with the mirror. Options for that: /etc/hosts dns manipulation to direct to another server with same protocol and directory structure, or by using a local transparent proxy. In your case, assuming you can set up the http mirror on the same machine as your ftp mirror: add the following line to /etc/hosts

103.21.126.20 in.archive.ubuntu.com
11
  • ? Before the installation surely the file won't exist? Do you mean edit it on the Live DVD?
    – Tim
    Jul 28, 2014 at 11:43
  • 1
    I assume that the live dvd is actually creating/using a ramdisk, and copies/unpacks contents from the CD there. I might be wrong, but it should be easy to test.
    – noleti
    Jul 28, 2014 at 11:45
  • Interesting, but a VT isn't needed, we can always use GNOME Terminal. That said, this is not much better than customising the live image, except in that users with their own USBs can do this. I'll test it when I can.
    – muru
    Jul 28, 2014 at 11:45
  • noleti I have an independent setup using preseeding and the network booting, but I'd like to leave this Live mode as untouched as possible, so that students can try it out. I can preseed Ubiquity, but I wonder if there is someway other than that. Failing all I'd rather customize the live image than do part preseeding. @Tim yes, a live environment does have all those files. This is, in every way, like the live CD/USB mode, except for the medium of booting.
    – muru
    Jul 28, 2014 at 12:25
  • @muru I understand your requirements better now, did not get them immediately from the question. You are looking for an easy command/instruction to tell the students so that they can make Ubiquity choose another mirror, correct? You don't want to rely on image changes to allow anyone to use a downloaded live usb key. Can you set up your PXE boot host to proxy/forward to your own Ubuntu proxy? If nothing else is running on it, you could just proxy port 80 or similar
    – noleti
    Jul 28, 2014 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .