[Pkg-sysvinit-devel] Bug#494001: Processed: Re: Bug#494001: debian-installer: /etc/mtab must be a symlink to /proc/mounts with linux >= 2.6.26

Henrique de Moraes Holschuh hmh at debian.org
Thu Mar 19 02:14:54 UTC 2009


On Wed, 18 Mar 2009, Roger Leigh wrote:
> On Wed, Mar 18, 2009 at 05:38:38PM -0300, Henrique de Moraes Holschuh wrote:
> > Are there other parts of Squeeze that would malfunction with Linux kernels
> > older than 2.6.26 ?
> > 
> > The version check is pretty much a good idea for safety reasons, I think it
> > would be better to just leave it in, and we can get rid of it for Squeeze+1.
> 
> Agreed.  I've attached a new patch with a version check.  I've now
> tested the patch by installing the package, and it correctly updates
> the symlink, and also preserves it if already a symlink.  The only
> corner case we have here is if the admin already deliberately
> symlinked it somewhere else--we won't link it to /proc/mounts in
> this case (do we want to trample on the admins changes in this
> case?).
> 
> I used dpkg --compare-versions, which I hope is OK for kernel revisions.

The more I think about it, the less I like this way of doing things.

You have to adjust to the running kernel, at every boot.  It is *normal* to
boot on kernel x.y.z, then go back to x.y-1.z, etc.

I.e. call uname, and find out what kernel you're dealing with at that boot,
and have /etc/mtab set up before mount (or anything else) needs it.  That
means early initscript, not postinst.

In the end, it really means we should teach mount to know what to do by
itself, and get rid of /etc/mtab, if we want to fix things properly.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh





More information about the Pkg-sysvinit-devel mailing list