LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Want to create the SWAP now, but FC6 Installation done without (https://www.linuxquestions.org/questions/linux-newbie-8/want-to-create-the-swap-now-but-fc6-installation-done-without-613868/)

hakeem 01-15-2008 11:02 PM

Want to create the SWAP now, but FC6 Installation done without
 
Hello, I am trying Linux after 2003 & still a newbie. [searched for similar threads but available ones
are not on FC6 & bit confusing, hence post this new]

1. I just installed Fed. Core6 to a 21GB partition named 'SDA12'. In this process, I had to skip the SWAP as I didnt know how to create one.[I have WinXP as my primary OS]
Can I create it now?

2. What should be the correct procedure to create one when installing FC6? When I tried to create the SWAP in '/' it didnot allow me saying not enough space!

Plz. advise. /Tks n regds.

acid_kewpie 01-16-2008 03:32 AM

swap would be created by default, there is no special way to do it. swap is conventionally it's own partition, it's not created in / or anything, it's in a different primary or logical partition completely. if you don't have spare unallocated disk space i'd say that it's too late at your level to create a partition, but you can create a swap *file* instead...

dd if=/dev/urandom of=/swapfile bs=1024 count=512
mkswap /swapfile

this will create a 512mb file and then convert it to swap space.

this will create a file as you seemed to be expecting, but is less desirable due to the overhead of going through a parent filesystem. but it'll work. once that's done just add a line to /etc/fstab...

/swapfile swap swap 0 0

and on reboot it should load. you can also directly load it with...

swapon /swapfile

without the reboot

hakeem 01-17-2008 04:43 AM

Dear Chris,

On which file I apply your command instructions..? Honestly,
I do not know when/where to try this.. Is it a script that I have to edit in vim first & save & run??

FC6 boots & works fine, so shall I use it like that or do I really need to create
a swap file due to any special reasons??

Tks in adv. for your valuable time./Regds.

acid_kewpie 01-17-2008 05:12 AM

if things are ok, no you don't *need* to at all. you would just run the dd and mkswap commands as root exactly as is.


All times are GMT -5. The time now is 12:12 AM.