<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>udev &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/udev/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Sat, 19 Jan 2019 01:44:21 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[Gentoo] Moved to eudev from udev</title>
		<link>https://richliu.com/2019/01/19/3406/gentoo-moved-to-eudev-from-udev/</link>
					<comments>https://richliu.com/2019/01/19/3406/gentoo-moved-to-eudev-from-udev/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Sat, 19 Jan 2019 01:42:51 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[eudev]]></category>
		<category><![CDATA[udev]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=3406</guid>

					<description><![CDATA[<p>好久沒有寫 Gentoo 的文章了，畢竟除了一般性升級也懶得再動什麼，不過最近一次升級系統又爛了 所有的 ne [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2019/01/19/3406/gentoo-moved-to-eudev-from-udev/">[Gentoo] Moved to eudev from udev</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>好久沒有寫 Gentoo 的文章了，畢竟除了一般性升級也懶得再動什麼，不過最近一次升級系統又爛了</p>



<p>所有的 network interface 變成 eth0/eth1 &#8230;.. ，不再是 predictable network interface names （可預測的網路介面名稱像是 ensp1 這樣的）</p>



<span id="more-3406"></span>



<p>查了一下系統，發現 driver loading 都是正常的，想到 predictable network interface names 最主要的就是 udev ，試著重啟 udev 看看，沒想到所有的 interface 就變回來了</p>



<p>查了一下 Kernel option ，以前 Gentoo 用 predictable network interface names 要開 kernel option ，現在不用，想必已經預設是這樣了<br />下一步就是查一下之前用的 udev ，再編回來。沒想到，舊版的 236 從 portage 移除了，新版的 238 之後， compile error 都要 download systemd 放在裡面。這下原因大白了，八成是這個原因，因為 Gentoo 的老玩家都還在用 OpenRC。</p>



<p>之前在查其他東西的時候有注意到 eudev 這個東西，不過沒有特別注意，但是解法就在這邊<br /><br />簡單的說， eudev 就是 Udev 的 Gentoo 版，給 OpenRC 這樣的舊系統用的，systemd 不要用。<br /><br />真是 %@%@#$%@#$%@#$%#@%$<br /><br />可能有一天真的要升級到 systemd ，我不想啊啊啊啊啊</p>



<p>以下 Copy 自 Gentoo Wiki<br />&#8212;<br /><strong>eudev</strong>&nbsp;is Gentoo&#8217;s fork of&nbsp;<a href="https://wiki.gentoo.org/wiki/Udev" target="_blank" rel="noopener">udev</a>, systemd&#8217;s&nbsp;<a href="https://wiki.gentoo.org/wiki/Device_file" target="_blank" rel="noopener">device file</a>&nbsp;manager for the Linux kernel.<sup><a href="https://wiki.gentoo.org/wiki/Eudev#cite_note-1" target="_blank" rel="noopener">[1]</a></sup>&nbsp;It manages device nodes in&nbsp;<a href="https://wiki.gentoo.org/wiki/Eudev#The_.2Fdev_directory" target="_blank" rel="noopener">/dev</a>&nbsp;and handles all user space actions when adding or removing devices.</p>



<p>The goal of eudev is to obtain better compatibility with existing software such as the&nbsp;<a href="https://wiki.gentoo.org/wiki/OpenRC" target="_blank" rel="noopener">OpenRC</a>&nbsp;init system,&nbsp;<a href="https://en.wikipedia.org/wiki/Upstart" target="_blank" rel="noopener">Upstart</a>&nbsp;init system, older Linux kernels, various toolchains, and anything else required<sup><a href="https://wiki.gentoo.org/wiki/Eudev#cite_note-2" target="_blank" rel="noopener">[2]</a></sup>&nbsp;by (but not well supported through)&nbsp;<strong>udev</strong>.</p>



<p>Similar to ebuild, eclass, emerge, etc. eudev&#8217;s name follows the &#8216;E&#8217; prefix convention started by Gentoo&#8217;s founder Daniel Robbins.<br /></p>



<p>System configurations running&nbsp;<strong>systemd</strong>&nbsp;have no use for eudev.</p>



<p>Ref.<br /><br />https://wiki.gentoo.org/wiki/Eudev</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2019/01/19/3406/gentoo-moved-to-eudev-from-udev/">[Gentoo] Moved to eudev from udev</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2019/01/19/3406/gentoo-moved-to-eudev-from-udev/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>udev 之後仍然想用原先的 network device rename 的方式修改 interface</title>
		<link>https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/</link>
					<comments>https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 01 Oct 2014 13:46:19 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Predictable Network Interface Names]]></category>
		<category><![CDATA[udev]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1667</guid>

					<description><![CDATA[<p>在Predictable Network Interface 這件事情出現之前, 很長一段時間, udev 起 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/">udev 之後仍然想用原先的 network device rename 的方式修改 interface</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>在<a href="http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/" target="_blank" rel="noopener">Predictable Network Interface </a>這件事情出現之前, 很長一段時間, udev 起來之後, script 會自動產生 70-persistent-net.rules , 然後所有的 ethernet device 就會在裡面, 如果要改個順序ex: eth0-&gt;eth1 or eth1-&gt;net1, 就在裡面改就好了.</p>
<p>不過總之他們就是改了, 說什麼安全的問題啦, firewall 設定啦.</p>
<p>只是改了之後, 大家討論了很久, 也 try 了很久.<br />
我也是這次因為一定要能動, 所以認真的研究了一下, 目前最安定的設定, 可以正確更改名稱的設定.<br />
1. 在 kernel command line 加上 net.ifnames=0, 這樣就會變原來的 eth0&#8230; blah blah , 可是原先的更改名稱方式還是不能用.</p>
<p>Gentoo 使用者可以改 Kernel Config, 關掉這個選掉</p>
<p>Gentoo Linux  &#8212;&gt;<br />
[ ]   Linux dynamic and persistent device naming (userspace devfs) support</p>
<p>2. 請參照 Gentoo 文件 <a href="http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&amp;chap=2#doc_chap4" target="_blank" rel="noopener">2.d. Network Interface Naming</a></p>
<pre># <span class="code-input">udevadm test-builtin net_id /sys/class/net/eth0 2&gt;/dev/null</span>
ID_NET_NAME_MAC=enxc80aa9429d76
ID_OUI_FROM_DATABASE=Quanta Computer Inc.

# <span class="code-input">vim /etc/udev/rules.d/70-net-name-use-custom.rules</span>
<span class="code-comment"># First one uses MAC information, and 70- number to be before other net rules</span>
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="c8:0a:a9:42:9d:76", NAME="lan0"

# <span class="code-input">vim /etc/udev/rules.d/76-net-name-use-custom.rules</span>
<span class="code-comment"># Second one uses ID_NET_NAME_PATH information, and 76- number to be between</span>
<span class="code-comment"># 75-net-*.rules and 80-net-*.rules</span>
SUBSYSTEM=="net", ACTION=="add", ENV{ID_NET_NAME_PATH}=="enp3s0", NAME="wifi0"</pre>
<p>這樣就可以成功了.</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/">udev 之後仍然想用原先的 network device rename 的方式修改 interface</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Upgrading udev from 171 (or older) to 197</title>
		<link>https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/</link>
					<comments>https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 01 Feb 2013 08:00:17 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[udev]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1379</guid>

					<description><![CDATA[<p>上次升到 udev + kernel 3.7.1, device 那邊怪怪的, 記錄一下, 以後碰到了可以查  [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/">Upgrading udev from 171 (or older) to 197</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>上次升到 udev + kernel 3.7.1, device 那邊怪怪的, 記錄一下, 以後碰到了可以查</p>
<p><span id="more-1379"></span></p>
<p># eselect news read 18<br />
2013-01-23-udev-upgrade<br />
  Title                     Upgrading udev from 171 (or older) to 197<br />
  Author                    Samuli Suominen <ssuominen @gentoo.org><br />
  Posted                    2013-01-23<br />
  Revision                  1<br />
Upgrading udev from 171 (or older) to 197 will require special attention:</p>
<p>&#8211; Remove udev-postmount from runlevels.</p>
<p>&#8211; The need of CONFIG_DEVTMPFS=y in the kernel; need to verify the fstype for<br />
  possible /dev line in /etc/fstab is devtmpfs (and not, for example, tmpfs)</p>
<p>&#8211; The case of predictable network interface names; if the file<br />
  /etc/udev/rules.d/70-persistent-net.rules is being used for renaming<br />
  network interface names to already existing names, then you need to<br />
  read following bug[1] because it&#8217;s no longer possible. This won&#8217;t<br />
  be a problem with the new predictable network interface name scheme[2].</p>
<p>  [1] http://bugs.gentoo.org/453494<br />
  [2] http://www.freedesktop.org/wiki/Software/systemd/<br />
      PredictableNetworkInterfaceNames</p>
<p>&#8211; Support for older kernels than 2.6.39 is dropped. If you need older kernel<br />
  we recommend you to look into sys-fs/eudev or use local overlay for keeping<br />
  the old ebuild. Remember to also get the distfiles where the patchsets are.<br />
  The upgrade into current stable version of gentoo-sources is recommended.</p>
<p>&#8211; The case of separate /usr; if it worked for you with 171 it will continue<br />
  to work for you with 197. We still recommend initramfs with separate /usr<br />
  mounting capabilities because you might need packages like sys-apps/kbd<br />
  (keymaps in /usr) or net-wireless/bluez (possible keyboard) in early boot.</p>
<p>And read every message printed by the emerge of udev and udev-init-scripts<br />
to ensure the system is in order before booting as this news item might<br />
not be complete.</p>
<p>Apologies if this news came too late for you.<br />
</ssuominen></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/">Upgrading udev from 171 (or older) to 197</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
