LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-01-2011, 02:36 PM   #1
juiceb0x
LQ Newbie
 
Registered: Sep 2011
Posts: 9

Rep: Reputation: Disabled
Fedora removing swap space


I'm using Fedora 14, and I have it installed on a USB. (Not live, a full install) and
I wish to remove all the swap space so the USB will last longer. Cause USB's die if they're written to a lot. So how can I do this? Any commands I should use?
 
Old 10-01-2011, 03:06 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
If you are booted on the USB:

- run 'swapoff -a' to stop using the swap space.
- remove the swap space from /etc/fstab
- delete or reallocate the swap partition on the drive.
 
1 members found this post helpful.
Old 10-01-2011, 03:58 PM   #3
juiceb0x
LQ Newbie
 
Registered: Sep 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Okay, I apologize for being such a noob but how exactly can I do those last two steps? And will this remove for good, or will I have to keep doing that every time I reboot?
 
Old 10-01-2011, 04:08 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
The first step is temporary until the next reboot. The second step makes the change permanent. The third change make it non-reversible (you'll have to set up swap from scratch).

To edit the /etc/fstab, become root (using the sudo or su command, whichever your distribution prefers), and use your favorite text editor to edit the file '/etc/fstab'. In that file you will see a line with 'swap'. You can delete that line, or insert a '#' character at the beginning to make it a comment. Save the file.

To delete and/or re-allocate a partition, you need to use a tool (again, as root) like fdisk, parted, or gparted. If you are not familiar with them, do a lot of research first. You can easily destroy your system with incorrect use.

Last edited by macemoneta; 10-01-2011 at 04:10 PM.
 
Old 10-02-2011, 07:44 AM   #5
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,261

Rep: Reputation: 1078Reputation: 1078Reputation: 1078Reputation: 1078Reputation: 1078Reputation: 1078Reputation: 1078Reputation: 1078
Removable and External hard drives are cheap these days . . . Faster than USB-sticks.
 
Old 10-02-2011, 11:02 AM   #6
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 2,957

Rep: Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767
To delete the swap partition and expand another to use the space released, you need to have the other partition unmounted. The easiest thing to do would be to run gparted from the live Fedora CD.

While you're editing /etc/fstab, change the options for the partitions from "defaults" to "defaults,noatime,nodiratime" and that will result in fewer accesses of the USB stick.
 
Old 10-02-2011, 02:22 PM   #7
jefro
Guru
 
Registered: Mar 2008
Posts: 11,098

Rep: Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362
I guess it can't hurt to turn off swap if you have a newish system with enough ram. I never use in on a live usb but I install it without the swap file when I used the installer.

I am kind of curious though. Did you use something like unetbootin or liveusbcreator to make this gizmo?
 
Old 10-17-2011, 04:34 PM   #8
juiceb0x
LQ Newbie
 
Registered: Sep 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
I used Unetbootin to make the Live USB of Fedora, and I used that USB to install on another USB. But I got it now guys, thank you.
 
  


Reply

Tags
fedora 14, remove, swap


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
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM
Fedora 3 boot hangs after "Enabling swap space: [OK]" Voroojack Fedora 2 11-29-2005 09:21 AM
after Enabling swap space Fedora hangs on boot ejbest Linux - Newbie 11 10-07-2004 08:27 AM
Good swap space for Fedora Core 2? blueturtle Linux - Newbie 4 08-10-2004 10:18 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM


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

Main Menu
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