Skip to main content

Questions tagged [chroot]

A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally not access) files outside the designated directory tree.

Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

Chroot: Write access to an SFTP directory by non-root users?

Task given: Set up an SFTP server for ~100 clients and fill their ./in directory with pricelists.  The pricelist per client is updated and maintained by a different user-account (≠root) in the normal ...
Bernd Hohmann's user avatar
0 votes
0 answers
27 views

Difference between 'source', 'chroot' and 'session' schroot namespaces

From schroot man page: Source chroots Some chroot types, for example LVM snapshots and Btrfs snapshots, provide session-managed copy-on-write snapshots of the chroot. These also provide a source ...
VIAGC's user avatar
  • 133
-6 votes
3 answers
89 views

Remove chroot outright

So chroot needs to go as after days of ... "research" it doesn't properly support listing an index unless you do some crazy long command and the program has to be running to even be listed. ...
John's user avatar
  • 194
0 votes
0 answers
29 views

Docker images and live-build

I'm working on constructing a live, non-persistant Debian system using live-build. In this system I need to have some containers set up and running but also need to keep the boot time of the system to ...
Synthetic Ascension's user avatar
0 votes
1 answer
25 views

How to Avoid Copying Large Folders When Creating a chroot Sandbox Using Symlinks, Hard Links, or Bind Mount?

I am working on creating a chroot sandbox and want to avoid the time-consuming and storage-intensive process of copying large directories such as bin, lib, and others. Is it possible to use symbolic ...
Foad's user avatar
  • 379
0 votes
0 answers
47 views

How do I properly chroot from a amd64 artix VM into a mounted aarch64 armtix OS image?

I want to chroot into an armtix (aarch64) OS image inside an artix VM. I copied qemu-aarch64-static into the mounted /usr/bin and then tried to chroot into the mounted image. It works, however, most ...
Folaht's user avatar
  • 1,082
0 votes
0 answers
21 views

After running pivot_root, how do you remove put_old?

I'm trying to replicate how a container is made for academic purposes so I've created some namespaces on an ubuntu VM and I'm trying to pivot_root into a busybox filesystem on the hard drive. I've run ...
StaticMethod's user avatar
0 votes
0 answers
99 views

xauth not running in chroot

I created a chroot environment on my computer and enabled a few different programs to run on it. I access this chroot environment through an ssh connection. One of the application in this chroot is ...
Goûtay's user avatar
0 votes
2 answers
173 views

Run nmcli commands in chroot environnement

I have set up a chroot environment (Ubuntu Jammy). I need to run the nmcli command for some purposes. nmcli depend on NetworkManager.service, but the systemd service isn't allowed in chroot env. How ...
GAD3R's user avatar
  • 67.4k
1 vote
2 answers
249 views

Debian 10 update-initramfs fails: cannot create /dev/null

trying to fix a cloned boot via chroot (new processor, hangs on boot). booted to a liveUSB and mounted the fs to /mnt. when i run update-initramfs -uv it blazes thru until near the end when it fails ...
WhiteRau's user avatar
  • 235
0 votes
0 answers
77 views

Create isolated environment for user

I personally use Hyprland and keep everything pretty light. Unfortunately, that's not really conducive to my girlfriend being able to use my computer, so I really need to install something like KDE ...
ScottishTapWater's user avatar
0 votes
0 answers
41 views

Bind mount the Docker socket into Alpine chroot?

I configured an OpenWrt OS on my FriendlyElec NanoPi R6s but decided to add an Alpine chroot to run other stuff in that OpenWrt doesn't have and to isolate it a little bit away; it even lives on it's ...
Ingwie Phoenix's user avatar
0 votes
0 answers
88 views

Failed getting release file while running debootstrap with root privileges

I've tried to install chroot using debootstrap with root account and receive same error everytimes. Using debootstrap from /usr/sbin/debootstrap Running debootstrap to install base system, this may ...
SJ_Lee's user avatar
  • 1
1 vote
0 answers
62 views

ACL permissions on Chroot jail

I have the Named service in a Chroot environment, I need a user to be able to modify the live files of the path /var/named/chroot/etc and I do not want to give full permissions with sudo, I have used ...
fah81's user avatar
  • 21
1 vote
0 answers
77 views

What is causing permission denied under proot?

At work I have limited access to my PC, so I am running proot with /nix mounted to give me access to nix package manager. However, executing some setuid commands fails under proot. $ proot /usr/bin/...
KamilCuk's user avatar
  • 870
0 votes
1 answer
347 views

SSH Chroot problems

Having multiple issues with a Chroot im trying to setup. When logging in, the users name shows up as "I have no name!". The etc/passwd file is present and accessible by the chroot user, ...
Will's user avatar
  • 3
0 votes
0 answers
31 views

linux: kill -9 process success only on second attempt

I'm currently solving umount /chrootedpath /dev/pts after several chroot(s): target is busy. I've found part of the problem - two processes still running ps had shown as sudo choot command. They were ...
Alex Martian's user avatar
  • 1,065
2 votes
1 answer
156 views

umount /chrootedpath /dev/pts after several chroot(s): target is busy

I've been doing several chrooted environments in parallel, each in separate folder (when the script with chroot exited I sometimes run another in same folder), and for a while it seemed fine. But now ...
Alex Martian's user avatar
  • 1,065
1 vote
1 answer
586 views

Some binaries are extremely slow with qemu-user-static inside docker

I'm currently working with the armbian build system and it is using chroot inside docker to cross build armbian images (for aarch64 in my case on an amd64 host). However, for some reason, when the ...
theCalcaholic's user avatar
1 vote
0 answers
239 views

Best practice to mimic a linux rootfs without root permission on an existing system

I have access to a user account of a ubuntu server. However it's really inconvenient to work without root permission (which means that cannot install packages) and I am more familiar with archlinux ...
Yutsing's user avatar
  • 11
0 votes
1 answer
277 views

Mirror download fails with error: Failed getting release file while running debootstrap with sudo

I run the command $ sudo debootstrap --variant=buildd --arch i386 lucid /var/chroot/ https://mirror.internet.asn.au/pub/ubuntu/archive/ and the error is: I: Retrieving InRelease I: Retrieving ...
user1416486's user avatar
1 vote
0 answers
288 views

Archlinux Chroot Won't run error input/output error

I'm new in Archlinux. I faced this problem I think there is problem with glibc library. When I run that command arch-chroot /mnt: chroot: failed to run command /bin/bash : input/output error And ...
Yahya Ashour's user avatar
0 votes
1 answer
648 views

chroot "Accessing a corrupted shared library" [closed]

I tried to execute the following command and got "Accessing a corrupted shared library" error. How can I resolve this? sudo chroot /home/jack/develop /bin/bash chroot: failed to run command ‘...
邢庆杰's user avatar
0 votes
1 answer
134 views

Can't mount `proc` to `schroot` environment using `setup.fstab`

I'm writing a bash command to deploy gluster inside a chroot called glusterchroot. I'm having issues mounting files from the host to the chroot. Schroot's man page recommends the following: $ man ...
mikeLundquist's user avatar
0 votes
1 answer
109 views

How can one compromise system integrity or availability from chroot jail?

As part of university assignment I'm researching the ways an attacker can bypass chroot jail. Naturally, I've seen that there are plenty of ways to attempt privilege escalation using vulnerable setuid ...
Nikolai Savulkin's user avatar
0 votes
1 answer
191 views

`chroot` bash not working after copying both the binary and its dependencies

I have reviewed the existing questions and responses but none worked in my case. So I'm opening a new question. OS: Debian Here are my steps: First, copy /bin/bash: $ sudo mkdir -p /mychroot/bin $ ...
yk3rt's user avatar
  • 11
0 votes
0 answers
1k views

How to install a Debian package in a target directory manually

I would like to learn how to manually install a Debian package (e.g., a .deb file) into a specific directory, such as /targetdir, as if it were the root. Later, I would like to relocate the ...
LucaM's user avatar
  • 1
3 votes
1 answer
2k views

chroot: failed with No such file or directory yet file exists [duplicate]

# chroot /mnt/sys1 /bin/bash chroot: failed to run command '/bin/bash': No such file or directory But it is NOT the usual chroot: failed with No such file or directory problem because the file is ...
xpt's user avatar
  • 1,644
1 vote
1 answer
90 views

When running a qemu-user chroot (say, a riscv64 chroot inside an amd64 host), is it possible to share the gpu and/or its drivers?

I'm curious to see if I can, say, somehow reroute the riscv64 mesa drivers to the host's gpu. I've already got X11 and OpenGL applications working from the riscv64 chroot, but they end up using ...
ChrisNonyminus's user avatar
1 vote
1 answer
351 views

debootstrap --second-stage with fakechroot fails on docker (/lib/ld-linux-armhf.so.3: No such file or directory)

I am trying to set up a foreign chroot in a docker container. Excerpt from the script: apt-get -y install debootstrap fakechroot fakeroot qemu-user-static binfmt-support mkdir -p $CROSS_ROOT ...
user149408's user avatar
  • 1,333
2 votes
0 answers
134 views

PHP-FPM + Apache2 security

My question is almost identical to Luis Machuca's from 2 years ago (Apache + php-fpm: Proper permissions for per-pool, per-user projects?), but with some additional conditions. I have also configured ...
MrL's user avatar
  • 21
1 vote
1 answer
274 views

Accessing /proc from foreign chroot

I am trying to set up a foreign chroot environment with QEMU, mostly as described at https://www.hellion.org.uk/blog/posts/foreign-chroots-with-schroot-and-qemu/. The host system is Ubuntu x86_64 (on ...
user149408's user avatar
  • 1,333
1 vote
1 answer
302 views

Does fstab make sense for chroot jail?

I've created an fstab file (to mount /dev/pts and /proc, with the bind option) as part of a jail but when I chroot to the jail neither filesystem is mounted. This makes me wonder when the fstab for a ...
Olumide's user avatar
  • 177
0 votes
0 answers
194 views

Different versions of ubuntu with chroot environment

I was trying to setup a chroot environment on older system using debootstrap. I had ubuntu 14.04 and I was wondering what version of ubuntu i can possibly install on it. If I were to try and run ...
pnikonowicz's user avatar
1 vote
1 answer
393 views

How to install packages in chroot when chroot is launched with doas?

On OpenBSD 7.2 stable, I've setup my chroot using this script: #!/bin/ksh dir="/jails/$1" mkdir -p "$dir" tar -C "$dir" -xzf /usr/src/base/base72.tgz tar -C "$dir&...
neezer's user avatar
  • 31
3 votes
1 answer
10k views

"sudo: unable to allocate pty: No such device" in chrooted Linux

Added: After reading suggested as duplicate Which of proc, sys etc. should be bind-mounted (or not) when chrooting into a "replacement" distribution? : How I know: it is customary to invoke ...
Alex Martian's user avatar
  • 1,065
0 votes
1 answer
1k views

How to install packages into chroot?

This question is related to debootstrap --variant=buildd couln't find build-essential As I know debootstrap may run the script after or before creating chroot debootstrap [OPTION...] SUITE TARGET [...
Ekaterina Ivanova iceja.net's user avatar
1 vote
1 answer
426 views

Run firefox within a Linux chroot jail in FreeBSD 13.1

I have managed to install a Ubuntu chroot jail within FreeBSD 13.1. However, I need to run Firefox from it to launch Jupyter Lab from a python virtual environment within the chroot subsystem. I was ...
Michael Schroter's user avatar
1 vote
0 answers
47 views

QEMU emulating two CPU archs

As I know, x86_64 Linuxes are capable of running x86 programs. I wonder if it would be possible to emulate it using QEMU. I am using proot and hoping to proot into such said system.
sudoer's user avatar
  • 55
1 vote
0 answers
22 views

How to build custom containers for paaas services like heroku without docker

I want to build a paas service like heroku, but i have difficulty running the client application, Is the client app running using chroot? /fakrechroot/other? Sorry, I've tried to search on Google but ...
noobdev's user avatar
  • 33
1 vote
0 answers
463 views

Temporary failure in name resolution, only in apt

I'm using Kali nethunter on my A12 phone. Network is supposed to work out of the box. apt update gives: Ign:1 http://http.kali.org/kali kali-rolling InRelease Ign:1 http://http.kali.org/kali kali-...
eldavo's user avatar
  • 11
1 vote
0 answers
518 views

clonezilla shell: update-initramfs is disabled, do i need to chroot and How? (External SSD)

I want to clone my laptop to an External HDD. I need to make an important precision: the process is successfull when i'm using mecanic HDD (old laptop). i use clonezilla to clone i go to clonezilla ...
redrabbit's user avatar
0 votes
1 answer
73 views

Error with Systemd in LFS

LFS version: 11.0-systemd Host: Ubuntu20.04 Chapter in which the problem occurred: 9.5 Commands executed: timedatectl set-local-rtc 1 Error log: System has not been booted with systemd as init system (...
Anzu's user avatar
  • 1
2 votes
2 answers
1k views

Why unshare with chroot does not isolate /dev like /proc?

I am following Container from scratch by Kevin Boone I have alpine mini root filesystem under /mnt/container/ I am a little puzzled about how the mount works with chroot and unshare involved. Without ...
Nagri's user avatar
  • 215
0 votes
1 answer
176 views

Recovering non booting system, probably due to power failure

I cycled the power on my Void Linux install when Firefox froze and would not respond to sigterm (poweroff command was hanging too). After doing this the computer (Thinkpad X220) no longer boots, it ...
Guilty's user avatar
  • 133
0 votes
1 answer
164 views

Error while building *.deb package in separate build environment

I'm trying to build *.deb packages into a chroot. When building the first package - bash, there were difficulties. I build packages using debootstrap and chroot. I install debootstrap: sudo ...
Darron's user avatar
  • 113
1 vote
0 answers
74 views

Slackware(64) 14.2 + Xephyr using chroot, umount partitions

This Exact Same Question i first time i do was ib -> https://www.linuxquestions.org/questions/showthread.php?p=6366697#post6366697 i need improve my script : For close the Xephyr window ...
Inukaze's user avatar
  • 47
1 vote
1 answer
151 views

Subprocess launched inside a chroot created on a codespace with debootstrap fail with /dev/fd/62: No such file or directory

My goal is to standup a chroot with the basic Unix tool-set (bash, cp, touch, cat, etc) and any necessary dependencies need to run apt get inside a codespace. Using debootstrap gets me close. The ...
Christopher King's user avatar
1 vote
1 answer
787 views

chroot as unpriviledged user leads to 'Permission denied' trying to run any binary

I have a chroot root containing some static binaries on an ARMv7l platform (Kobo eReader, see InkBox OS project), namely BusyBox. chrooting as root works fine: kobo:/kobo/mnt/onboard/onboard/.apps/...
Nicolas Mailloux's user avatar
1 vote
2 answers
1k views

Applications of fakeroot and chroot

Why are there two utilities chroot and fakeroot when both can fake a privileged access to the user?
Franc's user avatar
  • 299

1
2 3 4 5
12