I could be incorrectly crossing over two separate discussions, but that was what I was trying to work out. A bit of jiggery-pokery on a modern machine to pre-tweak the image and a raw disk write could be the solution to all this.true. I didn't know about the other partitions but I agree completely with your assessment.
Should run in 6.0.4(ish) and up but it's untested on anything other than 7.5.5On that note, for my purposes, it would be great if I could run this in System 6, 7 or 8.1 at VERY latest. saybur, what’s the minimum OS your very alpha version will run?
Well it shouldn't but this is hot code so I'm not comfortable saying it definitely will not. It seems unlikely unless the OS maps IDE devices onto SCSI IDs or something like that.if I'm then running this on a PB1400 that boots from IDE (and has the .iso on a PCMCIA->CF card), then there's no chance it'll overwrite my boot volume?
Correct!it sounds like his Whole Disc Image includes the partition table. That would cause any system that mounts the drive to ignore the unused space because it is not mapped, but should not cause any actual problems.
That's the idea.The .iso will include an ISO <whateverthestandardnumberis> partition map, just as any other optical disc. If the PA-RISC system can boot from a CD it shouldn't have any trouble reading it.
The whole installation is on 3 CDs. So, the first .iso would contain the normal .iso partition table and the PA-RISC system should boot from it and won't see the other CDs, but that's fine.In the other thread Snial was talking about appending two other disks, so the data that would be ignored in that scenario would be two other disks, including their partition tables and data partitions. Unless the image he is writing has already been modified to have a valid partition table for all three partitions, or he is only writing the image from a single CD.
Are you sure the merge script doesn't just extend the first image and move the package files onto it?Correct!
That's the idea.
The whole installation is on 3 CDs. So, the first .iso would contain the normal .iso partition table and the PA-RISC system should boot from it and won't see the other CDs, but that's fine.
For the Debian installation, I understand that the first .iso is the core installation and the other(s) are additional packages. So, I think it should be possible to mount those on reboot based on the sector offset and then install the packages.
So, I was thinking this would be reasonable, because I did something similar when playing with a MAME-based SparcStation 1 emulator on my Mac mini 2012. I couldn't get the FD to work, but I could create a HD image with a missing partition; then mount that missing partition from within SunOS and dd to it. Then I could shutdown and from the host side, dd the data back out. It was very crude, but worked. In the future I plan to use the emulated ethernet to transfer data, now that I have a better grasp of how to link it up to virtual network interfaces on the Mac.
But thinking about it again, I might be wrong, or at least a bit wrong. I would need to mount the other .iso images as .iso's so that the target (the PA-RISC system) understands their partition maps too. Maybe that's reasonable: the other .iso s on the HD won't be on partitions on the HD, so it's not like it's partitions within partitions.
It does mean that DumbDD needs to be able to specify the target offset, which I hadn't considered earlier... though I could get around that too just by joining them all together. However, I might not do that as I might not want to write 2GB in one go, just 644MB at a time.
The Debian script it looks like it merges all .isos into a single readable image, complete with combined package lists and the like.Are you sure the merge script doesn't just extend the first image and move the package files onto it?
Aaah, OK. I'd looked at the web page talking about this and then forgot about it. So, perhaps that solves one problem: it results in a merged .iso . In this case, the .iso would be about 1.932GB I think, less than 2GB. Sorry about that.The Debian script it looks like it merges all .isos into a single readable image, complete with combined package lists and the like.
dd to copy the .iso's block by block. I'm not sure what I should use with Mac OS 8.1. I certainly don't want a partition table...I was thinking it would be strange if it didn't and the description on the page sounded like it did.The Debian script it looks like it merges all .isos into a single readable image, complete with combined package lists and the like.
It should save properly, as it would be interpreted as an entire disk.So, if I created a blank .img without a partition map I should be able to mount it on Dingus PPC; then run @saybur 's scuzImager to write a .iso to it. We don't know if it'd save it properly, but I could use scuzImager again to write it to another .iso and then compare them?
Something like this would be great and very useful. I need to get an image of a real spinning disc A/UX SCSI volume to zigzagjoe for testing/debugging purposes and currently there is no way for me to do that with the setups I have at my disposal.



SCSIInstr gScsiProg[kScsiProgLen]={
{ scNoInc, 0UL, 0UL },
{ scStop, 0UL, 0UL }
};
#define Wrd(aWord) ((uint8_t)((aWord>>8)&255)), ((uint8_t)(aWord&255))
#define Lng(aLong) ((uint16_t)((aLong>>16)&0xffff)), \
((uint16_t)(aLong&0xffff))
uint8_t gReadBlk[]={
6, 8, Wrd(0), 0, 0, Wrd(0),
};
uint8_t gWriteBlk[]={ // offsets 2, 3, 4 are the block num (big-endian)
6, 0xa, Wrd(0), 0, 0, Wrd(0),
};
void ScsiInit(short aId, uint8_t *aCmdBlock)
{
SCSIGet();
SCSISelect(aId);
SCSICmd((char*)&aCmdBlock[1], *aCmdBlock);
}
short ScsiFinish(int16_t *aRetMsg, uint32_t aDelay)
{
SCSIComplete(&gScsiStat, &gScsiMess, aDelay);
*aRetMsg=gScsiMess;
return gScsiStat;
}
void ScsiProgSet(SCSIInstr *aProg, uint8_t *aBuff, uint32_t aBytes)
{
aProg->scParam1=(uint32_t)aBuff;
aProg->scParam2=(uint32_t)aBytes;
}
short ScsiDoRead(int16_t *aRetMsg, uint32_t aTicks,
short aId, uint8_t *aCmdBlock,
uint8_t *aBuff, uint32_t aBytes)
{
ScsiInit( aId, aCmdBlock);
ScsiProgSet(gScsiProg, aBuff, aBytes);
SCSIRead((Ptr)gScsiProg);
return ScsiFinish(aRetMsg, aTicks);
}
short ScsiDoWrite(int16_t *aRetMsg, uint32_t aTicks,
short aId, uint8_t *aCmdBlock,
uint8_t *aBuff, uint32_t aBytes)
{
ScsiInit( aId, aCmdBlock);
ScsiProgSet(gScsiProg, aBuff, aBytes);
SCSIWrite((Ptr)gScsiProg);
return ScsiFinish(aRetMsg, aTicks);
}
tRawCopyInfo gRawCopyInfo;
void ScsiRawCopyInit(tRawCopyInfo *aInfo, uint16_t aId, int16_t aState)
{
aInfo->iBlkPos=0UL;
aInfo->iId=aId;
if((aState&kRawCopyEventScsiOpMask)==kRawCopyEventScsiWrite) {
GetEOF(aInfo->iFd, &(aInfo->iLen));
}
else {
SetFPos(aInfo->iFd, fsFromStart, 0UL); // reset the file.
}
aInfo->iLenBlks=(aInfo->iLen+kBlkSize-1)>>kBlkSizeBits;
aInfo->iState=aState; //kRawCopyEventGo;
}
//#define kScsiRawCopyDummy
void ScsiRawCopy(tRawCopyEvent aEvent /* oops, unused*/ )
{
register tRawCopyInfo *info=&gRawCopyInfo;
int32_t count;
OSErr err=0;
int32_t to=In(kUpdateRate);
while(info->iLen && !After(to)) {
tBool readOp=(info->iState&kRawCopyEventScsiOpMask)==
kRawCopyEventScsiRd;
uint8_t *blkCmd=readOp? gReadBlk:gWriteBlk;
count=kBlkSize;
blkCmd[2]=(uint8_t)(info->iBlkPos>>16);
blkCmd[3]=(uint8_t)(info->iBlkPos>>8);
blkCmd[4]=(uint8_t)(info->iBlkPos&255);
if(readOp) {
#ifndef kScsiRawCopyDummy
ScsiDoRead(&gScsiMess, kStdWait, info->iId, blkCmd,
gScsiBuf, kBlkSize);
#endif
err=FSWrite(info->iFd, &count, gScsiBuf); // gScsiMess, gScsiStat
}
else {
FSRead(info->iFd, &count, gScsiBuf); // gScsiMess, gScsiStat
#ifndef kScsiRawCopyDummy
ScsiDoWrite(&gScsiMess, kStdWait, info->iId, gWriteBlk,
gScsiBuf, kBlkSize);
#endif
}
#ifdef kScsiRawCopyDummy
{
int32_t to=In(2);
while(!After(to)) {
// Delay 2 ticks.
}
}
#endif
++info->iBlkPos;
if(err==noErr && info->iLen>kBlkSize) {
info->iLen-=kBlkSize;
}
else {
info->iLen=0;
}
}
if(info->iLen==0) {
FSClose(info->iFd);
info->iState=kRawCopyEventDone;
info->iFd=0; // Reset FD.
AppMenuDDEnable(info);
}
}
That's an Infinite Mac error message. It's not from Snow. That's a bug for @mihai to fix.However, when I try and read from SCSI via Infinite Mac's Snow Mac IIcx emulator, I get:
OK, I'll add a Dd:Blocks... field to support starting blocks, then I can get it to read or write into the middle (or near the end) of the HD image and skip the APM. Though, actually it should indeed be possible to read the Apple Partition Map. TattleTech seems to work, I used it to get the SCSI IDs for the drives, but it also seems to return quite a lot of data I'd only expect from making direct SCSI commands.That's an Infinite Mac error message. It's not from Snow. That's a bug for @mihai to fix.
I think device header means the part of the virtual SCSI HD that is not the HFS or HFS+ partition? i.e. the Apple Partition Map which is generated programatically if a disk image does not contain an Apple Partition Map.
I suppose you can work around this by changing your code to not use block ranges that cross partition boundaries? That means you need to have code that understand the Apple Partition Map. Or you would have to read one block at a time, which is probably slow.
I didn't say you could not read the Apple Partition Map. I said that you cannot read from the Apple Partition Map and from the next partition in the same command.Though, actually it should indeed be possible to read the Apple Partition Map.
( 0.304s) metaimgfile.cpp:246 INFO| . . { MetaImgFile: Open "/Volumes/Devs/SheepShaver/Disks/Data1.dmg".
( 0.308s) metaimgfile.cpp:246 INFO| . . { MetaImgFile: Open "/Volumes/FreeSpace/Data2.dmg".
( 0.314s) metaimgfile.cpp:246 INFO| . . { MetaImgFile: Open "/Volumes/FreeSpace/PowerMac8600SSD/PowerMac8600SSD.dmg".
( 0.316s) metaimgfile.cpp:246 INFO| . . { MetaImgFile: Open "/Volumes/FreeSpace/B&WG3Clone.dmg".
( 0.317s) metaimgfile.cpp:246 INFO| . . { MetaImgFile: Open "/Volumes/FreeSpace/140GiB.dmg".
( 0.317s) metaimgfile.cpp:246 INFO| . . { MetaImgFile: Open "/Volumes/Work/Programming/infinite-mac/InfiniteHD.dmg".
APM Block 0 contents
000: sbSig : 'ER' = sbSIGWord
002: sbBlkSize : 512
004: sbBlkCount : 741067092 = 379426 MB = 361849 MiB
012: DDMap[0]: 23 @ 64 0x0001 = kDriverTypeMacSCSI
01a: DDMap[1]: 36 @ 120 0xffff = kDriverTypeMacSCSIChained
022: DDMap[2]: 21 @ 176 0x0701 = kDriverTypeMacATA
02a: DDMap[3]: 34 @ 232 0xf8ff = kDriverTypeMacATAChained
Partition Map contents (48 partitions)
1: 63 @ 1 Type:"Apple_partition_map" Name:"Apple" Status:00000003=Valid,Allocated
2: 56 @ 64 Type:"Apple_Driver43" Name:"Macintosh" Status:00000103=Valid,Allocated,ChainCompatible BootSize:11286 BootCksum:0x0000F1F0 Processor:"68000" Pad:70744452 = 'ptDR' = kPatchDriverSignature
3: 56 @ 120 Type:"Apple_Driver43" Name:"Macintosh" Status:00000303=Valid,Allocated,ChainCompatible,RealDeviceDriver BootSize:18142 BootCksum:0x0000040F Processor:"68000" Pad:00010600 = kSCSIDriverSignature
4: 56 @ 176 Type:"Apple_Driver_ATA" Name:"Macintosh" Status:00000103=Valid,Allocated,ChainCompatible BootSize:10490 BootCksum:0x00007EB4 Processor:"68000" Pad:70744452 = 'ptDR' = kPatchDriverSignature
5: 56 @ 232 Type:"Apple_Driver_ATA" Name:"Macintosh" Status:00000303=Valid,Allocated,ChainCompatible,RealDeviceDriver BootSize:17254 BootCksum:0x00003417 Processor:"68000" Pad:77696b69 = 'wiki' = kATADriverSignature
6: 512 @ 288 Type:"Apple_FWDriver" Name:"Macintosh" Status:00000003=Valid,Allocated
7: 512 @ 800 Type:"Apple_Driver_IOKit" Name:"Macintosh" Status:00000003=Valid,Allocated
8: 512 @ 1312 Type:"Apple_Patches" Name:"Patch Partition" Status:00000003=Valid,Allocated
9: 2095328 @ 1824 Type:"Apple_HFS" Name:"disk image" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
10: 39062496 @ 2097152 Type:"Apple_HFS" Name:"disk image" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
11: 4 @ 41159648 Type:"Apple_Free"
12: 2097152 @ 41159652 Type:"Apple_HFS" Name:"MacOS9.1" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
13: 2097152 @ 43256804 Type:"Apple_HFS" Name:"MacOS9.2" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
14: 2097152 @ 45353956 Type:"Apple_HFS" Name:"MacOS9.2.2" Status:C0000031=Valid,Readable,Writeable,MountedAtStartup,Startup
15: 262144 @ 47451108 Type:"Apple_Free"
16: 1835008 @ 47713252 Type:"Apple_HFS" Name:"System7.5.3" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
17: 409600 @ 49548260 Type:"Apple_HFS" Name:"System7.5.5" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
18: 614400 @ 49957860 Type:"Apple_HFS" Name:"System7.6.1" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
19: 614400 @ 50572260 Type:"Apple_HFS" Name:"MacOS8.0" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
20: 614400 @ 51186660 Type:"Apple_HFS" Name:"MacOS8.1" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
21: 614400 @ 51801060 Type:"Apple_HFS" Name:"MacOS8.5" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
22: 614400 @ 52415460 Type:"Apple_HFS" Name:"MacOS8.5.1" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
23: 614400 @ 53029860 Type:"Apple_HFS" Name:"MacOS8.6" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
24: 14773192 @ 53644260 Type:"Apple_Free"
25: 16778400 @ 68417452 Type:"Apple_HFS" Name:"Jaguar" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
26: 160 @ 85195852 Type:"Apple_Free"
27: 31457280 @ 85196012 Type:"Apple_HFS" Name:"Panther" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
28: 62914560 @ 116653292 Type:"Apple_HFS" Name:"Tiger" Status:4000007F=Valid,Allocated,InUse,Bootable,Readable,Writeable,BootCodePositionIndependent,MountedAtStartup LgBootStart:24279928 BootSize:417792 Processor:"powerpc"
29: 267616 @ 179567852 Type:"Apple_Free"
30: 95764008 @ 179835468 Type:"Apple_HFS" Name:"Misc8" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
31: 20971520 @ 275599476 Type:"Apple_HFS" Name:"Big Clone2" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
32: 12582912 @ 296570996 Type:"Apple_HFS" Name:"MacOS9 Clone2" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
33: 14680064 @ 309153908 Type:"Apple_HFS" Name:"Jaguar Clone2" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
34: 16777216 @ 323833972 Type:"Apple_HFS" Name:"Panther Clone2" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
35: 20971520 @ 340611188 Type:"Apple_HFS" Name:"Tiger Clone2" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
36: 81787104 @ 361582708 Type:"Apple_HFS" Name:"Leopard" Status:40000031=Valid,Readable,Writeable,MountedAtStartup
37: 29360118 @ 443369812 Type:"Windows_FAT_32" Name:"FATPART" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
38: 29360128 @ 472729940 Type:"Apple_HFS" Name:"partHFS2" Status:C0000033=Valid,Allocated,Readable,Writeable,MountedAtStartup,Startup
39: 29360128 @ 502090068 Type:"Apple_HFS" Name:"Untitled 3" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
40: 29360128 @ 531450196 Type:"Apple_HFS" Name:"Untitled 4" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
41: 29360128 @ 560810324 Type:"Apple_HFS" Name:"Untitled 5" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
42: 29360128 @ 590170452 Type:"Apple_HFS" Name:"Untitled 6" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
43: 29360128 @ 619530580 Type:"Apple_HFS" Name:"Untitled 7" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
44: 29360128 @ 648890708 Type:"Apple_HFS" Name:"Untitled 8" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
45: 29360128 @ 678250836 Type:"Apple_HFS" Name:"Untitled 9" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
46: 29360128 @ 707610964 Type:"Apple_HFS" Name:"Untitled 10" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
47: 10 @ 472729930 Type:"Apple_Free"
48: 4096000 @ 736971092 Type:"Apple_HFS" Name:"Infinite HD" Status:40000033=Valid,Allocated,Readable,Writeable,MountedAtStartup
Chunks
1824 @ 0 bytes:[0 933888) offset:0
2095328 @ 1824 bytes:[933888 1073741824) offset:933888
39062500 @ 2097152 bytes:[1073741824 21073741824) offset:32768
234439824 @ 41159652 bytes:[21073741824 141106931712) offset:933888
167770336 @ 275599476 bytes:[141106931712 227005343744) offset:933888
293601280 @ 443369812 bytes:[227005343744 377329199104) offset:32768
4096000 @ 736971092 bytes:[377329199104 379426351104) offset:0
Can you set the copy block size to 512 bytes @Snial? Then the boundaries will almost always match.That's an Infinite Mac error message. It's not from Snow. That's a bug for @mihai to fix.
I think device header means the part of the virtual SCSI HD that is not the HFS or HFS+ partition? i.e. the Apple Partition Map which is generated programatically if a disk image does not contain an Apple Partition Map.
I suppose you can work around this by changing your code to not use block ranges that cross partition boundaries? That means you need to have code that understand the Apple Partition Map. Or you would have to read one block at a time, which is probably slow.