<?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>SysAdmin Adventures &#187; interfaces</title>
	<atom:link href="http://blog.tpa.me.uk/tag/interfaces/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tpa.me.uk</link>
	<description>Tech notes from a Systems Administrator</description>
	<lastBuildDate>Mon, 06 Sep 2010 12:57:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Migrating Slackware to New Hardware</title>
		<link>http://blog.tpa.me.uk/2009/12/03/migrating-slackware-to-new-hardware/</link>
		<comments>http://blog.tpa.me.uk/2009/12/03/migrating-slackware-to-new-hardware/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 16:51:37 +0000</pubDate>
		<dc:creator>Zordrak</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[interfaces]]></category>
		<category><![CDATA[migrating]]></category>
		<category><![CDATA[net]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[persistent]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[udev]]></category>

		<guid isPermaLink="false">http://blog.tpa.me.uk/?p=272</guid>
		<description><![CDATA[Sometimes it is necessary to retain a Slackware installation, but change the hardware it runs on:

Migrating to or from virtual hardware (VirtualBox, VMware etc)
Duplicating an installation across multiple new servers
Using temporary hardware to set up a new OS for a server to minimise downtime
Plain old hardware failure
etc.

Under many other Operating Systems, especially Windows, this can [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is necessary to retain a Slackware installation, but change the hardware it runs on:</p>
<ul>
<li>Migrating to or from virtual hardware (VirtualBox, VMware etc)</li>
<li>Duplicating an installation across multiple new servers</li>
<li>Using temporary hardware to set up a new OS for a server to minimise downtime</li>
<li>Plain old hardware failure</li>
<li>etc.</li>
</ul>
<p>Under many other Operating Systems, <em>especially</em> Windows, this can be painful and perhaps not even worth doing. As usual it is easy with Slackware.</p>
<p>In the simplest case (default install, default kernel, desktop environment) there&#8217;s literally nothing you need to do. Just put the disk or image in the new hardware and boot.</p>
<p>If you are using a custom kernel (<a href="http://blog.tpa.me.uk/slackware-kernel-compile-guide/">as you should be</a>) then you will need to create a new kernel and update lilo either before or after you do the migration. If you have any sense of self-preservation, your lilo config will include the default &#8220;huge&#8221; kernel and so the minimum you need to do is just boot the huge kernel on the new hardware, then you can go about making a new custom kernel later.</p>
<p><strong>The bit that will catch you out:</strong><br />
There is one thing that might make you stumble: you moved the installation, booted up and all is well.. but the network isn&#8217;t working. You run `ifconfig -a` and find your two network interfaces are now called eth2 and eth3 and neither is configured.. &#8220;What&#8217;s going on?&#8221;, you ask. The answer is udev.</p>
<p>udev knows that your two new network interfaces are different to your old ones because they have different MAC addresses and decides you might not want to have them configured the same; perhaps you are going to swap in the old cards later and have four, so it reserves the previously used &#8220;ethX&#8221; labels in case it sees those cards again.</p>
<p>Since you are migrating to new hardware, you want it to forget about your previous network interfaces and re-use the labels with your new hardware. Head to <em>/etc/udev/rules.d</em> and find the file called 70-persistent-net.rules. Take a look at it.. it should look something like this:</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># This file was automatically generated by the //lib/udev/write_net_rules</span><br />
<span style="color: #666666; font-style: italic;"># program, run by the persistent-net-generator.rules rules file.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># You can modify it, as long as you keep each rule on a single</span><br />
<span style="color: #666666; font-style: italic;"># line, and change only the value of the NAME= key.</span><br />
<br />
<span style="color: #666666; font-style: italic;"># PCI device 0x10de:0x0373 (forcedeth)</span><br />
<span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;00:18:f3:7c:75:31&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, <span style="color: #007800;">KERNEL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># PCI device 0x10de:0x0373 (forcedeth)</span><br />
<span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;00:18:f3:7c:75:32&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, <span style="color: #007800;">KERNEL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># PCI device 0x10de:0x0373 (forcedeth)</span><br />
<span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;00:18:f3:7c:75:b7&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, <span style="color: #007800;">KERNEL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth2&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># PCI device 0x10de:0x0373 (forcedeth)</span><br />
<span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;00:18:f3:7c:75:b8&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, <span style="color: #007800;">KERNEL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth3&quot;</span></div></div>
<p>See how it has an entry for both the old interfaces and the new ones? That&#8217;s what&#8217;s meant by <em>persistent net rules</em>. If you moved to a new machine again, it would add the two new interfaces as eth4 and eth5.</p>
<p>You have two choices for fixing the situation:</p>
<ol>
<li>Delete the file. It will be re-created on next boot and start again from eth0.</li>
<li>Manually modify the file to reflect the configuration you want.</li>
</ol>
<p><em>Note: There is also a 70-persistent-cd.rules file that it&#8217;s worth keeping an eye on during hardware migration, but usually it&#8217;s only the net rules that actually cause people problems.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tpa.me.uk/2009/12/03/migrating-slackware-to-new-hardware/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
