Formatting HD

I am trying to format* my HD (sdc) and am unsure how to do it properly. I have tried using ‘Disc Utility’ but don’t know if it actually HAS been formatted as it reported back within seconds that it had formatted it.
Also, as it was formatted in ‘NTFS’ before, now I’m running Ubuntu, I told it to format ‘linux’ so I now need to change a few things but don’t know what to put in place of ‘NTFS 3g’ or whatever it was.

  • It had some bad sectors with unrecoverable files on them (Could not copy or move them)

What is the output from:

sudo parted -l

and

sudo blkid

Where are you planning on mounting the drive

A typical fstab entry for an EXT4 formatted drive/partition would be:

/dev/sdb1 /media/My-Video ext4 errors=remount-ro 0 1

OR you can use the UUID of the partition instead of its “device” assignment … eg.

UUID=2a64f0ad-001b-4d31-b291-86f5d730509d /media/My-Video ext4 errors=remount-ro 0 1

Disk Utility probably did format the drive (quick format) … but if you want, you can also try gparted (available in the repos.

sudo parted -l

[spoiler]peter@Petes-ubuntu-pc:~$ sudo parted -l
Model: ATA ST3500320AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 497GB 497GB primary ext4 boot
2 497GB 500GB 2950MB extended
5 497GB 500GB 2950MB logical linux-swap(v1)

Model: ATA MAXTOR STM325082 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 250GB 250GB primary ntfs boot

Model: ATA Maxtor 6V250F0 (scsi)
Disk /dev/sdc: 251GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 251GB 251GB primary ext4

Model: ATA ST31000340AS (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 1000GB 1000GB primary ntfs boot

peter@Petes-ubuntu-pc:~$
[/spoiler]

sudo blkid

[spoiler]
peter@Petes-ubuntu-pc:~$ sudo parted -l
Model: ATA ST3500320AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 497GB 497GB primary ext4 boot
2 497GB 500GB 2950MB extended
5 497GB 500GB 2950MB logical linux-swap(v1)

Model: ATA MAXTOR STM325082 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 250GB 250GB primary ntfs boot

Model: ATA Maxtor 6V250F0 (scsi)
Disk /dev/sdc: 251GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 251GB 251GB primary ext4

Model: ATA ST31000340AS (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 1000GB 1000GB primary ntfs boot

peter@Petes-ubuntu-pc:~$
peter@Petes-ubuntu-pc:~$
peter@Petes-ubuntu-pc:~$
peter@Petes-ubuntu-pc:~$ sudo blkid
/dev/sda1: UUID=“959cb526-06f8-4d5d-bec2-a6b42f438b07” TYPE=“ext4”
/dev/sda5: UUID=“e56dad6b-358f-4948-b51f-4abce81f50b1” TYPE=“swap”
/dev/sdb1: LABEL=“Storage” UUID=“01CB4AA7A24CB100” TYPE=“ntfs”
/dev/sdd1: LABEL=“Video” UUID=“E6A88BB6A88B83B1” TYPE=“ntfs”
/dev/sdc1: LABEL=“My Documents” UUID=“a83de422-30bc-4b5a-bf17-3e35905295e5” TYPE=“ext4”
peter@Petes-ubuntu-pc:~$ [/spoiler]

Where are you planning on mounting the drive
Don’t quite get the question!
It was sdc1 ‘Win-MyDocs’

Remember this…
/dev/sdb1 /media/Win-Storage ntfs-3g defaults,user,locale=en_GB.utf8 0 0
/dev/sdc1 /media/Win-MyDocs ntfs-3g defaults,user,locale=en_GB.utf8 0 0
/dev/sdd1 /media/Win-Video ntfs-3g defaults,user,locale=en_GB.utf8 0 0

Also… Whats the best format to format a HD in this OS?

OK, I’m going to guess you -
a) took ownership of the file system when you formatted as EXT4 in Disk Utility
b) want it mounted at /media/MyDocs

First create a /media/MyDocs directoy:

sudo mkdir /media/MyDocs

Then open fstab for editing:

sudo gedit /etc/fstab

Find the line:

/dev/sdc1 /media/Win-MyDocs ntfs-3g defaults,user,locale=en_GB.utf8 0 0
[b]and replace it with:[/b]
/dev/sdc1 /media/MyDocs ext4 rw,user,exec 0 0

now to mount all fstab entries, run:

sudo mount -a

Now check if you can read and write files to the /media/MyDocs direcory.

I’m not entirely sure as it wont let me mount it.
Can you guide me through doing it properly from scratch please?

Or is that it above?

Have you tried the above ?

and what do you mean by “it won’t let you mount it” … error messages would be helpful :slight_smile:

It’s sorted, also there’s a locked folder in there called ‘Lost + Found’ with a little padlock icon and an ‘x’ Icon. Whats that all about?

Leave that in place … the root of all Linux partitions contain that directory … it’s where fsck etc. will put recovered files or file parts that it doesn’t understand what to do with, after a system crash etc.

See here, for a better explanation:
http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lostfound.html

I would have thought something like that would have been a hidden folder?

Me too … but there you go :wink: