2

I'm trying to install arch using proot(instead of chroot). I'm following arch wiki. Steps I've followed:
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 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?
Note: I fear using root privilege to install arch on chroot and run the same. I've seen Arch can be installed on android(without root). That's why I'm trying to do that on my machine so that I can learn arch without any risk of messing my system.

0

Edit: Just realized how old this question is. Answer still applies.

Pacstrap requires root permissions because it relies on mount which needs them.

Make sure you are working on a nice clean parition and no harm will come to your current system, I promise.

If your still worried about it you could try booting Arch on a virtualmachine or a usb key. VM is a great way to go and easy to settup if your already in a Linux distro. Sure you won't get to do some of the fun things like partioning and formatting disk, but it sounds like thats what your worried about anyway.

  • When no one answered the question, I continued using chroot. Thanks @Linux Lover for answer. But I'm curious about how on earth proot can successfully install whole arch to android without root privilege. Here's the link, if anyone's interested about the script I'm talking about.termux arch . I wish someone could write that for ubuntu like systems so that people interested in learning Arch could enjoy Arch(and pacman) without any fear. – Abinash Dash May 4 '18 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.