Results 1 to 2 of 2

Thread: Building custom ISO fails with couldn't download packages, mirror config at fault?

  1. #1
    Join Date

    Building custom ISO fails with couldn't download packages, mirror config at fault?


    I'm sorry if this has been raised before but I am new to Kali and have been attempting to build a custom ISO for a couple of weeks now with no luck. I have resolved some issues I had by searching google and the forums but I cannot resolve this and don't think I can take it further on my own, your help or advice will be greatly appreciated.

    I have installed Kali rolling 2016.2 (......................) It is an HDD install on VMWare workstation 12, assigned 8Gb ram, 30gb HDD space, bridged networking. The host is windows 10 running on a Dell Precision 7510, i7, 16Gb ram, 500GB HDD with AVG installed Temporarily disabled AV and firewall. If I have missed anything that could help, please let me know and I'll try to provide more info.

    These are the steps I have taken after a fresh install with the latest ISO available on Kali website, I'm sorry if some of it is irrelevant but I'll try to include everything to give you the big picture.

    Install Vmware tools.
    Set sleep preference to never
    Set keyboard
    restart Kali VM
    Open terminal

    Output from apt-get update

    oot@kali:~# apt-get update
    Reading package lists... Done

    I changed /etc/apt/sources.list to what is published on the kali website, see below:

    # deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free
    #deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free
    deb kali-rolling main contrib non-free

    apt-get update output after sources.list edited.

    root@kali:~# apt-get update
    Get:1 kali-rolling InRelease [30.5 kB]
    Get:2 kali-rolling/main amd64 Packages [14.0 MB]
    Get:3 kali-rolling/contrib amd64 Packages [95.4 kB]
    Get:4 kali-rolling/non-free amd64 Packages [155 kB]
    Fetched 14.3 MB in 1min 40s (142 kB/s)
    Reading package lists... Done

    To create the custom ISO I have followed the instructions from

    apt-get install git live-build cdebootstrap curl -y
    git clone git://
    cd live-build-config

    I have changed the /live-build-config/kali-config/variant-light/package.list/kali.list.chroot as below

    # You always want those

    # Kali applications

    # A light desktop

    Then run ./ --variant-light --distribution sana --verbose to build the ISO

    This fails saying that the packages could not be downloaded from

    I folloed advice found on google which lead me to change /live-build-config/auto/config, the below text shows the beginning of the script and the only changes I have made are to the 4 mirror address shown:-


    set -e
    set -o pipefail # Bashism

    # You can put local mirrors here if you want



    Now, last week this resolved the issue of the "couldn't download packages" error I was seeing but I hadn't assigned my VM enough HDD space and so the ISO still failed to build. So, now I have given the VM another 10GB space and am trying to re-run the but once again I cannot get the packages to download. Can anyone suggest why this might be?

    Here is the output with the newly configured mirror (the same config I ran last week succesfully!)

    ./ --variant light --distribution sana --verbose
    [2016-09-20 12:16:05] lb clean --purge
    P: Executing auto/clean script.
    [2016-09-20 12:16:05] lb clean noauto --purge
    P: Executing auto/clean script.
    [2016-09-20 12:16:05] lb clean noauto --all
    P: Cleaning chroot
    find: ‘config/hooks/’: No such file or directory
    P: Executing auto/clean script.
    [2016-09-20 12:16:06] lb clean noauto --cache
    find: ‘config/hooks/’: No such file or directory
    find: ‘config/hooks/’: No such file or directory
    [2016-09-20 12:16:06] lb config -a amd64 --distribution sana -- --variant light
    P: Executing auto/config script.
    [2016-09-20 12:16:06] lb config noauto --distribution sana --debian-installer-distribution sana --archive-areas main contrib non-free --debootstrap-options --keyring=/usr/share/keyrings/kali-archive-keyring.gpg --keyring-packages kali-archive-keyring --updates false --backports false --source false --firmware-binary true --firmware-chroot true --mirror-bootstrap --mirror-debian-installer --mirror-binary --iso-application Kali Linux --iso-publisher Kali --iso-volume Kali Live --linux-packages linux-image --memtest memtest86 --bootappend-live boot=live username=root hostname=kali --debian-installer live --mirror-chroot-security --mirror-binary-security -a amd64
    P: Updating config tree for a debian/sana/amd64 system
    P: Symlinking hooks...
    [2016-09-20 12:16:06] lb build
    P: live-build 5.0~a11
    P: Building config tree for a debian/sana/amd64 system
    [2016-09-20 12:16:07] lb bootstrap
    P: Setting up cleanup function
    [2016-09-20 12:16:07] lb bootstrap_cache restore
    P: Restoring bootstrap stage from cache...
    [2016-09-20 12:16:07] lb bootstrap_debootstrap
    P: Begin bootstrapping system...
    P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
    P: Running debootstrap (download-only)...
    I: Retrieving Release
    I: Retrieving Release.gpg
    I: Checking Release signature
    I: Valid Release signature (key id 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6)
    I: Retrieving Packages
    I: Validating Packages
    I: Retrieving Packages
    I: Validating Packages
    I: Retrieving Packages
    I: Validating Packages
    I: Resolving dependencies of required packages...
    I: Resolving dependencies of base packages...
    I: Found additional required dependencies: acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 libsystemd0 libudev1 libustr-1.0-1 procps systemd systemd-sysv udev
    I: Found additional base dependencies: libdns-export100 libestr0 libffi6 libgmp10 libgnutls-deb0-28 libgnutls-openssl27 libhogweed2 libicu52 libidn11 libirs-export91 libisc-export95 libisccfg-export90 libjson-c2 liblogging-stdlog0 liblognorm1 libmnl0 libnetfilter-acct1 libnettle4 libnfnetlink0 libp11-kit0 libpsl0 libtasn1-6
    I: Checking component main on
    I: Retrieving acl 2.2.52-2
    W: Couldn't download package acl (ver 2.2.52-2 arch amd64)
    I: Retrieving adduser 3.113+nmu3
    W: Couldn't download package adduser (ver 3.113+nmu3 arch all)
    I: Retrieving apt
    W: Couldn't download package apt (ver arch amd64)
    I: Retrieving apt-utils
    W: Couldn't download package apt-utils (ver arch amd64)
    I: Retrieving aptitude-common 0.6.11-1
    W: Couldn't download package aptitude-common (ver 0.6.11-1 arch all)
    I: Retrieving base-files 1:2.0
    W: Couldn't download package base-files (ver 1:2.0 arch amd64)
    I: Retrieving base-passwd 3.5.37
    W: Couldn't download package base-passwd (ver 3.5.37 arch amd64)
    I: Retrieving bash 4.3-11+b1
    W: Couldn't download package bash (ver 4.3-11+b1 arch amd64)
    I: Retrieving bsdmainutils 9.0.6
    W: Couldn't download package bsdmainutils (ver 9.0.6 arch amd64)
    I: Retrieving bsdutils 1:2.25.2-6
    W: Couldn't download package bsdutils (ver 1:2.25.2-6 arch amd64)
    I: Retrieving coreutils 8.23-4
    W: Couldn't download package coreutils (ver 8.23-4 arch amd64)
    I: Retrieving cpio 2.11+dfsg-4.1

    I stopped the script at this point as the errors are already shown..

    Thanks for your time to read through this and any help advice will be welcome.

  2. #2
    Join Date

    I still haven't been able to move forward with this issue, can anyone shed any light at all?

    From a fresh install of the latest rolling version, and following the instructions in the Dojo workshops, this should work! Can anyone share their experience of building a successful ISO using these methods and perhaps I can work backward to figure out where this has gone wrong?

    Even if someone could suggest another line of investigation and I will try to identify the source of the issue.


Similar Threads

  1. Building ISO with cached packages
    By St0ner1995 in forum Building Archive
    Replies: 0
    Last Post: 2016-08-31, 07:01
  2. Replies: 0
    Last Post: 2015-08-15, 01:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts