Can I chroot to a linux environment from windows

9,994

Solution 1

chroot does not magically change the running kernel or start a new one. It only changes how much of the filesystem "chrooted" programs see, but they still run inside the same kernel. Since Linux ELF executables cannot be run on Windows directly, chroot will not work.

You can download your packages from https://www.archlinux.org/packages/ to disk, then install them using pacman -U.

Solution 2

chroot works for Linux based systems; it has no relation with Windows, so it is not possible.
Even if by some means you could do it, it makes no sense to do such a thing, as linux has one root and windows has many partitions at root level; their filesystems don't match at all.

Share:
9,994

Related videos on Youtube

nikhil
Author by

nikhil

Updated on September 18, 2022

Comments

  • nikhil
    nikhil almost 2 years

    I want to know if it is somehow possible to chroot into a Linux system from Windows, or, is there some technique or hack to achieve that?

    • Kevin
      Kevin over 12 years
      Using cygwin you can get a fairly good linux environment, and you don't even have to chroot. Is there something more you need out of it?
    • Mokubai
      Mokubai over 12 years
      What are you actually trying to achieve? chrooting makes no sense for operating systems that follow completely different paradigms and have not understanding of each other. You can SSH into a Linux box from Windows, but that is a completely different thing from chroot
    • nikhil
      nikhil over 12 years
      Can't get internet in arch linux, need to install a few packages. Figured I could use Windows instead of a live cd.
    • user5249203
      user5249203 over 12 years
      On a dual boot system you can download packages using Windows and save them in your Windows partition. After rebooting, your ArchLinux should be able to read the files from the Windows partition after you mount it.
  • user1686
    user1686 over 12 years
    Windows has chroot in its Services for Unix subsystem. Implementing it for multiple-root systems is possible as well; one could, for example, chroot into a directory containing separate directories for each virtual drive, or be limited to one virtual drive. (Also, "Unix based", not "Linux based.")
  • nikhil
    nikhil over 12 years
    Excellent answer, didn't know how chroot worked. Honestly it did seem quite magical to me.
  • Tamara Wijsman
    Tamara Wijsman over 12 years
    This is confusing, how does one chroot from Windows?