swap partitionForum: HD Install Topic: swap partition started by: alg0rithm Posted by alg0rithm on Mar. 04 2006,08:40
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?
Posted by dtf on Mar. 04 2006,12:31
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?
Posted by alg0rithm on Mar. 04 2006,17:55
root@box:/home/dsl# swapon /dev/hda2swapon: /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? Posted by Guest on Mar. 04 2006,18:11
Not sure but you need to type mkswap /dev/hda2 and after that type swapon /dev/hda2
Posted by dtf on Mar. 04 2006,21:38
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. Posted by dtf on Mar. 04 2006,21:45
Oops. Sorry - I meant to credit fxb with pointing out that you need to run mkswap in my previous post.
Posted by alg0rithm on Mar. 05 2006,02:22
yea I forgot to do the mkswap command first, thanks for all the help
|