Whole Network Most Recent TOP10 FreeBSD Hacks Securing

 

Sharing swap partitions between Linux and Windows

Filed in archive Linux For Windows Users by Michael Hammer on August 28, 2006

Format the partition as a dos partition, and create the Windows swap file on it, but don't run windows yet. (You want to keep the swap file completely empty for now, so that it compresses well).
Boot linux and save the partition into a file. For example if the partition was /dev/hda8:
dd if=/dev/hda8 of=/etc/dosswap

Compress the dosswap file; since it is virtually all 0's it will compress very well
gzip -9 /etc/dosswap

Add the following to the /etc/rc file to prepare and install the swap space under Linux: XXXXX is the number of blocks in the swap partition
mkswap /dev/hda8 XXXXX
swapon -av

Make sure you add an entry for the swap partition in your /etc/fstab file
If your init/reboot package supports /etc/brc or /sbin/brc add the following to /etc/brc, else do this by hand when you want to boot to dos|os/2 and you want to convert the swap partition back to the dos/windows version:
swapoff -av
zcat /etc/dosswap.gz | dd of=/dev/hda8 bs=1k count=100

# Note that this only writes the first 100 blocks back to the partition. I've found empirically that this is sufficient
>> What are the pros and cons of doing this?

Pros: you save a substantial amount of disk space.

Cons: if step 5 is not automatic, you have to remember to do it by hand, and it slows the reboot process by a nanosecond


Advertisement


Permalink: Sharing swap partitions between Linux and Windows
Tags: linux  windows  tips  tip  blog  blogs  help  server  operating  system    swap  linux+windows 

Trackback: http://www.creative-weblogging.com/cgi-bin/mt-tb.pl/34632



Related Entries:

Windows VS. Linux Security Report - 28 August 2006

Which Linux Fits Your Needs? - 28 August 2006

Linux in Your Pocket - 28 August 2006

Desperate Undelete - 28 August 2006

Advertisement


Advertisement


CW ToolbarInstall
RSSrss   | See all blog subscribe options
Googlegoogle   |   What is RSS?
Yahoo!yahoo
AddthisAddThis Feed Button
BloglinesBloglines
Newsletter
Advertisement - Book yours here.

Use our search feature to look for other interesting posts

Just this blog Whole network
 
  • Would you like to have a new interactive marketing channel for your company? Learn more about Sponsored Blogs with Creative Weblogging. See how we helped companies like Weblin and cellity reach their goals.
  • Would you like to reach millions of blog readers every day? See you banner on hundreds of blogs with TierOneAds? Stay in control measuring conversion in real time. Register now.
  • Would you like to make more money blogging? Use TierOneAds a new platform that allows you as a blogger to set your prices per impression. Register now.
  • Do you have a blog with more than 50k page views from the US? Let us market your blog and earn great fix payments and bonuses.
  • Would you like to see your text link here? Let us know!
Advertisement
Book yours here.

TierOneAds


  • Other blogs in the same channel in the Creative Weblogging Network

Advertisement -
Book yours here..
TierOneAds






Advertisement - Book yours here..
 
Tagcloud: Devices Entertainment Finding The Right Linux For You FreeBSD Hacks Humor Linux For Windows Users Misc Multimedia Networking Programming Securing Servers Solaris Tips & Tricks Utilities