How to transfer a USB bootable ubuntu system to a bootable DVD

1

0

I've built a USB bootable 1.5G system derived from Ubuntu core (along the lines of this example). It boots using syslinux on most of our Intel hardware. Intel iMacs are an exception (grub EFI with GPT or MBR partitions boot only sometimes and only on a few iMacs). Thus, I want to migrate the USB system to a bootable DVD. Which would be the best way to do this?

  1. Copy files from root and boot partitions on the USB stick to a directory, add isolinux configuration and call mkisofs. I tried that with limited success:

    • Kernel and initrd are run but at the very end of the init script of the initrd, when trying to pass control from the initrd ram based filesystem to the files on the DVD, the chroot within "exec run-init" fails and /sbin/init is not found leading to a kernel panic. (Built and tested on virtualbox on Ubuntu 12.04.)
    • The symptoms are quite similar to those described in: mystery
  2. Copy only the boot partition of the USB stick into a directory, add an image of the root partition (taken with dd) to be mounted when booting (how? when?), add isolinux configuration and call mkisofs.

    • Going to try that next.
    • How could the root image on the CD be mounted (kernel parameters or patching initrd.img or ...?)?
    • Problem when handing over dev/? (The image of the root filesystem on CD must be kept mounted...)
  3. Using memdisk: During boot with isolinux, use memdisk to transfer an image of all the files from the USB stick to ram and boot that. Probably impractical:

    • Not enough RAM (512M) on some of our system. (Image may be reducible to about 300 M.)
    • Probably takes very long on each boot.
  4. Other?

Which way would be the most promising (or even feasible)?

Carsten Scholtes

Posted 2013-03-28T08:29:13.650

Reputation: 215

Answers

1

Option number 2 appears to be common practice (Live CDs by Ubuntu, remastersys iso-images and others appear to be designed like this). The image of the root partition is typically provided using squashfs. Using overlayfs and tempfs, the CD / DVD can be supplied with a writable appearance which supports booting a normal system.

I've written a detailed guide about creating such a DVD from a Ubuntu Core USB stick in this answer to a more specific question.

Carsten Scholtes

Posted 2013-03-28T08:29:13.650

Reputation: 215