Page 1 of 1

Moving and resizing partitions

PostPosted: Wed Jan 25, 2017 5:39 pm
by ancalimon
Does Media Toolbox support moving and resizing partitions without erasing any data?

If not and if easy to achieve, this would be really nice and handy to have.

Re: Moving and resizing partitions

PostPosted: Wed Jan 25, 2017 9:37 pm
by MichaelMerkel
ancalimon wrote:Does Media Toolbox support moving and resizing partitions without erasing any data?

If not and if easy to achieve, this would be really nice and handy to have.


unfortunately not.
if you change smth with media toolbox you will see a warning requester when saving it to disk telling you that the changed partitions will be "lost"...
always do proper backups before changing stuff here.

regards...
michael

Re: Moving and resizing partitions

PostPosted: Thu Jan 26, 2017 2:43 am
by tonyw
Media Toolbox can resize a partition, but the effect of that resize depends on the file system installed in that partition. We don't have any AmigaOS file systems that can suffer a partition resize without losing data.

Since the file system could have data reaching to the extremes of the partition (start and end), any resizing that loses "edge" data could easily be fatal. All Amiga file systems use the first block of the partition to store the "signature" of the file system, so you can't chop off the start of the partition. Likewise, depending on how full the partition, there could be data out to the end of the partition, and losing that might screw part or the whole of the partition.

If the partition is expanded, then the increased space can only be used if the filesystem is made aware of the change and is capable of recalculating its geometry to make use of it. That usually requires a Format to generate the new data structures.

It's safe to assume that any reduction in the partition size will kill the contents. An expansion probably won't hurt, but won't be useful in any AmigaOS file systems.

Re: Moving and resizing partitions

PostPosted: Thu Jan 26, 2017 2:59 pm
by thomasrapp
Think of MediaToolbox as a partition table editor. It only edits the table, it does not touch the partitions themselves. If you delete a partition in Media Toolbox, the partition is not deleted, only the entry in the table. If you recreate the entry exactly as before, the partition will reappear with all the data it contains.

Moving / Resizing partitions without data loss would require a completely different kind of program.

Re: Moving and resizing partitions

PostPosted: Sat Apr 29, 2017 5:49 am
by daveyw
I recently installed ubuntu on a Windows 7 machine and was completely blown away by the ability to shrink the Windows partition to make space for a Linux partition.

I guess it's not so much of an issue for Amiga users, because we usually prep our own HDD, and if you're like me, leave plenty of free space, but it would be a nice feature to see. Felt a little jealous... ;)

If you formatted a drive with NTFS, would you be able to shrink this partition?

Re: Moving and resizing partitions

PostPosted: Sat Apr 29, 2017 4:27 pm
by broadblues
I recently installed ubuntu on a Windows 7 machine and was completely blown away by the ability to shrink the Windows partition to make space for a Linux partition.



It's cool when it works, but it's not 100% safe, I tried the same when I inherited a second hand PC, and trashed the windows partition....

If you formatted a drive with NTFS, would you be able to shrink this partition?


I think more than using the right file system is required here to enable such functionality.

Re: Moving and resizing partitions

PostPosted: Fri May 19, 2017 5:57 pm
by Elwood
daveyw wrote:If you formatted a drive with NTFS, would you be able to shrink this partition?


On Windows yes. I did it many times on Windows 2008 Server or 2012 Server without a problem. It should work the same on Win7 and 8.1 as they are more or less the same.

Re: Moving and resizing partitions

PostPosted: Sun Aug 13, 2017 2:35 am
by Belxjander
Elwood wrote:
daveyw wrote:If you formatted a drive with NTFS, would you be able to shrink this partition?


On Windows yes. I did it many times on Windows 2008 Server or 2012 Server without a problem. It should work the same on Win7 and 8.1 as they are more or less the same.



Unfortunately this isn't actually 100% on all windows versions...

@Everyone...

Server versions of the OS include "Enterprise" functionality with DLLs that are optional and in some cases (Home and Upgrades) *missing* from the installation without a full proper "Professional" or "Server" Business installation.

so it depends... and would require that there is a "FileSystem Imaging" tool that worked with both old+new hardblock "part" descriptors in order to transfer data from an old image to a new partition... you would need dataspace on the drive enough to memory-map and force a filesystem driver to use the memory-mapped datablocks f reading while writing freshly created filesystem structures into the new on-disk area set...

this is NOT trivial to implement...

The current best option you have will be to duplicate (MakeDiskImage) from the partition... save the full draw image somewhere... mount it through diskimage.device and then transfer everything in the image to the fresh partition location from the image back to disk...

the memory-mapping trick is NOT available on current AmigaOS variants as-is due to memory constraints and partition sizes exceeding physical memory.

PartitionMagic / PQMagic and similar "diskimage" editing tools actively understand the filesystems they can edit...

Don't expect any magic wonder-tool to deal with AOS and variant filesystems beyond validation or basic repairs unless the filesystem author writes such a fancy tool for his filesystem.

I've met both functionally expandable and unexpandable setups... so there is better than even chances with most computer literate people using a more complete OS install afaik. (I've not yet met a computer illiterate Amiga owner yet...:-)

Anyway... I have a LOT of hacking still "to do"...