cd /usr/share/debootstrap/scripts/ echo "default_mirror http://http.kali.org/kali"; sed -e "s/debian-archive-keyring.gpg/kali-archive-keyring.gpg/g" sid > /tmp/kali sudo mv /tmp/kali . sudo ln -s kali kali-rolling
cd ~ git clone https://gitlab.com/kalilinux/build-scripts/live-build-config.git
cd live-build-config/
此时,我们必须编辑build.sh脚本以绕过版本检查。为此,我们注释掉下面的“出口1”。
1 2 3 4 5 6 7 8
# Check we have a good debootstrap ver_debootstrap=$(dpkg-query -f '${Version}' -W debootstrap) if dpkg --compare-versions "$ver_debootstrap" lt "1.0.97"; then if ! echo "$ver_debootstrap" | grep -q kali; then echo "ERROR: You need debootstrap >= 1.0.97 (or a Kali patched debootstrap). Your current version: $ver_debootstrap" >&2 exit 1 fi fi
进行更改后,脚本应如下所示:
1 2 3 4 5 6 7 8
# Check we have a good debootstrap ver_debootstrap=$(dpkg-query -f '${Version}' -W debootstrap) if dpkg --compare-versions "$ver_debootstrap" lt "1.0.97"; then if ! echo "$ver_debootstrap" | grep -q kali; then echo "ERROR: You need debootstrap >= 1.0.97 (or a Kali patched debootstrap). Your current version: $ver_debootstrap" >&2 # exit 1 fi fi