FS#58329 - [arch-install-scripts] Does pacstrap need access to /dev?

Attached to Project: Arch Linux
Opened by Philip Abernethy (Chais) - Tuesday, 24 April 2018, 00:21 GMT
Last edited by Jelle van der Waa (jelly) - Monday, 18 September 2023, 17:53 GMT
Task Type General Gripe
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
I'm tinkering with lxc and noticed that pacstrap fails in an unprivileged container.
Digging a little deeper I narrowed it down to this line:
```
chroot_add_mount udev "$1/dev" -t devtmpfs -o mode=0755,nosuid
```
I don't see why a fully initialised devfs is necessary for installing packages. Useful devs like null or urandom could either be used from the host or initialised separately,
but I'd be surprised and suspicious if a package required direct access to, say, a block device during installation.
Am I missing something here? Or was this just the simplest solution and nobody tried building a chroot in an unprivileged lxc, yet?
This task depends upon

Closed by  Jelle van der Waa (jelly)
Monday, 18 September 2023, 17:53 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/a rch-install-scripts/issues/64
Comment by Dave Reisner (falconindy) - Saturday, 05 January 2019, 16:22 GMT
Doesn't grub need access to real devices in order to be useful?
Comment by dplusplus (dplusplus) - Wednesday, 01 December 2021, 00:06 GMT
I am trying to set up an unprivileged lxc container for automated PKGBUILD package building in clean chroots, and am hitting this same issue too (specifically, I try to run `pacstrap /home/archbuilding/arch-chroot` and I get the error message `mount: /home/archbuilding/arch-chroot/dev: permission denied.`). I guess the Arch Linux official build systems, and everyone else doing Arch package building in clean chroots, use virtual machines so they do not have this problem.

Things like GRUB certainly need access to real devices, but is GRUB useful in a chroot environment?
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...