I have a volume /dev/sda1
(1.2 TB) containing an NTFS partition using 0.6 TB space.
I want to make an ext4
partition in the remaining 0.6 TB space.
I have not tried anything yet because I don't want to risk losing data if I hit a wrong command. (I cannot use gparted as I don't have GUI.)
Can you provide me with the correct command, or at least the right parameters for mkfs.ext4
.
root@rasp:~# fdisk -l /dev/sda
Disk /dev/sda: 1500.3 GB, 1500299395072 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930272256 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000303ee
Device Boot Start End Blocks Id System
/dev/sda1 2048 2930272255 1465135104 7 HPFS/NTFS/exFAT
ntfsresize
you can delete the partition usingfdisk
and recreate it smaller as long as it starts on the same cylinder. So, basically, first delete the existing partition then follow the steps in my answer to create the new one. You do this at your own risk, I have never tried it personally but it should work. I would really recommend using clonezilla or a similar tool to make a backup first.ntfsresize
ran properly with success but it must have deleted something because I get the error of integrity fail..Failed to load $MFT: Input/output error
.