I have windows 7 and backtrack linux on the same system and i am dual booting them. now i want to remove the "windows 7" partition from my disk and use it to expand my linux OS HDD size.

Thanks....

The easiest would probably be to reinstall backtrack linux, and merge the partitions as part of the install process. You can always backup the home folder (or others) and any other system files (which you can later resynchronize with rsync, or manually with diff on all the config files). And if you don't want to lose the list of packages that you installed, just get the list with dpkg -l, save that to a file and after the fresh install you just feed that list to apt-get. I did that process with a ubuntu -> kubuntu migration, and it didn't take more than an hour total.

But if you really can't do a fresh install, then it's a bit harder and more time consuming, but possible.

I'm not sure if GParted or other similar partition managers (or fdisk) are able to take the deleted the windows partition(s) and extend the main linux partition with that (assuming the physical layout of the partitions will permit it). If it is possible, then you can just do that.

It is possible that your boot-loader will be confused by this change and no longer be able to boot you linux install (are you dual-booting by chainloading grub with neogrub, or by using grub on the MBR?). So, I recommend that you have a suitable LiveCD ready in case you have to repair the bootloader (and, btw, if you're doing information security stuff, you probably want to use a LiveCD all the time anyways, or a read-only flash drive).

If it isn't possible to merge the Linux partition with the freed space of the deleted windows partition(s), then you just have to create a new partition(s), and reformat it(them). Then, add the entry(ies) to the /etc/fstab file, choosing a mount-point(s) that makes sense. And you're good to go.

Overall, that's what you have to do, it's that simple, removing Windows is just a matter of deleting the partition(s). I'm just not sure how robust the boot-loaders are to drastic changes in the partition table, but reinstalling a boot-loader from a LiveCD isn't as hard as it sounds.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.