Live-Build

Differences between revisions 5 and 6
Revision 5 as of 2017-03-23 23:29:34
Size: 1867
Editor: debmc
Comment:
Revision 6 as of 2017-03-24 00:03:01
Size: 2871
Editor: debmc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
As of March 23, 2017, you will also need to clone and build grub2 on the build machine to include a patch for the ieee1275 chrp grub install -> [[https://wiki.ubuntu.com/ppc64el/grub2|How To Build and Install Grub2]] As of March 23, 2017, you will need to clone and build grub2 on the build machine to include a patch for the ieee1275 chrp grub install
[[https://wiki.ubuntu.com/ppc64el/grub2|How To Build and Install Grub2]]
Line 42: Line 43:
== Sample Configuration == [[attachment:0001-live-build-binary_hdd-enablement-for-ppc64el.patch]]
Line 44: Line 45:
This tutorial is based on a pre-configured setup for ppc64el as an example. [[attachment:0001-live-build-installer-enablement-for-ppc64el.patch]]
Line 46: Line 47:
Use the following tar file as the basis for setting up the build environment and there will be steps identified to show how to tweak the sample to achieve your desired results. == Sample Live-Build Configuration ==

This tutorial is based on a pre-configured setup for ppc64el.

=== Download the tar file ===

Use the following tar file as a base config, we will show you later the common options to tweak.
Line 49: Line 57:

=== Setup and Build ===

{{{
myuser@ppc64el:~ $ sudo mkdir lb-setup <- lb-setup directory can be named anything you want
}}}

{{{
myuser@ppc64el:~ $ sudo cp Mar-2017-fwts-installer-live-v5-ppc64el-config.tar.gz ~/lb-setup

myuser@ppc64el:~ $ cd lb-setup

myuser@ppc64el:~/lb-setup $ sudo tar -xvf Mar-2017-fwts-installer-live-v5-ppc64el-config.tar.gz

myuser@ppc64el:~/lb-setup $ sudo lb clean --all

myuser@ppc64el:~/lb-setup $ sudo lb build 2>&1 | tee /home/myuser/build.log

myuser@ppc64el:~/lb-setup $ ls -al live-image-ppc64el.iso <- This is the ISO output file
}}}

== Running the ISO ==

=== Install pre-req's ===

{{{

myuser@ppc64el:~/lb-setup $ sudo apt-get install qemu-kvm qemu-utils

}}}

=== Run the Live Image and Optional Install ===

{{{

myuser@ppc64el:~/lb-setup $ sudo kvm -cdrom live-image-ppc64el.iso -m 2G -nographic -nodefaults -serial stdio

}}}

Live-Build Steps for building a custom ISO, IMG or Netboot tarball with a custom kernel

Live-Build is a Debian based infrastructure -> Debian Live-Build Manual

Build Host Requirements

ppc64el images are built on a ppc64el host

Setting up Live-Build with Patches

There are two patches needed to build and install ppc64el ISO's, IMG's and Netboot tarball's.

As of March 23, 2017, you will need to clone and build grub2 on the build machine to include a patch for the ieee1275 chrp grub install How To Build and Install Grub2

Install pre-req's

myuser@ppc64el:~ $ sudo apt-get install debootstrap debhelper kpartx gdisk devscripts dh-systemd live-build isolinux

Clone the live-build tree

myuser@ppc64el:~ $ git clone git://anonscm.debian.org/git/debian-live/live-build.git
myuser@ppc64el:~ $ cd live-build
myuser@ppc64el:~/live-build $ sudo dpkg-buildpackage -b -uc -us
myuser@ppc64el:~/live-build $ sudo make install
myuser@ppc64el:~/live-build $ lb -v
1:20161216 <- This should reflect the current level of the git tree

Apply the Patches

myuser@ppc64el:~/live-build $ git am 0001-live-build-binary_hdd-enablement-for-ppc64el.patch
myuser@ppc64el:~/live-build $ git am 0001-live-build-installer-enablement-for-ppc64el.patch

0001-live-build-binary_hdd-enablement-for-ppc64el.patch

0001-live-build-installer-enablement-for-ppc64el.patch

Sample Live-Build Configuration

This tutorial is based on a pre-configured setup for ppc64el.

Download the tar file

Use the following tar file as a base config, we will show you later the common options to tweak.

Mar-2017-fwts-installer-live-v5-ppc64el-config.tar.gz

Setup and Build

myuser@ppc64el:~ $ sudo mkdir lb-setup  <- lb-setup directory can be named anything you want

myuser@ppc64el:~ $ sudo cp Mar-2017-fwts-installer-live-v5-ppc64el-config.tar.gz ~/lb-setup

myuser@ppc64el:~ $ cd lb-setup

myuser@ppc64el:~/lb-setup $ sudo tar -xvf Mar-2017-fwts-installer-live-v5-ppc64el-config.tar.gz

myuser@ppc64el:~/lb-setup $ sudo lb clean --all

myuser@ppc64el:~/lb-setup $ sudo lb build 2>&1 | tee /home/myuser/build.log

myuser@ppc64el:~/lb-setup $ ls -al live-image-ppc64el.iso  <- This is the ISO output file

Running the ISO

Install pre-req's

myuser@ppc64el:~/lb-setup $ sudo apt-get install qemu-kvm qemu-utils

Run the Live Image and Optional Install

myuser@ppc64el:~/lb-setup $ sudo kvm -cdrom live-image-ppc64el.iso -m 2G -nographic -nodefaults -serial stdio

Live-Build (last edited 2017-10-04 01:41:58 by debmc)