arch-install-scripts icon indicating copy to clipboard operation
arch-install-scripts copied to clipboard

udev runtime directory unavailable in chroot

Open irminsul opened this issue 2 years ago • 1 comments

Hi! I maintain a custom Arch installation script and noticed that it is broken since the release of v25 (8a5613392686a0f07d8664eecb78895b12bfb3e7).

Specifically, my script uses lsblk to get the PARTUUID of a block device like so:

lsblk -n -o PARTUUID /dev/nvme0n1p1

This fails inside an arch-chroot since lsblk needs the udev runtime data in /run/udev, which is unavailable because /run is just an empty tmpfs.

#15 mentions adding --make-private to the bind mount as an alternative to making /run a tmpfs. Is this a change you would consider, or should I rather stop using lsblk and get my UUIDs from /dev/disk/by-partuuid instead?

irminsul avatar Aug 30 '22 08:08 irminsul

Hmm, is there any downsides to --make-private? I struggle to get a good overview of the pros/conf of that flag versus making /run a tmpfs

Foxboron avatar Sep 10 '22 13:09 Foxboron

If using mount --make-private is not desired, libblkid doesn't involve udev thus a complete switch to blkid would solve this as well. (Although I haven't seen any downsides using the former method.)

YHNdnzj avatar Oct 25 '22 09:10 YHNdnzj