From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A7E9613877A for ; Thu, 24 Jul 2014 22:49:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 99079E146F; Thu, 24 Jul 2014 22:46:22 +0000 (UTC) Received: from virtual.dyc.edu (mail.virtual.dyc.edu [67.222.116.22]) by pigeon.gentoo.org (Postfix) with ESMTP id 0B067E146E for ; Thu, 24 Jul 2014 22:46:21 +0000 (UTC) Received: from [192.168.3.7] (cpe-74-77-145-97.buffalo.res.rr.com [74.77.145.97]) by virtual.dyc.edu (Postfix) with ESMTPSA id 0D1CD7E031A for ; Wed, 23 Jul 2014 07:40:39 -0400 (EDT) Message-ID: <53CF9F80.8040109@opensource.dyc.edu> Date: Wed, 23 Jul 2014 07:41:52 -0400 From: "Anthony G. Basile" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 To: gentoo-embedded@lists.gentoo.org Subject: Re: [gentoo-embedded] Qemu-user chroot handbook chapter - mdev issue References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: ce65e18d-3326-42e6-a615-44796f75f123 X-Archives-Hash: 78fe7e387aeab510a487a3239e2e40d3 On 07/22/14 15:28, Phil Tooley wrote: > Hi all, > > I have been looking at the handbook section regarding a qemu-user chroot > and have some serious concerns about part of it. Specifically, in the > section for setting up the chroot it is suggested to run > > chroot . /bin/busybox mdev -s > > Since I (like most others) am currently running udev, this seems to me like > a very bad idea. (And indeed this is confirmed when I try it on my dev VM, > where the permissions for /dev/pts /dev/null /dev/random etc. are messed up > by this) > > Can someone please explain the logic here, since as far as I can tell so > far, simply omitting this step does no major harm. > > Cheers > > Phil Tooley > Read the mdev primer: http://git.busybox.net/busybox/tree/docs/mdev.txt Basically it does a population of /dev via /sys and if it has a config file, will set permissions. So if you omit this step you may have a /dev which has incorrect permissions for your chroot. If you are running a chroot and you `mount --bind /dev /dev` then changing the permissions in /dev may mess up your real root. My recommendation is to not do a bind mount and just populate a fresh /dev. -- Anthony G. Basile, Ph. D. Chair of Information Technology D'Youville College Buffalo, NY 14201 (716) 829-8197