Tag Info

New answers tagged

0

Using strace udevadm info --query=all --name=/dev/sda I could see that /run/udev/data/b8:0 is also read: open("/run/udev/data/b8:0", O_RDONLY|O_CLOEXEC) = 3 This is an ASCII file: /run/udev/data/b8:0: ASCII text Containing the information you want to see. In your case it is necessary to have /run/udev/data available in your chroot environment aswell ...


0

#!/bin/bash copy_file_and_dependencies() { PROGRAM="$1" DEPENDENCIES="$(ldd "$PROGRAM" | awk '{ print $3 }' | grep -v '(' | grep -v 'not a dynamic executable')" mkdir -p "${JAIL}$(dirname $PROGRAM)" cp -Lv "$PROGRAM" "${JAIL}${PROGRAM}" for f in $DEPENDENCIES; do mkdir -p "${JAIL}$(dirname $f)" cp -Lv "$f" "${JAIL}${f}" ...


1

A chrooted environment where you install a distribution with the target vintage is the least-effort solution. It'll cost you maybe a couple of GB of disk space, but it's pretty painless, especially on Debian and derivatives where schroot does the job of setting up a usable chroot environment and Debootstrap can install an older or newer release of Debian or ...


2

First of you need to realize that if you get message like this the application you trying to run is not meant to this platform/distribution. So, it's very likely that it'll crash in most painful way, taking all your files, money and house :) Especially, this is related to the (g)libc, as it is closely tighten to the kernel ABI and running glibc compiled for ...


0

The normal way to find what is preventing a filesystem from being unmounted is to list the processes that have a file open on it (or a file descriptor, or their current directory, etc.): lsof /path/to/mount/point fuser -m /path/to/mount/point Review the list of processes and kill them if warranted. There are also a few ways in which the kernel itself can ...


0

I know this question is old but this helped me. chmod o-x /home/* run the above command from sudo and it will limit a user to its own home dir.


1

If there are processes running "inside" the chroot (even after your shell exited it), you are likely to be unable to umount the filesystems (say, you can't just pull the filesystem from under those processes feet). In such case, reenter the chroot (in a shell), and stop the services, or just kill them (even from "outside" the chroot), if you don't care ...


3

Do the chroot, as described in the question, and then do su - fred (or whatever your name is) or exec su - fred. Do chroot /mnt /bin/su - fred, so that the su will be the first thing that runs in the chroot environment. Note that both of the above assume that your fred user is defined in /mnt/etc/passwd. OR Do chroot --userspec=fred:bedrock ...


2

Subsystem sftp intenal-sftp Should be "internal".



Top 50 recent answers are included