LD_LIBRARY_PATH instead of chroot

Hello!
Once I needed to launch app compiled for Debian 7 i386 on CentOS 6.2 i386 w/o chroot. So I just set LD_LIBRARY_PATH and PATH.
It worked like a charm.
Now I try to do just the same thing on Arch x64 with Debian 7 x64, but all apps refuse to launch with some strange error (new every launch)
kostya ~ $ DEBIAN=/home/debian-wheezy-x64
kostya ~ $
kostya ~ $ export LD_LIBRARY_PATH=$DEBIAN/usr/lib/x86_64-linux-gnu:$DEBIAN/lib/x86_64-linux-gnu:$DEBIAN/usr/lib:$DEBIAN/lib:$DEBIAN/lib64
kostya ~ $ export PATH=$DEBIAN/usr/bin:$DEBIAN/bin
kostya ~ $
kostya ~ $ ls
ls: : ELF: o: Error 1415726082
kostya ~ $ ls
ls: i(: ELF: o: Error 18446744073659630594
kostya ~ $ ls
ls: @Fm: ELF: o: Error 18446744072869987330
kostya ~ $ ls
ls: : ELF: o: Error 18446744071681983490
I've never seen such errors before. What is it and how it could be fixed?

I found that problem could be fixed by preloading libc
LD_PRELOAD=/lib/libc.so.6 ls
bin boot dev etc home lib lib32 lib64 media mnt opt proc root run sbin selinux srv sys tmp usr var
But why does it work with common libc if I use chroot?

Similar Messages

  • Unable to load performance pack using JRockit 26.3 on Solaris 10

    Hi all,
    I'm getting the following error when starting up my WebLogic 9.1 server instance on Solaris 10. I've recently upgraded from Sun's JVM to JRockit 26.3. I do not get this error when using Sun's JVM.
    <May 16, 2006 9:16:38 AM EDT> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that a native performance library is in: '/usr/local/bea91_dev1/jrockit-R26.3.0-jdk1.5.0_06/jre/lib/sparcv9/jrockit:/usr/local/bea91_dev1/jrockit-R26.3.0-jdk1.5.0_06/jre/lib/sparcv9:/usr/local/bea91_dev1/jrockit-R26.3.0-jdk1.5.0_06/jre/../lib/sparcv9:/usr/local/bea91_dev1/patch_weblogic910/profiles/default/native:/usr/local/bea91_dev1/weblogic91/server/native/solaris/sparc:/usr/local/bea91_dev1/weblogic91/server/native/solaris/sparc/oci920_8:/usr/lib'
    Here's the content of the /usr/local/bea91_dev1/weblogic91/server/native/solaris/sparc folder:
    libfastfile.so libstackdump.so libwlfileio2.so
    libjmsc.so libterminalio.so wlauth
    libmuxer.so libweblogicunix1.so wlkeytool
    libnodemanager.so libwlenv.so
    I also have a sparc64 directory with the same file names.
    Can anyone shed some light?
    Regards,
    Daniel

    JRockit on Solaris is 64-bit so it needs the 64-bit performance pack files, so you need to have $WL_HOME/server/native/solaris/sparc64 in the LD_LIBRARY_PATH instead of $WL_HOME/server/native/solaris/sparc
    Bob

  • [SOLVED] Install to BtrFS already existing (but empty) subvolume

    I currently have a Btrfs filesystem made up of /dev/sda5 and /dev/sda6. On that filesystem, there is an Ubuntu 11.10 install in the @oneiric_main subvolume and a data subvolume (with Ubuntu /home) in the @Data subvolume. Grub2 is installed in the @oneiric_main subvolume and works fine.
    I would like to install arch to a new subvolume on the existing BtrFS filesystem. I would probably make a subvolume named @arch_2011.08 to install it on. (@arch is taken--I already tried to do this myself, installing using pacman -r <subvol_mount_point> -Sy base --ignore grub. Didn't work, has no initrd, kernel panics with VFS not syncing error) I would like to then boot Arch with Ubuntu's Grub2 since that install is working off BtrFS. How do I go about doing this?
    On the install that failed, I generally tried to follow https://wiki.archlinux.org/index.php/In … Btrfs_root, but I didn't really need/want automatic snapshots, so I didn't think I wanted to install mkinitcpio-btrfs. For it my Grub2 entry is
    menuentry "Arch (on /dev/sda6)" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod btrfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root d551dbac-3c7f-4f8f-a0d4-2d1f242cc42f
    linux /@arch/boot/vmlinuz-linux root=/dev/disk/by-uuid/d551dbac-3c7f-4f8f-a0d4-2d1f242cc42f rootflags=subvol=@arch ro
    I've tried to chroot to the Arch install from Ubuntu and run mkinitcpio, but that gave an error that some directory was not valid. The directory it complained about had the Ubuntu kernel version in its name, so I figured I was doing something majorly wrong. Edit:I suppose it would help if I updated the /etc/fstab. I did, but I still get the same error. The first line is "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"
    I'm not sure if I should try to fix the first install or just start again. Either way would get the goal:Arch installed on the BtrFS subvolume, booted with Ubuntu's Grub2.
    Last edited by Azendale (2011-12-17 22:34:16)

    @Teekay:I did mount /proc, /sys and /dev into the @arch subvolume before chrooting.
    Here's what happens when I try to chroot into the Arch install to make an initrd:
    [root@dynl:~]# mount -o subvol=@arch /dev/sda5 /mnt
    [root@dynl:~]# cd /mnt
    [root@dynl:/mnt]# mount -o bind /dev dev
    [root@dynl:/mnt]# mount -o bind /sys sys
    [root@dynl:/mnt]# mount -o bind /proc proc
    [root@dynl:/mnt]# chroot .
    chroot: failed to run command `/bin/zsh': No such file or directory
    [root@dynl:/mnt]# chroot . bash
    bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    [root@dynl /]# ls
    bin dev home lib64 mnt proc run srv tmp var
    boot etc lib media opt root sbin sys usr
    [root@dynl /]# mount
    /dev/sda5 on / type btrfs (rw,relatime)
    udev on /dev type devtmpfs (rw,relatime,size=693104k,nr_inodes=173276,mode=755)
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    [root@dynl /]# mkinitcpio
    /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    ==> ERROR: '/lib/modules/3.1.0-030100rc10-generic' is not a valid kernel module directory
    Update: I've made progress. Instead of chrooting from Ubuntu, I chooted from the arch installation live image. I was able to run mkinitcpio -p linux. I added an initrd line to grub2:
    menuentry "Arch (on /dev/sda6)" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod btrfs
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root d551dbac-3c7f-4f8f-a0d4-2d1f242cc42f
    linux /@arch/boot/vmlinuz-linux root=/dev/disk/by-uuid/d551dbac-3c7f-4f8f-a0d4-2d1f242cc42f rootflags=subvol=@arch ro
    initrd /@arch/boot/initramfs-linux.img
    The new error is :
    Decompressing Linux... Parsing ELF... done.
    Booting the kernel.
    :: Starting udevd...
    done.
    :: Running Hook [udev]
    :: Triggering uevents...done.
    Waiting 10 seconds for device /dev/sda6 ...
    mount: mounting dev/sda6 on /new_root failed: Invalid argument
    ERROR: Failed to mount the real root device.
    bailing out, you are on your own. Good luck.
    sh: can't access tty; job control turned off
    [ramfs /]#
    Also, the Arch /etc/fstab is:
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    tmpfs /tmp tmpfs nodev,nosuid 0 0
    UUID=d551dbac-3c7f-4f8f-a0d4-2d1f242cc42f / btrfs defaults,subvol=@arch 0 0
    Last edited by Azendale (2011-11-05 06:43:49)

  • Enterprise: X-platform technologie or native?

    Hey guys,
    my company thinks about joining the mobile market. Our main business is developing enterprise applications for business customers (mostly with Java).
    Now we have to decide whether we use platform independent things like phonegap - or doing native development. The advantages of X-Platform systems are obviously - they dont have to look for obj-c dev's because you can work with Java (e.g. phonegap). But what do you think, are there some clear disadvantages to do X-platform development in the enterprise area? If you know any publication about this topic please link it here.
    I'am a passionated iOS developer and I'd like to do it in my company - but I have to bring some evidences for native development.
    What do you think?
    Thanks,
    Alex

    Hi.
    As you checked the supported platforms doc you probably already executed the command
    ldd setup/utilities/license/libfl_qt-mt333R2_32.so.3
    but, in order to verify which libraries are missing, try this:
    1) Navigate to the setup/utilities/license on your installation folder. You should see the LicenseManager file in there.
    2) Copy the complete path of this folder and add it to your LD_LIBRARY_PATH environment variable (refer to the steps below my signature to know how to do it).
    3) Execute this command:
    ldd LicenseManager
    It will check the dependencies for all libraries on the environment variable LD_LIBRARY_PATH instead of only the libfl_qt-mt333R2_64.so.3 library.
    4) If you find any entry that shows u201Cnot foundu201D, copy its path and add it to the LD_LIBRARY_PATH. Do it for all u2018not foundu2019 entries.
    5) Try to run the installation again.
    I hope I have helped.
    Leo.

  • Complete checklist for oracle 11.2.0.4 environment variables on AIX 6

    Hi,
    Can anyone give me the Doc ID for complete checklist for oracle environment variable 11.2.0.4 on IBM AIX 6 platform (64 bit).
    Because we get the following from IBM website, we wonder if any other oracle variable need to make a change, or will impact upgrade correctly on AIX.
    “AIX 5.1 uses an environment variable LIBPATH when loading shared libraries. AIX 5.3 uses LD_LIBRARY_PATH
    instead. For backward compatibility, AIX5.3 still uses LIBPATH if it is defined.”
    URL: http://www-01.ibm.com/support/docview.wss?uid=isg3T1015835
    So we can actually define both -
    LIBPATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LIBPATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; /usr/local/lib export LD_LIBRARY_PATH
    there are less companies use AIX to run oracle database than those use Unix/Linux; we are planning upgrade oracle database 11.2.0.3 to 11.2.0.4 on IBM AIX (64bit) os level 6, so we need to double-confirm this.  FYI.
    thank you very much!

    Hi Abhi: the Doc URL you give me (<e48740>) it doesn't help much. It doesn't tell much about environment variables for oracle.  I have the following sample for oracle .profile at IBM AIX 6.1, is it Ok enough for us as basic setting?
    vi /home/oracle/.profile
    # Oracle variables
    umask 022
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR
    ORACLE_SID=meps; export ORACLE_SID
    ORACLE_BASE=/ora_bin01/u01/app/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME
    TNS_ADMIN=$ORACLE_HOME/network/admin  export TNS_ADMIN
    PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/sbin:/usr/ccs/bin; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib:/lib:/usr/lib;/usr/local/lib export LD_LIBRARY_PATH
    LIBPATH=$LD_LIBRARY_PATH export LIBPATH
    CLASSPATH=$CLASSPATH:$ORACLE_HOME/jdbc/lib:$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/oui/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    Note:
    there are optional environment variables: TNS_ADMIN(optional), NLS_LANG (optional), TWO_TASK (optional)
    thank you!

  • Upgrade broke complete system

    The 2.6.32 kernel-headers update (I think) broke my whole system, I can neither load the kernel image nor chroot in the system from a live cd (!). I get always the same error:
    Too many levels of symbolic links
    (e.g. "chroot: cannot run command '/bin/bash': Too many levels of symbolic links")
    Something probably went wrong at the upgrade. If trying to reinstall kernel-headers 2.6.32.1 or kernel26 2.6.31.5 (is it right that those packages have different version numbers in the repro?) with the "-r /mnt" swich (instead of chrooting) I get the following
    error:
    command failed to execute correctly
    for at least some of the packages (it doesn't get logged anywhere). Downgrading to kernel-headers 2.6.31 complains about dependency issues (glibc).
    This is my pacman.log of the last upgrade (nothing special as far as I can see):
    http://pastebin.com/m365c5914
    I couldn't reboot or login as a different user. Had to do a hard reset. This is my error.log:
    Dec 20 13:29:30 arch gdm-binary[5099]: ERROR: gdm_slave_exec_script: Ausführen gescheitert: /etc/gdm/PostSession/Default
    Dec 20 13:29:32 arch agetty[1765]: tty1: can't exec /bin/login: Too many levels of symbolic links
    Dec 20 13:30:20 arch acpid: execl(): Too many levels of symbolic links
    Any help please?
    Last edited by hinrich (2009-12-20 18:27:21)

    R00KIE wrote:Did you update glibc too? And for any reason did you change /lib64 to be a link to /lib ?
    Thank you, you hit the bulls-eye! I really did link lib64 to lib about a year ago, because I had to use some obscure proprietary 64-Bit driver looking for all libs in /lib64. Don't know why it didn't cause any problems up to now.
    pacman -r /mnt -S kernel-headers kernel26
    with the Arch system mounted to /mnt fixed the problem (after reverting the link of course).
    Last edited by hinrich (2009-12-20 23:12:13)

  • Recovery after system upgrade

    Yesterday, i tried to do system upgrade using "pacman -Syyu" but there were some problems with keychain because releated package was outdated. I did temporary fix by disabling key verification and run again "pacman -Syyu". System freezed in middle of upgrade so i had to manually reboot it. On next boot, i just got kernel panic and thats all. I made bootable archlinux usb and tried to chroot and fix it. But i'm getting "chroot: failed to run command '/bin/bash': Exec format error". All info that i've found about this problem points me to different architecture of booted media and installation i want to chroot in. But i did uefi x86_64 install and also booted the installation media in uefi mode so i really don't know what cause this problem. Here is also terminal output.
    http://i.imgur.com/NC0bb17.jpg
    Sorry for formatting, i'm on phone.
    -- mod edit: converted img to url tag.  Please see guidelines on image sizes.  Trilby --
    Last edited by Trilby (2015-06-09 17:56:42)

    Snoop05 wrote:System freezed in middle of upgrade so i had to manually reboot it.
    It seems that the bash executable (and potentially other files) is corrupted.  You should boot using the Arch install media and mount your root filesystem (for example under /mnt) but instead of chroot into the system, do
    pacman -Syyu
    and then reinstall bash
    pacman -r /mnt -S bash
    Last edited by mauritiusdadd (2015-06-09 17:56:56)

  • LD_LIBRARY_PATH different when logging in different ways - Why?

    I am running Oracle 10.2.0.3 on RedHat Linux 32-bit.
    In .bashrc file for oracle, I have set the LD_LIBRARY_PATH to $ORACLE_HOME/lib:$ORACLE_HOME/jre/1.4.2/lib/ext (need ext directory it for something I'm doing)
    I have a java function, getEnvVar that returns the value of environment variables.
    When I run sqlplus on the server from the oracle account using a non-system database account (i.e. SCOTT/TIGER), the LD_LIBRARY_PATH is set as above. Just what I want.
    When I login as another user on the server (non-oracle) and login to sqlplus using the same DB account as above, the LD_LIBRARY_PATH is BLANK
    When I go to my PC and use sqlplus on it (again using same database user as in the above two scenarios), the LD_LIBRARY_PATH is set to $ORACLE_11g_HOME/jre/1.4.2/lib/ext - no reference to $ORACLE_HOME/lib and it's looking in $ORACLE_11g_HOME for the ext directory instead of $ORACLE_HOME.
    ($ORACLE_11g_HOME isn't a real variable anywhere, it's just referencing /software/oracle/ora11g which is an incomplete environment we aren't even using.)
    I can't figure out where all the different values for LD_LIBRARY_PATH are coming from...I thought once it was set in the oracle account's .bashrc, it would use that for all logins to the database.
    Can anyone help me figure out what's going on here?
    Thanks,
    Laurel

    I understand this...See more details about the specifics of my scenario below.
    USER ORACLE on SERVER
    $env
    USER=oracle
    LD_LIBRARY_PATH=/software/oracle/ora10g/lib:/software/oracle/ora10g/jre/1.4.2/lib/ext
    ORACLE_HOME=/software/oracle/ora10g
    ORACLE_SID=gdwd
    $sqlplus userid/password
    SQL> select getenvvar('LD_LIBRARY_PATH') from dual;
    GETENVVAR('LD_LIBRARY_PATH')
    /software/oracle/ora10g/lib:/software/oracle/ora10g/jre/1.4.2/lib/ext
    USER LMOOD on SERVER
    $env
    USER=lmood
    LD_LIBRARY_PATH=/software/oracle/ora10g/lib:/software/oracle/ora10g/jre/1.4.2/lib/ext
    ORACLE_HOME=/software/oracle/ora10g
    ORACLE_SID=gdwd
    $sqlplus userid/password
    SQL> select getenvvar('LD_LIBRARY_PATH') from dual;
    GETENVVAR('LD_LIBRARY_PATH')
    SQL> select 'X'||NVL(getenvvar('LD_LIBRARY_PATH'),'VAR IS NULL')||'X' from dual;
    'X'||NVL(GETENVVAR('LD_LIBRARY_PATH'),'VARISNULL')||'X'
    XVAR IS NULLX
    Also, this would only address the local differences right? Not the issue when running on my PC via sqlnet.
    Ideas?
    Thanks,
    Laurel

  • LD_LIBRARY_PATH setting for a typical compiler installation

    What is the setting of the LD_LIBRARY_PATH environment variables (all three forms, i.e., including the ones with the _32 and _64 suffix) we can expect on a typical Sun C++ installation on SPARC? Can we expect only LD_LIBRARY_PATH to be set or do the
    suffix forms get defined as well (or instead)? We need to know which variable(s) to
    modify in our infrastructure and since the suffix forms override the generic one it makes
    a difference.

    Yup, LD_LIBRARY_PATH is also discouraged for installations in
    alternate directories. All the Sun Studio tools themselves will
    run just fine without needed any of these variables. But we do
    ship with shared libraries for our users to use in their apps.
    By default the compilers will add RPATH settings into the exectuables
    to find the shared libraries in the compiler install directory
    (wherever that happens to be during compile time). But if the
    end user doesn't have the same compiler installed in the same place,
    then the creator of the executable has to decide how to deal with it.
    One choice they have is to tell the end user to install the runtime
    libs in an arbitrary spot, and then use LD_LIBRARY_PATH.
    We try to discourage that, but we're not in a position to enforce it.
    It's better to ship the runtime libs in a fixed position relative to the executable
    that you're shipping, and use $ORIGIN in the RPATH setting.
    --chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Oracle Java 7 in 32bit chroot

    Is anyone able to launch java applets using Oracle Java 7 and Firefox in a 32bit chroot environment?
    Whenever I browse to any site which opens a Java applet I instantly get the following exception:
    java.lang.NullPointerException
        at java.lang.ProcessEnvironment.validateValue(ProcessEnvironment.java:119)
        at java.lang.ProcessEnvironment.access$400(ProcessEnvironment.java:61)
        at java.lang.ProcessEnvironment$Value.valueOf(ProcessEnvironment.java:202)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:241)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:220)
        at sun.plugin2.jvm.JVMLauncher.start(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.startImpl(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.start(Unknown Source)
        at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)
    Exception in thread "main" java.lang.NullPointerException
        at java.lang.ProcessEnvironment.validateValue(ProcessEnvironment.java:119)
        at java.lang.ProcessEnvironment.access$400(ProcessEnvironment.java:61)
        at java.lang.ProcessEnvironment$Value.valueOf(ProcessEnvironment.java:202)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:241)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:220)
        at sun.plugin2.jvm.JVMLauncher.start(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.startImpl(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.start(Unknown Source)
        at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)
    I have installed jdk from AUR. I have my 32bit chroot environment set up exactly at described on the wiki.
    This error only happens when I set LD_LIBRARY_PATH=/opt/java/jre/lib/i386 before launching Firefox. But without this, the libraries aren't found. For example, in the Java console I see errors like:
    libjawt.so. No such file or directory
    I've spent ages searching but I can't find a solution.

    Download the tar.gz installer and untar it to a location like /opt.
    Once you untar the archive, add the bin directory to your PATH variable and your should be all set to use it from the terminal.
    OR use sudo update-alternatives to set the java command to pick up your installed version.

  • Chroot SFTP on Solaris 10

    Hi everyone,
    Does any know how to implement chrooted sftp on solaris 10? I found an very good articale about this on the internet -http://www.brandonhutchinson.com/chroot_ssh.html.
    But it deals with ssh from the open source community(OpenSSH). The ssh on Solaris 10 is provided by Sun as shown below:
    # pkginfo |grep -i ssh
    system SUNWsshcu SSH Common, (Usr)
    system SUNWsshdr SSH Server, (Root)
    system SUNWsshdu SSH Server, (Usr)
    system SUNWsshr SSH Client and utilities, (Root)
    system SUNWsshu SSH Client and utilities, (Usr)
    Could anyone shed a light on how to chroot the ssh/sftp provided by Sun?
    Best regards,
    Alex Lai

    The key part is to have the devices you need: null and log, at a minimum.
    You can't create devices in a local zone: mknod says "not owner". Doesn't matter whether you zlogin or ssh in.
    Instead, create the devices from the global zone in your zone's filesystem. Create all your directories within the zone.
    If you have zone foo with it's root /export/zone/foo and you have some home directory in the zone /export/home/chroot
    cd /export/zone/foo/root/export/home/chroot/dev
    mknod log c 21 5
    mknod null c 13 5
    (I'm assuming you have the same major/minor as in my system; verify first with ls -l /dev/log and ls -l /dev/null )

  • DNS - CHROOT - SOLARIS 10

    Hello Campers!!!
    I am trying to set up a chroot environment on a DNS machine, however I am expeiencing some difficulty.
    I have Solaris 10 (latest 10 Recommended) and named 9.7.2-p3.
    When i run the command line named -g -t /DNS ...
    socket.c:3917 unexpected error
    open (/dev/poll) failed: no such file or directory
    ./main.c:589: unexpected error
    isc_socketmgr_create() failed: file not found
    create_managers() failed: unexpected error
    I have googled alot lately and have not found a good answer. Is this behaviorly indicative of missing files or bad permissions inthe chroot directory structure? If so what am I missing (or how do I fugure it out?)?
    Also - I had to modify the /lib/svc/method/dns-server script and /var/svc/manifiest/network/dns/server.xml to get this to run via the SMF facility (with the same results....)
    Thanks,
    Jerry

    Hi.
    I create test environment. It's look like work.
    # find /DNS -ls
    611522 1 drwxr-xr-x 5 root root 512 Feb 23 14:00 /DNS
    611523 1 drwxr-xr-x 2 root root 512 Feb 23 14:07 /DNS/etc
    611526 1 -rw-r--r-- 1 root root 244 Feb 23 14:02 /DNS/etc/named.conf
    611533 1 -rw------- 1 root root 77 Feb 23 14:07 /DNS/etc/rndc.key
    611524 1 drwxr-xr-x 4 root root 512 Feb 23 14:04 /DNS/var
    611525 1 drwxr-xr-x 2 noaccess root 512 Feb 23 14:02 /DNS/var/named
    611527 1 -rw-r--r-- 1 root root 138 Feb 23 13:59 /DNS/var/named/test.db
    611530 0 -rw-r--r-- 1 noaccess root 0 Feb 23 14:02 /DNS/var/named/root.cache
    611531 1 drwxrwxrwt 2 root root 512 Feb 23 14:07 /DNS/var/run
    611528 1 drwxr-xr-x 2 root root 512 Feb 23 14:05 /DNS/dev
    611529 0 crw-r--r-- 1 root root 138, 0 Feb 23 14:07 /DNS/dev/poll
    611532 0 crw-r--r-- 1 root root 190, 0 Feb 23 14:05 /DNS/dev/random
    Start:
    # named -g -t /DNS -u noaccess
    23-Feb-2011 14:11:39.166 starting BIND 9.3.6-P1 -g -t /DNS -u noaccess
    23-Feb-2011 14:11:39.166 found 2 CPUs, using 2 worker threads
    23-Feb-2011 14:11:39.169 using up to 4096 sockets
    23-Feb-2011 14:11:39.204 loading configuration from '/etc/named.conf'
    23-Feb-2011 14:11:39.210 using default UDP/IPv4 port range: [1024, 65535]
    23-Feb-2011 14:11:39.215 using default UDP/IPv6 port range: [1024, 65535]
    23-Feb-2011 14:11:39.229 listening on IPv4 interface lo0, 127.0.0.1#53
    23-Feb-2011 14:11:39.231 listening on IPv4 interface ce0, XXX.XXX.XXX.197#53
    23-Feb-2011 14:11:39.232 listening on IPv4 interface ce1, XXX.XXX.XXX.20#53
    23-Feb-2011 14:11:39.241 command channel listening on 127.0.0.1#953
    23-Feb-2011 14:11:39.241 couldn't add command channel ::1#953: address not available
    23-Feb-2011 14:11:39.242 ignoring config file logging statement due to -g option
    23-Feb-2011 14:11:39.245 test.db:1: no TTL specified; using SOA MINTTL instead
    23-Feb-2011 14:11:39.246 zone test.com/IN: loaded serial 2007121137
    23-Feb-2011 14:11:39.248 running
    23-Feb-2011 14:11:39.248 zone test.com/IN: sending notifies (serial 2007121137)
    23-Feb-2011 14:11:39.252 client XXX.XXX.XXX.197#42654: received notify for zone 'test.com'
    ^C23-Feb-2011 14:11:49.586 shutting down
    23-Feb-2011 14:11:49.586 stopping command channel on 127.0.0.1#953
    23-Feb-2011 14:11:49.589 no longer listening on 127.0.0.1#53
    23-Feb-2011 14:11:49.590 no longer listening on XXX.XXX.XXX.197#53
    23-Feb-2011 14:11:49.590 no longer listening on XXX.XXX.XXX.20#53
    23-Feb-2011 14:11:49.596 exiting
    major and minor number found:
    # ls -lL /dev/pool
    crw-rw-rw- 1 root sys 226, 1 Feb 22 22:49 /dev/pool
    # ls -lL /dev/random
    crw-r--r-- 1 root sys 190, 0 Feb 22 22:46 /dev/random
    Hope it's help.
    Regards.

  • [solved] Trying to make a bash function work for (chroot)

    So this is what I have so far.
    function arch-chroot () {
    sudo & mount /dev/sda1 /mnt
    cd /mnt
    mount -t proc proc proc/
    mount --rbind /sys sys/
    mount --rbind /dev dev/
    mount --rbind /run run/
    chroot /mnt /bin/bash
    I get stuck at cd /mnt. This is how I do it in terminal. I can't quite figure out to move past 'cd'.
    # just use the arch-install-scripts. Simple and easy. ------------
    Last edited by jedijimi (2015-01-25 18:11:19)

    It could be something like this:
    if [[ $EUID != 0 ]]; then
    echo "This script should be ran as root" && exit 1
    fi
    mount -t proc /proc $1/proc
    mount --rbind /sys $1/sys
    mount --rbin /dev $1/dev
    mount --rbind /run $1/run
    chroot $1
    This way it uses the default shell and asks for a new root as a parameter. But instead of reinventing the wheel just install arch-install-scripts as it only weights ~0.05MiB. Also when trilby had asked what do you want to do, he meant why are you using "sudo & ..." as sudo can't be run in background.
    Next time you can't find which package provides certain executable file, just use pkgfile.

  • Sftp to chrooted directory?

    Hello,
    I'm running Solaris 9 and I have used ftpconfig to set up some chrooted accounts for anonymous ftp.
    One of my business partners claim that they have to use sftp to transmit their data. But I can't get sftp to work with one of these chrooted accounts.
    Is sftp supported in this configuration?
    Any suggestions on correct configuration.

    Hi Mani
    Since your inbound IDOC is not synchronous , the main challenge will be returning the purchase order number from ECC.
    So if you wan't that the ECC will return the purchase order number, then you can think of using Proxy instead of IDOC.It is very easy to use proxy in case of synchronous requirement.
    Or you can modify the existing IDOC program so that it will create one asynchronous proxy to send back the purchase order from ECC.
    You will need one additional scenario for second approach.

  • ArchBuilder: building packages in chroot

    ArchBuilder builds packages in chroots, like pbuilder does in debian.
    Usage: archbuilder command [options]
    Commands:
    init: Initializes archbuilder
    update: Updates archbuilder's caches
    build: Builds a package.
    shell: Starts a shell in a chroot
    Options:
    --verbose: Show pacman output
    --shellonerror: Start a shell if the build fails
    --copypkgbuild: Copy the PKGBUILD when starting a shell
    Config:
    ArchBuilder reads it's configuration from ~/.archbuilderrc
    Valid options are:
    CHROOT=/var/cache/archbuilder/chroot.$$ : Directorty to create the chroot in, $$ is the current PID.
    CACHE=/var/cache/archbuilder/cache : Directory to cache the sync db and packages.
    RESULT=$(pwd) : Directory to copy the resulting package to.
    CHOWN=root : User to chown the resulting package to.
    COLOR=1 : Use color, set to 0 to disable.
    PACMAN_BIN=pacman : Binary to use instead of pacman, eg: powerpill.
    PACMAN_PKG= : Set this to the package that contains PACMAN_BIN.
    Webpage:
    http://miffe.org/wiki/ArchBuilder/
    Download:
    http://aur.archlinux.org/packages.php?ID=23575
    Last edited by miffe (2009-02-12 15:45:53)

    If I'm not mistaken, running makepkg as a root user, be it with the --asroot flag or as the root user is supposed to fail because of the changes to makepkg. It's been removed because the issues with fakeroot (which caused the --asroot flag to appear) have been fixed.
    If you create a normal user and then build in the chroot, it should work normally.
    EDIT: There's also something to do with sudo-ing to nobody somewhere in this thread.
    Last edited by clfarron4 (2015-01-06 20:46:13)

Maybe you are looking for