LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-10-2024, 11:16 AM   #1
boomerang
LQ Newbie
 
Registered: May 2024
Posts: 2

Rep: Reputation: 0
tftp transaction in UEFI shell states "too few arguments"


Hello, I am an ultra-beginner to UEFI world.
I was trying to setup a way to transfer the files from a server (running Linux) to a client setup (running UEFI shell).
I was able to ping server's IP address from the client setup and vice-versa.
I installed tftpserver on server.

Code:
[╗~ || $>  cat  /etc/default/tftpd-hpa
/etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"
And I have a file abc.txt in /srv/tftp.

Code:
[╗~ || $> ls /srv/tftp
abc.txt
From UEFI shell of client, I am trying to download the file from server.
And I have `tftp.efi` created in UEFI shell of client setup.

Code:
FS0:\network\> ls
Directory of: FS0:\network\
05/03/2024  14:39 <DIR>        16,384  .
05/02/2024  16:45 <DIR>             0  ..
05/03/2024  14:38              53,056  http.efi
05/03/2024  14:38              43,712  tftp.efi
          2 File(s)      96,768 bytes
FS0:\network\> (s)

FS0:\network\> tftp 10.7.71.53 abc.txt
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
tftp: Too few arguments
For some reason, this error does not go away.
I tried other options mentioned in `tftp -?` but in vain.
Any help to break-through is highly appreciated. Thank you!
 
Old 05-11-2024, 10:44 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,722

Rep: Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738Reputation: 2738
There are different TFTP clients, but the one I use requires three parameters.
The form is
Code:
tftp server command object
where the server is the IP address of the host, command is usually "get" or "put", and the object is a file name. Another command is "status", which might be of some use to you.

Generally it is a good idea to look these things up BEFORE you use the application. Saves time in the long run.
 
Old 05-11-2024, 11:52 AM   #3
boomerang
LQ Newbie
 
Registered: May 2024
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by wpeckham View Post
There are different TFTP clients, but the one I use requires three parameters.
The form is
Code:
tftp server command object
where the server is the IP address of the host, command is usually "get" or "put", and the object is a file name. Another command is "status", which might be of some use to you.

Generally it is a good idea to look these things up BEFORE you use the application. Saves time in the long run.
Thank you wpeckham.
I did look into the help of `tftp` binary (there is no status command in this version).

Code:
FS0:\network\> tftp 10.7.71.53 get abc.txt
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
ASSERT [tftp] /u/aydas/last/edk2/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c(97): ((BOOLEAN)(0==1))
tftp: Too few arguments

FS0:\network\> ping 10.7.71.53
Ping 10.7.71.53 16 data bytes.
16 bytes from 10.7.71.53 : icmp_seq=1 ttl=0 time=243~252ms
16 bytes from 10.7.71.53 : icmp_seq=2 ttl=0 time=243~252ms
16 bytes from 10.7.71.53 : icmp_seq=3 ttl=0 time=243~252ms
16 bytes from 10.7.71.53 : icmp_seq=4 ttl=0 time=243~252ms

4 packets transmitted, 4 received, 0% packet loss, time 972ms

FS0:\network\>
And the help of `tftp -?` seems pretty straightforward.

Code:
FS0:\network\> tftp -?
Download a file from TFTP server.

TFTP [-i interface] [-l <port>] [-r <port>] [-c <retry count>] [-t <timeout>]
     [-s <block size>] [-w <window size>] host remotefilepath [localfilepath]

  -i interface     - Specifies an adapter name, i.e., eth0.
  -l port          - Specifies the local port number. Default value is 0
                     and the port number is automatically assigned.
  -r port          - Specifies the remote port number. Default value is 69.
  -c <retry count> - The number of times to transmit request packets and
                     wait for a response. The default value is 6. Set to zero
                     also means to use the default value.
  -t <timeout>     - The number of seconds to wait for a response after
                     sending a request packet. Default value is 4s.
  -s <block size>  - Specifies the TFTP blksize option as defined in RFC 2348.
                     Valid range is between 8 and 65464, default value is 512.
  -w <window size> - Specifies the TFTP windowsize option as defined in RFC 7440.
                     Valid range is between 1 and 64, default value is 1.
  host             - Specify TFTP Server IPv4 address.
  remotefilepath   - TFTP server file path to download the file.
  localfilepath    - Local destination file path.

NOTES:
FS0:\network\> ommand allows to get the file specified by its 'remotefilepath'
     path from the TFTP server specified by its 'host' IPv4 address. If the
     optional 'localfilepath' parameter is provided, the downloaded file is
     stored locally using the provided file path. If the local file path is
     not specified, the file is stored in the current directory using the file
     server's name.
  2. Before using the TFTP command, the network interface intended to be
     used to retrieve the file must be configured. This configuration may be
     done by means of the 'ifconfig' command.
  3. If a network interface is defined with the '-i' option then only this
     interface will be used to retrieve the remote file. Otherwise, all network
     interfaces are tried in the order they have been discovered during the
     DXE phase.

EXAMPLES:
  * To get the file "dir1/file1.dat" from the TFTP server 192.168.1.1 and
    store it as file2.dat in the current directory :
    fs0:\> tftp 192.168.1.1 dir1/file1.dat file2.dat
Like I said, I tried all the other options (to specify the interface using `-i` etc.).
Those returned the same error.

I believe `tftp` binary in UEFI gives wrong error for other issue - which I am not able to figure out.
 
Old 05-11-2024, 03:09 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,010

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Can you pxe boot to some environment instead of trying to expect that stupid uefi to be written correctly?

Might be able to ilo to the nic card?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
UEFI Class 3 :: To use UEFI, or not to use UEFI? jheengut Slackware 19 12-30-2020 09:24 AM
LXer: My Nerd Life: Too Loud, Too Funny, Too Smart, Too Fat LXer Syndicated Linux News 0 01-24-2014 05:21 AM
LXer: Open States gathers legislative data from all 50 states LXer Syndicated Linux News 0 02-21-2013 11:00 AM
too few arguments to function 'register_sysctl_table' Richard.Yang Linux - Kernel 2 07-31-2009 08:31 AM
2.4 too few arguments Problem thomas55 Linux From Scratch 5 11-29-2005 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration