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