LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-23-2005, 05:31 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,426

Rep: Reputation: 95
No HD swap with a home-compiled kernel.


I compiled both 2.6.10 and 2.6.11 kernel on a P166, with hd swap support, but top shows me there's 0 bit of available swap. Then i got an unstable system (apps crashing etc...).
If i boot on stock 2.4.29 kernel, then all is ok. I hesitate to put .config here, because i configured this kernel as usual.
 
Old 03-23-2005, 10:48 PM   #2
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: CentOS, MacOS, [Open]SuSE, Raspian, Red Hat, Slackware, Solaris, Tru64
Posts: 1,503

Rep: Reputation: 167Reputation: 167
Re: No HD swap with a home-compiled kernel.

Quote:
I compiled both 2.6.10 and 2.6.11 kernel on a P166 ...
Well, I'll say this: You're certainly a patient soul.

I could barely tolerate a simple install of 2.6 on a P166 let alone a kernel compile.
Quote:
top shows me there's 0 bit of available swap. Then i got an unstable system (apps crashing etc...).
Perhaps these are dumb questions on my part: Have you defined a swap partition? What does "swapon -s" report? And, last but not least: There's a kernel config option for swapping? (I mean, if not a hard disk, where? )

Anyway, I'm rather hoping that you don't come back and tell us that the top display's 4th line reads something like "Swap: 0k total, 0k used". If it does, you're going to have to create a partition to be your swap device/area. Alternatively, you may be able to use a regular file as a swap space but there are restrictions on doing that. However, if you have no unused space on your disk(s) to define a dedicated swap partition, a swap file would be the way to go. See the manpages for "swapon(8)", "mkswap(8)", and "fstab(5)" for some additional information on that. The biggest swap file gotcha seems to be that the file cannot have any "holes" in it, which I take to mean that the file must be contiguous. While ext2/ext3 filesystems (and probably Reiser and the others as well) aren't supposed to fragment, I'm not sure how you'd guarantee that other than follow the advice in the mkswap(8) manpage. Then I always worry about a performance hit if swap space was located in a filesystem (but maybe I'm just superstitious about that).
Quote:
If i boot on stock 2.4.29 kernel, then all is ok.
The 2.4.x kernels could often run without any swap. The 2.6.x kernels pretty much require it (or so I recall reading back when 2.6 was initially released).

Post any questions. Good luck... (I may be slow in replying since LQ hasn't been able to use my email address to send notifications on replies. For the last year or so. (grumble, grumble).)
 
Old 03-28-2005, 08:36 AM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,426

Original Poster
Rep: Reputation: 95
I use P166 as a server, so i can let him compile quiet!

Yes i have defined a swap partition. When i use the default kernel, top is ok.
I compiled new kernel with swap option, like i do on other computers (i compile a LOT of kernel), but the output of top is different. It shows 0k.

Swapon don't work.

I'll continue to search. Thx.
 
Old 06-06-2005, 09:59 PM   #4
puffinman
Member
 
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Gentoo, Slackware
Posts: 217

Rep: Reputation: 30
I'm having this same problem with the 2.6.11.11 kernel on my HP ze4430us running slackware 10.1. Swap works fine with default 2.4.29 kernel. Has anyone figured this out?
 
Old 06-07-2005, 04:57 PM   #5
puffinman
Member
 
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Gentoo, Slackware
Posts: 217

Rep: Reputation: 30
Lightbulb

I finally figured it out. Turns out that one time I was playing with the suspend-to-disk option of the new kernel, but never got it working and just forgot about it. The suspend to disk writes the RAM image to the swap partition, and then the kernel needs to be run with appropriate parameters to check for the presence of this data in the swap partition on reboot. If you don't run the kernel with this option (or run an older kernel that does not have suspend/resume capability), then the kernel will see all this data on the swap partition as corruption and won't mount the partition at all. Problem was solved by re-initializing the swap partition with
Code:
mkswap /dev/hda1
(insert your swap partition in place of hda1).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
/, /swap, /home What about /boot? bluedevlx Linux - Newbie 10 12-01-2004 04:22 PM
OMG!!!! Linux boot, home, and swap partitions have dissapeared!!!!!!!!!!!!!!!!!!!!!!! aweir14150 Mandriva 9 04-30-2004 12:14 PM
no swap on self-compiled 2.6.3 kernel sterrenkijker Debian 0 03-21-2004 03:40 PM
home-compiled kernel in panic sterrenkijker Debian 3 03-11-2004 08:06 AM
Separate partions for /usr, /home,/root, and /swap hedburner Slackware 2 09-14-2003 11:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration