Results 1 to 4 of 4

Thread: Problem building Kali in LXC conatiner for non-pae on Ubuntu 14.04.1 x64

  1. #1
    Join Date
    2015-Feb
    Location
    Canada
    Posts
    4

    Exclamation Problem building Kali in LXC conatiner for non-pae on Ubuntu 14.04.1 x64

    I'm running Ubuntu 14.04.1 x64, and I created a Kali container in LXC using a modified Debian template (basically, it just adds the Kali repositories and installs the Kali repo key). I followed the directions for making a custom image found here, and I changed it from 686 i386 to 486 i386 (the target machine is pre-PAE, so the default i386 image won't install).

    Everything went fine, and I was able to complete all steps. However, during the build process, I got this during the final build stage (output truncated to minimize TLDR feedback):
    Code:
    Need to get 3457 MB of archives.
    After this operation, 8304 MB of additional disk space will be used.
    Get:1 http://archive.kali.org/kali/ kali/main bash-completion all 1:2.0-1 [193 kB]
    ...
    Get:2464 http://archive.kali.org/kali/ kali/non-free zd1211-firmware all 2.21.0.0-1 [16.5 kB]                                                                                                                                                                                                                              
    Fetched 3457 MB in 6min 48s (8454 kB/s)                                                                                                                                                                                                                                                                                    
    Extracting templates from packages: 100%
    Preconfiguring packages ...
    Selecting previously unselected package bash-completion.
    (Reading database ... 9329 files and directories currently installed.)
    ...
    Unpacking libaspell15 (from .../libaspell15_0.60.7~20110707-1_i386.deb) ...
    Selecting previously unselected package dictionaries-common.
    Unpacking dictionaries-common (from .../dictionaries-common_1.12.11_all.deb) ...
    Adding 'diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common'
    dpkg: unrecoverable fatal error, aborting:
     failed to fstat previous diversions file: No such file or directory
    E: Sub-process /usr/bin/dpkg returned an error code (2)
    P: Begin unmounting filesystems...
    P: Saving caches...
    E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
    I did manually run 'dpkg --configure -a' as it suggested, and it didn't make any difference and because I'm running Ubuntu, and not straight-up Debian, I can't just start mixing and matching with the PPA's or I'll mess up my existing install and have neither working Ubuntu nor working Kali. Is the problem because I'm building in an LXC container? Or is there something else going on? Any help would be appreciated.
    Last edited by EvilSupahFly; 2015-02-24 at 18:41. Reason: Fixed minor typo
    [FONT=Courier New]-----------------------------------------------------
    || If I had a signature, this is where I'd put it. ||
    -----------------------------------------------------[/FONT]

  2. #2
    Join Date
    2015-Feb
    Location
    Canada
    Posts
    4
    OK, I think I have the solution, though I'm creating and testing in a new container, just to be sure. During the initial container setup process, there is some problem with the dictionaries-common package, and I have no idea what it is because it's apparently not present on a live system. Initially, I tried apt-get install -y dictionaries-common but all I got was this:

    Adding 'diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common'
    dpkg: unrecoverable fatal error, aborting:
    failed to fstat previous diversions file: No such file or directory
    E: Sub-process /usr/bin/dpkg returned an error code (2)
    P: Begin unmounting filesystems...
    P: Saving caches...
    E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.


    So here's my 5-step (testing-in-progress) fix:
    1: dpkg --configure -a as recommended
    2: apt-get install --reinstall -y dictionaries-common to fix the problem so dpkg can resume
    3: lb clean to clean the chroot
    4: lb config to build whatever the container is running. Optionally, add --architecture amd64 or --architecture i386 to build to suit
    5: lb build to actually build the image

    By the time this post is approved, I will know for sure.
    [FONT=Courier New]-----------------------------------------------------
    || If I had a signature, this is where I'd put it. ||
    -----------------------------------------------------[/FONT]

  3. #3
    Join Date
    2015-Feb
    Location
    Canada
    Posts
    4
    Well, that failed, but it seems

    root@kali-v3:/## chroot chroot dpkg --configure -a

    Did the trick.
    Last edited by EvilSupahFly; 2015-03-05 at 02:29. Reason: clarity
    [FONT=Courier New]-----------------------------------------------------
    || If I had a signature, this is where I'd put it. ||
    -----------------------------------------------------[/FONT]

  4. #4
    Join Date
    2015-Feb
    Location
    Canada
    Posts
    4
    It worked until live build got to the openjdk-6* packages, then it barfed up dependency issues all over my terminal again, and I can't get past it now. I've created seven "Kali" containers in LXC now, and each time, live build barfs a few times on small things, which I can resolve with the above chroot foray, but every single time, they get tripped up on the same packages. I've tried chroot chroot dpkg --configure -a as well as chroot chroot apt-get remove --purge openjdk-6*, and even editing the chroot sources.list to include the official Oracle release from the webupd8 PPA, and nothing works. How can I tell Live Build not to install OJDK6? I can't find it listed in the scripts and yet when I uninstall it and try to build again, live build puts it back in there, and the error process repeats. I feel like I'm stuck in a recursive GOTO loop here!
    [FONT=Courier New]-----------------------------------------------------
    || If I had a signature, this is where I'd put it. ||
    -----------------------------------------------------[/FONT]

Similar Threads

  1. Problem building Kali in LXC conatiner for non-pae on Ubuntu 14.04.1 x64
    By EvilSupahFly in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2015-02-24, 03:06

Tags for this Thread

Posting Permissions

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