Click to See Complete Forum and Search --> : Reinstall Fedora to add swap partition?


ajh
03-30-2004, 08:27 AM
I am running Fedora Core 1 on an XP dual boot system, linux running on a 10GB partition on my 2nd 20GB HDD, XP on a seperate 120GB drive. When installing Fedora I (stupidly) didn't specify a swap partition.
I've read that I can create a swap file although they're not effective for over 256MB. I have 256MB RAM so from reading other forum posts, it looks like I need 512MB of swap space, so I intend to create a dedicated 512MB swap partition.

Can I create this swap partition without reinstalling Linux? If not, how do I backup my current Linux setup, reinstall from scratch, then reinstate my previous setup.

I have a DVD-R drive - could I simply copy my / root partition to disk, wipe the partition, reinstall Fedora (This time creating the Swap partition) then overwrite the root data with my disk backup? I don't really want to have to reinstall from scratch.

Or are there other methods of creating the swap space?

Any help would be much appreciated!

Hayl
03-30-2004, 08:36 AM
if you have unused space then use fdisk or cfdisk to create a new partition.

if you do not have unused space, then you will have to resize an existing partition with parted or a commercial partition resizing product such as partition magic, and then use fdisk or cfdisk to create a new partiotion.

then all you have to do is add the new swap partition to /etc/fstab

/dev/hdaX none swap sw 0 0

where X is the partition number (Assuming it is on hda - if it is on hdb then use hdbX).

ph34r
03-30-2004, 09:35 AM
Or use a swap file, and if you need more than 256mb, use 2 of 'em.

BTW - with 256mb ram, I had a 100mb swap partition and no problems.

ajh
03-30-2004, 12:35 PM
Thanks guys!
I'll try it right away.

mdwatts
03-30-2004, 01:35 PM
Always a good idea to familiarize yourself with our JL Help File Library.

From what ph34r suggested.

http://justlinux.com/nhf/Filesystems/Fly_Swapping.html

And from Hayl

http://justlinux.com/nhf/Filesystems/Building_a_Swap_Partition.html