You are not logged in.

#1 2018-04-16 07:37:40

abinashdash17
Member
Registered: 2018-04-16
Posts: 8

Errors encountered while trying to install arch with "proot"

I'm trying to install arch using proot(instead of chroot). I'm following arch wiki. Steps I've followed successfully:
1. Downloaded and extracted arch bootstrap file. 
2. Instead of using arch-chroot script in the bin folder(which requires chroot and hence root permission), I'm trying to use `proot` with proper arguments. 
The wiki instructs to follow these command if I don't( or can't) use arch-chroot script: 

    # mount --bind /tmp/root.x86_64 /tmp/root.x86_64
    # cd /tmp/root.x86_64
    # cp /etc/resolv.conf etc
    # mount -t proc /proc proc
    # mount --make-rslave --rbind /sys sys
    # mount --make-rslave --rbind /dev dev
    # mount --make-rslave --rbind /run run    # (assuming /run exists on the system)
    # chroot /tmp/root.x86_64 /bin/bash
To achieve same result with `proot` , I'm using this script instead: 
`proot -b /dev -b /sys -b /run -b /proc -r /home/lubas/arch/root.x86_64/ -w / -0` 
When I try to run `pacstrap /mnt base` , I get these errors: 

    ==> Creating install root at /mnt
    mount: /mnt/proc: permission denied.
    ==> ERROR: failed to setup chroot /mnt
    umount: bad usage
    Try 'umount --help' for more information. 
Can anyone tell me how to fix this?

Offline

#2 2018-04-16 10:51:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Errors encountered while trying to install arch with "proot"

Two problems: first, you are  creating your mountpoint at /home/lubas/arch/root.x86_64, but then you are trying to install everything to /mnt.  That obviously will not work, when you run pacstrap, you need to install to wherever your new system root directory is.

Second problem: why are you trying to install on a machine that you do not have root access to?  This just sounds very fishy.  Are you installing to an external drive that you are going to take to a different machine?  Why not just install on that machine in the first place?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-04-16 13:43:01

abinashdash17
Member
Registered: 2018-04-16
Posts: 8

Re: Errors encountered while trying to install arch with "proot"

I've extracted bootstrap image to  "/home/lubas/root.x86_64" . Arch wiki says chroot into that folder and then run commands like pacman and pacstrap so that I can have actual Arch installatiin at "/home/lubas/root.x86_64/mnt" . The difference is only that I'm trying to do that using proot.
Regarding 2nd problem , I've already installed arch using chroot once. Being a beginner to Arch I fear I might mess up my existing system with chroot. That's why I'm trying to do that with proot. And one more thing :I never thought it's possible with proot until I saw this. It installs arch chroot to android which can be used using any terminal emulator and that too without root privilege. Any ideas how to fix this issues?

Offline

#4 2018-04-16 15:04:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Errors encountered while trying to install arch with "proot"

abinashdash17 wrote:

Being a beginner to Arch I fear I might mess up my existing system with chroot. That's why I'm trying to do that with proot.

Chroot is not dangerous.  Proot is unsupported.  If you have the option to use chroot, do so.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2018-04-16 17:24:08

abinashdash17
Member
Registered: 2018-04-16
Posts: 8

Re: Errors encountered while trying to install arch with "proot"

Trilby wrote:

Chroot is not dangerous.  Proot is unsupported.  If you have the option to use chroot, do so.

I can use chroot without any worries then... But isn't there any possibility of problems in my host system as mount points /dev /proc /sys are part of host system too? Changes made by Arch will reflect in my host system too, I guess...
Can you say something about that ? What to do and what not to? Some links or wikis are welcomed.
And please help me with how I can debug this problem with proot. I really want to know how the chroot arch installation is possible without root. See this link. This script actually installs Arch on android device with proot. I've tested this myself on an aarch64 device and quite impressed by it.

Last edited by abinashdash17 (2018-04-16 17:27:38)

Offline

Board footer

Powered by FluxBB