PDA

View Full Version : Kali 2.0 sana custom iso... failed to run command ‘/usr/bin/env’



slaxd
2015-09-16, 12:04
I am trying to build a custom iso of kali 2 sana iso these are the steps i took and the error msg i recieved
My current system configuation is
Distributor ID: Kali
Description: Kali GNU/Linux 2.0
Release: 2.0
Codename: sana
Default desktop session
running a live instance of kali2.0 with two persistent drives.
I get the same error message whether in both persistent and Live instance
(Some processes like creating a new truecrypt volume did not work with kali1.x persistence but worked well with kali1.x live so i attempted both to create a custom iso - no luck either way)
Any suggestions or work arounds are appreciated



root@kali:~# apt-get install git live-build cdebootstrap devscripts
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version.
The following extra packages will be installed:
dctrl-tools debian-keyring diffstat distro-info-data dput equivs
hardening-includes libapt-pkg-perl libarchive-zip-perl
libclass-inspector-perl libclone-perl libcommon-sense-perl
libconvert-binhex-perl libdebian-installer-extra4 libdebian-installer4
libdistro-info-perl libemail-valid-perl libexporter-lite-perl libio-pty-perl
libio-sessiondata-perl libio-stringy-perl libipc-run-perl libjson-perl
libjson-xs-perl libmime-tools-perl libnet-domain-tld-perl libossp-uuid-perl
libossp-uuid16 libparse-debcontrol-perl libperlio-gzip-perl
libsoap-lite-perl libtext-levenshtein-perl libxmlrpc-lite-perl lintian
live-manual-html patchutils python3-magic strace t1utils wdiff
Suggested packages:
cvs-buildpackage debbindiff devscripts-el libterm-size-perl
libyaml-syck-perl svn-buildpackage mini-dinstall uuid libapache2-mod-perl2
libmime-lite-perl libnet-jabber-perl binutils-multiarch libyaml-perl
The following NEW packages will be installed:
cdebootstrap dctrl-tools debian-keyring devscripts diffstat distro-info-data
dput equivs hardening-includes libapt-pkg-perl libarchive-zip-perl
libclass-inspector-perl libclone-perl libcommon-sense-perl
libconvert-binhex-perl libdebian-installer-extra4 libdebian-installer4
libdistro-info-perl libemail-valid-perl libexporter-lite-perl libio-pty-perl
libio-sessiondata-perl libio-stringy-perl libipc-run-perl libjson-perl
libjson-xs-perl libmime-tools-perl libnet-domain-tld-perl libossp-uuid-perl
libossp-uuid16 libparse-debcontrol-perl libperlio-gzip-perl
libsoap-lite-perl libtext-levenshtein-perl libxmlrpc-lite-perl lintian
live-build live-manual-html patchutils python3-magic strace t1utils wdiff
0 upgraded, 43 newly installed, 0 to remove and 73 not upgraded.

(no room in forum post for - this successfull process has been turncated for breivity)

Processing triggers for libc-bin (2.19-18) ...



root@kali:~# git clone git://git.kali.org/live-build-config.git
Cloning into 'live-build-config'...
remote: Counting objects: 852, done.
remote: Compressing objects: 100% (567/567), done.
remote: Total 852 (delta 445), reused 427 (delta 220)
Receiving objects: 100% (852/852), 822.27 KiB | 29.00 KiB/s, done.
Resolving deltas: 100% (445/445), done.
Checking connectivity... done.
root@kali:~# cd live-build-config/
root@kali:~/live-build-config# lb build
[2015-09-16 02:18:13] lb build
P: Automatically populating config tree.
[2015-09-16 02:18:13] lb config
P: Executing auto/config script.
[2015-09-16 02:18:14] 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 http://archive.kali.org/kali --mirror-debian-installer http://archive.kali.org/kali --mirror-chroot-security http://archive.kali.org/kali-security --mirror-binary http://http.kali.org/kali --mirror-binary-security http://security.kali.org/kali-security --iso-application Kali Linux --iso-publisher Kali --iso-volume Kali Live --linux-packages linux-image --bootappend-live boot=live username=root hostname=kali --debian-installer live --linux-flavours 686-pae
P: Updating config tree for a debian/sana/i386 system
P: Symlinking hooks...
P: live-build 4.0.4
P: Building config tree for a debian/sana/i386 system
[2015-09-16 02:18:14] lb bootstrap
P: Setting up cleanup function
[2015-09-16 02:18:15] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2015-09-16 02:18:15] lb bootstrap_cdebootstrap
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 cdebootstrap (download-only)...
E: Unknown suite sana
P: Begin unmounting filesystems...
P: Saving caches...
chroot: failed to run command ‘/usr/bin/env’: No such file or directory
root@kali:~/live-build-config#

Saytan
2015-09-18, 10:11
Hello there,

Well, I encounter the same problem.
After going through the steps to configure a custom ISO, I finally issue `lb build` and it stops with the same error message.
Here is the result:



[root@kali ~/git/live-build-config] # lb build
[2015-09-18 11:53:28] lb build
P: live-build 4.0.4
P: Building config tree for a debian/sana/amd64 system
[2015-09-18 11:53:28] lb bootstrap
P: Setting up cleanup function
[2015-09-18 11:53:28] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2015-09-18 11:53:28] lb bootstrap_cdebootstrap
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 cdebootstrap (download-only)...
E: Unknown suite sana
P: Begin unmounting filesystems...
P: Saving caches...
chroot: failed to run command ‘/usr/bin/env’: No such file or directory


The command `/usr/bin/env` works perfectly fine otherwise.

Any help would be greatly appreciated :)

Thanks all

plozelle
2015-09-18, 17:12
Noodled this same issue for a couple days. Realized after some thought there is an error in the instructions. Apparently something changed.
Change: "apt-get install git live-build cdebootstrap:
to: "apt-get install git live-build debootstrap: -- Lose the "c"

after this change the process worked fine for me.

- Paul


I am trying to build a custom iso of kali 2 sana iso these are the steps i took and the error msg i recieved
My current system configuation is
Distributor ID: Kali
Description: Kali GNU/Linux 2.0
Release: 2.0
Codename: sana
Default desktop session
running a live instance of kali2.0 with two persistent drives.
I get the same error message whether in both persistent and Live instance
(Some processes like creating a new truecrypt volume did not work with kali1.x persistence but worked well with kali1.x live so i attempted both to create a custom iso - no luck either way)
Any suggestions or work arounds are appreciated



root@kali:~# apt-get install git live-build cdebootstrap devscripts
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version.
The following extra packages will be installed:
dctrl-tools debian-keyring diffstat distro-info-data dput equivs
hardening-includes libapt-pkg-perl libarchive-zip-perl
libclass-inspector-perl libclone-perl libcommon-sense-perl
libconvert-binhex-perl libdebian-installer-extra4 libdebian-installer4
libdistro-info-perl libemail-valid-perl libexporter-lite-perl libio-pty-perl
libio-sessiondata-perl libio-stringy-perl libipc-run-perl libjson-perl
libjson-xs-perl libmime-tools-perl libnet-domain-tld-perl libossp-uuid-perl
libossp-uuid16 libparse-debcontrol-perl libperlio-gzip-perl
libsoap-lite-perl libtext-levenshtein-perl libxmlrpc-lite-perl lintian
live-manual-html patchutils python3-magic strace t1utils wdiff
Suggested packages:
cvs-buildpackage debbindiff devscripts-el libterm-size-perl
libyaml-syck-perl svn-buildpackage mini-dinstall uuid libapache2-mod-perl2
libmime-lite-perl libnet-jabber-perl binutils-multiarch libyaml-perl
The following NEW packages will be installed:
cdebootstrap dctrl-tools debian-keyring devscripts diffstat distro-info-data
dput equivs hardening-includes libapt-pkg-perl libarchive-zip-perl
libclass-inspector-perl libclone-perl libcommon-sense-perl
libconvert-binhex-perl libdebian-installer-extra4 libdebian-installer4
libdistro-info-perl libemail-valid-perl libexporter-lite-perl libio-pty-perl
libio-sessiondata-perl libio-stringy-perl libipc-run-perl libjson-perl
libjson-xs-perl libmime-tools-perl libnet-domain-tld-perl libossp-uuid-perl
libossp-uuid16 libparse-debcontrol-perl libperlio-gzip-perl
libsoap-lite-perl libtext-levenshtein-perl libxmlrpc-lite-perl lintian
live-build live-manual-html patchutils python3-magic strace t1utils wdiff
0 upgraded, 43 newly installed, 0 to remove and 73 not upgraded.

(no room in forum post for - this successfull process has been turncated for breivity)

Processing triggers for libc-bin (2.19-18) ...



root@kali:~# git clone git://git.kali.org/live-build-config.git
Cloning into 'live-build-config'...
remote: Counting objects: 852, done.
remote: Compressing objects: 100% (567/567), done.
remote: Total 852 (delta 445), reused 427 (delta 220)
Receiving objects: 100% (852/852), 822.27 KiB | 29.00 KiB/s, done.
Resolving deltas: 100% (445/445), done.
Checking connectivity... done.
root@kali:~# cd live-build-config/
root@kali:~/live-build-config# lb build
[2015-09-16 02:18:13] lb build
P: Automatically populating config tree.
[2015-09-16 02:18:13] lb config
P: Executing auto/config script.
[2015-09-16 02:18:14] 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 http://archive.kali.org/kali --mirror-debian-installer http://archive.kali.org/kali --mirror-chroot-security http://archive.kali.org/kali-security --mirror-binary http://http.kali.org/kali --mirror-binary-security http://security.kali.org/kali-security --iso-application Kali Linux --iso-publisher Kali --iso-volume Kali Live --linux-packages linux-image --bootappend-live boot=live username=root hostname=kali --debian-installer live --linux-flavours 686-pae
P: Updating config tree for a debian/sana/i386 system
P: Symlinking hooks...
P: live-build 4.0.4
P: Building config tree for a debian/sana/i386 system
[2015-09-16 02:18:14] lb bootstrap
P: Setting up cleanup function
[2015-09-16 02:18:15] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2015-09-16 02:18:15] lb bootstrap_cdebootstrap
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 cdebootstrap (download-only)...
E: Unknown suite sana
P: Begin unmounting filesystems...
P: Saving caches...
chroot: failed to run command ‘/usr/bin/env’: No such file or directory
root@kali:~/live-build-config#

slaxd
2015-09-19, 01:44
Noodled this same issue for a couple days. Realized after some thought there is an error in the instructions. Apparently something changed.
Change: "apt-get install git live-build cdebootstrap:
to: "apt-get install git live-build debootstrap: -- Lose the "c"

after this change the process worked fine for me.

- Paul

trying now - seems to be working - will post back and link to the other threads with the same problem upon completion- nice noodling - tip my hat to you plozelle

Saytan
2015-09-22, 11:16
Hello,



Noodled this same issue for a couple days. Realized after some thought there is an error in the instructions. Apparently something changed.
Change: "apt-get install git live-build cdebootstrap:
to: "apt-get install git live-build debootstrap: -- Lose the "c"



It indeed solved the problem for me too.

Thank you very much

plozelle
2015-09-22, 16:01
Glad it worked for you both.

Cashiuus
2015-10-04, 18:37
I cam across this one as well, and found out through some digging that this change went live on/after 9/10/2015, but I don't believe any reference materials were updated to indicate this change. I realized this by seeing the commit message on the git repo for "live-build-config": http://git.kali.org/gitweb/?p=live-build-config.git;a=commit;h=f78f6d069777dc586ad09224f7f5 fb34e77ecd0b where code was added to require debootstrap specifically.

Also, the build.sh script checks for the package in a way that doesn't handle the case that you don't have the package installed, because it only checks to see what version you are running (build.sh line 149: dpkg-query -f '${Version}' -W debootstrap), which will be blank if you don't have it installed.