Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to update documentation on ipxe.org/docs?
2015-09-07, 13:02
Post: #4
RE: How to update documentation on ipxe.org/docs?
(2015-09-05 02:53)soltesz Wrote:  When booting a Linux kernel, any argument supplied to the initrd command will be used as the pathname for that image within the initial RAM filesystem. The initrd command also supports a mode= option for setting the permissions on a file added with the pathname argument. For example, if you have the script
Code:
#!ipxe
  
  kernel /boot/vmlinuz-2.6.31
  initrd initrd.img
  initrd /modules/2.6.31/e1000.ko /lib/modules/e1000.ko
  initrd /pubkeys/sshdebug.pub /root/.ssh/authorized_keys mode=0600    ## NEW
  boot

then the file initrd.img will be treated as a normal initramfs filesystem image, and the file e1000.ko will appear as an extra file /lib/modules/e1000.ko within this filesystem. The file authorized_keys will also appear with the specified mode. Every directory in the pathname must already exist in the original initrd.img for the file to be accessible after boot because iPXE does not create the directory hierarchy for a pathname argument.

Thank you for the suggestion. I think it could benefit from being made simpler:

- "The initrd command also supports..." sentence could be eliminated completely: it adds complexity before the example that many users will simply not need to care about. I try throughout the documentation to introduce the simple case first. The fact that the subsequent example includes a "mode=" argument is sufficient to illustrate the point: I don't think it needs to be introduced ahead of time.

- The phraseology could be more consistent, e.g. "..then the file initrd.img will be treated as a normal initramfs filesystem image, the file e1000.ko will appear as an extra file /lib/modules/e1000.ko within this filesystem, and the file sshdebug.pub will appear as an extra file /root/.ssh/authorized_keys within this filesystem." There is no functional difference between the e1000.ko and authorized_keys files, so there should be no difference in the way they are described.

- I would prefer an example of a file which is likely to exist within a random initrd.img that anyone might create. I chose /lib/modules for the original example since that directory is highly likely to exist in any initrd.img. Many initrd's will not have a /root/.ssh directory.

Thanks,

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to update documentation on ipxe.org/docs? - mcb30 - 2015-09-07 13:02



User(s) browsing this thread: 1 Guest(s)