{"id":1786,"date":"2008-09-16T07:06:37","date_gmt":"2008-09-16T04:06:37","guid":{"rendered":"http:\/\/mummila.net\/nuudelisoppa\/?p=1786"},"modified":"2010-09-23T17:02:43","modified_gmt":"2010-09-23T14:02:43","slug":"debian-lenny-how-to-change-mac-address-while-installing","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2008\/09\/16\/debian-lenny-how-to-change-mac-address-while-installing\/","title":{"rendered":"Debian (Lenny): How to change MAC address while installing"},"content":{"rendered":"<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>.<br \/>\n  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>).<\/li>\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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-1786","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-open-source"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/1786","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=1786"}],"version-history":[{"count":1,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/1786\/revisions"}],"predecessor-version":[{"id":2383,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/1786\/revisions\/2383"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=1786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=1786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=1786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}