How linux partitions (ext4 type) could be merged & converted in to NTFS type Data Partition? (without disturbing existing ntfs partitions)

Asked by Navin Talati

Friends,
I am seeking your valuable guidance related partitioning the hdd. Actually I have a very little computer/linux knowledge and hence I am expecting detailed stepwise reply.

I have 1 TB HDD in which Ubuntu 14.04 was freshly installed and then it is upgraded to Ubuntu15.10, keeping partitions as under:
/dev/sda
 /dev/sda1 ---> ext4 /boot 3GB
 /dev/sda3 ---> ext4 / 35GB
 /dev/sda4 ---> swap 12GB
 /dev/sda7 ---> ext4 160GB
 /dev/sda5 ---> ntfs 419GB
 /dev/sda6 ---> ntfs 371GB

Now, I have added a 250 GB HDD for Linux O.S. in which I have freshly installed Ubuntu 16.04. Its partitions are maintained as under:
/dev/sda1 ---> ext4, /boot, 3 GB
/dev/sda2 ---> ext4, /, 100 GB
/dev/sda3 ---> Swap, 12 GB
/dev/sda5 ---> ext4, /home, 135 GB

Therefore the O.S (i.e. Ubuntu15.10) in previous 1TB HDD is not required

Now, I want to use the 1TB HDD for Data only. For that, I want to merge & convert /dev/sda1 ---> ext4 /boot 3GB, + /dev/sda3 ---> ext4 / 35GB, + /dev/sda4 ---> swap 12GB, and + /dev/sda7 ---> ext4 160GB in a SINGLE Data Partition of 210 GB of NTFS file system. I mean, the 1 TB hdd, I wish to split into THREE Partitions only ( 210 GB + 416 GB + 371 GB ) and all of NTFS type file system to store my data.

My question is:
How can I merge & convert 3 + 35 + 12 + 160 GB partitions (these are all Linux partitions) in a SINGLE Partition of 210 GB – ntfs type without disturbing 416 GB + 371 GB partitions?

Thanks to all in anticipation.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You will need to to copy the data off that you want then remove the partitions and make a new one that is the size of the freed space.

Your backups will make this a lot easier as you can simply destroy the file systems then restore from your backups.

Revision history for this message
Navin Talati (n-m-talati) said :
#2

Sir,

The data in partitions 416 GB + 371 GB is a huge and I do not have that much spare space in my system and the activity is also a very time consuming to copy such a huge data and re-transfer them back to the original partitions.

This is the main reason as I am seeking some guidance to merge & convert 3 + 35 + 12 + 160 GB partitions without disturbing last TWO (416 GB + 371 GB) ntfs type partitions.

Can I do the job as under?

I keep only TWO hdds in the system --->
(1) hdd with Window-7 o.s.
(2) 1 TB hdd with Ubuntu 15-10 (i.e. hdd under captioned subject).

Then I boot the system through Window-7 and go to Control Panel ---> Computer Management ---> Disk management, which will show both the hdds detail and graphical layouts with colour bands/strips showing Unallocated, Primary partition, Extended partition, Free space, Logical drive etc.

In this case of 1 TB hdd, it shows as under in the order from Left to Right:

3 BG, --> 35 GB --> 12 GB --> 160 GB (all four as dark blue coloured Primary partition, THEN --> 416 GB --> 371 GB (both as light blue coloured Logical drive).

Can I delete these first FOUR partitions in the order from 160 GB --> 12 GB --> 35 GB --> 3 GB, and make a common Free space/Unallocated partition, and then I format the whole 210 GB space with ntfs file system.

This is just my theoretical assumption. Could this be executed successfully?

Please guide me.

Thanks a lot in anticipation

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

The information that you gave seems strange to me, because a partition table can only have four primary partitions, but I see information about five in your output.

Maybe a partition listing with the command

fdisk -l

helps us understand the exact layout of your disks.

Revision history for this message
Navin Talati (n-m-talati) said :
#4

The partition detail on the terminal output is found as under:
I have kept only TWO hdds as under on the machine to get this output.

(1) 160 GB hdd with Window-7 o.s.
(2) 1 TB hdd with Ubuntu 15-10 (i.e. hdd under captioned subject of merging the FOUR partition 3 BG, --> 35 GB --> 12 GB --> 160 GB ).
NOTE: The 12 GB partition is a swap and therefore it may be excluded from list of the primary partition.

Commands applied are:
(1). sudo fdisk -l
(2). sudo parted /dev/sda print
(3). sudo parted /dev/sdb print

----------------------------- OUTPUT ---------------------------------------

Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 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
Disklabel type: dos
Disk identifier: 0x12131212

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sda2 206848 206645247 206438400 98.4G 7 HPFS/NTFS/exFAT
/dev/sda3 206645248 312578047 105932800 50.5G 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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
Disklabel type: dos
Disk identifier: 0x000333ba

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 5855231 5853184 2.8G 83 Linux
/dev/sdb2 97652734 1953503999 1855851266 885G f W95 Ext'd (LBA)
/dev/sdb3 5855232 74215423 68360192 32.6G 83 Linux
/dev/sdb4 74215424 97650687 23435264 11.2G 82 Linux swap / Solaris
/dev/sdb5 409593303 1228795784 819202482 390.6G 7 HPFS/NTFS/exFAT
/dev/sdb6 1228795848 1953503999 724708152 345.6G 7 HPFS/NTFS/exFAT
/dev/sdb7 97652736 409591807 311939072 148.8G 83 Linux

Partition table entries are not in disk order.
navin@navin:~$
--------------------------------------------------------------------------------

navin@navin:~$ sudo parted /dev/sda print
Model: ATA ST3160211AS (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
 1 1049kB 106MB 105MB primary ntfs boot
 2 106MB 106GB 106GB primary ntfs
 3 106GB 160GB 54.2GB primary ntfs

navin@navin:~$
----------------------------------------------------------------------------------

navin@navin:~$ sudo parted /dev/sdb print
Model: ATA ST31000528AS (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
 1 1049kB 2998MB 2997MB primary ext4 boot
 3 2998MB 38.0GB 35.0GB primary ext4
 4 38.0GB 50.0GB 12.0GB primary linux-swap(v1)
 2 50.0GB 1000GB 950GB extended lba
 7 50.0GB 210GB 160GB logical ext4
 5 210GB 629GB 419GB logical ntfs
 6 629GB 1000GB 371GB logical ntfs

navin@navin:~$
----------------------------------------------------------------------------
Actually I want to keep partitions #5 & #6 which are ntfs type, undisturbed.
and want to merge remaining all and form a single ntfs type partition of about 210 BG size .

How this can be done? - Feel free if you need any further information.
Thanks in anticiapation.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

It is not possible to merge those four partitions.
Reason: sdb1, sdb3 and sdb4 are primary partitions, and sdb7 is a logical partition inside the extended partition sdb2.

The only possibility that you have is to copy the data elsewhere, completely re-partition the disk, and then restore the data that you want to keep.

Revision history for this message
Navin Talati (n-m-talati) said :
#6

Thanks for the quick reply stating that it is not possible to create a single partition pf about 210 GB. o.k. sir.

I request you to see the below mentioned terminal output
-----------------------------------------------------------------------------------
navin@navin:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
[sudo] password for navin:
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 149.1G
├─sda1 ntfs 100M System Reserved
├─sda2 ntfs 98.4G WIN_7 OS
└─sda3 ntfs 50.5G WIN_7 EMPTY
sdb 931.5G
├─sdb1 ext4 2.8G /boot
├─sdb2 1K
├─sdb3 ext4 32.6G /
├─sdb4 swap 11.2G [SWAP]
├─sdb5 ntfs 390.6G HOME_STORE
├─sdb6 ntfs 345.6G SUN_STORE
└─sdb7 ext4 148.8G
sr0 1024M
navin@navin:~$
------------------------------------------------------------------------------------

Sir, alternatively, is it possible to convert the only sdb7 partition (being a logical one) from ext4 type to ntfs type?
If it is possible, I can get THREE logical partitions for data storage (sdb5, sdb6, and sdb7)continuously.
And in the remaining space of sdb1+sdb2+sdb3+sdb4 (totalling to about 50 GB including swap), I may reinstall a new light OS like EduBOSS or similar.

Is this possible?

Thanks in anticipation.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

I see the following possibilities:

1.
delete the partitions sdb1, sdb3 and sdb4 (but not sdb2!)
/dev/sdb1 * 2048 5855231 5853184 2.8G 83 Linux
/dev/sdb3 5855232 74215423 68360192 32.6G 83 Linux
/dev/sdb4 74215424 97650687 23435264 11.2G 82 Linux swap / Solaris
giving free space of about 46 GiB
That free space can then be used to create new partitions(s).

and

2a.
delete the partition sdb7
/dev/sdb7 97652736 409591807 311939072 148.8G 83 Linux
giving free space of about 149 GiB
That free space can then be used to create new partitions(s).

or

2b.
keep the partition sdb7 allocated, but just reformat it to NTFS or whatever other file system you want.

Notes:
1. In any of these actions you will lose all data currently stored on these partitions.
2. Be extremely cautious, because a single wrong keypress can delete all data from a partition that you want to keep.
3. It should be possible to perform these actions both from Ubuntu or Windows operating systems.

Can you help with this problem?

Provide an answer of your own, or ask Navin Talati for more information if necessary.

To post a message you must log in.