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.
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.
I'm looking to delete my swap partition(100mb) and remake it with something decent, on the order of 600mb. Is it safe to just fdisk it away and make a new one? Or should i do something in the OS first to tell it "hey, swap partition is going away"
Also, when its made should i just use the addswap option on the slack bootcd or is there a better command to do within the shell?
RULE #1: Backup your data BEFORE you play around with this.
Now, if you have some free space on your drive you can just add a new partition with fdisk or cfdisk and make it a swap partition. Then just add a new line to your /etc/fstab file. Reboot and you should have more swap space.
If you don't have free space that means your going to have to do some divide-and-conquer. Delete one of your current partitions (preferably not the root one). Make 2 new partiions from it. Format one of them as a swap partition and the other as whatever you like.
HTH.
Remember to backup up your data. This is relatively simple to do if you have free space on your drive. Otherwise it can be like doing brain surgery on yourself: not unheard of, but you really wouldn't wanna do it.
No data to back up. Since this is my first time touching linux i'm using an old computer, and the OS was installed yesterday. But thanks, shouldnt have any problems(knock on wood)
How much swap are you actually using today, and what kind of box are you running? Personally, my experience is that if you've got, say, either 256Mg or 512Mg of RAM (or more) then you only need 256Mg of swap, if that. If you are running KDE, I'd recommend checking out System > Info Center > Memory. Unless your swap space is over 50% used, I'd say leave things the way they are.
The old rule of thumb with swap was to make it "twice RAM", but that was in the days where having 64Mg RAM was bleeding edge. If you've got 512Mg RAM, then it's very unlikely that your memory will be paging out to disk, and therefeore, a huge swap partition is just wasting disk space. -- J.W.
Originally posted by J.W. How much swap are you actually using today, and what kind of box are you running? Personally, my experience is that if you've got, say, either 256Mg or 512Mg of RAM (or more) then you only need 256Mg of swap, if that. If you are running KDE, I'd recommend checking out System > Info Center > Memory. Unless your swap space is over 50% used, I'd say leave things the way they are.
The old rule of thumb with swap was to make it "twice RAM", but that was in the days where having 64Mg RAM was bleeding edge. If you've got 512Mg RAM, then it's very unlikely that your memory will be paging out to disk, and therefeore, a huge swap partition is just wasting disk space. -- J.W.
~300mb of ram. the computer's akin to frankensteins monster.
Well 300Mg of RAM isn't too shabby, and I'd definitely suggest checking to see how much swap your system actually is using (under a normal to heavy load). If you see that swap is getting hit pretty hard, then Yes, you should expand it, but if your swap usage is very, very light or essentially non-existant, then increasing swap won't have any effect. In other words, if you pretty much aren't using your swap in the first place, increasing it from 100Mg to 512Mg (or whatever) won't have any effect. An analogy: suppose you kept $100 in a jar at home just for special occasions where you don't have time to go to the ATM. If you take $10 out every once in a while, and on very rare occasions take out $20, then your actual usage of that jar is minimal, and there would be pretty much no point in adding another $500 to that jar if you typically only take out $10. Same deal with swap, there's no real point in increasing the size unless you're using it pretty extensively (ie, if your jar contains $100 but you often are taking $50 or $60 or $90 bucks out of it, then Yes, having a bigger jar (ie, $200 or $400) would be a good idea.)
Sorry for the long post, my main point is that increasing swap will only deliver better results if your current swap is being heavily used. If it is, increasing it may be helpful, otherwise you're only making disk space unavailable to yourself. You may also want to consider buying more memory, which would almost guarantee a performance increase -- J.W.
Well, reading through this post made me realize that I wasted alot of disk space on my instalation. I have 1024MB of DDR3200, so I created a 2GB swap partition on my RedHat 9 install.
Would it be safe to use partition magic under windows xp to shrink my swap partition to 256mb and realocate the disk space to my root partition?
As always, before you do any work on your partitions you should backup all of your important data first, but otherwise I see no problems with shrinking partition "A" and giving the free space to partition "B", regardless of what kinds of partitions A and B are. I don't know your level of experience with PM, but if you've been using it for a while and are comforatble with it then I'd say go for it. Even if PM is pretty new to you, resizing partitions is a good thing to learn, but you would want to do some reading first to minimize the chance of an error. (Absolute worst case scenario here would be that you'd need to drop and recreate your RH9 partitions and then do a reinstall, but if you've just recently installed RH9 anyhow, then maybe even this scenario isn't too bad. Heck, I've screwed things up so many times on my system that I must have done about 20 total reinstalls by now, but the positive outcome of all those mistakes is that I now can partition my drives and reinstall Linux in my sleep, so overall, it worked out favorably.)
Anyway, I'll assume that you've got some decent experience with PM and therefore, my suggestion would be to do the backup of your important data first, but just go for it. Good luck with the project -- J.W.
Thanks, I was afraid that linux would complain about the missing swap space hehe. I will give it a try when I get home. And yes I am very confortable with partitioning disks with Fdisk/PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.