Creating an ubuntu livecd from scratch.

Josef Wolf jw at raven.inka.de
Fri Dec 28 17:17:31 GMT 2007


Hello,

I'm trying to create a customized ubuntu livecd from scratch based on
https://help.ubuntu.com/community/LiveCDCustomizationFromScratch

When the created image boots, it says:

  boot:
  Loading /casper/vmlinuz..............................
  Loading /casper/initrd.gz...............................................
  Ready.
  [  0.000000] ACPI: No DMI BIOS year, acpi=force is required to enable ACPI
  Loading, please wait....

Then the system hangs for a long time.  Finally, it writes:

    check root= bootarg cat /proc/cmdline
    or missing modules, devices: cat /proc/modules, ls /dev
  ALERT! does not exist. Dropping to a shell!

Then busybox's ash is started up.

Any ideas about what I have messed up here?  Below, I have attached the
exact commands I have issued.  I have inserted spaces and linebreaks in
this mail to improve readability.


  # Crate the basic chroot system
  #
  sudo /usr/sbin/debootstrap --arch i386 \
                             --include=syslinux,perl,debootstrap \
                             gutsy target

  # Copy some templates into the chroot
  #
  sudo chroot target locale-gen de_DE.UTF-8
  sudo chroot target cp -f /usr/share/zoneinfo/Europe/Berlin /etc/localtime
  sudo cp templates/etc/network/interfaces target/etc/network/interfaces
  sudo cp templates/etc/hosts              target/etc/hosts
  sudo cp templates/etc/apt/sources.list   target/etc/apt/sources.list
  sudo cp templates/etc/resolv.conf        target/etc/resolv.conf
  sudo cp templates/etc/hostname           target/etc/hostname
  sudo cp templates/etc/fstab              target/etc/fstab
  sudo cp templates/etc/preseed            target/etc/preseed
  sudo cp templates/etc/timezone           target/etc/timezone

  # Customize the templates
  #
  sudo chroot target perl -i \
                          -pe 's/__FLAVOR__/gutsy/g; \
                               s/__HOSTNAME__/mycd/g; \
                               s/__DOMAIN__/my.do.main/g; \
                               s/__FQDN__/mycd.my.do.main/g; \
                               s,__TIMEZONE__,Europe/Berlin,g' \
                               \
                               etc/network/interfaces \
                               etc/hosts \
                               etc/apt/sources.list \
                               etc/resolv.conf \
                               etc/hostname etc/fstab \
                               etc/preseed \
                               etc/timezone \
                               isolinux/isolinux.cfg

  # Now run update/upgrade
  #
  sudo chroot target apt-get update
  sudo chroot target apt-get dist-upgrade -y

  # add more packages
  #
  sudo chroot target apt-get install -y man less debconf-utils sbm \
                                        squashfs-tools os-prober discover1 \
                                        laptop-detect locales console-data \
                                        mkisofs linux-image casper

  # clean up
  #
  sudo chroot target apt-get clean
  sudo chroot target rm -rf /tmp/*

  # Now install kernel, initrd, casper and isolinux onto the disk image
  #
  mkdir -p target.boot/casper target.boot/isolinux target.boot/install
  sudo chroot target dpkg-reconfigure casper
  cp target/vmlinuz target.boot/casper
  cp target/initrd.img target.boot/casper/initrd.gz
  cp target/usr/lib/syslinux/isolinux-debug.bin target.boot/isolinux
  sudo cp templates/isolinux/isolinux.cfg target.boot/isolinux

  # Create manifest
  #
  sudo chroot target dpkg-query -W --showformat='${Package} ${Version}\n' \
                                >target.boot/casper/filesystem.manifest
  cp target.boot/casper/filesystem.manifest \
     target.boot/casper/filesystem.manifest-desktop
  sed -ie '/ubiquity/d' target.boot/casper/filesystem.manifest-desktop

  # Create squashfs inside chroot, because host system might not have
  # a mksquashfs command
  #
  sudo chroot target mksquashfs . filesystem.squashfs \
                                -e filesystem.squashfs -all-root
  sudo chmod 755 target/filesystem.squashfs
  sudo mv target/filesystem.squashfs target.boot/casper

  # calculate md5sums
  #
  cd target.boot && find . -type f -print0 | xargs -0 md5sum > md5sum.txt

  # Finally, create the image
  #
  sudo mkisofs -l -v -D -J -R -o target.iso \
               -no-emul-boot -boot-load-size 4 -boot-info-table \
                -b isolinux/isolinux-debug.bin -c isolinux/boot.cat \
                -cache-inodes target.boot



More information about the Ubuntu-installer mailing list