[SLOF] [PATCH v2 07/11] libnet: Wire up pxelinux.cfg network booting

Thomas Huth thuth at redhat.com
Fri May 25 17:29:34 AEST 2018


On 25.05.2018 09:08, Alexey Kardashevskiy wrote:
> On 19/5/18 1:45 am, Thomas Huth wrote:
>> In case the normal network loading failed, try to load a pxelinux.cfg
>> config file. If that succeeds, load the kernel and initrd with the
>> information that could be found in this file.
> 
> Without that, my test setup would report error like this:
> 
> 
> Trying to load:  from: /pci at 800000020000000/ethernet at 1 ...
>  Initializing NIC
>   Reading MAC address from device: c0:41:49:4b:00:30
>   Requesting information via DHCP: done
>   Using IPv4 address: 10.61.191.48
>   Requesting file "image.aiktest48" via TFTP from 10.61.2.7
>   Receiving data:  0 KBytes
> E3009 (net) file not found: image.aiktest48
> 
> E3407: Load failed
> 
> 
> 
> With this patch applied:
> 
> Trying to load:  from: /pci at 800000020000000/ethernet at 1 ...
>  Initializing NIC
>   Reading MAC address from device: c0:41:49:4b:00:30
>   Requesting information via DHCP: done
>   Using IPv4 address: 10.61.191.48
>   Requesting file "image.aiktest48" via TFTP from 10.61.2.7
>   Receiving data:  0 KBytes
> E3009 (net) file not found: image.aiktest48
> Trying pxelinux.cfg files...
>   TFTP error: TFTP buffer of 2047 bytes is too small for pxelinux.cfg/default
> 
> E3407: Load failed
> 
> 
> this is because....
[...]
>> @@ -689,6 +744,10 @@ int netload(char *buffer, int len, char *args_fs, int alen)
>>  	/* Do the TFTP load and print error message if necessary */
>>  	rc = tftp_load(&fn_ip, buffer, len);
>>  
>> +	if (rc <= 0 && !obp_tftp_args.filename[0]) {
> 
> .... obp_tftp_args.filename == "" in this particular case as tftp_load()
> does not seem to store the filename if loading fails.
> 
>> +		rc = net_pxelinux_cfg_load(&fn_ip, buffer, len, own_mac);
>> +	}

Sorry, I don't quite understand what you want to say here?

How big is your pxelinux.cfg/default file in this case? Was it smaller
than 2047 bytes, so that the above error message is not right? Or do
you rather complain that SLOF is trying to boot via pxelinux at all in
case you've set a bootfile name?

 Thomas


More information about the SLOF mailing list