[Oberon] PO2013 - SD Image Tool

Michael Schierl schierlm at gmx.de
Sat May 16 16:54:23 CEST 2020

Am 16.05.2020 um 15:33 schrieb Tomas Kral:
> On Sat, 16 May 2020 15:07:58 +0200
> Michael Schierl <schierlm at gmx.de> wrote:
>> Nope. It should provide space for a FAT filesyste
> Possibly does not have to, looking at my humble backup/restore tool. I
> just skip or seek past the FAT (256*1024K+1), and use 64MB only.

256*1024K = 256M and not 256K :-)

> pi at raspberrypi:/usr/src/oberon/img $ ls -sh
> 424K RISC.FS   <=== original
>  66M RISC1.FS  <=== my backups
>  66M RISC2.FS
>  66M RISC3.FS
>  65M RISC4.FS

Unlike the emulator, the real thing does not keep track which sectors
have ever been written to, so if you want to make it simple, you have to
copy the maximum size, which is 64 MB.

If you would like to shrink your images, you can also add a command to
Kernel.Mod which iterates over the sector map and overwrites every
unused sector with 0 bytes. I believe this is a simple task that you are
capable of doing, certainly easier than doing a full defragmentation.

Once you ran that command, you can then cut off the image after the last
non-empty sector. And you will notice if you compress the image that it
compresses a lot better (as all those zeroes compress really well).

> But you are right, it can only be used as OBERON.FS, cannot mount on as
> FAT or EXT4, through USB port. Perhaps if Linux mount people added
> Oberon FS then yes.

There are efforts by Charles Perkins to add such a driver, you can see
the progress at <https://github.com/io-core/obfs>. I never used it so I
am unsure about the status (whether it even works). When I want to get
all the files in an image to the host (and do not want to use HostFS for
that), I usually copy a file list out of the emulator and feed that to
PCLink to retrieve all the files.

> I would like to be close to original size, as I never fill the whole
> 64MB FS, but I store it with dd.

Then probably you should use a different tool :-)




More information about the Oberon mailing list