Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
In my PC I have Windows XP and RHL9. When I tried to upgrade from RHL9 to FC 4 I got an error during the begining of installation that the swap device is not found. Then when I checked in my RHL9 I have a entry in my /etc/fstab file
/dev/hdc8 swap swap defaults 0 0
but it's not getting mounted and following is the output of df -k.
[root@TAURUS root]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hdc9 30692672 8835872 20297696 31% /
/dev/hdc7 101089 14825 81045 16% /boot
none 515444 0 515444 0% /dev/shm
Can someone help me to mount the swap device? Using which command I can do it and how can I make it permanent.
Thanx in advance.
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
In our /etc/fstab file, do you have a line like so:
/dev/hda2 none swap sw 0 0
Note the /dev/hda2 is where my swap is, it might be different for you. If you don't know where the swap actually is check in cfdisk.
Lastly, if it fails to mount the swap partition, it could be that the swap partition is not formatted correctly - the above still needs to be in place for it being done at boot time, but do add it manually while the system is running do:
(again /dev/hda2 is my configuration)
if you need to make the swap partition, use makeswap.
As I mentioned in my first mail I have the following entry in my /etc/fstable file
/dev/hdc8 swap swap defaults 0 0.
But still it is not getting mounted. I tried the suggestion using the addswap. But it says no such command. I tried to locate it in my hard disk without success. How can I find out whether the mounting has failed during the boot time or not? Is there any way to mount it manually?
Thanks in advance,
first, as suggested, check with cfdisk to be sure which partition is your swap - the following commands will wipe all data from non-swap partitions.
if the swap is indeed /dev/hdc8:
as root -
Thanks for all the replies.
1. Yes the swap is not getting displayed using the df -k
2. I confirm my swap is activated and when I use the free it displays a non zero value for available space. I can switch it on & off using the swapon & swapoff commands.
But when I upgrade my RHL9 to FC3 and I'm choosing upgrade option while installing, it says the swap partition failed to initialize and the installation fails eventually. Any idea what should be done to over come this?
Thaks in advance,
I tried using the mkswap and tried to reinstall again. But I'm still getting the error "Error enabling swap device hdc9 no such file or directory. This most likely means the swap partition is not initialized".
I got to notice a strange thing while installing. Mine is a IDE hard disk and it is installed in secondary IDE controller as master. So when I boot using my RHL9 my partitions are named as hdc1, hdc2 etc and my swap is in hdc9. But FC3 always assumes it as SCSI. And it says existing RHL9 installation found at hda (but which is the instalation CD itself). When I boot in rescue mode using the installation CD and if I run fdisk -l I'm getting all the partitions named hda1, hda2, etc and the swap partition says hda9. From here I couldn't find my hdc partitions. Could you someone help me get out of this mess? (My CD Drive has been installed at the primary IDE controller as master)