I posted <a href="http://forum.ipxe.org/showthread.php?tid=3730">this</a> in the iPXE forum and was directed to try the dev mailing list.<div><br></div><div>While messing around with iPXE loading multiple initrd files I ran into an issue with file permissions not being maintained.</div>
<div><br></div><div>Here is my iPXE script:</div><div><span style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)"><br></span></div><div><span style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">#!ipxe</span><br style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">
<font face="'courier new', monospace"><span style="font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">kernel <a href="http://web/boot/vmlinuz">http://web/boot/vmlinuz</a></span><br style="font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">
</font><span style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">initrd <a href="http://web/boot/core.gz">http://web/boot/core.gz</a></span><br style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">
<span style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">initrd <a href="http://web/boot/bootlocal.sh">http://web/boot/bootlocal.sh</a> /opt/bootlocal.sh</span><br style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">
<span style="font-family:Monaco,Consolas,Courier,monospace;font-size:13px;line-height:18px;text-align:left;background-color:rgb(255,255,255)">boot</span></div><div style="text-align:-webkit-auto"><br></div><div style="text-align:-webkit-auto">
Here is the listing for /opt/bootlocal.sh in core.gz directory:</div><div style="text-align:-webkit-auto"><font face="'courier new', monospace">4 -rwxrwxr-x 1 root staff 51 Mar 4 2010 bootlocal.sh</font></div><div style="text-align:-webkit-auto">
<font face="'courier new', monospace"><br></font></div><div style="text-align:-webkit-auto"><div>Here is the listing for <a href="http://web/boot/bootlocal.sh">http://web/boot/bootlocal.sh</a>:</div><div><font face="'courier new', monospace">4.0K -rwxrwxrwx 1 root root 38 Aug 1 13:33 bootlocal.sh</font></div>
<div><br></div></div><div style="text-align:-webkit-auto">For reference, core.gz is from TinyCore 4.5 and <a href="http://web/">http://web/</a> is CentOS 6 (not that I think it makes a difference, just trying to be thorough). The script works. The system boots up and /opt/bootlocal.sh (which already exists in core.gz) is overwritten by <a href="http://web/boot/bootlocal.sh">http://web/boot/bootlocal.sh</a>, except that it no longer has the permissions that exist on the original bootlocal.sh in core.gz or on the web server copy. Along with new permissions it's got a new date stamp of Jan 1, 1970... so basically it's dropping all meta-data and umask is setting default create permissions. Digging through the iPXE source I found the acquire function that actually pulls the file off the server, and it's pretty much just wget (if I'm reading this right), which explains why I'm losing file permissions and such.</div>
<div style="text-align:-webkit-auto"><br></div><div style="text-align:-webkit-auto">Which finally leads me to my question: how can I set file permissions in iPXE after the file has been acquired?</div><div style="text-align:-webkit-auto">
<br></div><div style="text-align:-webkit-auto">-Bryce</div>