mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.12k stars 66 forks source link

Exported Saved HD.hda results in broken HFS volume #317

Closed erichelgeson closed 1 month ago

erichelgeson commented 1 month ago
$ hfdisk ~/Downloads/Saved HD.hda
Command (? for help): p
Saved HD.hda
            #                    type name                length   base    ( size )  system
Saved HD.hda1     Apple_partition_map Apple                   63 @ 1       ( 31.5k)  Partition map
Saved HD.hda2          Apple_Driver43 Macintosh               32 @ 64      ( 16.0k)  Driver 4.3
Saved HD.hda3               Apple_HFS MacOS                 2048 @ 96      (  1.0M)  HFS

Block size=512, Number of Blocks=2252896
DeviceType=0x1, DeviceId=0x1
Drivers-
1: @ 64 for 19, type=0x1

$ ls -l ~/Downloads/Saved HD.hda
-rw-r--r--@ 1 eric  staff  1153482752 May  8 20:58 ~/Downloads/Saved HD.hda

Something is off with the exported hda's still - you can see it is a ~1.1G file with seemingly a correct partition map and driver, but the HFS partition is very small and not readable.

DB4000K commented 1 month ago

I tested it in my (physical) mac plus, and it asked to initialize 3 different volumes.

mihaip commented 1 month ago

Oops, I forgot that I also needed to adjust where I write the block count when I have fewer partitions. Should be fixed now.

erichelgeson commented 1 month ago
$ hfdisk ~/Downloads/Saved\ HD\(1\).hda
Command (? for help): p

               #                    type name                length   base    ( size )  system
Saved HD(1).hda1     Apple_partition_map Apple                   63 @ 1       ( 31.5k)  Partition map
Saved HD(1).hda2          Apple_Driver43 Macintosh               32 @ 64      ( 16.0k)  Driver 4.3
Saved HD(1).hda3               Apple_HFS MacOS              2252800 @ 96      (  1.1G)  HFS

Block size=512, Number of Blocks=2252896
DeviceType=0x1, DeviceId=0x1
Drivers-
1: @ 64 for 19, type=0x1

Looks good, thanks for addressing it so quickly.