You are not logged in.
I have used Debian previously. I have a debian chroot on a separate partition which sole purpose is apache2 server. I use apache2 in chroot, so everytime I reinstall my main system, all my projects are left there in this system untouched. The chroot was created with Debian's debootstrap. Now when I moved from Debian to Arch, I can't use this chroot. When I chroot into it I can't execute any command there, all I get is command not found, even on things such as ls, rm, mv.
Does it mean that I have to create a chroot for server again, using Arch linux or is there a way to get this Debian working?
Last edited by kox (2015-05-02 20:13:22)
Offline
Post the commands you are using to enter the chroot.
Offline
I tried 'chroot dirname' and 'arch-chroot dirname /bin/bash' The result was the same .
Offline
Note that Arch's default PATH only has "/usr/local/sbin", "/usr/local/bin", and "/usr/bin", whereas debian uses these directories as well as "/bin", "/sbin" and "/usr/sbin" (though the sbin dirs are only added to the root's PATH).
When you chroot, you retain Arch's PATH. You should run
export PATH="$PATH:/usr/sbin:/sbin:/bin"
in the chroot, or source /etc/profile.
Last edited by WorMzy (2015-05-02 19:40:59)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I don't think the `arch-chroot` script will work for a Debian system but I could be wrong.
Have you tried mounting /proc, /sys & /dev first and sourcing the shell profiles afterwards?
https://wiki.archlinux.org/index.php/Ch … ing_chroot
This shouldn't make any difference as the chroot fstab should already have entries for these but you never know...
Maybe you should copy /etc/hosts & /proc/mounts from your new Arch system into your Debian chroot.
https://wiki.debian.org/Debootstrap
@WorMzy -- the shell built-ins are not working so I don't think it's a $PATH issue.
Last edited by Head_on_a_Stick (2015-05-02 19:41:44)
Offline
@WorMzy
It works out of the box. Thank you.
Offline
@WorMzy -- the shell built-ins are not working so I don't think it's a $PATH issue.
ls, mv and rm aren't bash built-ins. They might be in other shells though.
@kox: Great. Remember to mark your thread as [SOLVED].
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Is there a mark as solved button or do you mean to edit thread title and put [SOLVED] in it? Because I don't see such a button anywhere .
Last edited by kox (2015-05-02 20:07:43)
Offline
Nah, there's no button, you have to manually edit the title by editing the first post.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Edit your first post -- It has the option to edit the thread title. Prepend [SOLVED] to the title
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline