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
23 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
55 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
120 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
0 answers
20 views

Screen session inside of chroot does not show console output

I have a chroot jail set up for a minecraft server to be managed via SSH by someone. The chroot is setup properly with proc and lib bind mounted to the / directory for the jail, chroot/usr folder ...
dylanface's user avatar
0 votes
0 answers
67 views

Create pBuilder chroot environment for Raspberry Pi OS (ARM64)

I am attempting to create a pBuilder chroot environment for Raspberry Pi OS (ARM64) in order to build Debian packages for Raspberry Pi 4B/3B on an AMD64 host. I came across a tutorial that seems ...
Wolkenarchitekt's user avatar
0 votes
1 answer
48 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
52 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
62 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
249 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
0 votes
0 answers
37 views

i have a very messy situation with grub lost and a potentially corrupt partiton

SO, we start off with, this reddit post after that i understood that the issue was arising because i was using btrfs and root00 and home were subvolumes. However, before i understood this, i tried to ...
AyaanMAG's user avatar
2 votes
1 answer
579 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,232
1 vote
1 answer
55 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
143 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,125
2 votes
0 answers
83 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
122 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,125
0 votes
0 answers
43 views

How to run interactive script inside of overlayroot-chroot?

I am trying to run overlayroot-chroot and then run interactive script within chroot shell that prompts user for input using read -r. Somehow read -r triggers chroot exit.
sunknudsen's user avatar
1 vote
1 answer
140 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
  • 167
0 votes
0 answers
134 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
2 votes
1 answer
183 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
0 votes
0 answers
136 views

Running nmap on chroot nethunter

nmap on nethunter returns the following error when run on root user account [Chroot] nmap: netutil.cc:3195: int route_dst_netlink(const sockaddr_storage*, route_nfo*, const char*, const ...
Brian Kiplangat's user avatar
1 vote
1 answer
5k 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
0 votes
0 answers
215 views

Bootctl designates wrong root partition in loader/entries/*.conf file (debootstrap install fail)

I want to install Debian LUKS2 encrypted BTRFS filesystem with Systemd-boot via debootstrap, following this guide : https://gist.github.com/meeas/b574e4bede396783b1898c90afa20a30 My host OS is an ...
secu4tux's user avatar
0 votes
1 answer
599 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
0 votes
0 answers
486 views

How to install Grub2 on a newly created GPT partition?

I have an Ubuntu system, installed on a wired, (legacy BIOS bootable) USB HDD, that I would like to convert to UEFI boot. I was trying to follow this: https://gist.github.com/cjyar/...
Helen Craigman's user avatar
0 votes
0 answers
30 views

dpkg dpkg-split invocation problem on armhf

I'm trying to make a bullseye debian chroot work on an old arm phone (Archos Titanium 40C) running kitkat (rooted). It seems to works pretty well (including openssh-server), but dpkg doesn't work on ...
xneggoum's user avatar
1 vote
1 answer
321 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
40 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
  • 45
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
355 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
320 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
63 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
522 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
106 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
92 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
63 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
113 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
594 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
917 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
  • 229
1 vote
2 answers
686 views

Automatically execute `nix-user-chroot` when I start a terminal session (Steam Deck)

I am running Arch Linux on the Steam Deck. Steam Deck has a read only root file system which forces you to use Flatpak, or else to make the file system writable at the expense of wiping out, say, ...
Thomas Browne's user avatar
2 votes
0 answers
89 views

How to re-enable the `enable` command?

As part of a script to set up a restricted user, I ran the enable -n enable command. For testing purposes I would like to undo that command but I can't find any documentation on how to do so. I know ...
ajmeese7's user avatar
  • 215
2 votes
1 answer
581 views

Unshare with overlayfs results in permission denied with su

I am trying to setup 'rootless' containers by hand, with just unshare and mounting overlayfs. Currently, I can unpack a rootfs tarball, setup a /tmp and /proc mount, and pivot_root/chroot into it ...
Zameer Manji's user avatar
2 votes
0 answers
505 views

chroot with mounts in unprivileged container

How can I create a mount inside a Docker container as root but without --privileged mode? The purpose is getting a chroot with /proc, and /dev mounted inside a container. I can do so with chroot and ...
Lemon Sky's user avatar
  • 121
0 votes
0 answers
209 views

Can't Chroot into archlinux

I have Installed the generic aarch64 rootfs to an sdcard , and have placed It inside my phone and am trying to chroot into it - via a superuser adb shell , by running busybox chroot /data/local/mnt /...
Bilal Ahmed's user avatar
0 votes
1 answer
1k views

Command not found when In chroot

Im currently Porting Arch Linux to My phone and I am trying to set up the rootfs properly - have it installed to an external scdard and am using busybox to chroot into it with busybox chroot /data/ ...
Bilal Ahmed's user avatar
1 vote
1 answer
897 views

Restrict linux process write permission to one folder

I want a process (and all its potential children) to be able to read the filesystem according to my user profile but I want to restrict that process's write permission to only a set of pre-selected ...
Luke Skywalker's user avatar
0 votes
1 answer
325 views

Mismatching kernel versions during installation inside chroot

I'm trying to install Artix on a QEMU virtual machine through an automated script i've wrote, in one of the latest installation steps, where i setup Rootless Docker, it's required to enable the ...
henriquehbr's user avatar
1 vote
1 answer
723 views

SSHFS automount fstab with RSA Keypair asking for password

I have a problem. I added a SSH Server to mount to my server. I added the following line to /etc/fstab. sshfs#[email protected]:/home/hd03_00_backup_server/ /mnt/server_backup fuse.sshfs IdentityFile=/...
user154501's user avatar
1 vote
1 answer
346 views

Which tool to build a RPM inside a chroot?

I'm using pbuilder to build my binary package for Debian. pbuilder creates a chroot environment, installs all the packages declared as required for the build, and then builds the binary .deb packages ...
Didier Trosset's user avatar
1 vote
0 answers
49 views

Empty executables after creating bind mount

I've created a bind mount in /tmp/test which I then use to establish a chroot jail. For example: mount --bind -o ro /usr/bin/ /tmp/test chroot /tmp/test /some_executable This seems to work fine - most ...
stumbling.fool's user avatar
0 votes
0 answers
216 views

USB devices in android, without a module in the android kernel

I have a rather strange theoretical question. For example, when I connect a USB device to my Linux AMD64 PC, the functionality of this USB device depends on the presence of the corresponding module in ...
Jonathan's user avatar

1
2 3 4 5
12