Re: [arch-general] [arch-dev-public] [RFC] Initialize /etc/mtab by copying /proc/mounts
Thomas Bächler (2010-06-09 09:47):
Am 09.06.2010 03:40, schrieb Dan McGee:
On Tue, Jun 8, 2010 at 5:48 PM, Thomas Bächler <thomas@archlinux.org> wrote:
Our current process of initializing /etc/mtab is hackish and probably error-prone, replace it by simply copying /proc/mounts. ---
Looks good to me (but untested). This goes way back to the roots of Arch, wow.
The only weirdness that I found is that "rootfs" is now shown as a mount: rootfs / rootfs rw 0 0
Technically this is correct, but some tools might become confused. Another way would be to grep -v ^rootfs from /proc/mounts when creating mtab. I am entirely unsure what the "right way" is here.
Not that I know the right way, but am running Arch with /etc/mtab copied (or symlinked, on another system) from /proc/mounts for more than a year now, without any problems. -- -- Rogutės Sparnuotos
On Wed, Jun 9, 2010 at 3:58 AM, Rogutės Sparnuotos <rogutes@googlemail.com> wrote:
Thomas Bächler (2010-06-09 09:47):
Am 09.06.2010 03:40, schrieb Dan McGee:
On Tue, Jun 8, 2010 at 5:48 PM, Thomas Bächler <thomas@archlinux.org> wrote:
Our current process of initializing /etc/mtab is hackish and probably error-prone, replace it by simply copying /proc/mounts. ---
Looks good to me (but untested). This goes way back to the roots of Arch, wow.
The only weirdness that I found is that "rootfs" is now shown as a mount: rootfs / rootfs rw 0 0
Technically this is correct, but some tools might become confused. Another way would be to grep -v ^rootfs from /proc/mounts when creating mtab. I am entirely unsure what the "right way" is here.
Not that I know the right way, but am running Arch with /etc/mtab copied (or symlinked, on another system) from /proc/mounts for more than a year now, without any problems.
Almost all embedded distros do this as well; rootfs is there in my OpenWRT install because mtab is just a symlink. I would hope most tools can cope with this guy. -Dan
Am 09.06.2010 14:34, schrieb Dan McGee:
Not that I know the right way, but am running Arch with /etc/mtab copied (or symlinked, on another system) from /proc/mounts for more than a year now, without any problems.
Having mtab as a symlink is a bad idea, mount writes more options into mtab than the kernel knows about.
Almost all embedded distros do this as well; rootfs is there in my OpenWRT install because mtab is just a symlink. I would hope most tools can cope with this guy.
/me shrugs.
Thomas Bächler (2010-06-09 14:44):
Am 09.06.2010 14:34, schrieb Dan McGee:
Not that I know the right way, but am running Arch with /etc/mtab copied (or symlinked, on another system) from /proc/mounts for more than a year now, without any problems.
Having mtab as a symlink is a bad idea, mount writes more options into mtab than the kernel knows about.
Maybe... But no undocumented problems have arisen; I am using this after consulting mount(8) manual: It is possible to replace /etc/mtab by a symbolic link to /proc/mounts, and especially when you have very large numbers of mounts things will be much faster with that symlink, but some information is lost that way, and in particular using the "user" option will fail. -- -- Rogutės Sparnuotos
participants (3)
-
Dan McGee
-
Rogutės Sparnuotos
-
Thomas Bächler