how to (un)swap partition to create new one to use for filing
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to (un)swap partition to create new one to use for filing
Hi I'm a newbie,
while installing linux ubuntu i used halve of my second hdd for swap , i didn't realise you use it for memory to speed up the system.
how can i unswap (sorry for the way i saying that) , reparttion it , create a partition to save my files
if my question is not clear, please have some consideration I getting to know my pc better
This assumes that the swap is on /dev/hdb2. Run these commands as root or sudo:
Code:
swapoff /dev/hdb2
Edit /etc/fstab and remove the line that looks like this
Code:
/dev/hdb2 none swap sw 0 0
Reboot your machine just to make triple-damned sure that you didn't bork it. Then run:
Code:
fdisk /dev/hdb (to create a new partition with the freed space)
mkfs.ext3 /dev/hdb2 (to create a file system on it)
gedit /etc/fstab (to create a mount point for it)
Post back for specific questions about how to do this if it's not clear.
Added:
jlightner brings up a good point. You will have to remove the swap partition in fdisk before you can add a Linux partition. Depending on how much memory you have and whether you have another swap space, you might consider putting a 512MB swap space on it, anyway.
Last edited by Quakeboy02; 04-27-2007 at 01:17 PM.
Assuming this isn't your primary swap you can disable swap with the swapoff command (type "man swapoff" for details). Once you've turned the swap off you should be able to reuse the partition for other purposes - you'll have to change the partition type since swap is a type of its own.
Also don't forget to remove this swap device from /etc/fstab so it doesn't try to re-enable it on the next boot.
Hopefully you do have SOME swap - it helps increase your virtual memory pool - you don't actually swap out to disk (it does paging instead) but by having a larger virtual pool you can have more active processes because more memory can be preallocated. (The memory isn't actually in use - just "reserved" which is why virtual memory is a good thing.)
If you are logged in as root, then you are the superuser. End of story. There must be some other issue that you don't understand enough to relate to us.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.