3

If I clone my Linux system to other computers will this also clone the old MAC address to the new computers?


EDIT: due to the answer below

I really know what is a MAC address... And sure Linux is a matter since everything in Linux is a file and thus a network card is just a file inside Linux filesystem and thus cloning byte by byte also may clone this file to other pc's making the new pc have the same MAC address of Old.


Second Edit

The MAC address is outside the Linux FS but there is a udev rule for MAC address which will be cloned and thus override the read MAC in the new System.

What I mean if you open the file /etc/udev/rules.d/70-persistent-net.rules you can see:

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:19.0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.5/0000:09:00.0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Those are mine.

This file will be cloned to the new machine and thus it will override the real MAC and make the file system just read those MAC associated here instead of the real MAC.

2
  • A network card is not "just a file inside Linux filesystem" -- it exists outside Linux and will maintain its MAC address, even if you install a different operating system on the computer. Commented Mar 28, 2014 at 17:39
  • Yes sure it's outside but friend there is a rule for MAC address in the udev directory. This will be cloned and this will override the new MAC address. I've recently reach that and I'm now trying to solve it
    – Maythux
    Commented Mar 28, 2014 at 17:45

1 Answer 1

4

Your MAC address is a hardware identifier for network cards and as such has nothing to to with your Linux system. The answer is no.

https://en.wikipedia.org/wiki/MAC_address

2
  • I really know what is a MAC address... And sure Linux is a matter since everything in Linux is a file and thus a network card is just a file inside Linux filesystem and thus cloning byte by byte also may clone this file to other pc's making the new pc have the same MAC address of Old. So your answer is really illogical specially you are referencing to Wikipedia which is not confidential.
    – Maythux
    Commented Feb 22, 2014 at 10:30
  • Everything is a file to a certain point. All that concept means is that it is possible to access any object or device as a file, but that doesn't mean it inherently will carry over. Network cards are hard coded with said MAC address, but if you do override them, then yes, your MAC address will be the same on the other machines, but that simply means removing the overrides you made on the other machines.
    – DJ Chateau
    Commented Mar 28, 2014 at 17:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .