
* T o n g mlist4suntong@yahoo.com [20071111 18:21]:
On Sun, 11 Nov 2007 10:58:35 +0100, Michael Prokop wrote:
Check out "Can I use my own (local) Debian mirror?" at http://grml.org/grml-live/ (the manpage provides the same content, JFYI):
,---- [ http://grml.org/grml-live/ ] | If you want to use a local (for example NFS mount) mirror | additionally, just adjust MIRROR_DIRECTORY and MIRROR_SOURCES inside | /etc/grml/grml-live.conf as well. `----
Ah, thanks. The MIRROR_DIRECTORY is outside chroot, correct? Will it get wiped when building the iso?
Yes, it's just "mount --bind"-ed into the chroot und unmounted of course when building the ISO. No files will be deleted from the mirror of course, it's used just like a normal Debian mirror and accessed via apt-get/aptitude. :)
hmm, when trying to answer the above questions using the UTSL method, I noticed that it is not quite as what I proposed.
- One has to build a (local) Debian mirror first before he is able to use
MIRROR_DIRECTORY and MIRROR_SOURCES. I haven't done that before. Will I have to pull in the full Debian mirror, not just the packages that I need? The bind mount method on the contrary, does not require one to setup anything, and does not require storing any unnecessary packages either.
If all you need is a caching mirror just use approx/apt-cacher/... - it is really trivial to set up, just look in the docs for step-by-step instructions.
- Using the MIRROR_DIRECTORY and MIRROR_SOURCES, grml-live still need to
download packages into the chroot, then wipe the downloaded before building the iso. Even the mirror is local, there are still some quite heavy disk RW going on. With bind mount and up to date local apt archive, disk RW will be near-zero. Quite a performance boost, isn't it?
Hm, not sure whether I really got you, but is your suggestion to "mount --bind" the mirror directly to /var/cache/apt/archive of/for the chroot?
BTW: If you are interested in my own todolist for grml-live check out http://wiki.grml.org/doku.php?id=grml-live
regards, -mika-