RedHat 9: Swap not mounting

Posted on 2006-03-27
Last Modified: 2013-12-16

I have a RedHat 9 machine (Intel) and everything seems to funcion fine, except the swap partition is not mounting which is slowing the machine way down.  I am wondering if it is because everything in fstab is mounting with "LABEL"?  If so, what do I need to correct?


# swapon -s
Filename                        Type            Size    Used    Priority
(nothing listed here)

# swapon -a
swapon: /dev/hda2: Invalid argument

#cat /etc/fstab
LABEL=/               /                       ext3     defaults        1 1
LABEL=/boot        /boot                 ext3     defaults        1 2
none                    /dev/pts             devpts  gid=5,mode=620  0 0
LABEL=/home      /home                ext3     defaults        1 2
none                    /proc                  proc     defaults        0 0
none                    /dev/shm            tmpfs   defaults        0 0
/dev/hda2            swap                   swap   defaults        0 0

Question by:Mike R.
    LVL 43

    Accepted Solution

    if the /dev/hda2 is really swap (verify it with: fdisk -l /dev/hda)
    then propably swap got corrupted and needs to be rebuild: mkswap /dev/hda2
    LVL 10

    Assisted Solution

    Your fstab seems good to me, so I guess that ravenpl is right. You need to format your swap.
    If that doesnt work, I would do an fdisk to delete and create the swap partition from scratch (luckily it is easy to be done in your case)
    LVL 3

    Author Comment

    by:Mike R.
    The mkswap /dev/hda2 worked.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now