Page 21 of 25 FirstFirst ... 111920212223 ... LastLast
Results 201 to 210 of 250

Thread: 32-Bit Chroot How-To

  1. #201
    Join Date
    Nov 2006
    Beans
    1

    Smile Re: 32-Bit Chroot How-To

    Quote Originally Posted by chrestomanci View Post
    Currently when the do_chroot script passes program arguments to the chroot, it does not protect special characters from being interpreted by the shell
    You can use this shell script as do_chroot to protect most special characters, except for continuous backslashes.
    Code:
    #!/bin/sh
    args="`echo $0 | sed 's|^.*/\(.*\)\(32\)*$|\1|'`"
    for arg; do
        args="$args `echo $arg | sed 's|\([^-_a-zA-Z0-9]\)|\\\\\1|g'`"
    done
    /usr/bin/dchroot -d "$args"
    Last edited by Joybin; November 26th, 2006 at 04:50 PM.

  2. #202
    Join Date
    Jun 2006
    Location
    DC
    Beans
    26
    Distro
    Ubuntu

    Re: 32-Bit Chroot How-To

    Here is an update to make the whole do_dchroot process easier.

    Code:
    #!/bin/sh
    args="`echo $0 | perl -e '$_=<>; s/^.*\/(.*?)(32)?$/\1/; print; '`"
    for arg; do
        args="$args `echo $arg | sed 's|\([^-_a-zA-Z0-9]\)|\\\\\1|g'`"
    done
    if [ -e /usr/bin/linux32 ]; then
        /usr/bin/linux32 /usr/bin/dchroot -d "$args"
    else
        /usr/bin/dchroot -d "$args"
    fi
    Because of the change in do_dchroot step five becomes simpler:
    • dchroot -d
    • sudo apt-get install synaptic
    • sudo ln -s /usr/sbin/synaptic /usr/sbin/synaptic32 (DELETE, NO LONGER NEEDED)
    • exit
    • sudo ln -s /usr/local/bin/do_dchroot /usr/local/bin/synaptic32
    • sudo synaptic32


    This is a small change to the regex to allow this. This makes one assumption, the 64 bit program is not visible from within the 32bit chroot - which would make sense, after all we just spent all that time making a seperate area for the 32 bit programs! If there is no 32 at the end of the name it will ignore it and try and launch the program in the chroot anyway. The corrected handling of 32 required a non-greedy operator which I don't think seds can do (which is why it now uses perl).

    I also added a check for linux32 for those that need to do compiling in the chroot, this should automatically run the chroot with linux32 in front if it exists.
    Last edited by petriborg; December 17th, 2006 at 05:52 PM.

  3. #203
    Join Date
    Jun 2006
    Location
    DC
    Beans
    26
    Distro
    Ubuntu

    Re: 32-Bit Chroot How-To

    On a side note, you can *also* add another detail, under Dapper, if you add a file named "debian_chroot" to the /chroot/etc directory, the default profile will append the content of the file at the start of the PS1 variable. For example, if you put "dapper32" in the file it displays: (dapper32)petri@linuxbox:~$

    How cool is *that*

  4. #204
    Join Date
    Jan 2007
    Beans
    5

    Re: 32-Bit Chroot How-To

    I followed the directions from this thread. I am running the sudo synaptic32 command and getting the following error message:

    scott@zeus:~/downloads/BasicStamp$ sudo synaptic32
    I: [edgy chroot] Running command: “synaptic32 ”

    (synaptic32:29339): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.


    Does anyone know what is going wrong here and how I can fix it? Thanks.

    I am running Kubuntu 6.10.
    Last edited by hacktorious; January 30th, 2007 at 08:23 PM.

  5. #205
    Join Date
    Dec 2005
    Beans
    28
    Distro
    Ubuntu 6.06

    Re: 32-Bit Chroot How-To

    im running Ubuntu 6.06 LTS on a 64-bit pc
    getting this error in step 1 line 5
    Failure trying to run: chroot /chroot dpkg --force-depends --install var/cache/apt/archives/base-files_3.1.0ubuntu3_i386.deb var/cache/apt/archives/base-passwd_3.5.9_i386.deb
    dont know what t do

    note: Im trying to run xchat with support of http://fish.sekure.us/. cant get that t run on the pc
    Dont Worry Be Happy
    Stay Safe With Dapper Drake

  6. #206
    Join Date
    Feb 2007
    Beans
    5

    Re: 32-Bit Chroot How-To

    HI!

    I am very new to Linux, but am enjoying learning about it. When I try to do this I get this

    josh120@josh120-desktop:~$ sudo apt-get install dchroot debootstrap
    Password:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Couldn't find package dchroot


    Whenever I try to apt getupdate it never connects. Same with Add/remove, it says "Downloading 1/35" and does nothing. I have been working on this 1 problem for a few days now and am lost.

    PLEASE HELP!

    Thanks so much

  7. #207
    Join Date
    Jun 2005
    Beans
    137

    Re: 32-Bit Chroot How-To

    hey, nice guide - worked a treat for me, simply had to install an extra package to get around a locale problem, but apart from that it was plain sailing

    two things:

    1) All my apps look ugly How do I go about installing gtk themes in the chroot, is there any way to get the chroot to use the same themes as the rest of my desktop via another fstab mount point or something similar?

    EDIT: Answered my own question here: http://www.ubuntuforums.org/showthread.php?t=307194

    2) someone else earlier mentioned using "sudo mount --bind /etc/passwd /usr/chroot32/passwd" etc... as a neater way than simply copying all the required files, I'm a perfectionist and woud quite like to do this but all I get is:

    Code:
    mount: mount point /usr/chroot32/passwd does not exist
    Should this work? I've seen this in another guide, so I'm geusing there is a way of making it work...

    Thanks
    Last edited by kragen; February 21st, 2007 at 12:16 AM.

  8. #208
    Join Date
    Mar 2007
    Beans
    2

    Re: 32-Bit Chroot How-To


  9. #209
    Join Date
    Mar 2005
    Location
    France
    Beans
    19

    Re: 32-Bit Chroot How-To

    Hi all,

    my chroot edgy32 under edgy 64 works, except I am unable to install dbus; I get an error
    stating that "/etc/init.d/dbus start" fails; has anyone come across this or does anyone have an idea of what to do? dbus is kinda necessary for what I wanted to do!
    many thanks,

    Olivier

  10. #210
    Join Date
    Jun 2006
    Location
    DC
    Beans
    26
    Distro
    Ubuntu

    Re: 32-Bit Chroot How-To

    Quote Originally Posted by kragen View Post

    2) someone else earlier mentioned using "sudo mount --bind /etc/passwd /usr/chroot32/passwd" etc... as a neater way than simply copying all the required files, I'm a perfectionist and woud quite like to do this but all I get is:

    Code:
    mount: mount point /usr/chroot32/passwd does not exist
    Should this work? I've seen this in another guide, so I'm geusing there is a way of making it work...

    Thanks
    Sorry Kragen, no you can't do that, mount will only do that for folders to my knowledge.

Page 21 of 25 FirstFirst ... 111920212223 ... LastLast

Bookmarks

Posting Permissions

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