• Welcome to Peterborough Linux User Group (Canada) Forum.
 

making imac friendly iso

Started by dougal, August 13, 2018, 01:14:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dougal

wondering if anyone would be willing to help me learn how to do the conversion steps  below?

https://dedicated.mattgadient.com/linux-mac-iso/isomacprog.c.txt

Converting the ISO

This is done via a very simple C program. Credit goes to the poster here. A lot of extra info if you expand that thread’s bug discussion. Here’s the code (slightly modded to let you provide the file name instead of hard-coding it):

isomacprog.c.txt
https://dedicated.mattgadient.com/linux-mac-iso/isomacprog.c.txt

Saved it as “isomacprog.c” (remove the “.txt”), and compile it with:

cc -g -Wall isomacprog.c -o isomacprog
After that, make a COPY of the original ISO for your linux distro and run it against the copy. Something like:

cp original.iso macversion.iso
./isomacprog macversion.iso
This isn’t guaranteed to work on every Linux ISO image out there, but it’s worth a shot, and is what I’ve used for the images above.

The same notes apply as with the ISO’s I provided above. Burn to DVD, use MBR, etc.

Jason

Sure, Dougal. Which part are you having trouble with?
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

dougal

thanks Jason....my guessing on this is that I copy this to a text editor program after replacing each occurrence of   *iso_name  with the linux-mint mate file name and not when it doesn't have the preceeding * and save the file as isomacprog.c....and then compile by using  "cc -g -Wall isomacprog.c -o isomacprog" in the terminal followed by the text file and this should generate an executable file such as .exe in windowsOS...

this next bit baffles me:
After that, make a COPY of the original ISO for your linux distro and run it against the copy.

Something like:

cp original.iso macversion.iso
./isomacprog macversion.iso

Jason

I don't think you have to replace anything in the C source code file. This line will set the ISO file to whatever you have passed to as the first argument (after it's compiled to an executable file):

char *iso_name = argv[1];

In other words, after it's compiled to an executable file, the iso filename is argv[1] and is set to the iso_name everywhere it is used in the code. The example they use is:

./isomacprog macversion.iso

So in that case, argv[1] is macversion.iso, and iso_name is set to it this value.

Making the copy is probably just so if there are problems, you will still have the original ISO file to work with. Work on the copy you created, macversion.iso in the example, not the original .iso file (original.iso in the example). Original.iso is the iso you downloaded, macversion.iso is the copy of it created with the cp command.

Hope this helps.

* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13