Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Formatting A Linux Drive
post Feb 9 2004, 10:58 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 9-February 04
Member No.: 2,343

I'm trying to format a hard drive that is running Red Hat v9. Right now I have a dual boot system set up, so I can boot into Windows XP or Red Hat 9. I've gotten several pointers elsewhere, but everything seems to involve a command that linux tells me doesn't exist (fdisk) or a command that it simply refuses to execute (mkfs.ex3 /dev/hd...). I've tried the latter logged on normally, logged on as root, and from a boot disc. None worked. It says it can't do it for some reason. I've checked mount to be sure I have the right drive and partition and everything seems to check out, so I'm not sure what it is I'm not doing.

a.p. fergus
Go to the top of the page
+Quote Post
post Feb 10 2004, 07:56 AM
Post #2

Its GNU/

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151

for whatever the reason, your root user may not have /sbin in his path....

Issue the command (as root):

env | grep PATH

and see if /sbin is in there .... it should look something like this:


(fdisk and mke2fs {...which is also the same as mkfs.ext3 or mkfs.ext2 depending on switches} are both in /sbin)

If there is no /sbin in the root path, I would edit (or create if it doesn't exist) the file called /root/.bash_profile

add as the last line of that file:

export PATH=/sbin:/usr/sbin:$PATH
If you would like more help with formatting the drive, be specific on what you are trying to accomplish ... why are you trying to format the drive ... for example:

do you want to format (actaully in Linux it's called making a filesystem) it for use again in Linux and to reinstall RH9 or a different Linux? (if so, you can do this as part of a fresh install and don't need to d it before hand).

do you want to get rid of the partition and create free space (or another partition) for windows?

or something else?

BTW, if you are booted to a partition, you can't reformat that partiton because you have files open on it ...

Johnny Hughes
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
+Quote Post
post Feb 10 2004, 08:05 AM
Post #3

Whats this Lie-nix Thing?

Group: Members
Posts: 10
Joined: 15-January 04
From: Toronto
Member No.: 2,146

I have done all the partioning and formatting at install time. Most distors offer this option during install. You could try booting your installation CD's and adding the partition and formatting during install. You should be able to quit after that without destroying the current install.

I'm running Mandrake 9.2 It does have fdisk command. I did a man fdisk to see if it existed, the interesting think was at the "bugs" section. Here it is.
There are several *fdisk programs around. Each has its problems and
strengths. Try them in the order cfdisk, fdisk, sfdisk. (Indeed,
cfdisk is a beautiful program that has strict requirements on the par-
tition tables it accepts, and produces high quality partition tables.
Use it if you can. fdisk is a buggy program that does fuzzy things -
usually it happens to produce reasonable results. Its single advantage
is that it has some support for BSD disk labels and other non-DOS par-
tition tables. Avoid it if you can. sfdisk is for hackers only - the
user interface is terrible, but it is more correct than fdisk and more
powerful than both fdisk and cfdisk. Moreover, it can be used nonin-

The IRIX/SGI type disklabel is currently not supported by the kernel.
Moreover, IRIX/SGI header directories are not fully supported yet.

The option `dump partition table to file' is missing.

cfdisk(8), mkfs(8), parted(8), sfdisk(8)

You may want to do a man on some of these other fdisk type commands. The other thing I would suggest is have a look through the gui tools Redhat supplies to see if there is a gui tool. Mandrake has one.


Go to the top of the page
+Quote Post
post Feb 10 2004, 10:39 PM
Post #4

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 9-February 04
Member No.: 2,343

Thanks for the help. It looks like things should work now.

a.p. fergus
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 21st July 2018 - 08:27 PM