From: Mark David Dumlao <madumlao@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Output of "mount" and "cat /etc/mtab" inside install chroot?
Date: Sat, 19 Apr 2014 21:37:10 +0800 [thread overview]
Message-ID: <CAG2nJkPYTWzb0q4eAc4wNTA1io4C85LxTQtu1MbUD_xcPTsavg@mail.gmail.com> (raw)
In-Reply-To: <1568743.81bfSX6GRC@wstn>
On Sat, Apr 19, 2014 at 8:54 PM, Peter Humphrey <peter@prh.myzen.co.uk> 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
next prev parent reply other threads:[~2014-04-19 13:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-19 11:43 [gentoo-user] Output of "mount" and "cat /etc/mtab" inside install chroot? Walter Dnes
2014-04-19 12:21 ` Tom H
2014-04-19 12:54 ` Peter Humphrey
2014-04-19 13:37 ` Mark David Dumlao [this message]
2014-04-19 14:24 ` Tom H
2014-04-19 21:16 ` Walter Dnes
2014-04-21 10:16 ` Tom H
2014-04-20 22:55 ` yac
2014-04-21 8:38 ` Peter Humphrey
2014-04-21 23:44 ` Walter Dnes
2014-04-22 8:48 ` Peter Humphrey
2014-04-23 3:22 ` [gentoo-user] " Jonathan Callen
2014-04-22 11:29 ` [gentoo-user] " Tom H
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=CAG2nJkPYTWzb0q4eAc4wNTA1io4C85LxTQtu1MbUD_xcPTsavg@mail.gmail.com \
--to=madumlao@gmail.com \
--cc=gentoo-user@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