Thanks. This is exactly what I was looking for.<br><br>Thank you,<br>Luca<br><br><div class="gmail_quote">On Wed, Dec 16, 2009 at 3:13 AM, Thomas Miletich <span dir="ltr">&lt;<a href="mailto:thomas.miletich@gmail.com">thomas.miletich@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Wed, Dec 16, 2009 at 11:52 AM, Luca &lt;<a href="mailto:lucarx76@gmail.com">lucarx76@gmail.com</a>&gt; wrote:<br>

&gt; Thanks a lot.<br>
&gt;  Something is still not clear to me though. I&#39;m using gPXE on a diskless<br>
&gt; workstation. I use gPXE to download a small ramdisk. Then I use this one to<br>
&gt; do a secondary download of the remaining contents.<br>
&gt; After the download I can do a pivot_root and switch to the new filesystem.<br>
&gt;<br>
&gt; Yet the space I have left is 1.5G (since I&#39;m doing first download with gPXE<br>
&gt; and the image can&#39;t be bigger than 1.5GB).<br>
<br>
</div>The image you download with gPXE will be much smaller than 1.5GB.<br>
Somewhere around max. 10MB. In this small initramfs you will have all<br>
the modules and programs you need to access the network, and then you<br>
simply have a script to mount a tmpfs or a ramdisk somewhere:<br>
<br>
mount -t tmpfs -o size=4G none /rootfs<br>
<br>
This command will create a 4GB tmpfs and mount it at /rootfs. Now you<br>
can copy the root fs to /rootfs, in any way you like. You could mount<br>
a NFS share and copy it, use sshfs, maybe even rsync.<br>
<br>
It&#39;s a good start to take apart your distribution&#39;s initramfs( zcat<br>
/boot/initrd.img |cpio -i ) and look at the scripts that usually mount<br>
the HDD or NFS root. You should be able to modify them to copy your<br>
files to your tmpfs and use that as the new rootfs.<br>
<font color="#888888"><br>
Thomas<br>
</font><div><div></div><div class="h5"><br>
&gt; I&#39;m sure I&#39;m missing something, but having everything in RAM, after I<br>
&gt; download a small ramdisk with gPXE, where do I save the content of the<br>
&gt; secondary download (which is going to be around 4G)?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;  Luca<br>
&gt;<br>
&gt; On Fri, Dec 11, 2009 at 10:37 AM, H. Peter Anvin &lt;<a href="mailto:hpa@zytor.com">hpa@zytor.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 12/11/2009 07:28 AM, Luca wrote:<br>
&gt;&gt; &gt; Thank you. So gPXE can address 4GB of RAM.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Then, if I gPXE boot with the following script<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; #!gpxe<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;   kernel <a href="https://192.168.1.189/vmlinuz" target="_blank">https://192.168.1.189/vmlinuz</a> root=/dev/ram0 init=linuxrc<br>
&gt;&gt; &gt;   initrd <a href="https://192.168.1.189/ramdisk.img" target="_blank">https://192.168.1.189/ramdisk.img</a><br>
&gt;&gt; &gt;   boot<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; the ramdisk&#39;s size could not exceed 2G (considering gPXE has to download<br>
&gt;&gt; &gt; it and then load it in memory)?<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; Something like that.  In practice it is probably closer to 1-1.5 GB.<br>
&gt;&gt;<br>
&gt;&gt; You also don&#39;t want to actually use a ramdisk -- initramfs is a *lot*<br>
&gt;&gt; more efficient.<br>
&gt;&gt;<br>
&gt;&gt; However, realistically you probably don&#39;t want to do that.  Instead you<br>
&gt;&gt; want to bring up a reasonably small ramdisk that contains the contents<br>
&gt;&gt; needed to do a secondary download of the remaining contents.  The<br>
&gt;&gt; reasons are very simple: no need to double buffer, Linux has a *much*<br>
&gt;&gt; more advanced IP stack that gPXE (for, I hope, obvious reasons -- not<br>
&gt;&gt; picking on gPXE here), and no 4 GB limitation.<br>
&gt;&gt;<br>
&gt;&gt; As such, you should get much better preformace that way, and when you&#39;re<br>
&gt;&gt; talking gigabytes, that matters.<br>
&gt;&gt;<br>
&gt;&gt;        -hpa<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; H. Peter Anvin, Intel Open Source Technology Center<br>
&gt;&gt; I work for Intel.  I don&#39;t speak on their behalf.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; gPXE mailing list<br>
&gt;&gt; <a href="mailto:gPXE@etherboot.org">gPXE@etherboot.org</a><br>
&gt;&gt; <a href="http://etherboot.org/mailman/listinfo/gpxe" target="_blank">http://etherboot.org/mailman/listinfo/gpxe</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gPXE mailing list<br>
&gt; <a href="mailto:gPXE@etherboot.org">gPXE@etherboot.org</a><br>
&gt; <a href="http://etherboot.org/mailman/listinfo/gpxe" target="_blank">http://etherboot.org/mailman/listinfo/gpxe</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>