Search code examples
installationmountiso

Cannot mount a splitted ISO after concatenation


I have a splitted ISO (7 files of 7GB) which I concatenate with the terminal as

cat /Volumes/Blah/*.iso > /Volumes/Blah/concatenated.iso 

I can see that the concatenated.iso file has size 7 x 7GB, but when I use any mounting software afterwards on Mac OSX, (tried Keka & Disk Utility), the mounted disk shows only a size of 7GB & seems to only contain the first one. What am I doing wrong here?


Solution

  • Assuming the split parts do not have headers of their own, and can simply be concatenated:

    You need to ensure they are concatenated in the correct order. The order of cat /Volumes/Blah/*.iso is essentially undefined, it's likely not ordered alphabetically. Run echo /Volumes/Blah/*.iso to see what order you actually end up.

    So list all the files manually in the correct order, like cat /Volumes/Blah/foo_1.iso cat /Volumes/Blah/foo_2.iso cat /Volumes/Blah/foo_3.iso. If you have a very large number of files you can employ a sub-shell with a for loop but if this is a one-time job you're probably faster just copy/paste/modify-ing the path of each file manually.