Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

format command

Osbaldo
Occasional Contributor

format command

I had linux previously installed and I'am getting ready to format the hard drive. What's the formatting command for linux?
Be always prepared
7 REPLIES
Mark Fenton
Esteemed Contributor

Re: format command

To format a partition in Linux, you'd use mkfs with the appropriate file system type stuck in there -- check the man page for more complete info.
Osbaldo
Occasional Contributor

Re: format command

I want to install windows 98 on it, but it won't let me because I had linux previously installed. It gives me a message about creating a partition on MS- DOS.
Be always prepared
Mark Fenton
Esteemed Contributor

Re: format command

Ah,

You need to repartition the disk and make room for the windows 98 installation!

Fdisk is the partition software of choice, and can be used not only to repartition the drive, but to remove the LILO from the Master Boot Record. Details of this process are available from Microsoft (of course) at http://support.microsoft.com/support/kb/articles/q171/6/11.asp
Kodjo Agbenu
Honored Contributor

Re: format command

Hello Osbaldo,

Here is a method you can use, but remember that it will make you loose all data in your disk.

Boot from your Linux install CD-Rom.

After some screens (language and keyboard configuration), type CTRL-ALT-F2 to get a console shell.

Then, launch fdisk to remove all partitions on your disk.

For example if you have a single IDE disk, your disk drive is known by the system as /dev/hda. Then execute fdisk /dev/hda.
At the prompt : type "m" to get some help.
The deletion command is "d". Start deleting from the highest partition number to the lowest one (eg : from 7 to 1). After each deletion, type "p" to make sure that is it actually done.
At the end, type "w" to apply changes and exit.

After that, your disk is ready to be used for W98 install.


All what I described above could be done with an MS-DOS boot disk with the MS-DOS fdisk.exe command. Not exactly the same syntax, but you can reach the same result.


But in my opinion, replacing Linux by W98 is exactly as replacing a Jaguar with a Corsa...

Good luck

Kodjo
Learn and explain...
Shahul
Esteemed Contributor

Re: format command

Hi

U boot thru a dos bootable and use fdisk command. First remove all partition and then create fresh partitions as per ur requirement.

Best of luck

Shahul
Gavin Kerr
Occasional Visitor

Re: format command

The quickest (And dirtiest) way to do this:

In linux (As root)
Assuming your disk is /dev/hda

cat /dev/zero > /dev/hda

let it run for a minute, then hit the reset button and boot off the win98 install disk.

Win98 will see a blank disk and just create a (Disk sized) win98 partition for you.

:-)

Gav
Mark Fenton
Esteemed Contributor

Re: format command

Gav,

Cool idea -- once upon a time a sysadm at my work did something very like that to the root fs. Ended up in an ugly reinstall as there wasn't enough left to do a restore...