Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 25 Jul 2014, 09:47
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to use a hard drive for a Swap Partition
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
kethd

Joined: 20 Oct 2005
Posts: 451
Location: Boston MA USA

PostPosted: Fri 30 Dec 2005, 20:59    Post subject:  How to use a hard drive for a Swap Partition  

How to dedicate a small hard drive (270MB) to Swap Space for Puppy:

* Connect to IDE Secondary Master.

* (Zero or Wipe it if you wish, using dd or other tools)

* Boot Puppy.

* Use fdisk or cfdisk to make a Linux Swap Partition (type 82).

* From the command line:
mkswap /dev/hdc1
swapon /dev/hdc1

You are done. You can see the fruits of your labor with the command:
# free

Now that you have gotten all this working manually, if you are using a standard sort of Puppy, it seems to look for and start using this swap space automatically each time you boot.

But if you are using a more traditional sort of Linux installation (Puppy HDoption-2 install), you will either have to start your swap manually each session:
swapon /dev/hdc1
or figure out how to add that setting to your boot sequence.

Further info:
http://www.murga.org/%7Epuppy/viewtopic.php?t=4135
http://www.lissot.net/partition/partition-08.html
http://www.xenotime.net/linux/doc/swap-mini-howto.txt
http://www.faqs.org/docs/Linux-mini/Swap-Space.html

What is Swap space?
Using external storage as a virtual extension of internal ram memory. A slow way to pretend that you have more memory than you really do.

Will this make my computer faster?
Generally, it would be more logical for it to make your computer slower! If you can get the job done without using swap, your computer should run faster. But some tasks (having many big programs open at once, or doing heavy-duty program development compilation) might require either swap space or giant impractical amounts of memory.
Back to top
View user's profile Send private message 
noip

Joined: 06 Oct 2005
Posts: 93
Location: Sydney

PostPosted: Mon 02 Jan 2006, 21:07    Post subject:  

k,

Add the swap partition to /etc/fstab .. assuming type 2 HD install like a conventional distro ...

Here's my Puppy fstab file - and no I don't know EXACTLY what all the options are - copied from successful models mainly. However, line 2 shows what I did with the swap partition. Note that the tabs I used to line the fields up have degenerated to spaces ...

/dev/hdb10 / ext2 defaults 0 1
/dev/hda3 none swap sw 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=2,mode=620 0 0
/dev/hda1 /mnt/C vfat rw,nosuid,nodev,noexec,nouser,async,umask=0 0 0
/dev/hda6 /mnt/D vfat rw,nosuid,nodev,noexec,nouser,async,umask=0 0 0
/dev/hdb12 /mnt/E vfat rw,nosuid,nodev,noexec,nouser,async,umask=0 0 0
/dev/hdb13 /mnt/F vfat rw,nosuid,nodev,noexec,nouser,async,umask=0 0 0
/dev/hda5 /mnt/debian ext3 defaults 0 2
/dev/hdb9 /mnt/slack ext3 defaults 0 2
/dev/fd0 /mnt/floppy auto noauto,user,rw 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0



Rgds

GS

ftgs
Back to top
View user's profile Send private message 
muskrat

Joined: 03 Jul 2005
Posts: 24
Location: Gulf Coast TX-MX

PostPosted: Tue 17 Jan 2006, 12:17    Post subject:  

I have a HD with a swap partion, but Puppy doesn't do swapon automaticly at boot. It's in my fstab file and using a midia utility I can do swapon, but I have to do it each time.

I'm running 300 and some odd Mgs Ram, so it's a nothing really. I would just like it to do a swapon at boot. So my question is where and how to I edit my boot sequence to do a swapon at each boot?

I'm running 1.0.7 miltisession CD using a HD partion for my pup002 file. Will I need to burn another CD?

_________________
Steve (Muskrat) McMullen
http://www.muskratsweb.com
Registered Linux User #305785
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
Guest
Guest


PostPosted: Wed 18 Jan 2006, 05:57    Post subject:  

open file /etc/rc.d/rc.local and add line "swapon /dev/hda2".

Of course change hda2 to wherever your swap partition is.
Back to top
muskrat

Joined: 03 Jul 2005
Posts: 24
Location: Gulf Coast TX-MX

PostPosted: Wed 18 Jan 2006, 14:07    Post subject:  

Thanks for the help, i'll look into that /etc/rc.d/rc.local and see what's there. But I believe I was misstaken, I was looking at MUT and seeing a button that said swapoff, and thinking it was stating the condition of my system, It wasn't it was stating that if I pushed the button it would turn the swapoff, meaning swap was on allready.
_________________
Steve (Muskrat) McMullen
http://www.muskratsweb.com
Registered Linux User #305785
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
wilcal

Joined: 26 Jan 2006
Posts: 14
Location: San Diego, CA

PostPosted: Tue 31 Jan 2006, 14:43    Post subject:  

I have found that many/most Distros have issues with
recognizing a Linux swap partitions. The most
successful process I have found and use all the time,
although convoluted, is as follows:

Use Killdisk:

http://www.killdisk.com/

and wipe the HD drive completely to zeros end to end.
This program puts your HD back to the identical
condition as it was when it was shipped from the
factory. Give it time. Some slower drives can take
an hour(s) to wipe clean. Even the MBR space will
be wiped to zeros.

I then use the

Ranish Partition Manager

http://www.ranish.com/part/

to examine the drive for the structure of the
drive I want to put the Swap partition on. Lets
use one I'm tinkering with right now. It's a 6.5GB
drive on an older Dell Laptop. This thing only has
64MB of DRAM so a prodigious Linux Swap Partition
would do it well.

I split the drive into two ext3 partitions. One
about 500MB and the other right at 6GB. Once I
have established these two partitions I delete
the first partition ( 500MB ). Basically marking
the space of the first partition as Unused.

I then boot from the CD-1 of the Mandriva 2006
intall CD's. I then proceed to the custom partition
manage section of the Mandriva intall. Mandriva
presents a very nicely laid out GUI partition
manager. What it shows is the MBR, 500MB of unused
space then the 6GB of ext3. I then select the unused
space and designate all of that space, 500MB, as
Linux Swap space. I then let the Mandriva install
program write the MBR and let it format all that.
It only takes a second or so.

I then boot back to a simple floppy running anything.
The HD now has a real Linux Swap partition created by
a major Linux Distro.

At this point I put in my Puppy Linux Live-CD and
reboot the machine. Puppy REALLY laps up this swap
partition seeing the entire 500MB as usable SWAP DRAM
and loads its self entirely to the swap space.

The now doggedly slow laptop with the anemic 64MB DRAM
becomes a champion canine and runs all the Puppy apps
lighting fast. What's interesting is that this same
laptop running WinBlows XP takes almost 10 minutes
to boot to a working desktop with XP installed on
it's HD. With Puppy booting from a Live-CD and this
big Swap partition Puppy boots to a usable desktop
in a couple minutes tops.

_________________
"DISK BOOT FAILURE - INSERT SYSTEM DISK AND PRESS ENTER"
is my friend
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0578s ][ Queries: 11 (0.0039s) ][ GZIP on ]