It has been itching my head for a while, "why my Slackware UML guest OS gets different eth device name everytime it boots?". It's always incremented e.g first boot I got eth0, later I got eth1 and so on. For note: I didn't build the Slackware by myself, I downloaded from somewhere. Maybe it's uml.harlowill.com or something, sorry I couldn't recall. One thing for sure, it's Slackware 12.0
Previously, I absolutely had no idea why it happened. But lately I was thinking it could be something with udev (after all, it is the one which deals with device file, right?).
Let's boot the UML guest one more time and find out what we could dig. Note that I use the following parameter when I invoke the guest:
eth0=tuntap,tap0
Guest boots up and login prompt shows up. udev should put its configuration under /etc/udev or something alike, so let's dive. Found it, it's in /etc/udev/rules.d/75-network-devices.rules. Here is the snippet that explains my headache:
KERNEL=="eth?", ATTR{address}=="4e:82:25:ae:b1:bb", NAME="eth0"
I see the correlation now. If I don't specificly declare the MAC address of the ethernet device my UML guest will use, UML will pick one randomly. And udev inside the guest will think it's a different ethernet device.
Finally, simple solution. Put that MAC address as part of "eth" parameter:
eth0=tuntap,tap0,4e:82:25:ae:b1:bb
Now I get consistent naming!
PS: Looks like my "research" insting is back. Hopefully, it will stay inside me for long time....
regards,
Mulyadi.
A place where I share my daily experience in both technical and non technical issues. Expect to read Linux kernel related posts too.
Subscribe to:
Post Comments (Atom)
How to execute multiple commands directly as ssh argument?
Perhaps sometimes you need to do this: ssh user@10.1.2.3 ls It is easy understand the above: run ls after getting into 10.1.2.3 via ssh. Pi...
-
Ever saw something like below messages inside your KVM (Kernel Virtual Machine) guest's console? " BUG: soft lockup - CPU#0 stuck f...
-
Quick summary first: use gcc -save-temps ! Ever dig into Qemu (qemu.org) source code? OK, I assume you ever did that at least once... may ...
-
Dear readers This time I met interesting case, thus I think it is worth sharing it with you all. But first, big disclaimer. I AM NOT FREE ...
2 comments:
ive got "exactly" same problem with gentoo before (after upgrading my udev version), and i have to delete other entries and "hardcoded" udev net rules :).. yaay
me too :) i solved it the same way
Post a Comment