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 003DE138A1F for ; Sat, 19 Apr 2014 13:37:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 570D7E0A41; Sat, 19 Apr 2014 13:37:12 +0000 (UTC) Received: from mail-ig0-f170.google.com (mail-ig0-f170.google.com [209.85.213.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 54209E09A4 for ; Sat, 19 Apr 2014 13:37:11 +0000 (UTC) Received: by mail-ig0-f170.google.com with SMTP id uq10so401946igb.3 for ; Sat, 19 Apr 2014 06:37:10 -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; bh=Nfiia3moroJAYw2Q9LUV4585kCprqHB063Uaj7OUecA=; b=vraRMaAxYbV25IGzO2N2WPbdbsMbhwwqkzq2b7ALsTrJuy3hny06/UVfAO37bkhuLS sE4rpy+BnLNhNCP/jA+M9gCDZI0D9IlzsJZGjJohPnk66syCKtr2DyUX9Zrqtlg8s6u2 qJlm7pwc1cSYDVk27bLyr+z87bK8Cidgt+PidyAtqfSu8CPfpPODovz+PuOL9CT3/JhV x05FaTedJa5EacLlkyY9KJFm4Gnakwcewgma6sviLTU0uaVQRyWGnBWyyJBM9qKer4dG JGlbyxp9mMOOs/LK7UFpr9cPKUDNFZ8W8KHMPs5SAJtArA/5bOqSmSIYeLUbnz7IqotE q5ig== 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 X-Received: by 10.50.47.112 with SMTP id c16mr10368419ign.33.1397914630338; Sat, 19 Apr 2014 06:37:10 -0700 (PDT) Received: by 10.50.122.37 with HTTP; Sat, 19 Apr 2014 06:37:10 -0700 (PDT) In-Reply-To: <1568743.81bfSX6GRC@wstn> References: <20140419114318.GC1084@waltdnes.org> <1568743.81bfSX6GRC@wstn> Date: Sat, 19 Apr 2014 21:37:10 +0800 Message-ID: Subject: Re: [gentoo-user] Output of "mount" and "cat /etc/mtab" inside install chroot? From: Mark David Dumlao To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: b2994a8e-90fa-46a7-ac3c-fada5e564cf5 X-Archives-Hash: d080efe10d119da7a6cb560cd97ac80b On Sat, Apr 19, 2014 at 8:54 PM, Peter Humphrey wrote: > On Saturday 19 Apr 2014 07:43:18 Walter Dnes wrote: >> I've got another thread going called... >> "Strange behaviour with LILO on new install on old laptop". Before I >> file a bug report, I want to check first whether it's my fault. Can >> people here do me a favour? If you have a Gentoo install CD or USB key >> handy, and are willing to reboot, can you please do the following... >> >> 1) boot from the install ISO >> 2) chroot to a running environment >> 3) list the output from the 2 commands >> mount >> cat /etc/mtab >> >> I'm getting absolutely no output at all from those 2 commands in the >> install chroot. That screws up the lilo ebuild install process. I want >> to check whether blank /etc/mtab is my fault or not. > > The installation handbook used to include a command to write /etc/mtab in the > chroot by grepping the host mtab, but it's been removed and I haven't been > able to find it. Meanwhile, I think it's standard behaviour for mtab not to be > populated during the installation process. > > So I'd also be interested to hear from anyone who knows what mtab should > contain. > /etc/mtab is practically outdated. It's supposed to contain the list of currently mounted filesystems and the corresponding options, to be updated by the mount command when doing changes. You'll notice, of course, that this doesn't at all sound anything like most of the files in /etc - that's because the list of filesystems in a modern Linux changes a lot more frequently than the original Unixes. Instead of a config file, /etc/mtab essentially holds system state, which is something that is more appropriate for /var or /proc or /sys. And that's what /etc/mtab today should contain. Linux automatically updates /proc/self/mounts to hold what /etc/mtab used to hold, and a modern /etc/mtab should essentially just be a symlink to that. But of course, legacy. So the mount command will fail to function properly if you are, for example, in a read-only filesystem, or in a chroot, or otherwise in some situation where /etc/mtab was not updated by the mount command to match the contents of /proc/self/mounts. -- This email is: [ ] actionable [x] fyi [ ] social Response needed: [ ] yes [x] up to you [ ] no Time-sensitive: [ ] immediate [ ] soon [x] none