LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 03-16-2002, 11:38 AM   #1
chappy011
LQ Newbie
 
Registered: Mar 2002
Location: Troy, NY
Distribution: Red Hat 7.2
Posts: 9

Rep: Reputation: 0
cfdisk command not found


I am new to Linux, so hopefully this question won't be hard for you folks.

I installed Red Hat 7.2 last week with 48 megs of RAM and a swap size of 180 MB. Yesterday, I got another 128 megs of RAM and installed it in the computer. I read that the swap space should be twice the amount of RAM, so now I want to increase the swap space by another 180 MB or so.

I read that the way to do this is using the cfdisk or fdisk command. However, when I try typing either of those commands in the shell window (I currently have it set up to use GNOME), I get the error message 'Command Not Found'. Why is this?

Could those commands have not gotten installed when I installed the OS? If so, where are they and how do i install them now? Or, can I not use cfdisk from within GNOME? If so, how do i get out of GNOME?

Any help would be appreciated. Thanks!
 
Old 03-16-2002, 12:01 PM   #2
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
The commands are not installed OR, go to console and type su then the root password. Now as SuperUser, type fdisk or cfdisk. You should be able to use them now.
 
Old 03-16-2002, 12:10 PM   #3
chappy011
LQ Newbie
 
Registered: Mar 2002
Location: Troy, NY
Distribution: Red Hat 7.2
Posts: 9

Original Poster
Rep: Reputation: 0
I typed su then the root password. Then when I tried using cfdisk and fdisk, I still got the same 'Command not found' message. So what next?
 
Old 03-16-2002, 12:25 PM   #4
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
Then I assume they are not installed. Which is odd enough of course, but i've found alot of oddness in RH's package installs and what it defaults to. You'll wanna find the install CD that has the util-linux 2.11(x) rpm Probably on the first i'd assume.
 
Old 03-16-2002, 04:47 PM   #5
chappy011
LQ Newbie
 
Registered: Mar 2002
Location: Troy, NY
Distribution: Red Hat 7.2
Posts: 9

Original Poster
Rep: Reputation: 0
OK, i used the rpm command to see if the util-linux 2.11 package was already on my computer and it was. So then I tried logging out and logging back in as root (instead of using su). After I did this I was able to access the fdisk command - but not cfdisk. I tried to create a swap partition using fdisk and partially succeeded. I was able to create the partition - but when I looked at it through GNOME's hardware browser it says its type is 'None' instead of 'linux-swap', like my other swap partition says. When I created the partition I gave it the system ID of 82. And when I go back and look at it in fdisk, it says that its type is Linux Swap.

So now I have a few questions:
1) Why does the Hardware Browser say that the partition type is 'None'? Does this mean I didn't create the partition right, or is the Hardware Browser program just buggy? Or am I only allowed to have one swap partition ?

2) Why can I still not use cfdisk? Is it in another package, or should I try reinstalling the util-linux package?

3) Are there any advantages to using cfdisk over fdisk - does it do the job any better or is it just a better interface?
 
Old 03-16-2002, 07:54 PM   #6
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
It's probably fine if you set the partitions up as the correct types. The hardware browser is something i've never worried about. If it works it works. It may be that RedHat decided not to put cfdisk in their distro of the util package, you got me there. As far as cfdisk, yeah, it's a helluva lot easier to use. It's alot like DOS's fdisk. Black & white text UI. Makes setting types etc,... very easy. You could probably just get the source package from the GNU website and install that instead.
 
Old 03-16-2002, 07:57 PM   #7
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
you can get cfdisk here in rpm format: http://rpmfind.net/linux/RPM/contrib...8g-1.i386.html

-trickykid
 
Old 03-17-2002, 04:03 AM   #8
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
When ' su ' doesn't work, try ' su - '. Did you run the mkswap command after creating the swap partition?

Last edited by linuxcool; 03-17-2002 at 04:12 AM.
 
Old 03-19-2002, 10:59 PM   #9
chappy011
LQ Newbie
 
Registered: Mar 2002
Location: Troy, NY
Distribution: Red Hat 7.2
Posts: 9

Original Poster
Rep: Reputation: 0
su - worked like a charm. And no, I did not use the mkswap command - I didn't know I had to. So what are the steps involved in creating a new swap partition? First you have to use fdisk to create the partition. Then use mkswap, and is that it? I was looking through the mkswap man page, and they reference the swapon command as well as the /etc/fstab file. Do I have to run the swapon command and/or edit the /etc/fstab file as well? Thanks for all the help!
 
Old 03-20-2002, 04:12 AM   #10
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Yep. You create the swap partition. Next run mkswap /dev/hdXY. Replace the XY with the correct partition info. Edit your /etc/fstab. Add a line like this:
/dev/hdXY swap swap defaults 0 0. Then run swapon -a to initialize it. The next time that you boot up the new swap file will automatically be initialized.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: <command name> command not found smash Programming 5 03-13-2006 08:48 AM
command not found ginda Linux - General 3 07-16-2005 04:15 PM
fdisk/parted/cfdisk: command not found indole Linux - Software 2 02-17-2005 12:08 PM
how can I have cfdisk command in Redhat 8.0? broodman Linux - Newbie 12 07-19-2003 12:14 PM
:command Not Found severedhead Linux - Software 2 08-29-2002 07:51 PM


All times are GMT -5. The time now is 11:23 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration