Skip to main content
1 of 3
c11ada
  • 143
  • 1
  • 1
  • 4

Format windows (ntfs) hard drive on Ubuntu - command line only

This is really a two part question.Iv never formatted a hard dirve on Linux/Unix, so please bare with me.

I had a old windows machine which recently died. So I decided to put the hard drive into my ubuntu server. This hard drive is currently NTFS file format. the Disk info is as follows

 description: ATA Disk product: SAMSUNG HD502HI physical id: 0.0.0 bus info: scsi@1:0.0.0 logical name: /dev/sdb version: 1AG0 serial: size: 465GiB (500GB) capabilities: partitioned partitioned:dos configuration: ansiversion=5 sectorsize=512 signature=000c6181 

Part One

I need to get some files of this hard drive, but when i try to mount the hard drive all that seems to mount is the boot partition. here is what I am doing

edit fstab and add the following

/dev/sdb /media/Microsoft ntfs-3g defaults,locale=en_US.utf8 0 0 

Then after this I mount using the following command

sudo mount -ro /dev/sdb /media/Microsoft 

can some one tell me what I am doing wrong, and how I can mount the right partition.

Part Two

Once I have successfully mounted the hard drive and copied the files. How do I go about Formatting the hard drive and make it usable for my linux system ? from what i have read I have to do something like

mkfs.ext3 /dev/sdb 

then create a partition using fdisk

can some one direct me to the what I actually need to do.

c11ada
  • 143
  • 1
  • 1
  • 4