1

I was struggling for a long time with installing Linux on my Macbook 2,1 from mid 2007 with no luck. Finally I've managed to install Xubuntu i386 and have tried also Ubuntu 14.10 +mac ISO. Both installations succeed, but I'm using a pretty old hardware and finally I'd like to use Xubuntu 16.10 which installation ISO is created just like newest Ubuntu ISOs (what are the changes has been described What is different about Mac ISO image?, as multi-catalog images and my old Macbook isn't able to boot them. And so I've got a question how to convert such multi-catalog ISO to "single-catalog", so old Mac can boot it?

closed as unclear what you're asking by Eric Carvalho, Pilot6, Videonauth, user364819, terdon Jun 19 '16 at 19:05

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I didn't find this question as 'unclear what you're asking'... There is a lot of chat in the question, but title 'How to convert multi-catalog Ubuntu ISO image to single-catalog +mac version' is completely unambiguous – Adam Jun 21 '16 at 13:25
  • I've changed the title of this question to better reflect what I was looking for. – Krzysztof Jakóbczyk Jun 22 '16 at 9:59
0

The answer is in amd64+mac images no longer necessary. I've tried this on a iMac, late 2006, core 2 duo, and it works.

You could conceivably use mkisofs with the correctly blend of options, but this method is fool-proof.

If you are curious enough, here is a C program which i assume makes the trusty-desktop-amd64.iso bootable on your 2,1.

  • Put both, a copy of the ISO and the C program as make_single_eltorito.c into the same directory.

  • Compile the C program: cc -g -Wall -o make_single_eltorito make_single_eltorito.c

  • Run it without arguments (the ISO name is hardcoded in variable iso_name): ./make_single_eltorito

  • Put the ISO onto DVD and try booting.

/*
 Removes all entries but the first one from the El Torito boot catalog of
   http://cdimage.ubuntu.com/daily-live/current/trusty-desktop-amd64.iso

 Compile by:
   cc -g -Wall -o make_single_eltorito make_single_eltorito.c

 Run without arguments in the directory where the ISO image is stored.
*/

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

static char *iso_name = {"trusty-desktop-amd64.iso"};

int main(int argc, char **argv)
{
  int fd, ret;
  unsigned char buf[2048 - 64];
  off_t lba;
  size_t buf_size = 2048 - 64;

  fd = open(iso_name, O_RDWR);
  if (fd == -1)
    goto err_ex;
  if (lseek(fd, (off_t) 32768 + 2048 + 71, SEEK_SET) == -1)
    goto err_ex;
  ret = read(fd, buf, 4);
  if (ret == -1)
    goto err_ex;
  if (ret < 4) {
    fprintf(stderr, "Cannot read 4 bytes from %s\n", iso_name);
    exit(1);
  }
  lba = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
  if (lseek(fd, lba * 2048 + 64, SEEK_SET) == -1)
    goto err_ex;
  memset(buf, 0, buf_size);
  ret = write(fd, buf, buf_size);
  if (ret == -1)
    goto err_ex;
  if (ret < buf_size) {
    fprintf(stderr, "Cannot write %d bytes to %s\n", (int) buf_size, iso_name);
    exit(1);
  }
  close(fd);
  printf("done\n");
  exit(0);
err_ex:;
  perror(iso_name);
  exit(1);
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.