LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-26-2004, 02:51 AM   #1
lynos
Member
 
Registered: Mar 2004
Distribution: RedHat, Centos, Ubuntu
Posts: 52

Rep: Reputation: 15
creating swap


Hi All

I have a problem with partitioning on RedHat 9. When I try to create swap partition on my desktop, I couldn't.
There are two OS one of them is Win XP and second one is RedHat 9.
At the end of installation there were /boot and / partitions without swap.
Is there anybody to help me? How can I create swap partition on my desktop?

Thx
 
Old 03-26-2004, 03:01 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
just create a extra partition (you do have extra space on your hard drive that is unpartitioned right?)
 
Old 03-26-2004, 03:05 AM   #3
zefo
Member
 
Registered: Mar 2003
Posts: 71

Rep: Reputation: 15
man mkswap is your friend together w/ cfdisk (but be careful!)/partitionMagic.
 
Old 03-26-2004, 03:07 AM   #4
lynos
Member
 
Registered: Mar 2004
Distribution: RedHat, Centos, Ubuntu
Posts: 52

Original Poster
Rep: Reputation: 15
Yes I have enough unpartitioned space.But I tried to create swap space using redhat's documents (http://www.redhat.com/docs/manuals/l...ap-adding.html).
 
Old 03-26-2004, 03:25 AM   #5
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
i read the first few lines of those instructions and I'm already lost!,

OK heres how, first: what device is the partition on? for the example ill assume /dev/hda4

Code:
fdisk /dev/hda
in that type
Code:
p
that will display all the partitions, normally you can only have 4, but if you choose you can sacrifice 1 in order to get multiple "logical" partitions (extended partitions, so how many doe you have already?
now type in
Code:
n
Code:
p
(unless your your gonna make the last one an extended partition thingy)
then press "enter" and now it should be asking you how much space do you want it to be?, enter in something like +100MB, or how much you want, leave it blank and it will make it as big as it can be (all the unpartitioned space)
now press
Code:
t
then enter the new partition number,
and change the value to 81 (i think its 81?)
then press
Code:
p
again, and see if you new partition is listed, it should also say by it "linux swap", if not then press "t" and try 82, or 83 (i think it was one of those) ..... now press
Code:
w
now that your new partition is ready, type:
Code:
mkeswap /dev/hda4
now just add a new line to your /etc/fstab file and your set, the line should look like
Code:
/dev/hda4 swap swap 0 0
(or just copy the other swap line that should be there, changing the device name of course,)

now just reboot and it should be set
 
Old 03-26-2004, 03:31 AM   #6
lynos
Member
 
Registered: Mar 2004
Distribution: RedHat, Centos, Ubuntu
Posts: 52

Original Poster
Rep: Reputation: 15
Thx to all
I will try and send the result.
 
Old 03-27-2004, 07:07 AM   #7
lynos
Member
 
Registered: Mar 2004
Distribution: RedHat, Centos, Ubuntu
Posts: 52

Original Poster
Rep: Reputation: 15
I tried the last procedure. But it didn't work.
However I found the real problem.When I partitioned the disk there was 8 GB disk space unallocated for Linux. As you know I created / and /boot partitions but not swap.The unallocated disk space doesn't allow to create swap partition.
After fdisk and repartition I could create swap partition correctly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a version of grep for swap KingofBLASH Programming 6 08-28-2004 10:22 PM
Creating a swap partition on an old pc, WITHOUT using linux... TheMusicGuy Linux - General 17 08-09-2004 12:43 AM
problem creating swap partition during installation kristof Red Hat 11 07-03-2004 01:25 PM
Creating a swap partition thejackal13 Linux - Newbie 6 10-30-2003 07:03 PM
Creating a swap partition dsuniln Linux - Newbie 9 06-30-2003 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration