LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 07-29-2011, 04:08 PM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,619

Rep: Reputation: 48
Swap on Linux-based PXE image


Hi

I try to prepare Linux-based image for remote network boot via PXE.
Do I need to create Swap for this PXE image?

BTW the boot image will have about 300MB or less and we have P4/2GHz workstations with 1GB RAM.

Last edited by cccc; 07-30-2011 at 09:45 AM.
 
Old 07-29-2011, 04:16 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,111

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
technically no, however if you did the swap would have to be on a local disk not over the network otherwise when it starts swapping the computer's performance would drop like a rock towards a black hole, you would probably have to go out of your way though to make a swap file and use a loopback device anyways to do that).

depending on what you do with the remote boot workstation you should be able to get by without swap, even a hard disk really.
 
Old 07-29-2011, 04:31 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Never tried that, never heard of anyone doing it. I guess you could create a swap file on the local system. You'd have to have most of the net booted OS up then run some script to make a swap and mount it and be sure to delete it when powers off or delete on next start.


Many distro's can be booted over the network without any modifications but some need quite a lot of work.

Many work also from an iSCSI like freenas or open(darn I forgot that name). Then you could use gpxe or ipxe.

Last edited by jefro; 07-29-2011 at 04:33 PM.
 
Old 07-29-2011, 08:55 PM   #4
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,619

Original Poster
Rep: Reputation: 48
Sorry, I've read this before:

https://help.ubuntu.com/community/DisklessUbuntuHowto

and was unsure.

>>Adding a swap file

In case you do need or want to set up a swapfile, here's what I did to get one working:

sudo apt-get install dphys-swapfile

this package sets up a swap file at /var/swap that is 2x your current ram. however, it still doesn't setup the swapfile on its own, though it does try. to get the swap file working the rest of the way, do:

sudo losetup /dev/loop0 /var/swap
sudo swapon /dev/loop0

then, run top and you will see you have a swap file. however, put in as much ram as you need for what you are going to run, and just look at your swap file as "in case of emergency", because it is not efficient as a ram or a regular swap file, but should keep something from crashing. I'm running mythtv on top of a full feisty desktop, and tried it with 256mb ram, and myth-frontend would crash when i would try to bring it up. with the swap file, it would launch, but would take a while. i added an additional 256mb to bring the total to 512mb and it runs flawless, and i add the swap file just in case. i just make a script for it to set up the swap file at boot.<<
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an Image for PXE Boot Nightfish. Linux - General 4 07-28-2010 02:33 PM
Custom Fedora image for PXE baddah Fedora 1 04-30-2008 08:46 PM
Trying to create PXE server and can't mount initrd image Nylex Slackware 6 07-08-2007 02:10 PM
how to compile a PXE BOOT image from a Ubuntu install Nemus Ubuntu 1 04-19-2007 12:52 PM
boot from pxe image jcai Linux - General 1 06-21-2006 08:08 AM


All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration