From: "Anthony G. Basile" <basile@opensource.dyc.edu>
To: gentoo-embedded@lists.gentoo.org
Subject: Re: [gentoo-embedded] Qemu-user chroot handbook chapter - mdev issue
Date: Wed, 23 Jul 2014 07:41:52 -0400 [thread overview]
Message-ID: <53CF9F80.8040109@opensource.dyc.edu> (raw)
In-Reply-To: <CAL=Nhm4m4dQYP+9nzwwSh2ecrWeFoBZuLaB2C8H_4+buTqR1JQ@mail.gmail.com>
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 <chroot>/dev which has incorrect
permissions for your chroot.
If you are running a chroot and you `mount --bind /dev <chroot>/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
<chroot>/dev.
--
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197
prev parent reply other threads:[~2014-07-24 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 19:28 [gentoo-embedded] Qemu-user chroot handbook chapter - mdev issue Phil Tooley
2014-07-23 11:41 ` Anthony G. Basile [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53CF9F80.8040109@opensource.dyc.edu \
--to=basile@opensource.dyc.edu \
--cc=gentoo-embedded@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox