<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[HyperForum — [Linux] Beneficial endeavors to remove udev]]></title>
		<link>https://forums.hyperbola.info/viewtopic.php?id=1171</link>
		<atom:link href="https://forums.hyperbola.info/extern.php?action=feed&amp;tid=1171&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in [Linux] Beneficial endeavors to remove udev.]]></description>
		<lastBuildDate>Wed, 01 Apr 2026 14:24:16 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [Linux] Beneficial endeavors to remove udev]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=8802#p8802</link>
			<description><![CDATA[<p>So I&#039;ve been looking through the network setup code (/etc/init.d/net.lo) a bit more and realized it may not be udev that sets up eth0...</p><p>I&#039;m thinking it may actually be OpenRC, but to the point the setup depends on udev to work...</p><p>The code behind network setup is such a mess, requiring numerous scripts (in order):<br />/usr/lib/udev/rules.d/90-network.rules<br />/usr/lib/udev/net.sh<br />/etc/init.d/net.lo<br />/usr/lib/openrc/sh/functions.sh<br />/usr/lib/netifrc/sh/functions.sh<br />/usr/lib/artix/functions.sh</p><p>I still haven&#039;t worked through everything yet, but this is ridiculous</p><p>Whoever wrote this certainly didn&#039;t want people figuring out how networking works, or there wouldn&#039;t be so much bloat (needless code)</p><p>It&#039;s as if they think obscurity is somehow security, which seems to be a common trend I see amongst coders in many various languages...</p><p>Despite the fact so many security experts repeatedly say otherwise, but this is Linux, nobody listens to experts <img src="https://forums.hyperbola.info/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>EDIT: Ok so it&#039;s verified to not be OpenRC at all, at least not through shell scripts anyways...</p><p>I&#039;ve grep-searched my entire /usr/lib/* folder for anything containing &quot;\beth&quot;, and the only thing even remotely close (outside of commentary) to something capable of configuring &quot;eth0&quot; was openrc/console/keymap, which obviously wouldn&#039;t do anything like that XD</p><p>I also grep-searched /etc/* as well, which also was all commentary</p><p>So unless udev actually provides the &quot;eth0&quot; name for the scripts to configure, I can&#039;t see anything that would configure them otherwise...</p><p>There&#039;s just too much code I don&#039;t have the mental capacity to follow, if anything outside of udev configures this...</p>]]></description>
			<author><![CDATA[null@example.com (tcll)]]></author>
			<pubDate>Wed, 01 Apr 2026 14:24:16 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=8802#p8802</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Linux] Beneficial endeavors to remove udev]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=8801#p8801</link>
			<description><![CDATA[<p>More detailed info related to the mknod bit for mice<br /><a href="https://mkeys.sourceforge.net/input_setup.html">https://mkeys.sourceforge.net/input_setup.html</a></p><p>Localized code blocks just in case the link goes down (I&#039;m tired of finding info that goes nowhere, so best not to add to that 10 years later)</p><p>Kernel modules required (compacted from the page):<br /></p><div class="codebox"><pre><code>    input.o - Input core (main driver)
    mousedev.o - If you need mouse support
    keybdev.o - If you need keyboard support (most likely you do)
    usbcore.o - For USB to work
    usb-[uoe]hci.o - USB host controller (either one: UHCI, OHCI, or the newest EHCI)
    hid.o - The HID driver handles all HID devices

    evdev.o - Needed for HIDNode driver to work</code></pre></div><p>Standard devfs files those modules should provide:<br /></p><div class="codebox"><pre><code>    cd /dev
    mkdir input
    mknod input/mice c 13 63 # this is for USB mouse, if you own one

    mknod input/mouse0 c 13 32 # those are for applications that require
    mknod input/mouse1 c 13 33 # PS/2 - style mouse device
    mknod input/mouse2 c 13 34
    mknod input/mouse3 c 13 35 
    ...
    mknod input/mouse30 c 13 62 

    mknod input/event0 c 13 64 # this is for event devices required by HIDNode
    mknod input/event1 c 13 65 
    mknod input/event2 c 13 66
    mknod input/event3 c 13 67</code></pre></div><p>I&#039;ll have to play around with these and make sure Xorg finds my mouse, next time I&#039;m able to reboot <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (tcll)]]></author>
			<pubDate>Wed, 01 Apr 2026 09:58:47 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=8801#p8801</guid>
		</item>
		<item>
			<title><![CDATA[[Linux] Beneficial endeavors to remove udev]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=8800#p8800</link>
			<description><![CDATA[<p>This thread is primarily about my endeavors to remove udev from my Artix Linux install, but the outlook is intended to help Hyperbola (among potentially others) achieve similar.<br />(While I don&#039;t intend on installing Hyperbola (primarily because partitionless-EXT4: [<span style="color: gray"><em>mkfs.ext4 -FL Label -b 4096 /dev/sdx</em></span>] is FAR too reliable for me to attempt anything else), I do have stars in my eyes for the project)</p><p><strong>Disclaimer</strong>: This thread may occasionally go off topic due to the vast amount of coverage with the sheer knowledge involved with a project like this, and this post may also change (for the better) since I&#039;m just bad at writing. <img src="https://forums.hyperbola.info/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p><strong>Future</strong>: I do intend to cover the history and motivations behind my decisions that lead me down such a painful path, but that&#039;s it&#039;s own can of worms regarding how much Linux has further devolved into a cloud-focused insecure monolithic abomination that&#039;s done nothing but abuse me since I started using it in 2012 after my primary WinXP (an OS which I still use to date) install corrupted itself <img src="https://forums.hyperbola.info/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p><p>My personal goal is to have minimal static device configurations within initrd for setting up what udev would otherwise detect and configure, which from what I need really only needs to mount the mouse and network devices (if that) to a common location, as anything else I can mount after login...<br />(Ultimately I intend to remove my init system (OpenRC) entirely to have nothing at all running as root, but that&#039;s a goal for potentially another thread if Hyperbola is interested in providing similar options)</p><p>My current solutions to many various issues with this approach is simply just configuration scripts run from a custom user-level service daemon after login... (Although I AM building software to ease the tediousness of everything)<br />If anything needs root, I&#039;m prompted with a terminal window to grant root to... (at least I know for certain what&#039;s running as root and when, unlike with OpenRC which does a ton of stuff behind the scenes you&#039;ll only know about via reverse-engineering)<br />One such example is a custom memory manager that <strong>properly</strong> clears swap and caches [<span style="color: gray"><em>echo 3 &gt; /proc/sys/vm/drop_caches</em></span>] to avoid Linux becoming sluggish when disk-cache would fill up the remaining unused RAM...<br />(I used to clear it every 10 seconds which worked quite nicely, but Wine would have problems finding my nvidia GPU (yet another thing to fix), so I reduced it to every minute as a workaround, which causes tolerable instability)</p><p>But regardless, that&#039;s getting off topic... <img src="https://forums.hyperbola.info/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p><p>The first major hurdle to removing udev was Xorg and libinput, which was, despite the tediousness, actually quite easy to do...<br />All you need to do for xorg is remove the extension modules for libinput and libevdev, but additionally ensure you have the extension modules installed for the mouse and keyboard directly<br />The rest is just ensuring those devices are configured in Xorg.conf</p><p>The keyboard is extremely easy to configure, as the extension (if not Xorg itself) primarily gets that from the TTY (via the launch command [<span style="color: gray"><em>Xorg -nolisten tcp :0 <strong>vt1</strong> -keeptty ...</em></span>]):<br /></p><div class="codebox"><pre><code>Section &quot;ServerLayout&quot;
    ...
    
    InputDevice    &quot;Keyboard0&quot; &quot;CoreKeyboard&quot;
    ...

EndSection

...

Section &quot;InputDevice&quot;
    Identifier     &quot;Keyboard0&quot;
    Driver         &quot;kbd&quot;
EndSection</code></pre></div><p>(Bonus info, joystick, wacom, and even hyperpen and wiimote are also supported by Xorg directly with extensions, which not many seem to know about)<br />The mouse however... what little info I found about mounting the mouse via [<span style="color: gray"><em>mknod /dev/input/mice c 13 63</em></span>] has failed to work, and I have yet to find any info that does</p><p>I assume a similar approach would be used to mount network devices, but I need some help figuring that out as [<span style="color: gray"><em>/sys/class/net/*</em></span>] is empty without udev... &gt;.&gt;</p><p><strong>IMPORTANT</strong>: Ensure your perms don&#039;t allow the user to freely read mouse/keyboard input, as that&#039;s the very reason why very many distros to date still run Xorg as root (ignoring the PE issues from doing so)<br />(Xorg should be ran as no more than user, or at least some mid-level group swapped to via newgrp, with the device nodes configured to allow Xorg to read them, but not the user, without granting full root access to Xorg)</p><p>But anyways, with Xorg out of the way, you should be able to remove udev without much issue...<br />The only thing that might stand in your way would be any packages depending on udev</p><p>dbus for example requires udev through libelogind, which obviously I don&#039;t have installed if I can remove udev XD<br />(The ONLY program I have that requires dbus at all is Nheko, which to make that work, I had to pack dbus into it&#039;s AppDir and run it with [<span style="color: gray"><em>dbus-run-session</em></span>] which loads a shoddy script that runs a notification daemon and keepassxc under that)</p><p>So yeah, there ARE hurdles, but nothing too overly complex, especially if you focus on portability like I prefer (I guess it depends on what you prefer though, since I don&#039;t use a WM that can&#039;t live without dbus for example, heck I don&#039;t even use a login manager at this current moment) <img src="https://forums.hyperbola.info/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p><p>I&#039;ll save the details of what I run for the history/pain thread, as I think it might already surprise a lot of people I even run Xorg <img src="https://forums.hyperbola.info/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (tcll)]]></author>
			<pubDate>Tue, 31 Mar 2026 20:57:06 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=8800#p8800</guid>
		</item>
	</channel>
</rss>
