grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bootp: set is_def while processing dhcp ack


From: Andrei Borzenkov
Subject: Re: [PATCH] bootp: set is_def while processing dhcp ack
Date: Wed, 16 Mar 2016 14:13:27 +0300

On Wed, Mar 16, 2016 at 2:00 PM, Nikunj A Dadhania
<address@hidden> wrote:
>>>
>>> Thats what we are using in this current case, booting from the disk,
>>> and the grub.cfg has a netboot entry.
>>>
>>> menuentry 'Linux dev netboot' --class os {
>>>      insmod net
>>>      insmod ofnet
>>>      insmod tftp
>>>
>>>      net_bootp
>>>
>>>      echo 'Network status: '
>>>      net_ls_cards
>>>      net_ls_addr
>>>      net_ls_routes
>>>
>>>      echo 'Loading Linux ...'
>>>      linux  (tftp)/ubuntu-installer/ppc64el/vmlinux tasks=standard 
>>> pkgsel/language-pack-patterns= pkgsel/install-language-support=false --- 
>>> quiet
>>>      initrd     (tftp)/ubuntu-installer/ppc64el/initrd.gz
>>> }
>>>
>>
>> OK, so you attempt to configure everything. The first obvious question
>> is - *which* interface should now become default?
>
> In this case I only had one interface. So thats the default.
>
>> Your patch would make them compete, whoever is the last would win.
>
> Oh ok. Will "net_bootp" try all the interfaces ?
>

Yes. It is even documented :)

>> We would need to define some mechanism to designate interface as "default" 
>> here.
>>
>>>> server is stored in environment variable net_<if>_dhcp_server_name;
>>>> you are free to use it as needed, e.g. set $root and $prefix.
>>>>
>>
>> You can already fetch this information from environment. Something like
>>
>> for i in 0 1 2 3 4 5; do
>>   eval "set ip=\$net_ofnet${i}_dhcp_server"
>>   if [ -n "$ip" ]; then
>>     set boot_from=tftp,$ip
>>     break
>>   fi
>> done
>>
>
> Thanks, will try this out.
>
>> And later use ($boot_from) everywhere.
>
> Regards
> Nikunj
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]