Linux

Categorized | Uncategorized

Share the same SWAP partition in Linux and Windows

If you’re short on hard disk space and would like to share the same SWAP partition in Linux and Windows, you can try the following trick:

1. Format the partition as a DOS partition and create the Windows SWAP file on it, but do not boot Windows yet.

2. Boot in Linux and save the partition to a file. Assuming the partition is on /dev/hda5 we’ll do a

dd if=/dev/hda5 of=/etc/dosswap

3. Compress the dosswap file with

gzip -9 /etc/dosswap

4. Add the following in your /etc/rc file to prepare and install the Linux SWAP. XXXX represents the number of blocks of the SWAP partition:

mkswap /dev/hda5 XXXXX

swapon -av

5. Add the newly-created partition to /etc/fstab .

Author Profile

T4L ;

Other posts by T4L

Author's web site



Are you satisfied with this blog?
Why not subscribe our RSS Feed? you will always get the latest post.


Hi, Be the first leave some reply

Leave A Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>