possible to create swap partition after install?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

possible to create swap partition after install?

Postby kate273 on Wed May 27, 2009 4:54 am

I set up Linux Mint to dual boot on someone's PC but didn't set up a swap partition as I wasn't sure what they wanted to do with their XP system (that wouldn't load because of virus/trojan).
I can now set a swap partition up, but was wondering if I can do that without doing a re-install?
kate273
Level 1
Level 1
 
Posts: 9
Joined: Fri Jun 06, 2008 7:50 am
Location: United Kingdom, Bromley

Linux Mint is funded by ads and donations.
 

Re: possible to create swap partition after install?

Postby DataMan on Wed May 27, 2009 5:32 am

I've never done it post-install but it should be achievable. Here's the basics:

1. Create the swap partition using a partition editor (GParted Live is my perferred).
2. Make a backup copy and then edit your /etc/fstab file and identify the swap, here's a copy of my swap entry for the fstab:

# /dev/sda5
UUID=f421f351-xxxxxxxxxxxxxxxxxxxx none swap sw 0 0


3. Save the fstab file and re-boot.

If you're going to use the uuid method for identifying the swap partition, run the following from a terminal to get the uuid for the swap partition (use cut and paste):
Code: Select all
ls /dev/disk/by-uuid -lh


Hope this helps,

DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1208
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www


Return to Newbie Questions

Who is online

Users browsing this forum: Pierre and 24 guests