dos swap file


Forum: Other Help Topics
Topic: dos swap file
started by: mrs peanut

Posted by mrs peanut on Oct. 24 2006,22:33
i found dsl while venturing into the linux world (xubuntu was a no no on this old toshiba 320cdt)
i am so impressed with ease of use and i adore fluxbox after only ever seeing the windows desktop.

i'm running the live cd with 96mb ram and have read that a swapfile will improve performance,

so can i set up a dos swapfile and still keep win98me (i mnt the hard drive for my files)?

i have searched and cant find enough info. :(

Posted by sheldonisaac on Oct. 25 2006,01:45
Quote

so can i set up a dos swapfile and still keep win98me (i mnt the hard drive for my files)?


Something like this?

Code Sample

mount -t vfat /dev/hdb5 /mnt/hdb5
mkswap /mnt/hdb5/win386.swp
swapon /mnt/hdb5/win386.swp

Posted by mrs peanut on Oct. 25 2006,08:20
thanks, i'll give it a go, if win98 gets wrecked, its no big loss really.

:)

Posted by mrs peanut on Oct. 25 2006,15:08
the code from the above post didnt seem to work, so i tried setting it up from the menu.
i now have a knoppix swap file on the win98 hda1, but its not being used. do i have to activate in some way, or have i not done it properly?

Posted by ^thehatsrule^ on Oct. 25 2006,15:50
If swapon was successful, the system should now know the swapfile is there.  It won't use it until needed, but you can check your system stats (like torsmo)
Posted by pattmark on Oct. 29 2006,00:36
Quote (mrs peanut @ Oct. 25 2006,11:08)
the code from the above post didnt seem to work, so i tried setting it up from the menu.
i now have a knoppix swap file on the win98 hda1, but its not being used. do i have to activate in some way, or have i not done it properly?

I try creating a swapfile, it exist in my harddrive but DSL dont use it, or dont know that exist when boot from livecd.
is there any cheat code i need to use the swap file?
im lost too.

Posted by mrs peanut on Oct. 29 2006,08:42
i decided to get rid of windows and made a swap partition with cfdisk(reformatted completely) , then did a frugal install.
the swap partition is recognised by the installed dsl and the live cd, so if you are not dual booting or  using the live cd on a windows pc, for example then this would work.
on my laptop, the swapfile just would not work.

Posted by roberts on Oct. 29 2006,16:32
I will look into this area. I believe it may be a combination of things. The menu item is calling an original Knoppix script which will not work with a poorman's type install. Also the swapon is a busybox applet. Both need to be looked at. Thanks for the feedback.
Posted by pattmark on Oct. 30 2006,01:42
i will follow your steps mrs peanut, i will get rid of windows and start fresh.

just little help, how can i create the swap partition and the partition for frugal install, how format it, i use fdisk before, also create and manage partitions on windows, is it diferent, what format should i use, how can i format a partition in dsl.

Posted by jls legalize on Nov. 01 2006,09:50
if u like fluxbox u can try fluxbuntu

legalize cannabis, etc.

Posted by roberts on Nov. 01 2006,16:15
This is what I have found so far...
Regarding swapon:
The swapon in DSL works fine with dos swap file, i.e., knoppix.swp.
What I have found so far...
If the knoppix.swp is on the same partition as KNOPPIX folder then the swap file is detected and used.
If DSL is installed on another device/partition, then you must mount the device/partition containing the knoppix.swp file and then use the swapon command, e.g.,
mount /mnt/hda1
swapon /mnt/hda1/knoppix.swp

Regarding mkdosswapfile:
If DSL installed on a separate device/partition then mkdosswap works and allows creation of knoppix.swp.
If you have a poormans install, where the KNOPPIX folder is on the Windows partition, then the mkdosswapfile script fails in creating knoppix.swp.

Knowing this, one should be able to work around these issues until they are resolved.

Posted by pattmark on Nov. 03 2006,06:56
I finally make the DOS swapfile work, from livecd.  :D

you need a hard disk with a dos partition, a partition with win98 should be fine.
these was wath i do, step by step, maybe some step dont be needed or i do redundant things, dont know, im not an expert, but this work for me.

1. in the desktop, rigth-bottom, the box, click the device (cdrom,hda1,fd0,etc) until the one with the DOS partition, should be red unmounted, click to mount and change to green, if pop up advice "mount: you must especify the fylesystem type" you forgot format the partition, do it from windows or dos, if already green skip this step.

2. from menu (rigth click on desktop), menu System select "Setup DOS Swapfile", if advice "sorry, no dos partition available to swapfile", either you have already created one, or the dos partition wasnt mounted rigth(see 1 step), if all ok should be asking you a question select yes to accept, then select the size of the file, ok, shoul take a minute to create the file

3. use emelfm to confirm the exact path of the file, should be /mnt/hdaX/knoppix.swp, where X is the number of the dos partition, should be the same you mounted in step 1

4. open ATerminal and type "sudo swapon" + the path, should be something like this,
sudo swapon /mnt/hda1/knoppix.swp

5. if all ok, you should see the inmediate change in Swap used, on desktop below CPU and RAM usage

Hope this help anyone, take me 7 days and my win98 partition, i know i wasnt the only one trying to make this DOS swapfile work, agree mrs peanut?

i search and ask for help without result, i wish i could read this a week ago, so now, i wish this save u a week. :cool:

Posted by mrs peanut on Nov. 03 2006,11:45
hey pattmark, glad you got it working at last!

i gave up and just installed in the end, but i'm happy with that!
i think i forgot to mount the partition with the swap and thats why it didnt work, being reasonably new to linux, but you learn fast!

will you have to do "swapon" every time you boot though?

Posted by roberts on Nov. 03 2006,17:25
Quote
will you have to do "swapon" every time you boot though?


No, if the swapfile is on the same partition as the KNOPPIX folder.
Yes, if not, DSL, would not know to go looking for it.
You can place your commands in /opt/bootlocal.sh

mount /mnt/hda1
swapon /mnt/hda1/knoppix.swp

An update:
Based on this thread. I have updated frugal_grub, frugal_lilo, dslhdinstall, mkdosswapfile to support Poormans install, i.e., when the KNOPPIX folder is placed in the root of C:\ and booted from the boot floppy.

Also, have added a new boot option of dosswapfile
This will autoscan looking for knoppix.swp
It also support direct specification via
dosswapfile=hda1

These new updates will be in the next RC3 of DSL 3.1
Hopefully, this will make it easier for users that already have a Win98 older machine with no cdrom and wish to try DSL.

Posted by mrs peanut on Nov. 03 2006,23:02
thanks for that, i'm going to try that on my main pc now i understand how it works
DSL rocks!

Posted by pattmark on Nov. 04 2006,06:37
hey, mrs peanut, yes from livecd i had to swapon every boot, im trying to frugal install with a swap partition (get rif of the win98 partition time ago), but cant make it work, just think as i write this,maybe i need format the swap partition, rigth? how can i do that from linux?

wonderful roberts, thank you. a LOT. Cant wait for DSL 3.1, i give up some dsl cds to my friends to revive their old pc and laptop, all love DSL.

Now, i understand why DSL is so great, the creator look his work, listen the users and make it better, dsl is a masterpiece, and the artist behind it love his work. Take that Bill. Gates you need lessons from him.

Posted by mrs peanut on Nov. 04 2006,14:00
if you run sudo cfdisk from the terminal it should give you a list of your partitions.
i created swap of 256mb on hda1 . and left the rest as freespace if i remember. i clicked to write the partition table then exited back to live dsl. from the menu i then did the frugal install, and that should be it.
dsl frugal should then be on hda2 and when i rebooted without the live cd it loaded up and recognised the swap.

i'm about to do it again on a different pc, so i hope i,ve remembered correctly!

p.s i seem to have two swap partitions now,a primary and logical!
dont know how that happened,but it still works!

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.