2

My system has the option to boot up into three different OS's.

  • Windows 8
  • Linux PearOS 7
  • Linux Backtrack R5

The Windows 8 is installed on my C: drive and I'm perfectly content with that. Linux PearOS 7 is installed on my D: drive along with Linux Backtrack R5.

My D: drive in addition to holding my two Linux partitions also contains several hundred gigabytes of data that is not backed up, or stored anywhere else. I would like to uninstall my Linux PearOS 7 OS to retrieve the several gigabytes taken by it, (20 GB I think)

Is there any way that I can successfully keep my Linux Backtrack R5, Windows 8, and the data on my D: drive intact while removing the installed Linux PearOS 7 OS from the D: drive without having the removal touch any data on the D: drive.

Edit: My diskpart results: enter image description here

-Thanks in advance.

Zain Patel
  • 2,870

1 Answers1

3

...that (diskpart output) does not help much but at least you know that

Partition 1 = Data you want keep
Partition 2 = Windows/Boot/Bitlocker
Partition 3 = Windows
Extended    = Partition table for logical partitions
All logical = Linux stuff

You should be able to identify and remove PearOS partitions from Backtrack by using some GUI partitioning tool or by taking a look at /etc/fstab.

To remove or to keep:

You want to keep following partitions:

  • All primary partitions.
  • Extended partition.
  • Partitions used by Backtrack.
  • Boot partition.

You want to remove partitions that:

  • Are not found from above list (partitions you want keep).
  • Are not found from Backtrack /etc/fstab.
  • Are not marked as boot partition.

Before you remove anything it would be wise to backup MBR and Extended partition:

Make sure that your hard disk device node is /dev/sda, if not then adjust following command to point to your hdd device node.

# From linux terminal, backup master boot record
dd if=/dev/sda of=/path/for/mbr_backup.img bs=512 count=1

Make sure that extended partition device node is /dev/sda4, if not then adjust following sfdisk command to point to your extended partition.

# From linux terminal, backup extended partition
sfdisk -d /dev/sda4 > /path/for/extended_backup.sfdiskdump

If you have backed up your MBR and extended partition then you can restore all your partitions even after deleting them. Data is not deleted when you remove partition, only partition table is changed to indicate that there is free space to use.
However, if you create new partition with new filesystem in place of removed partition then data is gone (at least partially).

Finally, partitions removed. Take free space to use:

After you have successfully removed those partitions you should be able to resize your data partition so that it will use all space freed by removing PearOS.

Sampo Sarrala
  • 2,518
  • 1
  • 19
  • 28