LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   swap problems (https://www.linuxquestions.org/questions/linux-software-2/swap-problems-201514/)

talkinggoat 07-05-2004 07:32 PM

swap problems
 
over the last couple of months, i seem to have lost my swap partition. during bootup, it tells me that swapon has failed and the hd partition does not exist. where do i need to start to fix this problem?

arvind_sv 07-05-2004 08:51 PM

Go to /etc/fstab and search for lines with "swap" in the second column. These are the partitions that will become swap. Use "fdisk -l" and see if they're actually swap partitions.

If they're not, then, setup /etc/fstab with the correct swap partition. BE CAREFUL! If you give one of your data partitions as a swap partition in fstab, you lose all data there (almost certainly).

If you don't have any, you might have to use a partition manager to make a swap partition. Google around to see how to do that.

Arvind

amosf 07-05-2004 09:01 PM

Have you repartitioned your drive lately and used the swap partition for something else? Can we see a copy of your

/etc/fstab

file, that would be a help. If the swap partition is still available it may be able to be fixed. If it is gone or used for something else then you can always remove it from the fstab and create a swap file in your root directory to replace it - assuming you have room in / or you can create a new partition somewhere. It really depends on how your drive is set up.

talkinggoat 07-05-2004 09:36 PM

LABEL=/1 / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hde3 swap swap defaults 0 0
/dev/hdc3 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0


keep in mind that the os creates a swap partition for me when the original fails on boot.
i have not modified the fstab or the partition tables in any way. it just went out one day. i have no idea what i did. i am sure it was something small, but i know that i didn't do anything deliberately.

what is the log that it creates when it boots up? perhaps that may shine some light on the situation?

amosf 07-05-2004 09:47 PM

Hmm. okay. What distro is that and how many hard drives to you have... ie do you have an extra IDE controller card?

arvind_sv 07-05-2004 10:01 PM

The output of these two commands posted here might help:
fdisk -l /dev/hdc
fdisk -l /dev/hde

Arvind


All times are GMT -5. The time now is 09:23 PM.