LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-17-2004, 11:20 AM   #1
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Rep: Reputation: 30
weird 'swapon -a' error


On my fresh slackware 10 install, all went well. Then I compiled kernel 2.6.7 and then the trouble started. My machine started to work extremely slow when I opened up to many programs and I soon found out that my swap partition wasn't used. I checked /etc/fstab and noticed that the line concerning swap space was gone .
I added it again and all worked. Now I recompiled my kernel with the same config file, but with some extra modules and have an even stranger problem. /etc/fstab isn't changed, but swapon -a won't activate my swap partition.

this is the error:
Code:
swapon: /dev/hda5: Invalid argument
And this is my line for swap in /etc/fstab:
Code:
/dev/hda5        swap             swap        defaults         0   0
tnx,
elluva
 
Old 08-17-2004, 11:45 AM   #2
ve2mrj
LQ Newbie
 
Registered: Nov 2003
Posts: 24

Rep: Reputation: 4
When you change kernel from 2.4 to 2.6 you must
reformat the swap:
mkswap /dev/hda5
swapon /dev/hda5

That's all

Richard
 
Old 08-17-2004, 11:54 AM   #3
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Quote:
Originally posted by ve2mrj
When you change kernel from 2.4 to 2.6 you must reformat the swap:
Well I learnt something today :)

If anyone is interested, it's due to version 0 of swap no longer being supported - apparantly!
Quote:
http://kerneltrap.org/node/view/799?...ts_per_page=35
Note: Version 0 swap isn't supported, and you need to re-make your swap partition as version 1. Turn off your swap using 'swapoff -a', run 'mkswap -v1 /dev/xxx' where xxx is your swap device (for each swap device you have) and then you can reenable your swap using 'swapon -a'. Makes a big difference on machines that run into swap early.
 
Old 08-18-2004, 02:39 AM   #4
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Original Poster
Rep: Reputation: 30
thanks, now I know
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
swapon on ntfs willy_9 Linux - Newbie 4 10-25-2005 09:37 AM
swapon command Krenn Slackware 3 08-13-2004 08:53 AM
swapon hda6 - invalid argument ??? thepasty Mandriva 1 07-09-2004 09:37 AM
2.6.3 swapon - function not implemented Sammy2ooo Linux - General 3 03-10-2004 07:08 AM
Swapon error: "device busy" during RAID install of 9.2 Seekadvice Mandriva 0 02-19-2004 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration