[Oberon] cloning a filesystem or an OS.

PETER EASTHOPE peasthope at shaw.ca
Fri Feb 15 01:04:45 MET 2008


Folk,

This should apply equally to NO and Aos and 
at least partially to other systems.

Back in February of 2002 Bernhard Treutwein 
mentioned cloning a system; the primary focus 
was on FAT filesystems.

At the part level, provided both parts are 
the same size and there is enough space for 
an image file elsewhere, this works and is 
documented.
Partitions.PartitionToFile IDEs#m ImageFile ~
Partitions.FileToPartition IDEt#n  ImageFile ~
If the source is smaller than the target, I'm not 
sure the residual space on the target will be 
useable.  If the source is larger than the 
target, the second command ends with a trap and 
the target filesystem is likely broken.

Copying all files from one Aos filesystem to 
another is easy using these commands.
System.Directory  Source:* ~
FileSystem.GenCopyFiles  Source:  Target: 
   ...
~
But if the objective is to clone an OS, copying 
files won't copy the bootloader and the inverse 
of Partitions.UpdateBootFile is not obvious.  

So can anyone help with these questions.
* In the partition method, can the problems of 
differing source and target sizes be solved?
Ie., can the filesystem be extended in the first 
discrepancy and terminated properly in the second?

* In the filesystem method, can the BootFile be 
extracted from an executable part?  I'll guess 
that with the correct block numbers  
Partitions.PartitionToFile dev#part file [block blocks] ~
and some editing might work.

If there are any constructive answers, please 
consider adding them to your Web based documentation.

Thanks,         ... Peter E.

 http://carnot.yi.org/




More information about the Oberon mailing list