diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:39 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:39 +0200 |
commit | af04c39b8b9a20d70e7123c57ec175e1b34d7d94 (patch) | |
tree | eae1bc5312b8d6fa8dc5048b172923a01730026b | |
parent | 9a5955a79f907075d0cde61db6f7d2d605ab3b4a (diff) | |
download | live-build-af04c39b8b9a20d70e7123c57ec175e1b34d7d94.zip live-build-af04c39b8b9a20d70e7123c57ec175e1b34d7d94.tar.gz |
Adding live-package 0.99.20-1.
-rw-r--r-- | ChangeLog | 84 | ||||
-rw-r--r-- | TODO | 10 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/cron.daily | 46 | ||||
-rw-r--r-- | debian/default | 2 | ||||
-rw-r--r-- | src/config | 4 | ||||
-rwxr-xr-x | src/main.sh | 18 | ||||
-rw-r--r-- | src/scripts/02defaults.sh | 43 | ||||
-rw-r--r-- | src/scripts/11bootstrap.sh | 2 | ||||
-rw-r--r-- | src/scripts/13chroot.sh | 64 | ||||
-rw-r--r-- | src/scripts/21image.sh | 79 | ||||
-rw-r--r-- | src/scripts/23net.sh | 6 | ||||
-rw-r--r-- | src/scripts/24.usb.sh | 152 | ||||
-rw-r--r-- | templates/syslinux/isolinux.cfg.iso (renamed from templates/syslinux/isolinux.cfg) | 0 | ||||
-rw-r--r-- | templates/syslinux/isolinux.cfg.usb | 15 |
16 files changed, 467 insertions, 68 deletions
@@ -1,12 +1,35 @@ +2007-02-10 Daniel Baumann <daniel@debian.org> + + * Added legacy code for genisoimage. + +2007-02-09 Daniel Baumann <daniel@debian.org> + + * Added usb type. + +2007-02-08 Daniel Baumann <daniel@debian.org> + + * Added desktop task to the *-desktop flavours. + +2007-02-07 Daniel Baumann <daniel@debian.org> + + * Extended cron job a bit. + * Fixed manual pruning in minimal flavour as suggested by Bas Wijnen + <wijnen@debian.org> + +2007-02-02 Daniel Baumann <daniel@debian.org> + + * Added "--without-daemons". + 2007-02-01 Daniel Baumann <daniel@debian.org> * Added "--tasks". - * Added desktop base to all desktop package lists. + * Added desktop-base to all desktop package lists. 2007-01-31 Daniel Baumann <daniel@debian.org> * Changed vars in autobuilding script to be able to source make-live.conf. + * Uploaded 0.99.19. 2007-01-30 Daniel Baumann <daniel@debian.org> @@ -16,6 +39,7 @@ * Added additional pruning to minimal flavour. * Using interactive frontend while processing --hook. + * Uploaded 0.99.18. 2007-01-24 Daniel Baumann <daniel@debian.org> @@ -25,16 +49,23 @@ - adding start-stop-daemon wrapper to avoid daemons to be started. - adding workaround to prevent binfmt locking /proc. - adding LIVE_ISOLINUX_SPLASH. + * Uploaded 0.99.17. 2007-01-19 Daniel Baumann <daniel@debian.org> * Replacing mkisofs with genisoimage. +2007-01-18 Daniel Baumann <daniel@debian.org> + + * Cleanups. + * Uploaded 0.99.16. + 2007-01-16 Daniel Baumann <daniel@debian.org> * Switched default distribution back to unstable, as unstable is usable again from the kernel point of view. * Added file to the minimal package list. + * Uploaded 0.99.15. 2007-01-04 Daniel Baumann <daniel@debian.org> @@ -44,6 +75,10 @@ * Added xdebconfigurator to all X11 package lists. * Adding workaround for initrd backup files. +2006-11-06 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.14. + 2006-11-05 Daniel Baumann <daniel@debian.org> * Applied patch from Markus Bauer <bauer-markus@web.de>: @@ -62,6 +97,10 @@ * Fixed regression when using -d ${CODENAME} wrt/ kernel packages. +2006-10-30 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.13. + 2006-10-29 Daniel Baumann <daniel@debian.org> * Added minimal-net flavour. @@ -94,6 +133,10 @@ - allowing override of kernel-packages. * Reverted mangling of LIVE_DISTRIBUTION for sources.list generation. +2006-10-23 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.12. + 2006-10-18 Daniel Baumann <daniel@debian.org> * Autodetecting proxy now. @@ -101,6 +144,16 @@ 2006-10-16 Daniel Baumann <daniel@debian.org> * Readded and slightly changed --clone and --preseed. + * Uploaded 0.99.11. + +2006-10-09 Daniel Baumann <daniel@debian.org> + + * Cleanups. + * Uploaded 0.99.10. + +2006-10-02 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.9. 2006-10-01 Daniel Baumann <daniel@debian.org> @@ -125,11 +178,16 @@ arguments. * Fixed package list handling similar to the fix suggested by Alex Owen <r.alex.owen@gmail.com>. + * Uploaded 0.99.8. -2006-09-08 Marco Amadori <marco.amadori@gmail.com> +2006-09-24 Marco Amadori <marco.amadori@gmail.com> * 13hack.sh: initramfs-tools hack, check added for xorg. +2006-09-18 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.7. + 2006-09-15 Daniel Baumann <daniel@debian.org> * Added eject to minimal package selection. @@ -138,6 +196,10 @@ * Adjustements for linux 2.6.17 testing propagation. +2006-09-11 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.6. + 2006-09-08 Marco Amadori <marco.amadori@gmail.com> * 23net.sh: Fixed binary missing directory creation. @@ -154,6 +216,10 @@ * 23net.sh: Added 2 variables for basenames to ease readability. * main.sh, 02default.sh: Modified Usage() uses. +2006-09-04 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.5. + 2006-09-03 Daniel Baumann <daniel@debian.org> * Added dist parameter to easily pull images for live.debian.net. @@ -196,6 +262,7 @@ * Updated documentation. * Added patch from Alex Owen <r.a.owen@qmul.ac.uk> to update pxelinux.cfg for NFS root in casper. + * Uploaded 0.99.4. 2006-08-27 Daniel Baumann <daniel@debian.org> @@ -212,11 +279,19 @@ * Cleaned up parameter names. * testing is now supported. +2006-08-21 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.3. + 2006-08-02 Marco Amadori <marco.amadori@gmail.com> * Rewrote netboot support. * Added support for pure directory rootfs images. +2006-07-31 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.2. + 2006-07-28 Daniel Baumann <daniel@debian.org> * Added DEBIAN_FRONTEND to chroots(), now completely non-interactive. @@ -226,6 +301,10 @@ * Changed amd64 kernel naming scheme. +2006-07-24 Daniel Baumann <daniel@debian.org> + + * Uploaded 0.99.1. + 2006-07-19 Daniel Baumann <daniel@debian.org> * Bugfixes. @@ -238,6 +317,7 @@ * Added chroot to 01-patch.sh. * Added "--logfile". + * Uploaded 0.99. 2006-07-01 Daniel Baumann <daniel.baumann@panthera-systems.net> @@ -1,10 +1,10 @@ Todo: - * logfile support * output hiding - * multiple other repositories * d-i/g-i integration * documentation - * source images - * investigate about /proc - * fixing sources.list before image generation. + + * l10n flags + * --disable-daemons + + * general source tarballs diff --git a/debian/changelog b/debian/changelog index 0b503e6..883565e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +live-package (0.99.20-1) unstable; urgency=low + + * New upstream release: + - Fixed manual pruning in minimal flavour as suggested by + Bas Wijnen <wijnen@debian.org> (Closes: #410040). + + -- Daniel Baumann <daniel@debian.org> Thu, 1 Feb 2007 17:35:00 +0100 + live-package (0.99.19-1) unstable; urgency=low * New upstream release. diff --git a/debian/control b/debian/control index 4afdd98..c96be77 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.7.2 Package: live-package Architecture: all -Depends: cdebootstrap, genext2fs, genisoimage, squashfs-tools +Depends: cdebootstrap, dosfstools, genext2fs, genisoimage | mkisofs, squashfs-tools, syslinux, mtools, parted Provides: make-live Description: utility to build Debian Live systems make-live is a utility to build Debian Live systems. It takes a Debian mirror diff --git a/debian/cron.daily b/debian/cron.daily index f330e1f..4948dfc 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -34,23 +34,23 @@ fi # Process image autobuilding cd "${AUTOBUILD_DIRECTORY}" -for DISTRIBUTION in ${AUTOBUILD_DISTRIBUTIONS} +for AUTOBUILD_DISTRIBUTION in ${AUTOBUILD_DISTRIBUTIONS} do - for FLAVOUR in ${AUTOBUILD_FLAVOURS} + for AUTOBUILD_FLAVOUR in ${AUTOBUILD_FLAVOURS} do - if [ ! -f "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}.txt ] + if [ ! -f "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-iso-log.txt ] then # Generating images mkdir debian-live - make-live -d ${AUTOBUILD_DISTRIBUTION} -p ${AUTOBUILD_FLAVOUR} -m ${LIVE_MIRROR} ${AUTOBUILD_OPTIONS} > debian-live/log.txt 2>&1 + make-live -t iso -d ${AUTOBUILD_DISTRIBUTION} -p ${AUTOBUILD_FLAVOUR} -m ${LIVE_MIRROR} ${AUTOBUILD_OPTIONS} > debian-live/log.txt 2>&1 fi if [ -f debian-live/binary.iso ] && [ -f debian-live/source.iso ] then # Moving logs mkdir -p "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log - mv debian-live/log.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-log.txt - mv debian-live/packages.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-packages.txt + mv debian-live/log.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-iso-log.txt + mv debian-live/packages.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-iso-packages.txt # Moving images mkdir -p "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/${AUTOBUILD_ARCHITECTURE} @@ -60,6 +60,29 @@ do mv debian-live/source.iso "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/source/debian-live-${AUTOBUILD_DISTRIBUTION}-source-${AUTOBUILD_FLAVOUR}.iso fi + # Cleanup + rm -rf debian-live + + if [ ! -f "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-usb-log.txt ] + then + # Generating images + mkdir debian-live + make-live -t usb -d ${AUTOBUILD_DISTRIBUTION} -p ${AUTOBUILD_FLAVOUR} -m ${LIVE_MIRROR} ${AUTOBUILD_OPTIONS} > debian-live/log.txt 2>&1 + fi + + if [ -f debian-live/binary.img ] + then + # Moving logs + mkdir -p "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log + mv debian-live/log.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-usb-log.txt + mv debian-live/packages.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-usb-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/${AUTOBUILD_ARCHITECTURE} + mv debian-live/binary.img "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/${AUTOBUILD_ARCHITECTURE}/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}.img + fi + + # Cleanup rm -rf debian-live done done @@ -67,3 +90,14 @@ done # Cleanup umount -f "${AUTOBUILD_DIRECTORY}"/debian-live/chroot/proc > /dev/null 2>&1 rm -rf "${AUTOBUILD_DIRECTORY}" + +# MD5SUMS +for DIRECTORY in "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/* +do + cd "${DIRECTORY}" + md5sum * > MD5SUMS +done + +# Current symlink +rm -f "${AUTOBUILD_SERVER}"/daily-builds/current +ln -s ${AUTOBUILD_DATE} "${AUTOBUILD_SERVER}"/daily-builds/current diff --git a/debian/default b/debian/default index 50ccb2a..523fce9 100644 --- a/debian/default +++ b/debian/default @@ -4,7 +4,7 @@ AUTOBUILD="false" AUTOBUILD_DISTRIBUTIONS="etch sid" AUTOBUILD_FLAVOURS="minimal standard kde-desktop gnome-desktop xfce-desktop" -AUTOBUILD_OPTIONS="--tasks laptop --with-source" +AUTOBUILD_OPTIONS="--with-source" AUTOBUILD_DIRECTORY="/srv/tmp/make-live" AUTOBUILD_SERVER="/srv/debian-live" @@ -87,7 +87,7 @@ LIVE_REPOSITORY_SECTIONS_edu="local" LIVE_REPOSITORY_restricted="http://ftp.debian-unofficial.org/debian-restricted/" LIVE_REPOSITORY_KEY_restricted="http://ftp-master.debian-unofficial.org/key_2007.asc" -LIVE_REPOSITORY_KEYRING_restricted="" +LIVE_REPOSITORY_KEYRING_restricted="debian-unofficial-archive-keyring" LIVE_REPOSITORY_DISTRIBUTION_restricted="" LIVE_REPOSITORY_SECTIONS_restricted="restricted" @@ -98,7 +98,7 @@ LIVE_REPOSITORY_DISTRIBUTION_fai="etch" LIVE_REPOSITORY_SECTIONS_fai="koeln" # Debian section (Default: main) -#LIVE_SECTION="main" +#LIVE_SECTIONS="main" # Netboot server (Default: 192.168.1.1) #LIVE_SERVER_ADDRESS="" diff --git a/src/main.sh b/src/main.sh index 20bc5c5..31c5b65 100755 --- a/src/main.sh +++ b/src/main.sh @@ -28,7 +28,7 @@ set -e BASE=${LIVE_BASE:-"/usr/share/make-live"} CONFIG="/etc/make-live.conf" PROGRAM="`basename ${0}`" -VERSION="0.99.19" +VERSION="0.99.20" CODENAME_OLDSTABLE="woody" CODENAME_STABLE="sarge" @@ -41,7 +41,7 @@ do . "${SCRIPT}" done -USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--clone DIRECTORY] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--with-generic-indices] [--without-generic-indices] [--with-recommends] [--without-recommends] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [-k|--keyring] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--preseed FILE] [--proxy-ftp URL] [--proxy-http URL] [--repositories NAME] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE] [--tasks TASK]" +USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--clone DIRECTORY] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--with-generic-indices] [--without-generic-indices] [--with-recommends] [--without-recommends] [--with-daemons] [--without-daemons] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [-k|--keyring] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--preseed FILE] [--proxy-ftp URL] [--proxy-http URL] [--repositories NAME] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE] [--tasks TASK]" Help () { @@ -60,7 +60,7 @@ Help () echo " Filesystems: ext2, plain, squashfs." echo " Boostrap flavours: minimal, standard." echo " Kernel flavours: Debian Kernel flavour of your architecture." - echo " Types: iso, net." + echo " Types: iso, net, usb." echo echo "Options:" echo " -a, --architecture: specifies the bootstrap architecture." @@ -97,6 +97,8 @@ Help () echo " --without-generic-indices: disables generic debian package indices." echo " --with-recommends: installes recommended packages too." echo " --without-recommends: does not install recommended packages (default)." + echo " --with-daemons: don't touch daemons." + echo " --without-daemons: disable all non-essential daemons." echo echo "Environment:" echo " All settings can be also specified trough environment variables. Please see make-live.conf(5) for more information." @@ -166,7 +168,7 @@ Configuration () Main () { - ARGUMENTS="`getopt --longoptions root:,tasks:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,keyring:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" + ARGUMENTS="`getopt --longoptions root:,tasks:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,keyring:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-daemons,without-daemons,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" if [ "${?}" != "0" ] then @@ -317,6 +319,14 @@ Main () LIVE_RECOMMENDS="no"; shift ;; + --with-daemons) + LIVE_DAEMONS="yes"; shift + ;; + + --without-daemons) + LIVE_DAEMONS="no"; shift + ;; + --with-source) LIVE_SOURCE="yes"; shift ;; diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh index e762145..924ad65 100644 --- a/src/scripts/02defaults.sh +++ b/src/scripts/02defaults.sh @@ -29,6 +29,10 @@ Defaults () LIVE_TYPE="Net" ;; + usb) + LIVE_TYPE="Usb" + ;; + *) echo "E: image type wrong or not yet supported." Usage 1 @@ -72,6 +76,9 @@ Defaults () if [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_TYPE}" = "Iso" ] then LIVE_FILESYSTEM="squashfs" + elif [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_TYPE}" = "Usb" ] + then + LIVE_FILESYSTEM="squashfs" elif [ -z "${LIVE_FILESYSTEM}" ] && [ "${LIVE_TYPE}" = "Net" ] then LIVE_FILESYSTEM="plain" @@ -164,15 +171,15 @@ Defaults () if [ "${LIVE_PACKAGE_LIST}" = "gnome-desktop" ] then LIVE_PACKAGE_LIST="gnome" - LIVE_TASKS="${LIVE_TASKS} gnome-desktop" + LIVE_TASKS="${LIVE_TASKS} standard laptop desktop gnome-desktop" elif [ "${LIVE_PACKAGE_LIST}" = "kde-desktop" ] then LIVE_PACKAGE_LIST="kde" - LIVE_TASKS="${LIVE_TASKS} kde-desktop" + LIVE_TASKS="${LIVE_TASKS} standard laptop desktop kde-desktop" elif [ "${LIVE_PACKAGE_LIST}" = "xfce-desktop" ] then LIVE_PACKAGE_LIST="xfce" - LIVE_TASKS="${LIVE_TASKS} xfce-desktop" + LIVE_TASKS="${LIVE_TASKS} standard laptop desktop xfce-desktop" fi # Check for package lists @@ -185,13 +192,16 @@ Defaults () LIVE_PACKAGE_LIST="${BASE}/lists/standard" fi else - if [ ! -r "${LIVE_PACKAGE_LIST}" ] + if [ "${LIVE_PACKAGE_LIST}" != "everything" ] then - if [ -r "${BASE}/lists/${LIVE_PACKAGE_LIST}" ] + if [ ! -r "${LIVE_PACKAGE_LIST}" ] then - LIVE_PACKAGE_LIST="${BASE}/lists/${LIVE_PACKAGE_LIST}" - else - LIVE_PACKAGE_LIST="${BASE}/lists/standard" + if [ -r "${BASE}/lists/${LIVE_PACKAGE_LIST}" ] + then + LIVE_PACKAGE_LIST="${BASE}/lists/${LIVE_PACKAGE_LIST}" + else + LIVE_PACKAGE_LIST="${BASE}/lists/standard" + fi fi fi fi @@ -223,9 +233,9 @@ Defaults () fi # Set debian sections - if [ -z "${LIVE_SECTION}" ] + if [ -z "${LIVE_SECTIONS}" ] then - LIVE_SECTION="main" + LIVE_SECTIONS="main" fi # Set netboot server @@ -279,4 +289,17 @@ Defaults () then LIVE_DEBCONF_PRIORITY="critical" fi + + if [ -z "${LIVE_DAEMONS}" ] + then + LIVE_DAEMONS="yes" + fi + + # This is a hack because Ubuntu does not ship cdrkit already + if [ -x /usr/bin/genisoimage ] + then + GENISOIMAGE="/usr/bin/genisoimage" + else + GENISOIMAGE="/usr/bin/mkisofs" + fi } diff --git a/src/scripts/11bootstrap.sh b/src/scripts/11bootstrap.sh index 7247223..224ac19 100644 --- a/src/scripts/11bootstrap.sh +++ b/src/scripts/11bootstrap.sh @@ -21,7 +21,7 @@ Bootstrap () if [ -n "${LIVE_BOOTSTRAP_CONFIG}" ]; then SUITE_CONFIG="--suite-config ${LIVE_BOOTSTRAP_CONFIG}" - fi + fi # Bootstrap system cdebootstrap --arch="${LIVE_ARCHITECTURE}" --flavour="${LIVE_FLAVOUR}" ${SUITE_CONFIG} "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}" diff --git a/src/scripts/13chroot.sh b/src/scripts/13chroot.sh index 06df0b6..5a5298e 100644 --- a/src/scripts/13chroot.sh +++ b/src/scripts/13chroot.sh @@ -126,12 +126,39 @@ EOF Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST_CLONED}` aptitude install --assume-yes" fi + # Install aptitude tasks + if [ -n "${LIVE_TASKS}" ] + then + for TASK in ${LIVE_TASKS} + do + Chroot_exec "aptitude install --assume-yes ${TASK}" + done + fi + # Install packages list if [ -n "${LIVE_PACKAGE_LIST}" ] then - grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" - Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes" - rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" + if [ "${LIVE_PACKAGE_LIST}" = "everything" ] + then + #for FILE in "${LIVE_CHROOT}"/var/lib/apt/lists/*_Packages + #do + # awk '/Package: / { print $2 }' "${FILE}" | grep -v ".*-dbg$" >> "${LIVE_CHROOT}"/root/everything + #done + + #Chroot_exec "xargs --arg-file=/root/everything aptitude install --assume-yes" + #rm -f "${LIVE_CHROOT}"/root/everything + + # FIXME + + for SECTION in admin base comm devel doc editors electronics embedded games gnome graphics hamradio interpreters kde libs libdevel mail math misc net news oldlibs otherosfs perl python science shells sound tex text utils web x11 + do + Chroot_exec "aptitude install --assume-yes ~s${SECTION}" + done + else + grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" + Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes" + rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" + fi fi # Install extra packages @@ -140,15 +167,6 @@ EOF Chroot_exec "aptitude install --assume-yes ${LIVE_PACKAGES}" fi - # Install aptitude tasks - if [ -n "${LIVE_TASKS}" ] - then - for TASK in ${LIVE_TASKS} - do - Chroot_exec "aptitude install --assume-yes ${TASK}" - done - fi - # Copy external directory into the chroot if [ -d "${LIVE_INCLUDE_CHROOT}" ] then @@ -178,6 +196,26 @@ EOF # Save package list Chroot_exec "dpkg --get-selections" > "${LIVE_ROOT}"/packages.txt + # Disable daemons + if [ "${LIVE_DAEMONS}" = "no" ] + then + # Disable all + for FILE in "${LIVE_CHROOT}"/etc/init.d/* + do + Chroot_exec "update-rc.d -f `basename ${FILE}` remove" + done + + # Re-enable all required (taken from -f standard chroot) + for PACKAGE in casper console-common cron dpkg ifupdown initscripts kbd klogd libc6 libdevmapper1.02 libselinux1 libsepol1 login makedev module-init-tools netbase openbsd-inetd procps sudo sysklogd udev util-linux + do + # Re-configure if existing + if [ -f "${LIVE_CHROOT}"/var/lib/dpkg/info/${PACKAGE}.postinst ] + then + Chroot_exec "/var/lib/dpkg/info/${PACKAGE}.postinst configure" + fi + done + fi + # Add filesystem.manifest Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest @@ -193,7 +231,7 @@ EOF if [ "${LIVE_FLAVOUR}" = "minimal" ] then - rm -f "${LIVE_CHROOT}"/var/lib/apt/lists/* + rm -rf "${LIVE_CHROOT}"/var/lib/apt/lists/* rm -f "${LIVE_CHROOT}"/var/lib/dpkg/available-old rm -f "${LIVE_CHROOT}"/var/lib/dpkg/diversions-old rm -f "${LIVE_CHROOT}"/var/lib/dpkg/statoverride-old diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh index ba52d70..934bc70 100644 --- a/src/scripts/21image.sh +++ b/src/scripts/21image.sh @@ -16,36 +16,36 @@ Indices () # Configure custom sources.list case "${LIVE_DISTRIBUTION}" in oldstable|"${CODENAME_OLDSTABLE}"|stable|"${CODENAME_STABLE}"|testing|"${CODENAME_TESTING}") - echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src ${LIVE_MIRROR} ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi - echo "deb ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src ${LIVE_MIRROR_SECURITY} ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi ;; unstable|"${CODENAME_UNSTABLE}") - echo "deb ${LIVE_MIRROR} unstable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb ${LIVE_MIRROR} unstable ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src ${LIVE_MIRROR} unstable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src ${LIVE_MIRROR} unstable ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ] then - echo "deb ${LIVE_MIRROR} experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb ${LIVE_MIRROR} experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src ${LIVE_MIRROR} experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src ${LIVE_MIRROR} experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi cat > "${LIVE_CHROOT}"/etc/apt/preferences << EOF @@ -62,36 +62,36 @@ EOF # Configure default sources.list case "${LIVE_DISTRIBUTION}" in oldstable|"${CODENAME_OLDSTABLE}"|stable|"${CODENAME_STABLE}"|testing|"${CODENAME_TESTING}") - echo "deb http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src http://ftp.debian.org/debian/ ${LIVE_DISTRIBUTION} ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi - echo "deb http://security.debian.org/ ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb http://security.debian.org/ ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src http://security.debian.org/ ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src http://security.debian.org/ ${LIVE_DISTRIBUTION}/updates ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi ;; unstable|"${CODENAME_UNSTABLE}") - echo "deb http://ftp.debian.org/debian/ unstable ${LIVE_SECTION}" > "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb http://ftp.debian.org/debian/ unstable ${LIVE_SECTIONS}" > "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src http://ftp.debian.org/debian/ unstable ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src http://ftp.debian.org/debian/ unstable ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ] then - echo "deb http://ftp.debian.org/debian/ experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb http://ftp.debian.org/debian/ experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list if [ "${LIVE_SOURCE}" = "yes" ] then - echo "deb-src http://ftp.debian.org/debian/ experimental ${LIVE_SECTION}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "deb-src http://ftp.debian.org/debian/ experimental ${LIVE_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list fi fi ;; @@ -181,6 +181,15 @@ Syslinux () "${LIVE_ROOT}"/binary/isolinux rm -f "${LIVE_ROOT}"/binary/isolinux/pxelinux.cfg + #if [ "${LIVE_TYPE}" = "Iso" ] + #then + mv "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg.iso "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg + rm -f "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg.usb + #else + # mv "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg.usb "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg + # rm -f "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg.iso + #fi + if [ -n "${LIVE_ISOLINUX_SPLASH}" ]; then cp "${LIVE_ISOLINUX_SPLASH}" "${LIVE_ROOT}/binary/isolinux/splash.rle" fi @@ -201,7 +210,7 @@ Syslinux () cp -r "${LIVE_TEMPLATES}"/syslinux/* \ "${LIVE_ROOT}"/tftpboot/pxelinux.cfg mv "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/pxelinux.cfg "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default - rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.cfg + rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.cfg.* sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.txt if [ -n "${LIVE_ISOLINUX_SPLASH}" ]; then @@ -304,19 +313,19 @@ Mkisofs () if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] then # Create image - genisoimage -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_DISK_VOLUME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} + ${GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_DISK_VOLUME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} else echo "W: Bootloader on your architecture not yet supported (Continuing in 5 seconds)." sleep 5 # Create image - genisoimage -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_DISK_VOLUME}" "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} + ${GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_DISK_VOLUME}" "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} fi ;; source) # Create image - genisoimage -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"source.iso -r -J -l -V "${LIVE_DISK_VOLUME}" "${LIVE_ROOT}"/source + ${GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"source.iso -r -J -l -V "${LIVE_DISK_VOLUME}" "${LIVE_ROOT}"/source ;; esac } @@ -347,3 +356,33 @@ Sources () mv "${LIVE_CHROOT}"/"${SOURCE}"_* "${LIVE_ROOT}"/source/"${LETTER}"/"${SOURCE}" done } + +losetup_p () +{ + # Usage: losetup_p <image_filename> [partition_#] + FILE=$1 ; MNT=$2 ; PART=$3 + + FREELO=$(losetup -f) + losetup $FREELO $FILE + + FDISK_OUT=$(fdisk -l -u "$FREELO" 2>&1) + losetup -d $FREELO + + VDEV=$(echo "$FREELO"p"${PART:=1}") + + CYL=`echo "$FDISK_OUT" | sed -ne "s_^$VDEV[ *]*\([0-9]*\).*_\1_p"` + + START=$((CYL*512)) + + FREELO=$(losetup -f) + echo loop $FREELO at offset $START + + export FREELO + + if [ "${PART}" = "0" ] + then + losetup $FREELO "${FILE}" + else + losetup -o $START $FREELO "$FILE" + fi +} diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh index 48f5926..f9c2089 100644 --- a/src/scripts/23net.sh +++ b/src/scripts/23net.sh @@ -22,7 +22,7 @@ Net () mkdir -p "${LIVE_ROOT}"/binary/casper cp -r "${LIVE_TEMPLATES}"/common/* "${LIVE_ROOT}"/binary - + for MANIFEST in "${LIVE_ROOT}"/filesystem.manifest* do if [ -e "${MANIFEST}" ]; then @@ -42,10 +42,10 @@ Net () if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] then if [ ! -d "${LIVE_CHROOT}"/etc/initramfs-tools ] - then + then mkdir "${LIVE_CHROOT}"/etc/initramfs-tools fi - + # Configuring initramfs for NFS cat >> "${LIVE_CHROOT}"/etc/initramfs-tools/initramfs.conf << EOF MODULES=netboot diff --git a/src/scripts/24.usb.sh b/src/scripts/24.usb.sh new file mode 100644 index 0000000..cc51fda --- /dev/null +++ b/src/scripts/24.usb.sh @@ -0,0 +1,152 @@ +#!/bin/sh + +# make-live - utility to build Debian Live systems +# +# Copyright (C) 2006 Daniel Baumann <daniel@debian.org> +# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com> +# +# make-live comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +# This is free software, and you are welcome to redistribute it +# under certain conditions; see COPYING for details. + +Usb () +{ + if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ] + then + # Configure chroot + Patch_chroot apply + Patch_runlevel apply + + # Configure network + Patch_network apply + + mkdir -p "${LIVE_ROOT}"/binary/casper + for MANIFEST in "${LIVE_ROOT}"/filesystem.manifest* + do + if [ -e "${MANIFEST}" ]; then + mv "${MANIFEST}" "${LIVE_ROOT}"/binary/casper/ + fi + done + + # Remove indices + rm -rf "${LIVE_CHROOT}"/var/cache/apt + mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives/partial + rm -rf "${LIVE_CHROOT}"/var/lib/apt/lists + mkdir -p "${LIVE_CHROOT}"/var/lib/apt/lists/partial + + # Switching package indices to default + if [ "${LIVE_GENERIC_INDICES}" = "yes" ] + then + Indices default + fi + + # Deconfigure network + Patch_network deapply + + # Deconfigure chroot + Patch_runlevel deapply + Patch_chroot deapply + + # Generating rootfs image + Genrootfs + + # Configure chroot + Patch_chroot apply + Patch_runlevel apply + + # Configure network + Patch_network apply + + # Remove indices + rm -rf "${LIVE_CHROOT}"/var/cache/apt + mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives/partial + rm -rf "${LIVE_CHROOT}"/var/lib/apt/lists + mkdir -p "${LIVE_CHROOT}"/var/lib/apt/lists/partial + + # Switching package indices to custom + Indices custom + + # Installing syslinux + Syslinux iso + + # Installing linux-image + Linuximage iso + + # Installing memtest + Memtest iso + + # Deconfigure network + Patch_network deapply + + # Deconfigure chroot + Patch_runlevel deapply + Patch_chroot deapply + + # Calculating md5sums + Md5sum + + # Creating image + mv "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg "${LIVE_ROOT}"/binary/syslinux.cfg + mv "${LIVE_ROOT}"/binary/isolinux/isolinux.bin "${LIVE_ROOT}"/binary/syslinux.bin + mv "${LIVE_ROOT}"/binary/isolinux/* "${LIVE_ROOT}"/binary + + # Everything which comes here needs to be cleaned up, + # especially all the parted/syslinux stuff should be done + # from within the chroot, not on the host system, will do that later. + + DU_DIM="`du -ms ${LIVE_ROOT}/binary | cut -f1`" + REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... + dd if=/dev/zero of="${LIVE_ROOT}"/binary.img bs=1024k count=${REAL_DIM} + + echo "!!! The following error/warning messages can be ignored !!!" + losetup_p "${LIVE_ROOT}"/binary.img 0 + parted -s ${FREELO} mklabel msdos + set +e + parted -s ${FREELO} mkpartfs primary fat16 0.0 100% + parted -s ${FREELO} set 1 boot on + parted -s ${FREELO} set 1 lba off + set -e + cat /usr/lib/syslinux/mbr.bin > ${FREELO} + losetup -d ${FREELO} + echo "!!! The above error/warning messages can be ignored !!!" + + losetup_p "${LIVE_ROOT}"/binary.img 1 + mkfs.msdos -n DEBIAN_LIVE ${FREELO} + mkdir "${LIVE_ROOT}"/binary.tmp + mount ${FREELO} "${LIVE_ROOT}"/binary.tmp + cp -r "${LIVE_ROOT}"/binary/* "${LIVE_ROOT}"/binary.tmp + umount "${LIVE_ROOT}"/binary.tmp + rmdir "${LIVE_ROOT}"/binary.tmp + syslinux ${FREELO} + losetup -d ${FREELO} + + # Touching stage file + touch "${LIVE_ROOT}"/.stage/image_binary + fi + + if [ ! -f "${LIVE_ROOT}"/.stage/image_source ] && [ "${LIVE_SOURCE}" = "yes" ] + then + # Configure chroot + Patch_chroot apply + Patch_runlevel apply + + # Configure network + Patch_network apply + + # Downloading sources + Sources + + # Deconfigure network + Patch_network deapply + + # Deconfigure chroot + Patch_runlevel deapply + Patch_chroot deapply + + # Creating image + tar cfz source.tar.gz "${LIVE_ROOT}"/source + + # Touching stage file + touch "${LIVE_ROOT}"/.stage/image_source + fi +} diff --git a/templates/syslinux/isolinux.cfg b/templates/syslinux/isolinux.cfg.iso index dd03d65..dd03d65 100644 --- a/templates/syslinux/isolinux.cfg +++ b/templates/syslinux/isolinux.cfg.iso diff --git a/templates/syslinux/isolinux.cfg.usb b/templates/syslinux/isolinux.cfg.usb new file mode 100644 index 0000000..57ebf6c --- /dev/null +++ b/templates/syslinux/isolinux.cfg.usb @@ -0,0 +1,15 @@ +default linux +label linux + kernel isolinux/vmlinuz + append initrd=isolinux/initrd.gz boot=casper LIVE_BOOTAPPEND +label memtest + kernel isolinux/memtest +display isolinux/isolinux.txt +timeout 0 +prompt 1 +f1 isolinux/f1.txt +f3 isolinux/f3.txt +f4 isolinux/f4.txt +f8 isolinux/f8.txt +f9 isolinux/f9.txt +f0 isolinux/f10.txt |