LinuxQuestions.org
Help answer threads with 0 replies.
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 09-07-2004, 09:03 AM   #1
Alf829
Member
 
Registered: Jul 2003
Distribution: Fedora Core 2 & 5
Posts: 110

Rep: Reputation: 15
Unhappy Lost my swap space


Hey all,

I've just noticed that my linux didn't load up my swap space anymore, so I checked in the logs and found this:

...
EXT3 FS on hda3, internal journal
drivers/usb/input/hid-ff.c: hid_ff_init could not find initializer
input: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:1d.0-1
drivers/usb/core/usb.c: registered new driver hid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
Unable to find swap-space signature
kjournald starting. Commit interval 5 seconds
EXT3 FS on hda2, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Unable to find swap-space signature
...

I don't know when this happened, but I have a pretty good idea it was when I tried out suspend to disk for the first time. It didn't work and Linux rebooted up saying I made an unclean shutdown.

This is how my 40GB HD is set up:
hda1 - NTFS
hda2 - /boot
hda3 - /
hda5 - logical 1 - swap
hda6 - logical 2 - fat32 (for sharing files with linux and XP)

The output from df is the following:
[root@localhost root]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 10321168 5992588 3804296 62% /
/dev/hda2 99075 10946 83014 12% /boot
none 241440 0 241440 0% /dev/shm
/dev/hda6 4019272 659908 3359364 17% /mnt/windows

The swap partition (hda5) is still there but somehow it's not getting accessed. Any help on how to fix this problem would be very welcome.

I'm running Fedora Core 2 Test 1, with kernel 2.6.4, kde 3.1.95-0.3 on a Toshiba TE2300 laptop.

Regards,
Alf
 
Old 09-07-2004, 09:29 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,337

Rep: Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146
A swap partition isn't mounted like a regular filesystem. Check the output of the free command. What does it say for total swap? If zero then something is awry. You can try reformatting the swap partition:
mkswap /dev/hda5
to mount
swapon /dev/hda5
 
Old 09-07-2004, 10:52 AM   #3
Alf829
Member
 
Registered: Jul 2003
Distribution: Fedora Core 2 & 5
Posts: 110

Original Poster
Rep: Reputation: 15
Hi Michaelk,

this is my output from free:

[root@localhost root]# free
total used free shared buffers cached
Mem: 482884 462708 20176 0 98820 68256
-/+ buffers/cache: 295632 187252
Swap: 0 0 0

I take it this isn't good since swap is showing 0 across the board.

So, to reformat swap, do I do:
1. mkswap /dev/hda5
2. mount swapon /dev/hda5

Regards,
Alf
 
Old 09-07-2004, 11:30 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,337

Rep: Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146
Sorry my fault... your enabling swap not mounting. The command is just:
swapon /dev/hda5
 
Old 09-07-2004, 06:54 PM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You will have to to do mkswap /dev/hda5 and then do swapon /dev/hda5. Check in your /etc/fstab file for any incorrect swap lines.
 
Old 09-08-2004, 09:11 AM   #6
Alf829
Member
 
Registered: Jul 2003
Distribution: Fedora Core 2 & 5
Posts: 110

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Electro
You will have to to do mkswap /dev/hda5 and then do swapon /dev/hda5. Check in your /etc/fstab file for any incorrect swap lines.
This is what's in my fstab file:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
...

I don't think there's anything wrong with the swap mounting is there?

I ran the mkswap /dev/hda5 and swapon /dev/hda5 commands and now have a swap space. Do I need to do this everytime I reboot linux?
 
Old 09-08-2004, 09:43 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,337

Rep: Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146
No, swap will be automatically enabled via the line in your /etc/fstab file at boot time.
 
  


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
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 08:05 AM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM
2.6.2 kernel upgrade and lost swap space??? pld Linux - Hardware 2 02-10-2004 11:00 PM
Lost Swap Space rayflynn Linux - General 1 08-05-2001 04:44 PM

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

All times are GMT -5. The time now is 03:31 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