Hi, On 01/16/2015 12:19 AM, Sebastian Herbszt wrote:> Andreas Gruenbacher wrote: >> "Loading <FILE>... failed: No such file or directory" when the TFTP >> server replies with "Permission denied" for the kernel or initrd. > [...] > > The (almost untested) patch below should fix this.hmm, probably close but I still get the same "No such file or directory" error message. Also, should error codes other than 1 (File not found) and 2 (Access violation) not be mapped to something like EIO and not ENOENT? Thanks, Andreas
On 01/16/2015 01:44 AM, Andreas Gruenbacher wrote:> Hi, > > On 01/16/2015 12:19 AM, Sebastian Herbszt wrote: >> Andreas Gruenbacher wrote: >>> "Loading <FILE>... failed: No such file or directory" when the TFTP >>> server replies with "Permission denied" for the kernel or initrd. >> [...] >> >> The (almost untested) patch below should fix this. > > hmm, probably close but I still get the same "No such file or directory" > error message. Also, should error codes other than 1 (File not found) > and 2 (Access violation) not be mapped to something like EIO and not > ENOENT? >You would think, but that would depend on TFTP servers being consistent in this. -hpa
Hello Andreas, Andreas Gruenbacher wrote:> Hi, > > On 01/16/2015 12:19 AM, Sebastian Herbszt wrote: > > Andreas Gruenbacher wrote: > >> "Loading <FILE>... failed: No such file or directory" when the TFTP > >> server replies with "Permission denied" for the kernel or initrd. > > [...] > > > > The (almost untested) patch below should fix this. > > hmm, probably close but I still get the same "No such file or directory" > error message.which tftp server are you using? It seems to send error code 0 on EACCES instead of 2.> Also, should error codes other than 1 (File not found) > and 2 (Access violation) not be mapped to something like EIO and not ENOENT?We have the following possible error codes from RFC 1350 0 Not defined, see error message (if any). 1 File not found. 2 Access violation. 3 Disk full or allocation exceeded. 4 Illegal TFTP operation. 5 Unknown transfer ID. 6 File already exists. 7 No such user. and 8 ("OACK failure") from RFC 1782. I am not sure which ones are relevant for pxelinux. Maybe just map them to EIO. Sebastian
Hi, On 01/17/2015 12:57 AM, Sebastian Herbszt wrote:>> On 01/16/2015 12:19 AM, Sebastian Herbszt wrote: >>> Andreas Gruenbacher wrote: >>>> "Loading <FILE>... failed: No such file or directory" when the TFTP >>>> server replies with "Permission denied" for the kernel or initrd. >>> [...] >>> >>> The (almost untested) patch below should fix this. >> >> hmm, probably close but I still get the same "No such file or directory" >> error message. > > which tftp server are you using? It seems to send error code 0 on EACCES > instead of 2.The last version I have tries was tftp-server-5.2-15.fc21.x86_64; it replies with an ErrorCode of 0 and "Permission denied" as ErrMsg. Is it important to get this fixed? Do other tftp server get this right?>> Also, should error codes other than 1 (File not found) >> and 2 (Access violation) not be mapped to something like EIO and not ENOENT?I think it makes sense to distinguish between error codes 1, 2, and everything else here: 1 "File not found" -> ENOENT 2 "Access Violation" -> EACCES Everything else -> EIO (or similar) If the server provides an ErrMsg, reporting that seems to make sense as well; at least it would have helped me in this case. Thanks, Andreas