76
28
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
Thanks for the update, I am looking into the details but in the mean time, you do have a backup of your NTFS data right? If not MAKE ONE NOW! It should be possible to do this without data loss but you never know... Also, do you have full access to the machine? Can you reboot into a live session for example? – terdon – 2013-09-11T11:47:04.853
@terdon I have root access but not physical access. The /dev/sda is not the one I boot from. I cannot do backup or boot from anything else. From http://ubuntuforums.org/showthread.php?t=1244058 I read that I have to delete the partition from the table and set a new one in the range of the NTFS size, then add a new partition that I have to initialize with ext4.
– Daniel W. – 2013-09-11T11:53:14.050Yes, exactly. Also have a look at this. Theoretically, once you have resized using
– terdon – 2013-09-11T11:57:35.403ntfsresize
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.@terdon I noticed that
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
. – Daniel W. – 2013-09-11T12:29:16.520Sorry, no idea about that. Perhaps this will help.
– terdon – 2013-09-11T12:32:42.653Running
testdisk
now... I hope the data is not lost xDDD hahahaaaaaaa nooooooo MASTER FILE TABLE corrupt gg – Daniel W. – 2013-09-11T12:41:30.260