[arch-projects] [mkinitcpio][PATCH] /dev: drop non-devtmpfs support
This is not supported by udev any longer, so no point in keeping it around. Signed-off-by: Tom Gundersen <teg@jklm.no> --- PKGBUILD | 4 ++-- init | 14 ++------------ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index a6a083f..7532d78 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,8 +8,8 @@ license=('GPL') groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") -depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils' - 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=174-1' 'file' 'gzip') +depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.20.1-2' 'libarchive' 'coreutils' + 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177' 'file' 'gzip') makedepends=('asciidoc' 'git') optdepends=('xz: Use lzma or xz compression for the initramfs image' 'bzip2: Use bzip2 compression for the initramfs image' diff --git a/init b/init index 8cf90b1..e017ada 100644 --- a/init +++ b/init @@ -5,18 +5,8 @@ PATH=/usr/bin mount -t proc proc /proc -o nosuid,noexec,nodev mount -t sysfs sys /sys -o nosuid,noexec,nodev -if mount -n -t devtmpfs udev /dev -o mode=0755,nosuid; then - devtmpfs_mounted=1 -else - mount -n -t tmpfs udev /dev -o mode=0755,nosuid - devtmpfs_mounted=0 - # We don't have devtmpfs, so add the most important standard devices - mknod /dev/null c 1 3 - mknod /dev/zero c 1 5 - mknod /dev/console c 5 1 - # /dev/mem is needed if we want to load uvesafb before triggering uevents - mknod /dev/mem c 1 1 -fi +mount -t devtmpfs dev /dev -o mode=0755,nosuid +devtmpfs_mounted=1 # for compat only, to be removed mount -t tmpfs run /run -o nosuid,nodev,mode=0755 mkdir -m755 /run/initramfs -- 1.7.8.3
On Thu, Jan 12, 2012 at 11:54:27PM +0100, Tom Gundersen wrote:
This is not supported by udev any longer, so no point in keeping it around.
Signed-off-by: Tom Gundersen <teg@jklm.no> --- PKGBUILD | 4 ++-- init | 14 ++------------ 2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD index a6a083f..7532d78 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,8 +8,8 @@ license=('GPL') groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") -depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils' - 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=174-1' 'file' 'gzip') +depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.20.1-2' 'libarchive' 'coreutils' + 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177' 'file' 'gzip')
You can skip this part... I've already bumped the dep in the commit that removes the firmware helper and rules from the udev hook.
makedepends=('asciidoc' 'git') optdepends=('xz: Use lzma or xz compression for the initramfs image' 'bzip2: Use bzip2 compression for the initramfs image' diff --git a/init b/init index 8cf90b1..e017ada 100644 --- a/init +++ b/init @@ -5,18 +5,8 @@ PATH=/usr/bin
mount -t proc proc /proc -o nosuid,noexec,nodev mount -t sysfs sys /sys -o nosuid,noexec,nodev -if mount -n -t devtmpfs udev /dev -o mode=0755,nosuid; then - devtmpfs_mounted=1 -else - mount -n -t tmpfs udev /dev -o mode=0755,nosuid - devtmpfs_mounted=0 - # We don't have devtmpfs, so add the most important standard devices - mknod /dev/null c 1 3 - mknod /dev/zero c 1 5 - mknod /dev/console c 5 1 - # /dev/mem is needed if we want to load uvesafb before triggering uevents - mknod /dev/mem c 1 1 -fi +mount -t devtmpfs dev /dev -o mode=0755,nosuid +devtmpfs_mounted=1 # for compat only, to be removed
LGTM.
mount -t tmpfs run /run -o nosuid,nodev,mode=0755 mkdir -m755 /run/initramfs
-- 1.7.8.3
This is not supported by udev any longer, so no point in keeping it around.
Signed-off-by: Tom Gundersen <teg@jklm.no> --- PKGBUILD | 4 ++-- init | 14 ++------------ 2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD index a6a083f..7532d78 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,8 +8,8 @@ license=('GPL') groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") -depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils' - 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=174-1' 'file' 'gzip') +depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.20.1-2' 'libarchive' 'coreutils' + 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177' 'file' 'gzip') makedepends=('asciidoc' 'git') optdepends=('xz: Use lzma or xz compression for the initramfs image' 'bzip2: Use bzip2 compression for the initramfs image' diff --git a/init b/init index 8cf90b1..e017ada 100644 --- a/init +++ b/init @@ -5,18 +5,8 @@ PATH=/usr/bin
mount -t proc proc /proc -o nosuid,noexec,nodev mount -t sysfs sys /sys -o nosuid,noexec,nodev -if mount -n -t devtmpfs udev /dev -o mode=0755,nosuid; then - devtmpfs_mounted=1 -else - mount -n -t tmpfs udev /dev -o mode=0755,nosuid - devtmpfs_mounted=0 - # We don't have devtmpfs, so add the most important standard devices - mknod /dev/null c 1 3 - mknod /dev/zero c 1 5 - mknod /dev/console c 5 1 - # /dev/mem is needed if we want to load uvesafb before triggering uevents - mknod /dev/mem c 1 1 -fi +mount -t devtmpfs dev /dev -o mode=0755,nosuid +devtmpfs_mounted=1 # for compat only, to be removed Compat with exactly what? It isn't like our low-level userspace stays
On Thu, Jan 12, 2012 at 4:54 PM, Tom Gundersen <teg@jklm.no> wrote: the same for longer than someone can blink anyways, so seems stupid to keep this around considering other things break random hooks anyway.
On Fri, Jan 13, 2012 at 12:10 AM, Dan McGee <dpmcgee@gmail.com> wrote:
Compat with exactly what? It isn't like our low-level userspace stays the same for longer than someone can blink anyways, so seems stupid to keep this around considering other things break random hooks anyway.
I simply could not find the users of it ('git grep devtmpfs' gave me nothing), so didn't want to just rip it out. If someone else wants to do it I wouldn't object... -t
Am 13.01.2012 00:17, schrieb Tom Gundersen:
On Fri, Jan 13, 2012 at 12:10 AM, Dan McGee <dpmcgee@gmail.com> wrote:
Compat with exactly what? It isn't like our low-level userspace stays the same for longer than someone can blink anyways, so seems stupid to keep this around considering other things break random hooks anyway.
I simply could not find the users of it ('git grep devtmpfs' gave me nothing), so didn't want to just rip it out. If someone else wants to do it I wouldn't object...
-t
This was used in poll_device in earlier versions (no idea what Dave did to it). The logic was: Only wait for a device if either udev is used, or devtmpfs is mounted. Otherwise, devices won't magically show up if we wait, so there is no point in waiting. I don't remember any other users.
udev does not support this as of udev-176, so there is no point in pretending it will work. This also drops devtmpfs_monuted=1, so any custom hooks that use this would have to be updated (no official hooks are affected). Signed-off-by: Tom Gundersen <teg@jklm.no> --- init | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/init b/init index 8cf90b1..86a954b 100644 --- a/init +++ b/init @@ -5,18 +5,7 @@ PATH=/usr/bin mount -t proc proc /proc -o nosuid,noexec,nodev mount -t sysfs sys /sys -o nosuid,noexec,nodev -if mount -n -t devtmpfs udev /dev -o mode=0755,nosuid; then - devtmpfs_mounted=1 -else - mount -n -t tmpfs udev /dev -o mode=0755,nosuid - devtmpfs_mounted=0 - # We don't have devtmpfs, so add the most important standard devices - mknod /dev/null c 1 3 - mknod /dev/zero c 1 5 - mknod /dev/console c 5 1 - # /dev/mem is needed if we want to load uvesafb before triggering uevents - mknod /dev/mem c 1 1 -fi +mount -t devtmpfs dev /dev -o mode=0755,nosuid mount -t tmpfs run /run -o nosuid,nodev,mode=0755 mkdir -m755 /run/initramfs -- 1.7.8.3
On 01/12/2012 07:54 PM, Tom Gundersen wrote:
This is not supported by udev any longer, so no point in keeping it around.
Signed-off-by: Tom Gundersen<teg@jklm.no> --- PKGBUILD | 4 ++-- init | 14 ++------------ 2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD index a6a083f..7532d78 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,8 +8,8 @@ license=('GPL') groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") -depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils' - 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=174-1' 'file' 'gzip') +depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.20.1-2' 'libarchive' 'coreutils' + 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177' 'file' 'gzip') makedepends=('asciidoc' 'git') optdepends=('xz: Use lzma or xz compression for the initramfs image' 'bzip2: Use bzip2 compression for the initramfs image' diff --git a/init b/init index 8cf90b1..e017ada 100644 --- a/init +++ b/init @@ -5,18 +5,8 @@ PATH=/usr/bin
mount -t proc proc /proc -o nosuid,noexec,nodev mount -t sysfs sys /sys -o nosuid,noexec,nodev -if mount -n -t devtmpfs udev /dev -o mode=0755,nosuid; then - devtmpfs_mounted=1 -else - mount -n -t tmpfs udev /dev -o mode=0755,nosuid - devtmpfs_mounted=0 - # We don't have devtmpfs, so add the most important standard devices - mknod /dev/null c 1 3 - mknod /dev/zero c 1 5 - mknod /dev/console c 5 1 - # /dev/mem is needed if we want to load uvesafb before triggering uevents - mknod /dev/mem c 1 1 -fi +mount -t devtmpfs dev /dev -o mode=0755,nosuid +devtmpfs_mounted=1 # for compat only, to be removed mount -t tmpfs run /run -o nosuid,nodev,mode=0755 mkdir -m755 /run/initramfs
I we are going to stop support non non-udev systems (anyone use static /dev today?) we can remove "modprobe/mknod" from hooks: btrfs, encrypt, lvm2, dmraid, and mdadm, then use on-demand module loading (modules.devname) (from these last four hooks there are still pending patches thats remove external tools (sed, cut...) usage (FS#27308 , FS#27307 , FS#27306 , FS#27305) we can do this in one step. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Fri, Jan 13, 2012 at 12:33 AM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
I we are going to stop support non non-udev systems (anyone use static /dev today?)
Both mkinitcpio and initscripts have been depending on udev for a long time...
we can remove "modprobe/mknod" from hooks: btrfs, encrypt, lvm2, dmraid, and mdadm, then use on-demand module loading (modules.devname)
We should probably wait for -lts kernel to be bumped, as .32 does not support .devname. We can drop mknod though, and only do modprobe. -t
On 01/12/2012 08:52 PM, Tom Gundersen wrote:
On Fri, Jan 13, 2012 at 12:33 AM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
I we are going to stop support non non-udev systems (anyone use static /dev today?) Both mkinitcpio and initscripts have been depending on udev for a long time...
we can remove "modprobe/mknod" from hooks: btrfs, encrypt, lvm2, dmraid, and mdadm, then use on-demand module loading (modules.devname) We should probably wait for -lts kernel to be bumped, as .32 does not support .devname. We can drop mknod though, and only do modprobe.
-t
Oh yes sure, when kernel26-lts become linux-lts (3.0.X) in next month. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 13.01.2012 00:52, schrieb Tom Gundersen:
On Fri, Jan 13, 2012 at 12:33 AM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
I we are going to stop support non non-udev systems (anyone use static /dev today?)
Both mkinitcpio and initscripts have been depending on udev for a long time...
Last time I checked, you could use mkinitcpio without udev in some simple cases (especially since we started supporting devtmpfs, as the basic devices nodes are created by the kernel and you don't need the stupid device name parsing logic). I actually have virtual machines that have MODULES="virtio_pci virtio_blk ext4" HOOKS="base" and they do boot fine. And I am pretty sure we have users with setups like MODULES="ahci sd_mod ext4" HOOKS="base" With newer mkinitcpio versions, even root=LABEL=foobar should work without udev. In theory, as we have devtmpfs, a dm-crypt setup might also still work without udev (with some quirks). What makes you think mkinitcpio depends on udev?
On Fri, Jan 13, 2012 at 10:11 AM, Thomas Bächler <thomas@archlinux.org> wrote:
Last time I checked, you could use mkinitcpio without udev in some simple cases (especially since we started supporting devtmpfs, as the basic devices nodes are created by the kernel and you don't need the stupid device name parsing logic).
[...]
What makes you think mkinitcpio depends on udev?
You are right. What I meant was simply that it has depends=(udev). It is of course possible to not include the udev hook (in the vast majority of cases there is no point in including udev). That said, this only holds if you use devtmpfs. /dev on tmpfs used to be possible with the udev hook, but now it is not possible at all. -t
participants (5)
-
Dan McGee
-
Dave Reisner
-
Gerardo Exequiel Pozzi
-
Thomas Bächler
-
Tom Gundersen