To format your HDD you would need the Gparted application.
Open the Gparted application, and select your device (HDD) from the top right corner (it would be labelled as /dev/sdb or /dev/sda). Verify that its correct before proceeding furthur.
There would now be a number of partions displayed which are present on your HDD.
Right click on each , and select Delete.
This would Delete all the partitions.
Click on the accept icon /button in the menu to make the changes permanent.
Now you would have only a single block of unallocated space.
;and you can create your desired partitions.
right click on the unallocated space, click on new.
Just change the type to ext4 instead of ext2, rest all options as is.
This would create your desired ext4 partition. Click on accept button to write the changes to disk.
P.S.will post more later.
How to automount a partition on startup
1.) First you will need to create a mount point, that is, a location/folder where the mounted partition will appear.
For example you want the ext4 partition to appear as the folder Data in your home directory, for that you would have to create the folder using-
sudo mkdir /home/<your user name>/Data
Data is the name of the folder, you could choose any like MyData or LinuxData etc
2.)Now you need to find out the UUID of the partition you want to automount.For that,
In a terminal, type
This would list all your partitions and their UUIDs. From here you need to copy the UUID of your desired partition (the data partition that you have just now created).Copy it.
3.)Now we need to make changes to /etc/fstab, so that your partition is mounted at startup automatically.
in the terminal type-
sudo gedit /etc/fstab
Inside this file there will be a list of partitions. Now you need to make entry for your desired partition.
UUID=5c563186-c587-4715-b9c1-7044dfa05411 /home/<your user name>/Data ext4 defaults 0 0
In the same way create the entry as I have created, but remeber to replace my partiton partition UUID with the one that you got using the sudo blkid command, and replace your username with
After this save the file and restart..and after restaring, your partition should now be mounted in your desired Directory!
You can choose any other , more convinient mount point like
/media/Data if it suits you. But remember to make the directory Data under the media folder!
A little Useful information-
This is what the options that are being edited in /etc/fstab stand for
<file system> <dir> <type> <options> <dump> <pass>
UUID=5c563186-c587-4715-b9c1-7044dfa05411 /media/Data ext4 defaults 0 0
so file system is the UUID, dir is the directory where partition is being mounted, type is the type of file system, eg ext4, options are for specifying options like ro (readonly), and dump and pass are for checking the filesystem during startup