[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#621803: Add support for /run directory



On Mon, Apr 18, 2011 at 07:38:41PM +0100, Roger Leigh wrote:
> On Mon, Apr 18, 2011 at 05:58:07PM +0000, maximilian attems wrote:
> > On Mon, Apr 18, 2011 at 05:43:02PM +0100, rleigh wrote:
> > > 
> > > I didn't see a patch in git, so I've attached a simple one here.
> > > This creates /run as a tmpfs, and moves the mount to the rootfs
> > > /run as done for other filesystems.
> > 
> > please look harder next times!
> > 
> > the git archive, don't know where you looked, so here it is:
> > http://git.debian.org/?p=kernel/initramfs-tools.git;a=summary
> > checkout the branch maks/run
> 
> Ah, found it, thanks.
> 
> > > If this is all that is needed in the main initramfs, will it
> > > take long to get the /run support into unstable?  It looks like
> > > this might be a prerequisite for a fully functional udev, and
> > > for other tools that store state in the initramfs, and it's a
> > > simple and safe change to make.  I've raised the severity due
> > > to the /run transition being dependent on this being fixed.
> > 
> > there is *no* point in posting trivial patches round and round.
> > if you'd build i-t with that branch and have it *well* tested
> > in several different configuration, then that would be a help.
> 
> What different types of configuration would you like testing?
> I'll be happy to test, but I'm not sure exactly what you would
> like varying.
> 
> Current tests have been on a system with root on LVM on md RAID1
> using grub2.

I've also tested on a powerpc wheezy system and amd64 unstable kvm VM.
No issues found.

If you would like any other scenarios testing, I'll be happy to
accommodate you if possible.  However, given the simple nature of
the patch, I'm confident it's working correctly given that it's
mounted unconditionally and will be moved onto the host if /run
exists in all cases.

> By the way, could you consider adding this patch to your branch:

diff --git a/init b/init
index 38c8a5d..cdbfe50 100755
--- a/init
+++ b/init
@@ -25,7 +25,7 @@ if ! mount -t devtmpfs -o mode=0755 none /dev; then
 fi
 mkdir /dev/pts
 mount -t devpts -o noexec,nosuid,gid=5,mode=0620 none /dev/pts || true
-mount -t tmpfs -o nodev,noexec,nosuid,mode=0755 none /run
+mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run
 mkdir /run/initramfs
 
 # Export the dpkg architecture

Slightly simpler than the previous patch, but does the same job.
Please note that I've now patched initscripts
(http://paste.debian.net/114826/ and
http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/2011-April/004990.html) so that the filesystems mounted in the initramfs and later moved
over to the root filesystem are remounted with the mount options
specified in /etc/fstab (or /etc/default/tmpfs if no fstab entry
exists).  In consequence, it's no longer critical that the mount
option defaults in the initramfs match the "real" root filesystem
defaults, because they will always be applied by mountkernfs/
mountdevsubfs.  So if you choose not to apply this, that's fine--it's
just a "nice to have" addition; the patch as it stands without the
above change is equally acceptable.

Thanks for doing this.  Do we have any ETA on an upload?


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature


Reply to: