LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-22-2005, 12:05 PM   #1
jadukor
Member
 
Registered: Nov 2005
Location: Bangladesh
Distribution: openSUSE
Posts: 83

Rep: Reputation: 15
common swap partition for XP & Linux


Hi all
I am a newbie running Slackware10.2. I was just going through a book that I downloaded from TLDP. It showed a few steps for creating swap files. Something like this

$ dd if=/dev/zero of=/extra-swap bs=1024 count=1024
$ mkswap /extra-swap 1024
$ swapon /extra-swap

I still do not understand these commands fully, but I already have a 300MB swap partition for Linux, which to the best of my knowledge was never actually used, it is just sitting there. So I was wandering if it is possible to make a separate partition for swap files which can be used by both XP & Linux on my dual boot PC.

If such a swap partition is possible, then can someone please advise me on how to implement it.
Any link will also be appreciated.

Thanks
 
Old 12-22-2005, 12:32 PM   #2
geeman2.0
Member
 
Registered: Feb 2005
Location: Ontario, Canada
Distribution: Gentoo, Slackware
Posts: 345

Rep: Reputation: 30
Linux requires a special type of filesystem (called Linux Swap) for it's page files.
Windows can only read FAT or NTFS partitions for it's page files.

Thus I think what you are trying to do is impossible.
But I could be wrong...
 
Old 12-22-2005, 02:09 PM   #3
aneroid
Member
 
Registered: May 2005
Distribution: slackware, slax, debian
Posts: 88

Rep: Reputation: 26
for a common "swap partition" for linux and windows: http://www.tldp.org/HOWTO/Swap-Space.html (main part starts here)

u can use a "swap file" as u've got it. btw, from the mkswap man page:
Code:
The  size  parameter is superfluous but retained for backwards compati-
bility.	(It specifies the desired size of the swap area	 in  1024-byte
blocks.	mkswap will use the entire partition or file if it is omitted.
Specifying it is unwise - a typo may destroy your disk.)
in ur example
Quote:
Originally Posted by jadukor
$ dd if=/dev/zero of=/extra-swap bs=1024 count=1024
$ mkswap /extra-swap 1024
$ swapon /extra-swap
the 'dd' line reads and writes 1024 (bs) bytes at a time, 1024 times (count). it reads zeros from /dev/zero (if, input file) and writes it to /extra-swap (of, output file). 1024 bytes 1024 times is 1 MB. u may want a larger swap file ;-)

read the man pages.
quote:
mkswap sets up a Linux swap area on a device or in a file.
Swapon is used to specify devices on which paging and swapping are to take place.

anirudh

Last edited by aneroid; 12-22-2005 at 02:57 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap file & Boot Partition Resize surfer2k3 Linux - Newbie 4 07-17-2008 07:50 PM
common swap partition.. tenzan Linux - General 7 11-15-2005 04:49 AM
doing away with linux swap partition? kahn Linux - Hardware 3 06-26-2005 04:14 PM
Partition Hd fr DSL and Win XP p2 What size for part, & swap file beekers Linux - Newbie 4 06-09-2005 10:14 PM
linux windows common swap alaios Linux - General 3 09-26-2004 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration