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: (2) </ [1] 2 >/

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

reply to topic new topic new poll
Topic: swap partition< Next Oldest | Next Newest >
alg0rithm Offline





Group: Members
Posts: 7
Joined: Mar. 2006
Posted: Mar. 04 2006,08:40 QUOTE

I made a swap partition /dev/hda2, 512 megs linux swap file system, but it won't let me type the command swapon /dev/hda2 as root, any ideas how to get this thing to work and autoload on boot from a hard drive install?
Back to top
Profile PM 
dtf Offline





Group: Members
Posts: 196
Joined: Nov. 2005
Posted: Mar. 04 2006,12:31 QUOTE

I ususally create the partitions including the swap partition and before doing the install enter the swapon command and then do the install.  What is the error you are getting?
Back to top
Profile PM 
alg0rithm Offline





Group: Members
Posts: 7
Joined: Mar. 2006
Posted: Mar. 04 2006,17:55 QUOTE

root@box:/home/dsl# swapon /dev/hda2
swapon: /dev/hda2: Invalid argument


is it because the partition is not mounted?
What would I do in that case to have it always mounted for boot and what location?
Back to top
Profile PM 
Guest
Unregistered






Posted: Mar. 04 2006,18:11 QUOTE

Not sure but you need to type mkswap /dev/hda2 and after that type swapon /dev/hda2
Back to top
dtf Offline





Group: Members
Posts: 196
Joined: Nov. 2005
Posted: Mar. 04 2006,21:38 QUOTE

When you create your partitions you need to create the swap partition with a drive type of 82.  As root execute the command

fdisk -l

You should see /dev/hda2 listed with Id 82 and the words Linux swap.  If you do not see this then you have not created the partition correctly.  And as Alg0rithm pointed out you need to execute mkswap /dev/hda2 and swapon /dev/hda2. I am not sure if the order is significate.  I remember doing mkswap and then swapon.
Back to top
Profile PM 
6 replies since Mar. 04 2006,08:40 < Next Oldest | Next Newest >

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

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: swap partition

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