HOWTO on using live-build to create 12.04 images

Asked by Chris McClimans

Regarding the Ubuntu process used to build the 12.04 images available at http://www.ubuntu.com/download

What version of Ubuntu is used? lucid/natty/maverick/oneric/precise?

What versions of live-build, livecd-rootfs, debootstrap (and any other necessary packages) are used?
(include any apt-sources/ppas that aren't in main, restricted, universe or multiverse)

What lb config is used? (Is it just a specific version of livecd-rootfs or is it a particular ppa/bzr branch?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu live-build Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I'd use Precise, not only is it the latest stable release, it is also LTS.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2
Revision history for this message
Chris McClimans (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlr-launchpad-a811i2i3ytqlsztthjth0svbccw8inm65tmkqp9sarr553jq53in4xm1m8wn3o4rlwaer06ogwvqwv9mrqoku2x334n7di44o6) said :
#3

I'm actually looking for the process used by Canonical to build the official isos, not to create my own distro...
Take a look at the script I'm using now:

#!/bin/bash
# echo out everything to make it easier to understand whats happening while it runs
set -x
# I run this on a 12.04 host, but we are debootstrapping a clean 12.04 in /dev/shm
# to make sure this is exactly the ubuntu release, apt-sources, and package versions we need to create the isos
# host needs debootstrap
apt-get install -y debootstrap
# I have a lot of memory, so I run builds in shm, change these first three lines
mount -o remount,dev /run/shm # by default they mount nodev
export PRECISE_CHROOT=/run/shm/precise-chroot
mkdir -p $PRECISE_CHROOT

# if this gets run twice, don't debootstrap again if /dev exists within the chroot
if [ ! -d $PRECISE_CHROOT/dev ] ; then
    debootstrap --arch amd64 precise $PRECISE_CHROOT http://localhost:8910/ubuntu/ # using local mirror
    mount proc $PRECISE_CHROOT/proc -t proc
    mount sysfs $PRECISE_CHROOT/sys -t sysfs
    cp /etc/hosts $PRECISE_CHROOT/etc/hosts
fi

# if this gets run twice, don't install livecd-rootfs (depends on live-build in precise)
if [ ! -f $PRECISE_CHROOT/usr/bin/lb ] ; then
    chroot $PRECISE_CHROOT /usr/bin/apt-get install -y livecd-rootfs
fi

# create a live-build area within our new precise-chroot
export LIVE_BUILD=$PRECISE_CHROOT/lb
mkdir -p $LIVE_BUILD/{config,config/chroot_local-packageslist,config/chroot_sources}

# copying in the livecd-rootfs/live-build auto _seems_ like the right thing to do
# but it's more cargo culting than anything... can I get some direction here?
cp -a $PRECISE_CHROOT/usr/share/livecd-rootfs/live-build/auto $LIVE_BUILD/auto

# generates ./config/* based on the auto config from livecd-rootfs
chroot $PRECISE_CHROOT bash -c 'cd lb ; PROJECT=ubuntu \
 SUITE=precise \
 ARCH=amd64 \
 BINARYFORMAT=iso \
 LB_PARENT_MIRROR_BOOTSTRAP="http://localhost:8910/ubuntu" \
 LB_PARENT_MIRROR_CHROOT="http://localhost:8910/ubuntu" \
 LB_PARENT_MIRROR_CHROOT_VOLATILE="http://localhost:8910/ubuntu" \
 LB_PARENT_MIRROR_CHROOT_SECURITY="http://localhost:8910/ubuntu-security" \
 LB_PARENT_MIRROR_UBUNTU_INSTALLER="http://localhost:8910/ubuntu" \
 LB_MIRROR_BOOTSTRAP="http://localhost:8910/ubuntu" \
 LB_MIRROR_CHROOT="http://localhost:8910/ubuntu" lb config'

chroot $PRECISE_CHROOT bash -c 'cd lb ; lb build'

Revision history for this message
Chris McClimans (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlr-launchpad-a811i2i3ytqlsztthjth0svbccw8inm65tmkqp9sarr553jq53in4xm1m8wn3o4rlwaer06ogwvqwv9mrqoku2x334n7di44o6) said :
#4

I'm basing this appoach based on Colin Wilson's post to ubuntu-devel / debian-live @ http://lists.debian.org/debian-live/2011/06/msg00152.html

Revision history for this message
Chris McClimans (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlr-launchpad-a811i2i3ytqlsztthjth0svbccw8inm65tmkqp9sarr553jq53in4xm1m8wn3o4rlwaer06ogwvqwv9mrqoku2x334n7di44o6) said :
#5

That's Colin Watson, not Colin Wilson.

Revision history for this message
Colin Watson (cjwatson) said :
#6

We used livecd-rootfs on precise, which contains live-build configuration in live-build/, driven from the BuildLiveCD script. That's configured to only build the squashfs parts; the ISO images were built using https://code.launchpad.net/+branch/ubuntu-cdimage and https://code.launchpad.net/~ubuntu-cdimage/debian-cd/ubuntu.

Revision history for this message
Hippie Hacker (hippiehacker) said :
#7

Thanks Colin, I looked at those two repos but wasn't able to get BuildLiveCD to work.

https://gist.github.com/2978542 is another attempt to just use live-build, but it seems a dead end.

Could you give a bit of direction to the use/config of the live-build + BuildLiveCD using the ubuntu-cdimage and debian-cd/ubuntu repos? I wasn't able to cobble it together on my own.

Can you help with this problem?

Provide an answer of your own, or ask Chris McClimans for more information if necessary.

To post a message you must log in.