How to prepare a fresh VM image for download

This is for VirtualBox so if you use another VM thingie your mileage may vary

  1. Open the .ovf and confirm importing
  2. Click "Settings" and adjust them as following:
    • General->Basic: change "Version" to Debian

    • General->Description: maybe put a short manual how to get started here

    • System->Motherboard: enable "Hardware clock in UTC time"

    • Storage:
      • Select the CD drive on the IDE controller and "insert" a Linux live CD image (click the small CD icon right to the "CD/DVD Drive" drop-down box)
      • Select the SCSI controller and enable "Use host I/O cache" (this is important otherwise the machine will have a corrupt file system after each complete shutdown)
  3. Start the VM which should boot the live CD (eg Knoppix or any other)
  4. Mount the disk: sudo mount /dev/sda1 /mnt/

  5. Download the customisation package:

    cd /mnt/root/
    sudo wget --content-disposition ''

    You can also use a web browser to download the file and then copy it to the right place on the command line

  6. Chroot with network connection:

    sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
    sudo mount -o bind /sys/ /mnt/sys/
    sudo mount -o bind /proc/ /mnt/proc/
    sudo chroot /mnt/
  7. Change root password to a known value: passwd

  8. Install the customisation package:

    dpkg -i root/cacert-dev-image_0.2_all.deb
    # ^ This will fail to configure due to missing dependencies but already unpack the package ^
    aptitude install cacert-dev-image
    # ^ This dowloads the dependencies and finishes the configuration ^

    You will be asked whether you want to replace the and interfaces with the package maintainer's version. At least replacing interfaces is strongly recommended because it makes the network setup a whole lot easier.

    There may be some problems with mtop but that's not related to cacert-dev-image

  9. Shutdown live CD and export the VM (File->Export Appliance…) one time using the all in one .ova and the other time in .ovf format both times with the manifest option checked (allows to easily identify corrupted downloads)

SystemAdministration/Systems/Development/Prepare (last edited 2013-08-24 14:12:17 by UlrichSchroeter)