[PATCH anaconda-dracut] Fix ksdevice=<MAC> - instead of renaming the device to ksdev0 just use it

Will Woods wwoods at redhat.com
Sat Feb 23 00:46:50 UTC 2013


The patch (and the documented behavior) all looks fine to me, with one
note below:

On Thu, 2013-02-21 at 13:57 +0100, Radek Vykydal wrote:
> ksdevice option doesn't work in f17 and f18.
> 
> It used to specify which network device to activate in early stage of
> installation, eg. to fetch kickstart or installation image.
> 
> In F17 and F18 the device should be specified by dracut option ip=
> 
> Mapping of ksdevice options from loader to dracut options used in
> F17 and F18:
> 
> - ksdevice missing (and network is required)
> loader: user was asked in UI in case of more devices present
> dracut: activates all devices if not specified
> 
> - ksdevice=eth0
> loader: eth0 is activated
> dracut: specify device in ip=, eg
>         ip=eth0:dhcp
>         ip=10.34.39.44::10.34.39.254:255.255.255.0::eth0:none
> 
> - ksdevice=00:12:34:56:78:9a
> loader: device with MAC address is activated
> dracut: We translate it to ifname=ksdev0:00:12:34:56:78:9a which renames
>         the device.
>         It is possible to use BOOTIF=00-12-34-56-78-9a, which this patch
>         does.
> 
> - ksdevice=link
> loader: first device with link found is activated
> dracut: no way to achive this (activate single unspecified device)?

Like it said in the code before, I believe the default behavior matches
ksdevice=link. See if you can follow the logic:

1. If you don't specify a device, dracut tries to bring them *all* up.
2. The first device that comes online is used to grab the kickstart.

Therefore:

* If you only have one device with link, that one will be used
* If you have multiple devices with link, one of them will be used
  - Exactly which device comes online first is undefined and may vary

(for anaconda-dracut, whichever comes online fastest wins.)

Now let's look at loader's behavior when using "ksdevice=link":

* If you only have one device with link, that one will be used
* If you have multiple devices, the "first device" will be chosen
  - Exactly which device is listed first is undefined and may vary

(for loader, whichever device was enumerated first by the kernel wins.)

So, unless there actually does exist some definition of loader's
required behavior when using "ksdevice=link" with multiple devices, I
think anaconda-dracut's default behavior matches the expected behavior
there, and the warning should probably mention that so people don't
think we've lost that functionality.

-w



More information about the anaconda-patches mailing list