My Blog

April 10, 2008

Linux hangs on Enabling swap space when bootup

Filed under: Miscellaneous — by enotebook @ 2:05 pm

Problem:
with enabling swap space on “Boot Time“.
while Redhat Linux Booting into run level 3 , then it suddenly got struck up with swap space enabling.

Solution:
Boot into single user mode and make sure /etc/fstab has correct entries. Also can format swap partition.

Before formatting swap partition please disable that partition. do(in single user mode):

#swapoff /dev/hda5 (your /etc/fstab entry for swap).
To Create new swap partition do the follow,
step1:
Create new partition by using “fdisk”.Say here “/dev/hdaX”(Also works with deleting old swap partition and recreate it to use original space.)
step2:
Create Swap signature on that partition.to do that,
#mkswap -v1 /dev/hdaX
step3:
Enable swap partition,
#swapon /dev/hdaX
step4:
Check the status of swap partition.
#swapon -s

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: