FetusZero / Member

Forum Posts Following Followers
1258 33 59

XP tried to eat my Linux Swap!

First of all, let's start with what is a Swap partition for those who might not know (basicaly people who show no interest in Linux). Oh and, thanks to Linux.com for providing me with an easy definition which I modified at will since copying and pasting it would make me seem lazy and also would take a hell lot of more space on the blog, but it just made it easier for me to explain what it is efficiently, simply because I didn't know how to explain it well. Yep, I'm not that good when it comes to explaining computer related stuff, although I know what it does and what it is.

Swapping consist of when you run softwares/programs that are bigger than your physical memory and your computer decides to temporarely store chunks of memory onto the hard drive while other data is moved into the physical memory space.So to start with Linux,which divides its physical RAM access into chucks of memory called pages, Linux will swap (copy) a page of memory on the pre-configured space on the hard disk, called swap space, in order to free up that page of memory. So basicaly: Physical memory + Swap space = Ammount of Virtual memory available.

Swapping is something very important in Linux as you'll learn why later in my blog, but it is because when the system requires more memory than is physically avaible, Linux will swap out some less used pages and give more to the current process that needs the memory right away. There are other reasons which I won't waste explaining as this was the main reason for having a Swap space in Linux.

The only downside with a Swap space is that memory is much faster than a disk, but hey, gotta do with what you have. There are two types of Swap space in Linux: A partition on the hard disk dedicated to swapping only, and a Swap file which resides somewhere with your system and data files. Anyway, on to the story.

Some of you may know that I recently re-installed a Dual-Boot Ubuntu/XP in order to play my recently bought PC game (F.E.A.R.) without having to struggle with Virtual Consoles in Ubuntu. All of this installation went fine and I gave my fresh install of XP a big 20GB, considering that I take videos and screenshots and that the game requires somewhere about 7GB of free space. That being done, I just knew something would have to go wrong at some point, because it's Windows XP.

As expected, Next thing I notice when booting in Ubuntu, which is something I do everyday, after a while my programs started lagging, and ended up closing by themselves or freezing. First thing I thought "WHAT THE HELL!?". Second thing I thought was more appropriate: "A bad update? or XP?"

So I spent a while on this one here, I knew it couldn't have been a bad update, that would of been a first experience on Ubuntu to receive such a bad update. So the source? It definitely was XP that had done something to my partitions.

And it did, but it mostly was caused when I resized/moved the partitionsto make some space for my fresh install of XP. Back then, my hard disk partitions were Linux => Swap space. Currently though, my partitions are as follow: Linux => Swap space => XP.

My Swap space had changed places then, instead of being at the complete end of the hard disk, it is now more at the middle of my disk, which is what caused the problem since Linux was commanded to use the Swap space situated at the end of the disk, not in the middle. Ah, found the problem, good thing I finally thought about checking out my system logs to see so many "not enough memory" errors.

I then manually redirected to the not so new Swap space and activated it and made it activate automatically at boot, which was a whole new command line for me to learn, which I won't show you because people always tell me how I give them headaches when I start talking about command lines to them lol.

Such a big story for such a small issue, yep. Isn't that great :]

Now I feel like making a new story with my tarantula Storm, but she doesn't feel like moving now though, I suspect she's going to molt soon eventually, and if she doesn't, well I'm in for worries of a dead tarantula -.- but if she does molt, I'll try to make a video of it for all of you to enjoy the amazingness of a molting tarantula.. or at least take pics. Wow, total change of subject here.