[sles-beta] SLES12 Beta1 : Problem concerning NIC naming with autoyast
Christoph Schumacher
Christoph.Schumacher at porsche.de
Wed Mar 5 02:56:33 MST 2014
Hi,
That's what i asked earlier.
That'll work, but is there/will there be a "nicer" way by doing it with
autoyast itself?
Dipl.-Inf. Christoph Schumacher
FAI5 Competence Center Dezentrale Server
Dr. Ing. h.c. F. Porsche AG
Porscheplatz 1, D-70435 Stuttgart Zuffenhausen
Telefon: +49 (0)711/911-23729
Fax: +49 (0)711/911-23171
E-Mail: christoph.schumacher at porsche.de
From: "Bienwald, Martin" <martin.bienwald at sap.com>
To: "'urs.frey at post.ch'" <urs.frey at post.ch>,
"sles-beta at lists.suse.com" <sles-beta at lists.suse.com>
Date: 05/03/2014 10:39
Subject: Re: [sles-beta] SLES12 Beta1 : Problem concerning NIC
naming with autoyast
Sent by: sles-beta-bounces at lists.suse.com
Hi,
Actually, you can do HW detection in a “pre-script” and then change the
autoinst.xml accordingly. Something like this:
<interfaces config:type="list">
<interface>
<bootproto>static</bootproto>
<device>NIC_NAME</device>
<ipaddr>10.1.100.167</ipaddr>
<netmask>255.255.254.0</netmask>
<startmode>auto</startmode>
</interface>
</interfaces>
[…]
<scripts>
<pre-scripts config:type="list">
<script>
<source><![CDATA[
NICNAME=`ip a s | grep ^[0-9]: | grep -v LOOPBACK | head -1 |
cut -d: -f2 | sed 's/ //'`
sed "s/NIC_NAME/$NICNAME/" /tmp/profile/autoinst.xml >
/tmp/profile/modified.xml
]]>
</source>
<interpreter>shell</interpreter>
<filename>changeprofile.sh</filename>
</script>
</pre-scripts>
</scripts>
At least you could do that in SLES10 and SLES11. See
https://www.suse.com/documentation/sles11/singlehtml/book_autoyast/book_autoyast.html#createprofile.scripts
Regards, Martin
From: sles-beta-bounces at lists.suse.com [
mailto:sles-beta-bounces at lists.suse.com] On Behalf Of urs.frey at post.ch
Sent: Wednesday, March 05, 2014 10:19 AM
To: sles-beta at lists.suse.com
Subject: [sles-beta] SLES12 Beta1 : Problem concerning NIC naming with
autoyast
Hello all
I wonder what the naming rule for the NIC names really is.
Does the NIC name depend on HW / driver?
Does the NIC name depend on the position on the PCI bus?
Background:
I am trying to install SLES12 Beta1 using autoyast.
In my autoinst.xml profile, I would like to put in a name for the first
NIC on my server.
Because I have to prepare my autoinst.xml before I can do a HW detection
on my server I run into a “hen – egg” problem:
“What to put in my autoinst.xml under <interface> … <device> ??”
<interfaces config:type="list">
<interface>
<bootproto>static</bootproto>
<device>NIC_NAME????</device>
<ipaddr>10.1.100.167</ipaddr>
<netmask>255.255.254.0</netmask>
<startmode>auto</startmode>
</interface>
</interfaces>
Until today I could safely enter “eth0” and I was quite sure to configure
the first NIC nevertheless on what HW or platform I was installing with
autoyast.
(yes I remember the old days under sles10 where I had to put in eth-MAC !)
When I am looking on my HP ProLiant DL380-G7 I can see these names
h063ur:~ # lspci | grep Ethernet
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709
Gigabit Ethernet (rev 20)
03:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709
Gigabit Ethernet (rev 20)
04:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709
Gigabit Ethernet (rev 20)
04:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709
Gigabit Ethernet (rev 20)
h063ur:~ # ifconfig -a | grep Ethernet
enp3s0f0 Link encap:Ethernet HWaddr D8:D3:85:FE:4D:1E
enp3s0f1 Link encap:Ethernet HWaddr D8:D3:85:FE:4D:20
enp4s0f0 Link encap:Ethernet HWaddr D8:D3:85:FE:4D:22
enp4s0f1 Link encap:Ethernet HWaddr D8:D3:85:FE:4D:24
h063ur:~ #
But /etc/udev/rules.d/70-persistent-net.rules file is empty
h063ur:~ # cat /etc/udev/rules.d/70-persistent-net.rules
h063ur:~ # ls -l /etc/udev/rules.d/70-persistent-net.rules
-rw-r--r-- 1 root root 0 Mar 3 16:33
/etc/udev/rules.d/70-persistent-net.rules
h063ur:~ #
On VMWare ESXi Client SLES12 Beta1 I can see this name
v03er9:~ # lspci | grep Ethernet
02:00.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet
Controller (Copper) (rev 01)
v03er9:~ # ifconfig -a | grep Ethernet
ens32 Link encap:Ethernet HWaddr 00:50:56:B7:02:A9
v03er9:~ #
v03er9:~ # ls -lsa /etc/udev/rules.d/
total 4
0 drwxr-xr-x 2 root root 80 Feb 15 18:36 .
0 drwxr-xr-x 3 root root 128 Mar 5 10:55 ..
4 -rw-r--r-- 1 root root 458 Jan 13 07:35 70-kdump.rules
v03er9:~ #
Conclusion
I know the MAC of my NIC I want to install on and configure.
But I do not know the final name.
So the entire autoyast process is not complete until I can use a generic
name, MAC or some other way to have my NIC configured in an automated way.
Thank you for sharing your ideas and feedback
Best regards
Urs Frey
Post CH AG
Informationstechnologie
IT Betrieb
Webergutstrasse 12
3030 Bern (Zollikofen)
Telefon : ++41 (0)58 338 58 70
FAX : ++41 (0)58 667 30 07
E-Mail: urs.frey at post.ch
_______________________________________________
sles-beta mailing list
sles-beta at lists.suse.com
http://lists.suse.com/mailman/listinfo/sles-beta
Dr. Ing. h.c. F. Porsche Aktiengesellschaft
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart HRB-Nr. 730623
Vorsitzender des Aufsichtsrats: Dr. Wolfgang Porsche
Vorstand: Matthias Müller, Vorsitzender
Thomas Edig, stv. Vorsitzender
Dr. Oliver Blume, Wolfgang Hatz, Bernhard Maier, Lutz Meschke, Uwe-Karsten Städter
Die vorgenannten Angaben werden jeder E-Mail automatisch hinzugefügt. Dies ist kein Anerkenntnis,
dass es sich beim Inhalt dieser E-Mail um eine rechtsverbindliche Erklärung der Porsche AG handelt.
Erklärungen, die die Porsche AG verpflichten, bedürfen jeweils der Unterschrift durch zwei zeichnungs-
berechtigte Personen der AG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.suse.com/mailman/private/sles-beta/attachments/20140305/6ea5788e/attachment.htm>
More information about the sles-beta
mailing list