Search code examples
linuxmbr

how to determine what sectors of partition are unused?


I have one MBR partition(NTFS) with Windows 8.1 installed on it. I wanna install Arch Linux as the second OS. I need to make new partition from unused space of existing one. Is it possible? If so, how to determine what "start" and "end" sector of existiing partition I need to specify to create new partition (to not damage existing one)?


Solution

  • Yes, this is possible. However, it isn't quite as easy as you might think. You cannot simply look for a "start" and "end" sector, as the existing file system might have scattered its data all over the partition. The right thing to do is the following:

    Determine how much free space is left in the file system, and how much you could possibly take away (the file system might have some expectations about that).Then, move all the data to the start of the partition, making sure the file system understands the data is in new places.

    After that, you can alter the size of the partition itself, and create new partitions.

    All together, that is not a trivial task, and is best done by partition managers that can do file system re-sizing. In your case, you want one that understands NTFS and probably also is standalone, i.e. runs from a live CD or something like that - I'm not sure you can resize a NTFS file system that is currently being used. Arch Linux might even provide a "boot" or "install" DVD that will do this.