Moving and resizing partitions

AmigaOS users can make feature requests in this forum.
Post Reply
ancalimon
Posts: 35
Joined: Tue Oct 18, 2011 7:31 am

Moving and resizing partitions

Post 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.
User avatar
MichaelMerkel
Beta Tester
Beta Tester
Posts: 350
Joined: Mon Dec 20, 2010 2:08 pm
Location: Germany
Contact:

Re: Moving and resizing partitions

Post 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
Michael Merkel :lol:
(Member of Amiga Freunde Pfalz)
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1445
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Moving and resizing partitions

Post 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.
cheers
tony
User avatar
thomasrapp
Posts: 290
Joined: Sat Jun 18, 2011 11:22 pm

Re: Moving and resizing partitions

Post 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.
User avatar
daveyw
Posts: 242
Joined: Mon Sep 12, 2011 7:44 pm

Re: Moving and resizing partitions

Post 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?
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 594
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Moving and resizing partitions

Post 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.
User avatar
Elwood
Posts: 65
Joined: Sat Jun 18, 2011 6:57 pm
Location: Lyon, France
Contact:

Re: Moving and resizing partitions

Post 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.
Philippe "Elwood" Ferrucci
Sam460 owner
AmigaOS 4 betatester
Belxjander
Posts: 310
Joined: Mon May 14, 2012 10:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
Contact:

Re: Moving and resizing partitions

Post 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"...
Post Reply