>>Anyone know if it's possible to configure Linux to use swapfiles on the root
>>filesystem in the case that the swap partition is filled. I'd like to be able to
>>run Xemacs and Netscape simultaneously if possible, but apparently the 32MB of swap
>>I have with my 16MB of RAM isn't enough, and I'd rather not reparition. Thanks.
>Yep, sure is. It's documented in the installation guide (Linux Documentation Project),
>section 4.9, 'Using a swap file'.
>You can also add the '/swap' into your /etc/fstab (just copy the swap line that's
>already there, changing '/dev/hda3' (for eg) to '/swap'), and the swapon and swapoff
>will be done automagically on startup and shutdown.
Not directly; possibly you could kluge up something if you wrote aQuote:>Under HP-UX you can tell the kernel to use spare space on a filesystem
>as a swap space, with a configurable maximum size (minimum free space
>left). The operating system decides how much space is needed and
>reserves it, allocating and deallocating space dynamically as
>needed. Can this be done under Linux??
That would be a godawful hack, though, and you really wouldn't want to
do it. HP-UX's way of doing much the same in the kernel is probably
not much better; that would mean bloating the kernel even worse than
it already is. Besides, swapping would get *s-l-o-w*; swapfiles are
already slow enough compared with partitions.
" ... got to contaminate to alleviate this loneliness
i now know the depths i reach are limitless... "
Here's a summary:
use 'dd if=/dev/zero of=/swap bs=1024 count=8192'
to create an 8 Mb file called /swap
use 'mkswap /swap 8192'
to initialise the space
and use 'sync'
then 'swapon /swap'
to activate your extra swap.
You should 'swapoff /swap' before you shutdown.
You can also add the '/swap' into your /etc/fstab (just copy the swap line that's
already there, changing '/dev/hda3' (for eg) to '/swap'), and the swapon and swapoff
will be done automagically on startup and shutdown.
Take note of drawbacks to this system:
- swap files are not as fast as swap partitions
- you have more chance of corrupting your root partition (has this happened to
- be careful with the 'dd' command - mistyping anything could be v. dangerous!
I have Linux and ms-dos installed on myn harddisk. There is a partion
for the Linux swap-file. I using also Windows under ms-dos
What I want is this
I want to use the linux swapfile partion also voor the windows (MSDOS) swapfile
Is this posible
2. 'tiobench' results comparision for 2.5.43 kernel and 2.4.19
5. hardrive removed, including swapfile how to stop mounting swapfile and make another
6. DLL on Linux
7. using a swapfile under linux
9. Sharing a Swapfile/partition b/w OS/2 & Linux
10. Share swapfile between Linux and MSWindows?
11. Urgent , add swapfile but reboot server failed (PROD server) OS : Linux
12. Sharing Linux and Win31 swapfile
13. Sorry-Need help sharing swapfiles btwn linux/windows