create hfd images with morphos
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    cip060
    Posts: 137 from 2010/7/30
    Is there a program you use to create HDF image files on morphos?
    They tell me that it is present in the basic installation but I cannot find it!
    maybe it's downloadable on aminet?
  • »10.09.21 - 12:10
    Profile
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2026 from 2003/2/24
    From: po-RNO
    There is the FileWrite command in the standard MorphOS installation. It can write empty files like ADFs or HDFs, but unfortunately it first creates the file in RAM, so it's limited to your free RAM how big files you can write. (Edit: this has been fixed)

    I've made a request to MorphOS team that they'd change this to write files directly to HD without buffering it to RAM, so let's see... :)

    Basically creating these images is just writing null bytes into a file, so it wouldn't be any rocket science to write a separate program that'd do this.

    Or maybe you could create smaller files, but join them with the Join command as many times as you need... maybe a small shell script for this.. hmm...



    [ Edited by jPV 15.08.2022 - 12:03 ]
  • »10.09.21 - 13:06
    Profile Visit Website
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2026 from 2003/2/24
    From: po-RNO
    Well.. I created a shell script that will join bigger chunks into really big file and it worked... but it's quite slow and abusive regarding hd writes, so let's ditch that :)

    But I wrote a short Lua script to create empty files, read the comment section how to use it (notice that you give size in MiB): create_file.lua

    Haven't tested it too much, and no idea if the Lua implementation supports large (>2GB) files. Please let me know if somebody tries it. But at least this works out-of-the-box on a default MorphOS installation.


    [ Edited by jPV 10.09.2021 - 17:58 ]
  • »10.09.21 - 15:36
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    cip060
    Posts: 137 from 2010/7/30
    A friend of mine said there is a program to create hdf from morphos and he has been doing it for years
    but i have to wait until monday if anyone has any information
    I could create it from winuae but i can't make partitions even using hd config i have problems
  • »10.09.21 - 16:35
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 779 from 2007/10/23
    From: Gelsenkirchen,...
    If you have the SDK
    Code:
    dd if=zero: of=foo.hfd bs=1024 count=10k
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »10.09.21 - 17:24
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    cip060
    Posts: 137 from 2010/7/30
    I have no idea what you wrote
  • »10.09.21 - 18:29
    Profile
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2026 from 2003/2/24
    From: po-RNO
    Well.. as said, FileWrite comes with MorphOS and you can use it to write a HDF. Type this in the shell:
    Code:
    filewrite test.hdf 209715200

    That creates a 200MB hardfile, now you can give it to an emulator and prepare it there, or mount it under MorphOS with FileImageCtrl and then format it with MorphOS's format option.

    If you want to create bigger HDF files that you don't have enough memory in your system, just use the Lua script I made and launch it in the shell like this:
    Code:
    LuaX create_file.lua Work:test.hdf 1024

    That would create a 1GB hardfile, and then do the rest the same way as told with the FileWrite image...

    Edit: the FileWrite command has been fixed to work with large files without noticeable memory consumption.

    Or use the MorphOS Software Development Kit's dd command as suggested by Polluks, which does the same as FileWrite or create_file.lua.
  • »10.09.21 - 19:55
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1031 from 2004/9/23
    You should be able to simply use the RawDisk: device to create and write file images.

    Those images can be mounted with mounter.
  • »11.09.21 - 02:00
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    cip060
    Posts: 137 from 2010/7/30
    So I have solved morphos unfortunately does not support 8 gig image files so the problem does not arise
    If I want to prepare an 8 gig image file and beyond I have to use Windows and WinUAE unfortunately
    That I like it or not
  • »11.09.21 - 10:12
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12077 from 2003/5/22
    From: Germany
    > You should be able to simply use the RawDisk: device
    > to create and write file images.

    This implies he has a physical volume he wants to create an image file of. As far as I can see, there's been no indication in this thread that this is what he seeks to achieve.
  • »11.09.21 - 11:13
    Profile
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2026 from 2003/2/24
    From: po-RNO
    Quote:

    cip060 wrote:
    So I have solved morphos unfortunately does not support 8 gig image files so the problem does not arise
    If I want to prepare an 8 gig image file and beyond I have to use Windows and WinUAE unfortunately
    That I like it or not

    Was the used filesystem something that should support that large files?
  • »11.09.21 - 17:03
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    cip060
    Posts: 137 from 2010/7/30
    I had to create an 8 gig image for my cd32 with terrible fire
    i know that cd32 has the limit of 8 giga maximum so i wanted to create n full image file of 3.2 and whdload and make an emergency backup without going through hundreds of whdload folders every time
  • »11.09.21 - 19:20
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 779 from 2007/10/23
    From: Gelsenkirchen,...
    You could use the Ice File System to create an 8 gig file,
    see Filesystems.
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »11.09.21 - 21:31
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    cip060
    Posts: 137 from 2010/7/30
    In fact I had noticed while reading the file systems supported by morphos
    I could use an external hard drive with ice file system to create the image file
    I could create a 15/20 gig ice filesystem partition just to do this
  • »11.09.21 - 22:37
    Profile
  • MorphOS Developer
    geit
    Posts: 1031 from 2004/9/23
    I guess exFat counts as proper file system and is fully supported. AFAIR NTFS was supported, too.
  • »12.09.21 - 02:15
    Profile