Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (6) </ 1 2 3 4 5 [6] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Toshiba Satellite Pro 430 CDS, Trying it out on ancient hardware< Next Oldest | Next Newest >
AwPhuch Offline





Group: Members
Posts: 1404
Joined: April 2004
Posted: Oct. 08 2004,14:07 QUOTE

Quote (greenlead @ Sep. 15 2004,01:08)
i'm not having much luck figuring out how to make use of the virtual memory

if someone wants to lay it all out, i would be willing to try, but for right now, i'm giving up. :(

http://www.linuxquestions.org/questio....=109511
http://www.linux.com/howtos/Swap-Space-1.shtml

does this help

Quote
Sharing a swap file with linux and windows ( post #1)

So, I read a while ago that it was considered generally a quite difficult thing to create a swap file (or partition) which could be shared by both windows and linux on a dual boot system.
WRONG. !!

After all you dont need large redundant files on your system do you ?

Here's how I have my machine set up:

Dual boot Win XP (other versions will work also), and RedHat linux 9.0 (other distros/versions _should_ work also. Feel free to post replies to this if specific variations on this theme are needed to make it work on other OS versions).

First off, you need a partition or drive which is visible to both windows and linux. This could be:
- Your windows partition. Although be warned that if this is NTFS, linux won't be able to write to it (at least my system doesn't) so that's a non-starter. You need to use an alternative.
- A dedicated FAT (16 or 32) swap partition.
- Another drive altogether (with FAT file system). This is the set-up I have.

I am not going to go into here what size swap you should be using (if any), nor do I intend to explain how to create/move/copy/resize partitions on your HD. But, here are the outline apporxiamte steps you need to take for both systems to be happy.

First things first: When installing linux, you should not specify a special linux swap partition. Ignore the warning about not using a swap partition for now. If you already have linux set up (probably most of you, but I did it from scratch), you could go about removing the current reference to the swap partition in /etc/fstab, and then convert your swap partition to FAT, so that you can share it with windows.

Boot windows and change the page/swap file settings to use a file on the shared space of your choice (on my machine this is D: second hard disk). Under Win XP/2K/NT this creates a file called pagefile.sys. On other Windows versions 95/98/ME etc i think it's called win386.swp. You will need to know the precise location and name of this file in order to set it up with linux. You should be able to find it quite easily because of it's enoumous size.

That's windows taken care of. You will probably have to reboot back into windows immediately so that it can create/move the appropriate files.

Configuring linux is a little more tricky (it always is, isn't it ?). There are a couple of things you need to change, and one of these is necessary at every boot of linux, however, this can be taken care of in the startup scripts.

The first thing to do, as a test before we modify the system is issue a couple of commands to check that linux has the appropriate permissions to use the swap file properly. Open up a console, and find the swap/page file that windows created. On my system, under linux this is /mnt/data/pagefile.sys.

Run a quick check with (you should be root to do this):

   code:

mkswap /mnt/data/pagefile.sys
swapon /mnt/data/pagefile.sys



The first command sets the file up for swap use with linux. The second activates it as a swap space.
Verify that linux is using swap by issuing a 'free' command. It should list the amount of used/free swap and memory. If on of these commands fails, you should check out the write attributes of your drives/partitions/files. Linux needs to write to this file, quite obviously.

Now, you want these things to happen automatically when you boot linux. The second part is easy, you need an entry in your /etc/fstab file which looks remarkably like the old one:

   code:

..
/mnt/data/pagefile.sys   swap    swap    defaults   0  0
..



Then, when the system calls for all swap spaces to activate, it sees this entry and all is good.
However, not much is going to happen if you booted windows in the meantime and overwrote the file with windows junk. So on every linux boot we need an mkswap command. I put mine in the /etc/rc.sysinit file. I'm not sure if it should really belong in here, but it works for me. A word of warning: Be VERY careful when editing this file. !!

In the file I found the very LAST occurrance of the command 'swapon -a', and just before it I put in:

   code:

..
mkswap /mnt/data/pagefile.sys
..



Now when linux boots, it runs through the rc startup script and automatically configures the use of your windows swap/page file for it's own use.

Sweet! That's all there is to it. I know I've written quite a lot here, but really there is nothing to it.

I hope it works for you.. really there's only a few things you need to change, and they're not difficult.

Doug Hammond.


Dude no offense but STFW

Brian
AwPhuch


--------------
http://www.frappr.com/dsl <-- Where do you use DSL?
http://www.smoothwall.org <-- Ultimate firewall for the world!
http://boinc.mundayweb.com/one/stats.php/userID:6107 <--My BOINC stats!
./S99LinuxRevolution start
Back to top
Profile PM WEB 
25 replies since Sep. 09 2004,15:23 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (6) </ 1 2 3 4 5 [6] >/
reply to topic new topic new poll
Quick Reply: Toshiba Satellite Pro 430 CDS

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code