Jump to content

- - - - -

Write some information to remote server.

grub4dos pxe pd write

  • Please log in to reply
4 replies to this topic

#1 Yaoming

  • Members
  • 2 posts

Posted 09 May 2013 - 12:21 PM



I have the following situation:


GRLDR is booted through the network, and in the config I'm looking for a menu.lst file, and when it's found I'm checking this file is OK. It is simple check, just:
cat --locate=somestringthatshouldbethere /menu.lst
Now i want to write some information somewhere on server that the string wasn't found (file was corrupted). I think it would be something like:
cat --locate=somestringthatshouldbethere /menu.lst || command_to_write_some_information_to_the server
How to write sth to the server? I'm asking, because i couldn't find any example in grub4dos documentation.

I'm new to the grub4dos, and will apppreciate any answer :)

#2 steve6375


    Platinum Member

  • Developer
  • 6881 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
    United Kingdom

Posted 09 May 2013 - 12:25 PM

I don't think you can write to a pxe server - PXE can read files from server but not write AFAIK.

Otherwise that would be dangerous and anyone would have access to server files (no authentication)?


You could write to a local disk using grub4dos...

#3 erwan.l


    Gold Member

  • Developer
  • 2447 posts
  • Location:Nantes - France

Posted 09 May 2013 - 01:17 PM

Hi There,


In theory a pxe server is a dhcp server + tftpd server.


TFTPD supports get's and put's.


The limitation I believe is more on the "client" part aka G4D or the tftp client in use.


Does the virtual (PD) G4D virtual device (not sure if this is the right wording there) supports writing?




#4 Yaoming

  • Members
  • 2 posts

Posted 14 May 2013 - 10:18 AM


Sorry, that I was not writing, but I've been away for a few days.


So, recently I was checking what can I do with the files on server from local grub4dos console.

I've checked that it it possible to write content of a file to console by using cat command - I've chosen a small file which is in the same directory as grldr file, to try that out:


cat (pd)/boot/somefile


And it worked out - I was able to see the file content.

Then I've tried to write an integer (zero) to that file using the write command:


write (pd)/boot/somefile 0


but there was an error:


Error 29: Disk write error


So it looks like writing to a server is forbidden. What do you think?

Maybe it could be made possible after some changes in ftpd server configuration.

Or maybe you have some other advice for me.

#5 erwan.l


    Gold Member

  • Developer
  • 2447 posts
  • Location:Nantes - France

Posted 14 May 2013 - 10:32 AM

I dont this this is the tftp server the issue but i could be wrong.

Unless you have explicitly forbidden write access on your tftpd server, this one will support read and write by default.

A tftpd server is pretty secureless.


Simple test : from your windows machine, try the following :

tftp put c:\boot.ini


replace with your tftp server ip of course.
you should then get something like (sorry in french...) :
Transfert réussi : 195 octets en 1 seconde, 195 octets/s


I would rather think that G4D does not support write onto the virtual (PD) device.

To be checked with G4D guys.



Also tagged with one or more of these keywords: grub4dos, pxe, pd, write

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users