Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Sharing Linux Swap Partitions


  • Please log in to reply
1 reply to this topic

#1 pasha19

pasha19

  • Members
  • 202 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Michigan
  • Local time:06:58 AM

Posted 15 January 2008 - 07:58 PM

I am running SuSE and Gentoo (up to 2 versions (old vs new for migration)) on the same box (old and slow) in multi boot mode. I want to share a swap file on the second drive between the three -- set for whichever one is booted. I assume I need to do a mkswap in the boot process to setup appropriately. /etc/init.d/boot.local does this too late on SuSE. I have no idea where to do this on Gentoo. In the same vein as a security measure how can the swap file be cleared on shutdown I saw a "dd /dev/random /dev/XXX9" (pardon syntax) that could clear the space if run at the appropriate time after a swapoff in the shutdown. Assuming the mkswap /dev/XXX9 can be done in the boot process. (This may be useful on the servers I am considering building.)

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:04:58 AM

Posted 16 January 2008 - 09:52 AM

Yes, you can share swap partitions. In Gentoo, you would do it when you install the OS. Barring that, you just need to change your /etc/fstab file to point to the temp directory. Look at the one in Suse, and copy the parameter. That should work, but back up your fstab settings just in case.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users