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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
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.
- Jack
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:
addswap /dev/hda2
(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,
- Jack
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 -
mkswap /dev/hdc8
swapon /dev/hdc8
swap will not be displayed in the output of the df command.
Look at the output of the free command. If the value of total swap is greater then zero then it is activated.
As stated make sure hdc8 is really a swap partition. You need to be logged as root to run the commands. If running the commands via su then use su - instead to include root environment.
/dev/hdc only refers to the CDROM if the drive is installed in the second IDE controller primary location. In typical PC the hard drive will be /dev/hda and the CDROM /dev/hdc but it does not matter.
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,
- Jack
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)
Thanx,
- Jack
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.