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. By the way, could you consider adding this patch to your branch: diff --git a/init b/init index 38c8a5d..c7e5909 100755 --- a/init +++ b/init @@ -25,7 +25,8 @@ 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 +run_tmpfs_size="20%" +mount -t tmpfs -o "nosuid,size=$run_tmpfs_size,mode=0755" none /run mkdir /run/initramfs # Export the dpkg architecture This syncs the mount options with the defaults in initscripts. Note that the nodev option was removed, because it's currently required on some systems by /etc/init.d/checkroot.sh (it uses mknod /dev/rootdev to get a device node to mount /root). I hope that we can remove this at some point, but for now mounting /run with nodev will cause some systems to break. It also mounts with noexec, since this is potentially needed for some uses of /dev/shm. Again, I hope we can remove it, but it will need testing whether or not exec perms are needed to map with PROT_EXEC on current kernels. WRT these mount options, I aim to get initscripts to remount /run with options from /etc/fstab or /etc/default/tmpfs which will allow the system to be configured to use more restrictive mount options after boot, should the admin choose. And, depending upon the configuration, we may be able to automatically determine if stricter permissions are possible (e.g. /run/shm is a separate mount, so noexec is safe to use). So this patch uses the options we know are safe, and initscripts can tighten them up later, if possible. This remounting with user-specified options will apply to all filesystems mounted in mountkernfs/mountdevsubfs. 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