Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting the hard drive 1

Status
Not open for further replies.
Jul 1, 2004
28
US
Hello,
My friend gave me a disk with linux loaded on it and I am not sure what commands are needed to format the hard drive. Ultimately I would like to format the hard drive and load another operating system on it. Can anyone point me in the right direction to get this accomplished. I am not very experienced in Linux/Unix commands.

Thanks!
 
You could begins with something as simple as DOS. connect the HD to your system and boot up with a DOS disk. Then using the Fdisk utility, you can choose to delete the non-dos partition or any other partitions that may be on the HD; once that is done, you can install any OS you want. Please note that sometimes Linux will create serveral partitions on a hard drive.

If at first you don't succeed, reboot!
 
Thank you for your quick feedback....unfortunately my laptop does not have a floppy disk. The only bootable device I have is my cd-rom. I have a factory recovery disk that came with my laptop. But when I boot that with the new hard drive, it attempts to format the disk, but an "internal error" is encountered. That is all the info I have to provide. Maybe the disk is corrupt or has crashed. If you have any other information to provide or direction I would appreciate it greatly.

Thanks!!
 
You may download an live-iso-image or an installation-cd, burn it to cd (if you have a burner - perhaps on another machine) and start installation from that medium.
You will get asked how to partition and format what, to get a linux filesystem.

Normally you need at least two: a partition for the filesystem and a partition for swap-space.

A somewhat new and nice userfriendly girl in town is ubuntu-linux, which you get here, if you don't have different preferences right now:


seeking a job as java-programmer in Berlin:
 
Also make sure you're BIOS is not stopping the master boot record from being overwritten. It used to have problems when "Chipaway (I think) virus" was enabled.

Mark

There are 10 types of people in this world, those who undersand binary and those who don't.
 
If you have a Windows 9x or ME boot CD, you can use that and boot to a command prompt. From there you can run fdisk to reconfigure the disk.

If not, you will need to download a Linux bootable CD (live CD) like KNOPPIX, or SuSE or Ubuntu. Let the linux live-cd boot using the defaults. Open a terminal window as root (it is usually an option on the menu like Root-terminal). You can tell if you are root because the prompt will be a '#.'

As root type 'fdisk /dev/hda' assuming that this hard disk is your primary, master disk. Follow the commands to delete all partitions that exist on the hard disk. A 'p' will print all of the partitions and their numbers that exist on the disk. Partitions 1-4 are primary partitions. Partitions > 4 are extended (or DOS logical) partitions. A 'd' will delete a partition, with a second prompt to ask you for the partition number. Be sure to delete all of the partitions.

Then type 'w' to write the disk with no partitions and exit fdisk.

When you get a prompt back, you can shutdown the PC and should be able to install a Windows OS.


pansophic
 
If you want to wipe the drive to put Windows on it then just boot from the Windows CD - check you BIOS settings to ensure that CD is your first boot device.
Once you boot from a Windows CD, (if it's Win2k or XP) you will be shown a list of partitions and drives. Setup will let you format the ones you want and you can format them in FAT32 or NTFS.
If you want to know how to do it in Linux then don't listen to me! :)

Good Luck,


Steve
(Resident WinNT admin / Linux Newbie)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top