|
Gloriously Lead Overclockix Chief Architect
Join Date: Sep 2002
Location: indianapolis, indiana
|
Overclockix builder utils prerequisites
In order to use the 'overclockix_builder_utils' script, you will need a Debian based operating system with the following packages installed:- genisoimage
- live-build
- squashfs-tools
You also need to download the isohybrid.pl script and place it in '/usr/bin/'. Make sure to make the isohybrid.pl script executable after downloading it.
Please note that you must either be running squeeze or using the 'live-build' package from squeeze! The 'live-build' package in wheezy is not working correctly when creating an image from scratch!
Note: All examples in these instructions are for the i386 architecture. To build an amd64 image, simply use 'amd64' where you see 'i386'.
========================================
Creating a new 'iso-hybrid' image
You should download the overclockix template and overclockix builder utils which i have created. On my system, I have a working directory for LiveCD builds called '/opt/live/i386' which I downloaded the template archive to. The builder utils should be saved to '/opt/live/scripts'. If you wish to use a directory other than '/opt/live', you need to modify the script to change the 'live_dir' variable which is found in the 'choose_branch' function. The build utils also includes a testing branch which is found in '/opt/live_testing' by default.
Extract the archive and rename it to the type of image you want to correct (ie - 'iso-hybrid').
Change directory to the new Overclockix project directory. you will need to customize the config file for the specific build:
In 'auto/config', you will need to change the '--packages-lists' directive to the base desktop build of your choice. For example:
If you want to enable 'copy image to testing' in the menu, you will need to customize the function 'copy_iso_to_testing' to point to the location of your choice, more specifically, the 'testing_dir' variable.
From here, we are ready to perform our initial build. As root (or using sudo), execute the build script (which is located in the '/opt/live/scripts' directory):
Choose the architecture you want to work on (i386). Next, choose the image type (iso-hybrid). First we need to create a base image using live-build. Simply choose 'create a base image from live-build' from the menu.
This process will take a while as it is basically installing a new system in a chroot environment.
As long as you do not get any errors, you should now have a 'binary-hybrid.iso' file in your project directory. This is your new livecd image:
Next, run the build script again and choose 'extract image to live fs'. This function will prompt you to enter the name of the image file which you would like to use. This will unpack the image for you to work on. If you need to drop files into the chroot, it is extracted to './fs'. Now choose 'chroot to live fs from files' and you will be dropped in the chroot of the extracted squashfs so that you can make modifications to the LiveCD environment.
I have my own set of customizations and extras install script which i have made available. The only required customization is the '/etc/live/config.conf' file which sets the username, hostname and full user name for the LiveCD. The rest are just my personal customizations. If you download the customizations archive to '/opt/live/temp/i386/sources' and keep the same file name, you can apply my customizations from the build script using 'deploy customizations to live fs'. Alternatively, you can simply extract the archive in the same location as the work_dir (in this case, '/opt/live/i386/iso-hybrid/'), they will be applied automatically at this stage. I am also including applications which need to be compiled manually to the customizations.
If you have performed any apt/aptitude functions, you will want to clear the file cache before exiting using 'apt-get clean'. This will remove the downloaded archives to save space. Once you have finished, you simply type 'exit' and you will be dropped back to the menu.
If you are ready to build the new image file, just choose 'build new squashfs' and it will build the new squashfs (root file system) and then run 'repack image' and it will repack the image for you. It will create the image as 'newcd.iso' as seen below:
If you want, you can change the default output name of the new ISO. It is hard coded in the build script. Next, take your new image for a spin and make modifications as you wish.
========================================
Modifying a 'iso-hybrid' image
If you need to go back into the chroot environment and you have the image has already been extracted to '/fs' and '/iso', execute the build script and choose 'chroot to live fs from files' from the menu.
If you want to take an existing image file created using this method, you can extract it by executing the build script and choosing 'extract image to live fs'.
This will extract the filesystem and choose 'chroot to live fs from files' to drop you into a chroot environment. Once you have made your changes, you simply need to build new squashfs & repack image as before.
========================================
Creating a new 'usb-hdd' image
You should download the overclockix template and overclockix builder utils which I have created. On my system, I have a working directory for livecd builds called '/opt/live/i386' which I downloaded the template archive to. The builder utils should be saved to '/opt/live/scripts'. If you wish to use a directory other than '/opt/live', you need to modify the script to change the 'live_dir' variable which is found in the 'choose_branch' function. The build utils also includes a testing branch which is found in '/opt/live_testing' by default.
Extract the archive and rename it to the type of image you want to correct (ie - 'usb-hdd').
Change directory to the new Overclockix project directory. You will need to customize the config file for the specific build:
In 'auto/config', you will need to change the '--packages-lists' directive to be blank. Since we are using the squashfs from the iso-hybrid build, all we need is a base install to work from. Also, you will need to change the '--binary-images' directive to 'usb-hdd'. For example my config file looks like:
If you want to enable 'copy image to testing' in the menu, you will need to customize the function 'copy_iso_to_testing' to point to the location of your choice, more specifically, the 'testing_dir' variable.
From here, we are ready to perform our initial build. As root (or using sudo), execute the build script (which is located in the '/opt/live/scripts' directory):
Choose the architecture you want to work on. Next, choose the project. First we need to create a base image using live-build. Simply choose 'create a base image from live-build' from the menu.
This process will take a while as it is basically installing a new system in a chroot environment.
As long as you do not get any errors, you should now have a 'binary.img' file in your project directory. this is your new image:
If you need to drop files into the chroot, it is extracted to './fs'. Now choose and you will be dropped in the chroot of the extracted squashfs so that you can make modifications to the livecd environment.
Next, run the build script again and choose 'extract image to live fs'. This function will prompt you to enter the name of the image file which you would like to use. This will unpack the image for you to work on. Normally you would choose 'chroot to live fs from files' to drop you in the chroot of the image so that you can make modifications to the livecd environment but it skips this setup when using a 'usb-hdd' image. In order to make things easier to maintain, we are going to make the newly created 'usb-hdd' image share the squashfs (root filesystem) with the 'iso-hybrid' image. You will be prompted to choose a project to use as a base for the fs and squashfs. Once you do that, it will automatically create the symlinks required to link it to the 'iso-hybrid' image.
In order to support the building of the 'usb-hdd' images, you will need to install the following packages in your 'iso-hybrid' image's chroot: mtools, parted, & syslinux. (See modifying a 'iso-hybrid' image for more information).
If you are ready to build the new image file, just choose 'repack image' and it will repack the image for you. It will create the image as 'newbinary.img' as seen below:
========================================
Modifying a 'usb-hdd' image
In order to edit your 'usb-hdd' image, you need to edit the live fs of the corresponding 'iso-hybrid' image since they share a squashfs. See modifying a 'iso-hybrid' image for instructions.
__________________
intel i5-750 -- msi p55-gd65 -- 4 x 4096mb ddr3 1600 -- msi gtx550 ti cyclone oc 1gb -- antec p182 -- ocz fatal1ty 750w -- win8 x64
intel i5-3330 -- msi z77a-gd65 -- 4 x 8gb ddr3 1600 -- intel hd graphics 2500 -- chieftec bravo ba-01b-b-b -- debian wheezy amd64
forum rules | overclockix | overclockers geforce survey | mbentley.net
Last edited by mbentley; 10-05-11 at 07:20 PM.
|