From 85d243ff5836fc17416c65dca8a9e8b4e9d915bc Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 18 Jun 2011 18:38:58 -0300 Subject: [archiso] Use dm-snapshot instead of aufs2 (A.K.A. "The Big Commit") * Use device mapper + snapshot module, instead union layer filesystem. * A block-level approach vs vfs-level. * No more unofficial (Linux) things. * More memory is needed. * Refactor mkarchiso. * Refactor hooks/archiso. * Fix install/archiso_pxe_nbd (due recent change in mkinitcpio-0.6.15 on checked_modules()/all_modules()) [Thanks Dave for the improved workaround] * New configs/releng to build official images. * Works with a Bash script instead of Makefile. (better control and easy to maintain) * Remove configs/syslinux-iso. * Remove archiso2dual script. Integrate functionality in configs/releng. * New configs/baseline to build the most basic live medium or use as template. * New README (draft). [Thanks Dieter for fixing english grammar] Signed-off-by: Gerardo Exequiel Pozzi --- archiso2dual/Makefile | 13 -- archiso2dual/README | 55 ------ archiso2dual/archiso2dual | 411 --------------------------------------- archiso2dual/isomounts | 12 -- archiso2dual/removefiles.lst | 7 - archiso2dual/syslinux.cfg | 12 -- archiso2dual/syslinux_32only.cfg | 3 - archiso2dual/syslinux_arch32.cfg | 10 - archiso2dual/syslinux_arch64.cfg | 10 - archiso2dual/syslinux_both.cfg | 4 - archiso2dual/syslinux_head.cfg | 32 --- archiso2dual/syslinux_tail.cfg | 29 --- 12 files changed, 598 deletions(-) delete mode 100644 archiso2dual/Makefile delete mode 100644 archiso2dual/README delete mode 100755 archiso2dual/archiso2dual delete mode 100644 archiso2dual/isomounts delete mode 100644 archiso2dual/removefiles.lst delete mode 100644 archiso2dual/syslinux.cfg delete mode 100644 archiso2dual/syslinux_32only.cfg delete mode 100644 archiso2dual/syslinux_arch32.cfg delete mode 100644 archiso2dual/syslinux_arch64.cfg delete mode 100644 archiso2dual/syslinux_both.cfg delete mode 100644 archiso2dual/syslinux_head.cfg delete mode 100644 archiso2dual/syslinux_tail.cfg (limited to 'archiso2dual') diff --git a/archiso2dual/Makefile b/archiso2dual/Makefile deleted file mode 100644 index f615bce..0000000 --- a/archiso2dual/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -all: - -install: all - install -D -m 755 archiso2dual $(DESTDIR)/usr/sbin/archiso2dual - install -d -m 755 $(DESTDIR)/usr/share/archiso2dual/syslinux - install -D -m 644 isomounts $(DESTDIR)/usr/share/archiso2dual/isomounts - install -D -m 644 syslinux.cfg $(DESTDIR)/usr/share/archiso2dual/syslinux/syslinux.cfg - install -D -m 644 *.cfg $(DESTDIR)/usr/share/archiso2dual/syslinux/ - install -D -m 644 removefiles.lst $(DESTDIR)/usr/share/archiso2dual/removefiles.lst - -uninstall: - rm -f $(DESTDIR)/usr/sbin/archiso2dual - rm -rf $(DESTDIR)/usr/share/archiso2dual diff --git a/archiso2dual/README b/archiso2dual/README deleted file mode 100644 index 5e18aed..0000000 --- a/archiso2dual/README +++ /dev/null @@ -1,55 +0,0 @@ -Tree structure of an iso image archlinux-2010.04.24-core-dual.iso (610MB) -running with profile "split": - -# tree -I *.c32 -. -|-- any -| `-- usrshare.sqfs -|-- boot -| |-- i686 -| | |-- archiso.img -| | `-- vmlinuz26 -| |-- syslinux -| | |-- boot.cat -| | |-- isolinux.bin -| | |-- syslinux.cfg -| | `-- memdisk -| |-- memtest -| |-- memtest.COPYING -| |-- releasenotes.txt -| |-- splash.png -| |-- x86_64 -| | |-- archiso.img -| | `-- vmlinuz26 -|-- i686 -| |-- core-pkgs.sqfs -| |-- libmodules.sqfs -| |-- overlay.sqfs -| `-- root-image.sqfs -|-- isomounts.i686 -|-- isomounts.x86_64 -|-- isomounts.x86_64-i686 -`-- x86_64 - |-- core-pkgs.sqfs - |-- libmodules.sqfs - |-- overlay.sqfs - `-- root-image.sqfs - -7 directories, 26 files - -* Current dual image sizes (basic/split/full) - -664M archlinux-2010.04.24-core-dual.iso -610M archlinux-2010.04.24-core-dual.iso -572M archlinux-2010.04.24-core-dual.iso - -326M archlinux-2010.04.24-netinstall-dual.iso -272M archlinux-2010.04.24-netinstall-dual.iso -234M archlinux-2010.04.24-netinstall-dual.iso - -* Current single image sizes: -326M archlinux-2010.04.24-core-i686.iso -342M archlinux-2010.04.24-core-x86_64.iso - -161M archlinux-2010.04.24-netinstall-i686.iso -169M archlinux-2010.04.24-netinstall-x86_64.iso diff --git a/archiso2dual/archiso2dual b/archiso2dual/archiso2dual deleted file mode 100755 index 4e80b4d..0000000 --- a/archiso2dual/archiso2dual +++ /dev/null @@ -1,411 +0,0 @@ -#!/bin/bash - -# -# Join two Arch Linux iso images of i686 and x86_64 architecture. -# Contributed for archiso by Gerardo Exequiel Pozzi -# - -set -e -u - -publisher="Arch Linux " -application="Arch Linux Live/Rescue disk" -label="ARCH_$(date +%Y%m)" -isofile_i686="" -isofile_x86_64="" -imgname="" -quiet="y" -profile_type="basic" -work_dir="/tmp/archiso2dual" -isomounts_file="/usr/share/archiso2dual/isomounts" -syslinuxcfg_dir="/usr/share/archiso2dual/syslinux" -removefiles_file="/usr/share/archiso2dual/removefiles.lst" -compression="xz" -install_dir="arch" -appname=${0##*/} -_error="0" -_confirm="n" -_v="" -_iscoreiso=n - -iso_umount() { - echo "Executing: ${FUNCNAME}" - trap - 0 1 2 15 - umount ${_v} ${work_dir}/i686/mnt - umount ${_v} ${work_dir}/x86_64/mnt -} - -iso_mount() { - echo "Executing: ${FUNCNAME}" - trap 'iso_umount' 0 1 2 15 - mount ${_v} -t udf -o ro,loop ${isofile_i686} ${work_dir}/i686/mnt - mount ${_v} -t udf -o ro,loop ${isofile_x86_64} ${work_dir}/x86_64/mnt -} - -kernel_copy() { - echo "Executing: ${FUNCNAME}" - for _arch in i686 x86_64; do - cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/${_arch}/archiso.img ${work_dir}/iso/${install_dir}/boot/${_arch}/archiso.img - cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/${_arch}/vmlinuz26 ${work_dir}/iso/${install_dir}/boot/${_arch}/vmlinuz26 - done -} - -syslinux_copy() { - echo "Executing: ${FUNCNAME}" - cp ${_v} ${work_dir}/i686/mnt/${install_dir}/boot/{memtest*,splash.png} ${work_dir}/iso/${install_dir}/boot/ - cp ${_v} ${work_dir}/i686/mnt/syslinux/*.c32 ${work_dir}/iso/syslinux/ - cp ${_v} ${work_dir}/i686/mnt/syslinux/poweroff.com ${work_dir}/iso/syslinux/ - cp ${_v} ${work_dir}/i686/mnt/syslinux/memdisk ${work_dir}/iso/syslinux/ - cp ${_v} ${work_dir}/i686/mnt/syslinux/isolinux.bin ${work_dir}/iso/syslinux/ - cp ${_v} ${work_dir}/i686/mnt/syslinux/pxelinux.0 ${work_dir}/iso/syslinux/ - cp ${_v} ${work_dir}/i686/mnt/syslinux/gpxelinux.0 ${work_dir}/iso/syslinux/ - cp ${_v} -r ${work_dir}/i686/mnt/syslinux/hdt ${work_dir}/iso/syslinux/ -} - -syslinuxcfg_copy() { - echo "Executing: ${FUNCNAME}" - for _cfg in ${syslinuxcfg_dir}/*.cfg; do - sed "s|%ARCHISO_LABEL%|${label}|g; - s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/iso/syslinux/$(basename ${_cfg}) - done -} - -isomounts_copy() { - echo "Executing: ${FUNCNAME}" - cp ${_v} ${isomounts_file} ${work_dir}/iso/${install_dir}/ -} - -squashfs_copy() { - echo "Executing: ${FUNCNAME}" - for _arch in i686 x86_64; do - cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/${_arch}/*.sqfs ${work_dir}/iso/${install_dir}/${_arch}/ - done -} - -make_iso() { - echo "Executing: ${FUNCNAME}" - if [ "${quiet}" = "y" ]; then - _qflag="-quiet" - else - _qflag="" - fi - mkisofs ${_v} ${_qflag} -r -l \ - -b syslinux/isolinux.bin -c syslinux/boot.cat \ - -uid 0 -gid 0 \ - -udf -allow-limited-size -iso-level 3 \ - -input-charset utf-8 -p "prepared by archiso2dual" \ - -no-emul-boot -boot-load-size 4 -boot-info-table \ - -publisher "${publisher}" \ - -A "${application}" \ - -V "${label}" \ - -o "${imgname}" "${work_dir}/iso/" - isohybrid "${imgname}" -} - -unsquashfs_image() { - echo "Executing: ${FUNCNAME}" - img=${1} - arch=${2} - rm -rf ${work_dir}/tmp/${arch}/${img} - if [ "${quiet}" = "y" ]; then - unsquashfs -d ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs > /dev/null - else - unsquashfs -d ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs - fi -} - -mksquashfs_image() { - echo "Executing: ${FUNCNAME}" - img=${1} - arch=${2} - rm -f ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs - if [ "${quiet}" = "y" ]; then - mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs -comp ${compression} > /dev/null - else - mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs -comp ${compression} - fi -} - -usrshare_make_image() { - echo "Executing: ${FUNCNAME}" - mkdir -p ${work_dir}/tmp/any/usrshare/usr - cp -a ${work_dir}/tmp/i686/root-image/usr/share ${work_dir}/tmp/any/usrshare/usr - mksquashfs_image usrshare any -} - -libmodules_make_image() { - echo "Executing: ${FUNCNAME}" - for _arch in i686 x86_64; do - mkdir -p ${work_dir}/tmp/${_arch}/libmodules/lib - cp -a ${work_dir}/tmp/${_arch}/root-image/lib/modules ${work_dir}/tmp/${_arch}/libmodules/lib - mksquashfs_image libmodules ${_arch} - done -} - -core_pkgs_make_image() { - echo "Executing: ${FUNCNAME}" - mkdir -p ${work_dir}/tmp/any/core-any-pkgs/src/core/pkg - cp -a ${work_dir}/tmp/i686/core-pkgs/src/core/pkg/*-any.pkg.* ${work_dir}/tmp/any/core-any-pkgs/src/core/pkg - for _arch in i686 x86_64; do - rm -rf ${work_dir}/tmp/${_arch}/core-pkgs/src/core/pkg/*-any.pkg.* - mksquashfs_image core-pkgs ${_arch} - done - mksquashfs_image core-any-pkgs any -} - -core_pkgs_extract() { - echo "Executing: ${FUNCNAME}" - for _arch in i686 x86_64; do - unsquashfs_image core-pkgs ${_arch} - done -} - -check_if_core_medium() { - echo "Executing: ${FUNCNAME}" - if [ -f ${work_dir}/iso/${install_dir}/i686/core-pkgs.sqfs ] && [ -f ${work_dir}/iso/${install_dir}/x86_64/core-pkgs.sqfs ]; then - _iscoreiso=y - fi -} - -root_image_extract() { - echo "Executing: ${FUNCNAME}" - for _arch in i686 x86_64; do - unsquashfs_image root-image ${_arch} - done -} - -root_image_purge() { - echo "Executing: ${FUNCNAME}" - while read _file; do - [ "${_file#"#"}" != "${_file}" ] && continue - for _arch in i686 x86_64; do - rm -rf "${work_dir}/tmp/${_arch}/root-image/${_file}" - done - done < "${removefiles_file}" -} - -root_image_list_purge() { - while read _file; do - [ "${_file#"#"}" != "${_file}" ] && continue - for _arch in i686 x86_64; do - echo "${work_dir}/tmp/${_arch}/root-image/${_file}" - done - done < "${removefiles_file}" -} - -root_image_make_image() { - echo "Executing: ${FUNCNAME}" - for _arch in i686 x86_64; do - rm -rf ${work_dir}/tmp/${_arch}/root-image/usr/share - rm -rf ${work_dir}/tmp/${_arch}/root-image/lib/modules - mksquashfs_image root-image ${_arch} - done -} - -make_workspace() { - echo "Executing: ${FUNCNAME}" - for _arch in i686 x86_64; do - mkdir ${_v} -p ${work_dir}/iso/${install_dir}/${_arch} - mkdir ${_v} -p ${work_dir}/iso/${install_dir}/boot/${_arch} - mkdir ${_v} -p ${work_dir}/${_arch}/mnt - mkdir ${_v} -p ${work_dir}/tmp/${_arch} - done - mkdir ${_v} -p ${work_dir}/iso/syslinux - mkdir ${_v} -p ${work_dir}/iso/${install_dir}/any - mkdir ${_v} -p ${work_dir}/tmp/any -} - -show_help() -{ - exitvalue=${1} - echo - echo "${appname} [options] -3 -6 -o " - echo - echo " needed options:" - echo " -3 Path to i686 source iso image" - echo " -6 Path to x86_64 source iso image" - echo " -o Path to dual target iso image" - echo - echo " general options:" - echo " -M Path to isomounts file - (default to '${isomounts_file}'" - echo " -S Path to syslinux.cfg file - (default to '${syslinuxcfg_dir}'" - echo " -R Path to removefiles file - (default to '${removefiles_file}'" - echo " -w Set work directory - (default to '${work_dir}')" - echo " -T Type of target image (work is done on root-image.sqfs): - basic: join both images, no changes in root-image - split: 'basic' + split out usr/share/ and lib/modules/ from root-image - full: 'split' + remove specified directories (with -R) from root-image - (default to '${profile_type}')" - echo " -L