Specify MAC address in kickstart

Jason Kohles email at jasonkohles.com
Wed Oct 24 18:28:41 UTC 2007


On Oct 24, 2007, at 9:41 AM, Harry Hoffman wrote:

> While I'm not 100% sure, I think you may be able to accomplish this  
> via boot parameters
>
> 'man bootparam' shows that ethernet devices can be assigned based  
> upon IO and IRQ:
> ether=irq,iobase[,param_1[,...param_8]],name
> ether=0,0,eth1
>
> This would, of course, require you to know the io address and the  
> interrupt but it sounds doable.
>
> If you decide to go this route I'd be curious to hear how it works.
>
On newer hardware it doesn't work at all, in modern hardware (after  
the mid-90s), the BIOS assigns the IO and IRQ at boot time, so you  
can't reliably predict what it will be in order to pass it on the  
command line.  Also the arguments to ether= can vary depending on the  
driver being used for the card.

On top of all that, ether= has been deprecated as of kernel 2.6.10.

You can change the device name at run time though, with ip:

ip link set eth0 name eth1

but putting HWADDR in network-scripts/ifcfg-* does this for you, and  
you don't have to figure out which ones are wrong in order to change  
them.

> Cheers,
> Harry
>
>
> Jason Kohles wrote:
>> On Oct 24, 2007, at 9:04 AM, Vimal Kumar wrote:
>>
>>> Hello,
>>>
>>> I had a query from a customer who has four network interfaces in  
>>> his server and while doing a kickstart, he want interfaces with  
>>> particular MAC addresses get assigned the name eth0, eth1 etc..
>>>
>>> ie.. He wants the interface with MAC '00:14:5E:B3:56:F4' be eth0,  
>>> interface with MAC '00:14:5E:A7:0B:B8' be eth1 and so on..
>>>
>>> I was only able to locate the directives for the 'network'  
>>> section in kickstart, specified below. Are there any directives  
>>> available to configure MAC addresses or is there a work around  
>>> for this.
>>>
>> The only way to do configuration that kickstart can't do directly,  
>> is to write the configuration files yourself from a %post script
>>
>> %post
>> cat <<END > /etc/sysconfig/network-scripts/ifcfg-eth0
>> DEVICE=eth0
>> BOOTPROTO=static
>> HWADDR= 00:14:5E:B3:56:F4
>> IPADDR=192.168.0.1
>> NETMASK=255.255.255.0
>> ONBOOT=yes
>> END
>>
>> cat <<END > /etc/sysconfig/network-scripts/ifcfg-eth1
>> DEVICE=eth0
>> BOOTPROTO=static
>> HWADDR= 00:14:5E:A7:0B:B8
>> IPADDR=192.168.1.1
>> NETMASK=255.255.255.0
>> ONBOOT=yes
>> END
>>
>> --Jason Kohles
>> email at jasonkohles.com
>> http://www.jasonkohles.com/
>> "A witty saying proves nothing."  -- Voltaire
>>
>>
>> _______________________________________________
>> Kickstart-list mailing list
>> Kickstart-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/kickstart-list
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>

-- 
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire





More information about the Kickstart-list mailing list