From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S8etq-0001YB-GH for garchives@archives.gentoo.org; Fri, 16 Mar 2012 21:41:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 65F55E0C1E; Fri, 16 Mar 2012 21:41:12 +0000 (UTC) Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com [209.85.210.53]) by pigeon.gentoo.org (Postfix) with ESMTP id E63B4E0AEA for ; Fri, 16 Mar 2012 21:40:03 +0000 (UTC) Received: by dady25 with SMTP id y25so7460657dad.40 for ; Fri, 16 Mar 2012 14:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Aarakugvib+1iCGiU10AKLZa1uBRslKy0FuOrW3Cz34=; b=y3TykFGFMZyNehjPG/PQ+S9BeFDhNhEEtvcBakczZ7+XdehyFAEfQyloXgprYyF7c/ gNg/LoicdXWPCd5zyB+K/uIC+sCGW+Qmuj3pBz5DLbgEFv90/Q9CNZx7fsHe0IKk2XrI aYbcQsDfFSwtkhZ3hzdeRoRhtXeA1uq9EbEscGemTvhp5EWQbqBcexmkkWgTSDJB7zYR YfwlgUjXyGMHGcxd3KjvR7C4b1+7Wj756lLDPJsEDUmg6bE0xSlEh/+lZ1LXNhDuDArh h9dQIIsgHj7Kj+MUb+lz596nBLLHcbTDRrJs+N8YNQcaa9VHPgUeuxzusmerHcMXr8Vx 5f9Q== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.68.195.3 with SMTP id ia3mr18360983pbc.20.1331934003276; Fri, 16 Mar 2012 14:40:03 -0700 (PDT) Received: by 10.68.197.41 with HTTP; Fri, 16 Mar 2012 14:40:03 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Mar 2012 15:40:03 -0600 Message-ID: Subject: Re: [gentoo-user] To mount or not to Mount proc, that is the question From: =?UTF-8?B?Q2FuZWsgUGVsw6FleiBWYWxkw6lz?= To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 638024a5-281c-407c-86fe-2754722265ad X-Archives-Hash: a1446056b06e8e54c1a96598e6ee5ec9 On Fri, Mar 16, 2012 at 3:18 PM, Mark Knecht wrote: > On Fri, Mar 16, 2012 at 12:47 PM, Canek Pel=C3=A1ez Vald=C3=A9s wrote: >> On Fri, Mar 16, 2012 at 1:40 PM, Mark Knecht wrot= e: > >>> Looking at the Gentoo amd64 install guide here: >>> >>> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3D1&chap=3D= 8 >>> >>> it appears that the recommendation is to mount proc. >>> >>> [QUOTE] >>> >>> /dev/sda1 =C2=A0 /boot =C2=A0 =C2=A0 =C2=A0 =C2=A0ext2 =C2=A0 =C2=A0def= aults,noatime =C2=A0 =C2=A0 1 2 >>> /dev/sda2 =C2=A0 none =C2=A0 =C2=A0 =C2=A0 =C2=A0 swap =C2=A0 =C2=A0sw = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 0 >>> /dev/sda3 =C2=A0 / =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ext3 =C2=A0= =C2=A0noatime =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 1 >>> >>> /dev/cdrom =C2=A0/mnt/cdrom =C2=A0 auto =C2=A0 =C2=A0noauto,user =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A00 0 >>> >>> proc =C2=A0 =C2=A0 =C2=A0 =C2=A0/proc =C2=A0 =C2=A0 =C2=A0 =C2=A0proc = =C2=A0 =C2=A0defaults =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 0 >>> shm =C2=A0 =C2=A0 =C2=A0 =C2=A0 /dev/shm =C2=A0 =C2=A0 tmpfs =C2=A0 nod= ev,nosuid,noexec =C2=A00 0 >>> >>> [QUOTE] > >> >> I haven't put /proc explicitly on my /etc/fstab since a long time ago, >> and everything seems to be working. However, I use systemd, which >> always mounts /proc with the default options, and only uses the entry >> in /etc/fstab (if present) to override the default options. In other >> words, systemd always mounts /proc, no matter if it's listed in >> /etc/fstab or not. >> >> I don't know what OpenRC does, but it would not surprise me that it's >> something similar. >> >> Regards. >> -- >> Canek Pel=C3=A1ez Vald=C3=A9s >> Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n >> Universidad Nacional Aut=C3=B3noma de M=C3=A9xico >> > > Thanks Canek. I appreciate your response. > > It seems when rereading the link above the authors do put the work > 'example' in italics, implying that possibly I should know what I'm > doing and not depend on the text on that page. I'm fine with the not > depending part. I'm not so sure about the 'know what I'm doing' part. > ;-) > > I'm going to take a wild guess that it's somehow mounted in an init > script these days but I have no reason to know that's actually how it > gets done. I did read the kernel docs and it doesn't seem to be done > automatically by the kernel AFAICT. No, it's the init system; look at /lib/rc/sh/init.sh:66: # By default VServer already has /proc mounted, but OpenVZ does not! # However, some of our users have an old proc image in /proc # NFC how they managed that, but the end result means we have to test if # /proc actually works or not. We do this by comparing two reads of # /proc/self/environ for which we have set the variable VAR to two # different values. If the comparison comes back equal, we know that # /proc is not working. mountproc=3Dtrue f=3D/proc/self/environ if [ -e $f ]; then if [ "$(VAR=3Da cat $f)" =3D "$(VAR=3Db cat $f)" ]; then eerror "You have cruft in /proc that should be deleted" else einfo "/proc is already mounted, skipping" mountproc=3Dfalse fi fi unset f if $mountproc; then procfs=3D"proc" [ "$RC_UNAME" =3D "GNU/kFreeBSD" ] && proc=3D"linprocfs" ebegin "Mounting /proc" if ! fstabinfo --mount /proc; then mount -n -t "$procfs" -o noexec,nosuid,nodev proc /proc fi eend $? fi Mistery solved :D Regards. --=20 Canek Pel=C3=A1ez Vald=C3=A9s Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n Universidad Nacional Aut=C3=B3noma de M=C3=A9xico