{"id":2031,"date":"2008-09-23T12:00:03","date_gmt":"2008-09-23T09:00:03","guid":{"rendered":"http:\/\/mummila.net\/swirling\/?p=49"},"modified":"2008-09-23T12:00:03","modified_gmt":"2008-09-23T09:00:03","slug":"how-to-change-mac-address-while-installing-lenny","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2008\/09\/23\/how-to-change-mac-address-while-installing-lenny\/","title":{"rendered":"How to change MAC address while installing Lenny"},"content":{"rendered":"<p>(<a href=\"http:\/\/mummila.net\/nuudelisoppa\/?p=1786\">I&#8217;m reposting this<\/a> from my other, more generic blog.)<\/p>\n<p>It&#8217;s easy enough to <a href=\"http:\/\/www.howtogeek.com\/howto\/ubuntu\/change-your-network-card-mac-address-on-ubuntu\/\">change your network adapter&#8217;s MAC address<\/a> once you have a Debian\/Ubuntu system installed, but I needed to do this from within the Debian installer (Lenny beta 2), and it took me a while to figure out how. So I&#8217;m making a note of it for my own future reference, and maybe someone googling for the phrases I initially did will find this helpful.<\/p>\n<p>So here&#8217;s the problem: my NIC&#8217;s default MAC address is (say) <code>01:02:03:04:05:06<\/code>, and for one reason or another, I need it to be <code>06:05:04:03:02:01<\/code> instead. Furthermore, I need this change to be in effect while I&#8217;m inside Lenny&#8217;s installer, so <code>ifconfig<\/code> is not available. Here&#8217;s how I did it:<\/p>\n<ol>\n<li>From the installer&#8217;s boot menu, select <code>Advanced options<\/code>, and <code>Expert install<\/code>.<\/li>\n<li>Work your way down the steps as needed, starting from the top, until you&#8217;ve gone through <code>Detect network hardware<\/code>. Instead of the next one (<code>Configure the network<\/code>), pick <code>Execute a shell<\/code> from further down the menu.<\/li>\n<li>In the shell you can check your network interface status with<br \/>\n<blockquote>\n<pre><code># ip link show eth0<\/code><\/pre>\n<\/blockquote>\n<p>You might use <code>eth1<\/code> or some other port instead of <code>eth0<\/code>, but I haven&#8217;t done this with anything other than the one NIC I had in the setup, and so haven&#8217;t used anything besides <code>eth0<\/code>.<\/p>\n<p>In my case, entering the command gives the following output:<\/p>\n<blockquote>\n<pre><code>2: eth0:  mtu 1500 qdisc noop qlen 1000\n    link\/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff<\/code><\/pre>\n<\/blockquote>\n<\/li>\n<li>Next, the spell you&#8217;ve been waiting for. Let&#8217;s change that MAC address!<br \/>\n<blockquote>\n<pre><code># ip link set eth0 addr 06:05:04:03:02:01<\/code><\/pre>\n<\/blockquote>\n<p>If all goes well, <code>ip<\/code> won&#8217;t say anything. Re-run the &#8216;<code>show<\/code>&#8216; command listed in the previous point to see that it actually worked.<\/li>\n<li>Type <code>exit<\/code> to return to the installer.<\/li>\n<li>Now you pick up from <code>Configure the network<\/code>, and proceed installing from there.<\/li>\n<\/ol>\n<p>One last point: the changed MAC address won&#8217;t survive the reboot finalizing the installation, so if you want to make it permanent, you&#8217;ll want to set it after the first boot into your new system, by using the method I linked to in the beginning (editing <code>\/etc\/network\/interfaces<\/code>). Or you could to do it from the installer, using <code>nano<\/code> (in <code>busybox<\/code>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s easy enough to change your network adapter&#8217;s MAC address once you have a Debian\/Ubuntu system installed, but I needed to do this from within the Debian installer (Lenny beta 2), and it took me a while to figure out how. So I&#8217;m making a note of it for my own future reference, and maybe someone googling for the phrases I initially did will find this helpful.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[3084],"class_list":["post-2031","post","type-post","status-publish","format-standard","hentry","tag-command-line"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/2031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/comments?post=2031"}],"version-history":[{"count":0,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/2031\/revisions"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=2031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=2031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=2031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}