Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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?
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,500
Rep:
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.