LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-08-2004, 01:13 PM   #1
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Rep: Reputation: 15
swap partition fails after recompile kernel


I am dual-boot Slackware and FreeBSD (also Win2K). Slackware and FreeBSD share the same swap partition (known as hdb8) with space around +262MB.

After compile 2.4.23 kernel, the swap partition is not recognized..it was perfectly work in 2.4.5, as I still keep the 2.4.5 kernel.

The only changed I made long time ago was the line in /etc/rc.d/rc.S:
Quote:
# enable swapping
19 awk -- '/swap/ && ($1 !~ /#/) { system("mkswap "$1"") }'
/etc/fstab
20 /sbin/swapon -a
#
<--refer from the Linux-mini-HOWTOs/Linux+FreeBSD-->
Below is the boot message claims the errors:
Quote:
mkswap: error: swap area needs to be at least 40kB
Usage: mkswap [-c] [-v0|-v1] [-pPAGESZ] /dev/name [blocks]
swapon: /dev/hdb8: No such device
For more info:
This is on the linux 2.4.23:
Quote:
root@darkstar:~# uname -a
Linux darkstar 2.4.23 #1 SMP Sun Jan 4 20:57:29 MYT 2004 i686 unknown
[00:31am] root@darkstar:~# free
total used free shared buffers cached
Mem: 158724 34664 124060 0 2476 22824
-/+ buffers/cache: 9364 149360
Swap: 0 0 0
This is on the linux 2.4.5:
Quote:
root@darkstar:~# uname -a
Linux darkstar 2.4.5 #6 Fri Jun 22 01:38:20 PDT 2001 i686 unknown
root@darkstar:~# free
total used free shared buffers cached
Mem: 158428 39976 118452 0 2548 28648
-/+ buffers/cache: 8780 149648
Swap: 263036 0 263036
what I am supposed to do, does the kernel being changed and needed to do some modification? Help me...thanks..
 
Old 01-08-2004, 01:18 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
swapon: /dev/hdb8: No such device
Please

cat /etc/fstab
fdisk -l /dev/hdb


Cheers,
Tink
 
Old 01-08-2004, 01:51 PM   #3
bhaskie
Member
 
Registered: Jan 2004
Location: New Delhi, India
Distribution: L.F.S 5.0 | FreeBSD 5.2 | Debian sid | Gentoo 2004.0 | Slackware 9.1
Posts: 78

Rep: Reputation: 15
Error message says it can't even find the second hard drive (hdb)
Check the entry for /dev/hdb8 as "swap" partition in /etc/fstab.
If that doesnt work out, check the kernel's config file for any missing entry.
Maybe you disabled something while creating the config file.
 
Old 01-08-2004, 02:22 PM   #4
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Original Poster
Rep: Reputation: 15
Ahh...sorry..a bit late for reply...

well..

This is appended of fstab output:
Quote:
/dev/hdb1 / ext2 defaults 1 1
/dev/hdb5 /home ext2 defaults 1 1
/dev/hdb6 /pub ext2 defaults 1 1
/dev/hda8 /mnt/songs vfat defaults 1 0
/dev/hdb8 none swap sw 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
This is appended of fdisk output:
Quote:
Disk /dev/hdb: 15 heads, 63 sectors, 10585 cylinders
Units = cylinders of 945 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 4142 1957063+ 83 Linux native
/dev/hdb2 4143 4762 292950 5 Extended
/dev/hdb3 4763 10585 2751367+ a5 BSD/386
/dev/hdb5 4143 4555 195111 83 Linux native
/dev/hdb6 4556 4762 97776 83 Linux native
This is appended of mtab output:
Quote:
/dev/hdb1 / ext2 rw 0 0
/dev/hdb5 /home ext2 rw 0 0
/dev/hdb6 /pub ext2 rw 0 0
/dev/hda8 /mnt/songs vfat rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /proc proc rw 0 0
/dev/hda7 /mnt/assign vfat rw 0 0
hmmm..I got some point..why all the output don't seems to recognize the hdb8 ? The odd thing is why linux 2.4.5 just use that swap ...
 
Old 01-08-2004, 02:32 PM   #5
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Original Poster
Rep: Reputation: 15
A reminder that I am using the freebsd to create the swap partition..it should works, as I did for 2.4.5...
 
Old 01-08-2004, 02:33 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Maybe you had the old kernel compiled with
support for other partition types, and skipped
this in the 2.4.23 one?



Cheers,
Tink
 
Old 01-08-2004, 02:43 PM   #7
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Original Poster
Rep: Reputation: 15
mmmh...perhaps...then I might recompile my kernel..

I'll be back, guru..
 
Old 01-08-2004, 02:45 PM   #8
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
Is your 2nd HD a standard IDE? Or if it's not, did you enable support for it in the kernel?
I suppose your base system is on hda (1st disk), am i right?
Boot your previous kernel, then try (as root)
cat /proc/ide/hdb/model

**Sorry, didn't get your fdisk output

Last edited by ac1980; 01-08-2004 at 02:48 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
recompile kernel to read ntfs partition scottybwoy Debian 5 11-08-2005 07:24 PM
Swap Won't Work in New 2.6.6 Kernel, Partition Table Messed Up DvChWi Slackware 11 06-19-2004 12:51 AM
SWAP partition /dev/hdb2 fails to detect/mount after memory upgrade. Sgaileach1 Linux - Hardware 2 02-06-2004 03:29 PM
recompile kernel 2.4.23 support for apm..fails IamDaniel Slackware 5 01-21-2004 08:32 PM
How to remove a kernal recompile that fails? Crasherz Linux - Newbie 9 11-11-2003 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:00 PM.

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