[arch-releng] [RFC] Finalized work about install_dir
All this work is in my install_dir branch (based on experimental). Tested and works. http://github.com/djgera/archiso/compare/experimental...install_dir Today images sizes: (*dual build with -T split, otherwise core-dual is 725M and net-dual 355M): 666M archlinux-2010.10.21-core-dual.iso 357M archlinux-2010.10.21-core-i686.iso 374M archlinux-2010.10.21-core-x86_64.iso 297M archlinux-2010.10.21-netinstall-dual.iso 176M archlinux-2010.10.21-netinstall-i686.iso 185M archlinux-2010.10.21-netinstall-x86_64.iso
-D <install_dir> allow to select install directory on target media defaults to "arch". There is a new %INSTALL_DIR% macro for syslinux.cfg. This is how ISO will look now: /syslinux only syslinux related files (syslinux.cfg, *.c32, etc) /arch/ isomounts + *.sqfs images /arch/boot/ Linux + initramfs + Memtest86+ + other files for early boot stage Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- archiso/hooks/archiso | 4 ++++ archiso/mkarchiso | 47 +++++++++++++---------------------------------- 2 files changed, 17 insertions(+), 34 deletions(-) diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index 92a5430..8e35231 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -62,6 +62,10 @@ run_hook() { copytoram_size="75%" fi + if [ "x${isomounts}" = "x" ]; then + archisobasedir="arch" + fi + if [ "x${isomounts}" != "x" ]; then isomounts="/bootmnt/${isomounts}" else diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 12ff023..7bbc827 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -9,6 +9,7 @@ PUBLISHER="Arch Linux <http://www.archlinux.org>" APPLICATION="Arch Linux Live/Rescue CD" COMPRESSION="gzip" CREATE_DEFAULT="n" +INSTALL_DIR="arch" APPNAME=$(basename "${0}") @@ -27,6 +28,9 @@ usage () echo " NOTES:" echo " lzma: not officially supported yet by Linux (2.6.36)" echo " lzo: needs Linux >= 2.6.36" + echo " -D <install_dir> Set an install_dir. All files will by located here on ISO (except for syslinux)" + echo " Default $INSTALL_DIR" + echo " NOTE: Max 8 characters, use only [a-z0-9]" echo " -d Create default user directory /home/arch" echo " -v Enable verbose output" echo " -h This message" @@ -39,7 +43,7 @@ usage () exit $1 } -while getopts 'p:C:L:P:A:c:dfvh' arg; do +while getopts 'p:C:L:P:A:c:D:dfvh' arg; do case "${arg}" in p) PKGLIST="${PKGLIST} ${OPTARG}" ;; C) PACCONFIG="${OPTARG}" ;; @@ -47,6 +51,7 @@ while getopts 'p:C:L:P:A:c:dfvh' arg; do P) PUBLISHER="${OPTARG}" ;; A) APPLICATION="${OPTARG}" ;; c) COMPRESSION="${OPTARG}" ;; + D) INSTALL_DIR="${OPTARG}" ;; d) CREATE_DEFAULT="y" ;; f) FORCE="y" ;; v) QUIET="n" ;; @@ -110,33 +115,8 @@ _pacman () command_create () { echo "====> Creating working directory: ${work_dir}" - mkdir -p "${work_dir}/iso/" + mkdir -p "${work_dir}/iso/${INSTALL_DIR}" mkdir -p "${work_dir}/root-image/" - echo "# archiso isomounts file -# img - location of image/directory to mount relative to addons directory -# arch - architecture of this image -# mount point - absolute location on the post-initrd root -# type - either 'bind' or 'squashfs' for now - -# syntax: <img> <arch> <mount point> <type> - -# NOTE: Order matters. If the same file exists in multiple -# images, the FIRST one mounted, top-down, will take precedence - -root-image.sqfs i686 / squashfs -#root-image-x86_64.sqfs x86_64 / squashfs" > "${work_dir}/isomounts" - - echo "README for this archiso created directory - -All directories in this dir, except for 'iso' will be squashed -with squashfs and put into the iso dir as iso/<dirname>.sqfs -This should be reflected in the isomounts file - -The iso dir is later used to build the actual bootable iso. -Please ensure the proper bootloader is installed or copied -to the iso/ directory. - -...TODO: Write more..." > "${work_dir}/README" if [ "${PKGLIST}" != "" ]; then echo "====> Installing packages to '${work_dir}/root-image/'" @@ -177,7 +157,7 @@ _mksquash () { return 1 fi - sqimg="${work_dir}/iso/$(basename ${1}).sqfs" + sqimg="${work_dir}/iso/${INSTALL_DIR}/$(basename ${1}).sqfs" echo "====> Generating SquashFS image for '${1}'" if [ -e "${sqimg}" ]; then dirhaschanged=$(find ${1} -newer ${sqimg}) @@ -218,7 +198,7 @@ _imgcommon () { exit 1 fi - if [ ! -f "${work_dir}/isomounts" ]; then + if [ ! -f "${work_dir}/iso/${INSTALL_DIR}/isomounts" ]; then echo "Error: the isomounts file doesn't exist. This image won't do anything" echo " Protecting you from yourself and erroring out here..." exit 1 @@ -234,10 +214,9 @@ _imgcommon () { fi fi - cp "${work_dir}/isomounts" "${work_dir}/iso/" - - if ! sed "s|archisolabel=[^ ]*|archisolabel=${LABEL}|" -i ${work_dir}/iso/boot/syslinux/syslinux.cfg; then - echo "Error: ${work_dir}/iso/boot/syslinux/syslinux.cfg, doesn't exist, aborting." + if ! sed "s|archisolabel=[^ ]*|archisolabel=${LABEL}|; + s|%INSTALL_DIR%|${INSTALL_DIR}|" -i ${work_dir}/iso/syslinux/syslinux.cfg; then + echo "Error: ${work_dir}/iso/syslinux/syslinux.cfg, doesn't exist, aborting." exit 1 fi } @@ -249,7 +228,7 @@ command_iso () { qflag="" [ "${QUIET}" = "y" ] && qflag="-quiet" mkisofs ${qflag} -r -l \ - -b boot/syslinux/isolinux.bin -c boot/syslinux/boot.cat \ + -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 mkarchiso" \ -- 1.7.3.1
Am 21.10.2010 05:38, schrieb Gerardo Exequiel Pozzi:
-D <install_dir> allow to select install directory on target media defaults to "arch".
There is a new %INSTALL_DIR% macro for syslinux.cfg.
This is how ISO will look now: /syslinux only syslinux related files (syslinux.cfg, *.c32, etc) /arch/ isomounts + *.sqfs images /arch/boot/ Linux + initramfs + Memtest86+ + other files for early boot stage
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Why don't we unify this layout with the -dual layout and move architecture-specific files to /arch/${arch} and /arch/boot/${arch}?
On 10/21/2010 04:06 AM, Thomas Bächler wrote:
Am 21.10.2010 05:38, schrieb Gerardo Exequiel Pozzi:
-D<install_dir> allow to select install directory on target media defaults to "arch".
There is a new %INSTALL_DIR% macro for syslinux.cfg.
This is how ISO will look now: /syslinux only syslinux related files (syslinux.cfg, *.c32, etc) /arch/ isomounts + *.sqfs images /arch/boot/ Linux + initramfs + Memtest86+ + other files for early boot stage
Signed-off-by: Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> Why don't we unify this layout with the -dual layout and move architecture-specific files to /arch/${arch} and /arch/boot/${arch}?
Yes thats is my idea, I asked this here: http://mailman.archlinux.org/pipermail/arch-releng/2010-October/001255.html I can work on this over my install_dir branch. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 21.10.2010 17:29, schrieb Gerardo Exequiel Pozzi:
Why don't we unify this layout with the -dual layout and move architecture-specific files to /arch/${arch} and /arch/boot/${arch}?
Yes thats is my idea, I asked this here: http://mailman.archlinux.org/pipermail/arch-releng/2010-October/001255.html
I can work on this over my install_dir branch.
Oh, seems I didn't respond. I say go for it, it makes the merging in archiso2dual much easier.
This is how ISO will look now: /syslinux only syslinux related files (syslinux.cfg, *.c32, etc) /arch/ isomounts + *.sqfs images /arch/boot/ Linux + initramfs + Memtest86+ + other files for early boot stage Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- configs/syslinux-iso/Makefile | 51 ++++++++++--------- .../syslinux-iso/boot-files/syslinux/syslinux.cfg | 8 ++-- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/configs/syslinux-iso/Makefile b/configs/syslinux-iso/Makefile index 0298004..7bc3a45 100644 --- a/configs/syslinux-iso/Makefile +++ b/configs/syslinux-iso/Makefile @@ -1,6 +1,7 @@ ver=$(shell date +%Y.%m.%d) WORKDIR=work +INSTALL_DIR=arch ARCH?=$(shell uname -m) @@ -19,9 +20,9 @@ core-iso: $(COREname) net-iso: $(NETname) $(COREname): core-pkgs base-fs - mkarchiso iso $(WORKDIR) $@ + mkarchiso -D $(INSTALL_DIR) iso $(WORKDIR) $@ $(NETname): base-fs - mkarchiso iso $(WORKDIR) $@ + mkarchiso -D $(INSTALL_DIR) iso $(WORKDIR) $@ # This is the main rule for make the working filesystem. base-fs: root-image bootfiles initcpio overlay iso-mounts @@ -30,32 +31,34 @@ base-fs: root-image bootfiles initcpio overlay iso-mounts # Rules for make the root-image for base filesystem. root-image: $(WORKDIR)/root-image/.arch-chroot $(WORKDIR)/root-image/.arch-chroot: - mkarchiso -p base create $(WORKDIR) - mkarchiso -p $(PACKAGES) create $(WORKDIR) + mkarchiso -D $(INSTALL_DIR) -p base create $(WORKDIR) + mkarchiso -D $(INSTALL_DIR) -p $(PACKAGES) create $(WORKDIR) # Rule for make /boot bootfiles: root-image - mkdir -p $(WORKDIR)/iso/boot - cp $(WORKDIR)/root-image/boot/System.map26 $(WORKDIR)/iso/boot/ - cp $(WORKDIR)/root-image/boot/vmlinuz26 $(WORKDIR)/iso/boot/ - cp $(WORKDIR)/root-image/boot/memtest86+/memtest.bin $(WORKDIR)/iso/boot/memtest - cp $(WORKDIR)/root-image/usr/share/licenses/common/GPL2/license.txt $(WORKDIR)/iso/boot/memtest.COPYING - cp -r boot-files/* $(WORKDIR)/iso/boot/ - cp $(WORKDIR)/root-image/usr/lib/syslinux/*.c32 $(WORKDIR)/iso/boot/syslinux/ - cp $(WORKDIR)/root-image/usr/lib/syslinux/poweroff.com $(WORKDIR)/iso/boot/syslinux/ - cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/syslinux/ - cp $(WORKDIR)/root-image/usr/lib/syslinux/memdisk $(WORKDIR)/iso/boot/syslinux/ - cp $(WORKDIR)/root-image/usr/lib/syslinux/pxelinux.0 $(WORKDIR)/iso/boot/syslinux/ - cp $(WORKDIR)/root-image/usr/lib/syslinux/gpxelinux.0 $(WORKDIR)/iso/boot/syslinux/ + mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot + cp $(WORKDIR)/root-image/boot/System.map26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/ + cp $(WORKDIR)/root-image/boot/vmlinuz26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/ + cp $(WORKDIR)/root-image/boot/memtest86+/memtest.bin $(WORKDIR)/iso/$(INSTALL_DIR)/boot/memtest + cp $(WORKDIR)/root-image/usr/share/licenses/common/GPL2/license.txt $(WORKDIR)/iso/$(INSTALL_DIR)/boot/memtest.COPYING + cp boot-files/splash.png $(WORKDIR)/iso/$(INSTALL_DIR)/boot/ + mkdir -p $(WORKDIR)/iso/syslinux + cp $(WORKDIR)/root-image/usr/lib/syslinux/*.c32 $(WORKDIR)/iso/syslinux/ + cp $(WORKDIR)/root-image/usr/lib/syslinux/poweroff.com $(WORKDIR)/iso/syslinux/ + cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/syslinux/ + cp $(WORKDIR)/root-image/usr/lib/syslinux/memdisk $(WORKDIR)/iso/syslinux/ + cp $(WORKDIR)/root-image/usr/lib/syslinux/pxelinux.0 $(WORKDIR)/iso/syslinux/ + cp $(WORKDIR)/root-image/usr/lib/syslinux/gpxelinux.0 $(WORKDIR)/iso/syslinux/ + cp boot-files/syslinux/syslinux.cfg $(WORKDIR)/iso/syslinux/syslinux.cfg # Add pci.ids and modules.alias for hdt - mkdir -p $(WORKDIR)/iso/boot/syslinux/hdt/ - wget -O - http://pciids.sourceforge.net/v2.2/pci.ids | gzip -9 > $(WORKDIR)/iso/boot/syslinux/hdt/pciids.gz - cat $(WORKDIR)/root-image/lib/modules/$(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2)/modules.alias | gzip -9 > $(WORKDIR)/iso/boot/syslinux/hdt/modalias.gz + mkdir -p $(WORKDIR)/iso/syslinux/hdt/ + wget -O - http://pciids.sourceforge.net/v2.2/pci.ids | gzip -9 > $(WORKDIR)/iso/syslinux/hdt/pciids.gz + cat $(WORKDIR)/root-image/lib/modules/$(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2)/modules.alias | gzip -9 > $(WORKDIR)/iso/syslinux/hdt/modalias.gz # Rules for initcpio images -initcpio: $(WORKDIR)/iso/boot/archiso.img -$(WORKDIR)/iso/boot/archiso.img: mkinitcpio.conf $(WORKDIR)/root-image/.arch-chroot - mkdir -p $(WORKDIR)/iso/boot +initcpio: $(WORKDIR)/iso/$(INSTALL_DIR)/boot/archiso.img +$(WORKDIR)/iso/$(INSTALL_DIR)/boot/archiso.img: mkinitcpio.conf $(WORKDIR)/root-image/.arch-chroot + mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot mkinitcpio -c ./mkinitcpio.conf -b $(WORKDIR)/root-image -k $(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2) -g $@ @@ -68,8 +71,8 @@ overlay: # Rule to process isomounts file. -iso-mounts: $(WORKDIR)/isomounts -$(WORKDIR)/isomounts: isomounts root-image +iso-mounts: $(WORKDIR)/iso/$(INSTALL_DIR)/isomounts +$(WORKDIR)/iso/$(INSTALL_DIR)/isomounts: isomounts root-image sed "s|@ARCH@|$(ARCH)|g" isomounts > $@ diff --git a/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg b/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg index 15a9fd7..3ce985b 100644 --- a/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg +++ b/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg @@ -1,7 +1,7 @@ DEFAULT vesamenu.c32 PROMPT 0 MENU TITLE Arch Linux -MENU BACKGROUND /boot/splash.png +MENU BACKGROUND /%INSTALL_DIR%/boot/splash.png TIMEOUT 3000 # TODO: Replace these crappy messages with something useful @@ -37,8 +37,8 @@ Boot the Arch Linux live medium. It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux -LINUX /boot/vmlinuz26 -APPEND initrd=/boot/archiso.img archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 +LINUX /%INSTALL_DIR%/boot/vmlinuz26 +APPEND initrd=/%INSTALL_DIR%/boot/archiso.img archisobasedir=%INSTALL_DIR% archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 # Next line should be uncommented when prepare enviroment to boot from PXE. #IPAPPEND 3 @@ -54,7 +54,7 @@ APPEND hd0 0 # http://www.memtest.org/ LABEL memtest MENU LABEL Run Memtest86+ (RAM test) -LINUX /boot/memtest +LINUX /%INSTALL_DIR%/boot/memtest # http://hdt-project.org/ LABEL hdt -- 1.7.3.1
Am 21.10.2010 05:38, schrieb Gerardo Exequiel Pozzi:
This is how ISO will look now: /syslinux only syslinux related files (syslinux.cfg, *.c32, etc) /arch/ isomounts + *.sqfs images /arch/boot/ Linux + initramfs + Memtest86+ + other files for early boot stage
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
While all this is looking good, we might be able to contain it more in /arch. In principle, syslinux now has a 'cd' call to change the 'current directory'. /syslinux could then only contain isolinux.cfg and a syslinux.cfg file (and maybe a few .c32) that changes the directory to /arch/boot/syslinux/ and loads syslinux.cfg from there. On the syslinux command line, this is easy: cd.c32 /arch/boot/syslinux config.c32 syslinux.cfg In a config file, I don't know if it'll work, but we'll see. Maybe we need to script it in lua, as I know of no way to call two .c32 files in a row. This way (if I can figure out how it works), it would be possible to dump /boot completely and only copy /arch when switching to a different bootloader.
This is how ISO will look now: /syslinux only syslinux related files (syslinux.cfg, *.c32, etc) /arch/ isomounts /arch/any *.sqfs only on -T full or -T split /arch/i686 *.sqfs /arch/x86_64 *.sqfs /arch/boot Memtest86+ + other files for early boot stage /arch/boot/i686 Linux + initramfs /arch/boot/x86_64 Linux + initramfs Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- archiso2dual/archiso2dual | 55 +++++++++++++++++++++++++------------------- archiso2dual/syslinux.cfg | 12 +++++----- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/archiso2dual/archiso2dual b/archiso2dual/archiso2dual index 457e902..6783226 100755 --- a/archiso2dual/archiso2dual +++ b/archiso2dual/archiso2dual @@ -20,6 +20,7 @@ isomounts_file="/usr/share/archiso2dual/isomounts" syslinuxcfg_dir="/usr/share/archiso2dual/syslinux" removefiles_file="/usr/share/archiso2dual/removefiles.lst" compression="gzip" +install_dir="arch" appname=${0##*/} _error="0" _confirm="n" @@ -43,39 +44,40 @@ iso_mount() { kernel_copy() { echo "Executing: ${FUNCNAME}" for _arch in i686 x86_64; do - cp ${_v} $work_dir/${_arch}/mnt/boot/archiso.img $work_dir/iso/boot/${_arch}/archiso.img - cp ${_v} $work_dir/${_arch}/mnt/boot/vmlinuz26 $work_dir/iso/boot/${_arch}/vmlinuz26 + cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/archiso.img ${work_dir}/iso/${install_dir}/boot/${_arch}/archiso.img + cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/vmlinuz26 ${work_dir}/iso/${install_dir}/boot/${_arch}/vmlinuz26 done } syslinux_copy() { echo "Executing: ${FUNCNAME}" - cp ${_v} $work_dir/i686/mnt/boot/{memtest*,releasenotes.txt,splash.png} $work_dir/iso/boot/ - cp ${_v} $work_dir/i686/mnt/boot/syslinux/*.c32 $work_dir/iso/boot/syslinux/ - cp ${_v} $work_dir/i686/mnt/boot/syslinux/poweroff.com $work_dir/iso/boot/syslinux/ - cp ${_v} $work_dir/i686/mnt/boot/syslinux/memdisk $work_dir/iso/boot/syslinux/ - cp ${_v} $work_dir/i686/mnt/boot/syslinux/isolinux.bin $work_dir/iso/boot/syslinux/ - cp ${_v} $work_dir/i686/mnt/boot/syslinux/pxelinux.0 $work_dir/iso/boot/syslinux/ - cp ${_v} $work_dir/i686/mnt/boot/syslinux/gpxelinux.0 $work_dir/iso/boot/syslinux/ - cp ${_v} -r $work_dir/i686/mnt/boot/syslinux/hdt $work_dir/iso/boot/syslinux/ + 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|XXX|${label}|g" ${_cfg} > $work_dir/iso/boot/syslinux/$(basename ${_cfg}) + sed "s|XXX|${label}| + s|%INSTALL_DIR%|${install_dir}|" ${_cfg} > ${work_dir}/iso/syslinux/$(basename ${_cfg}) done } isomounts_copy() { echo "Executing: ${FUNCNAME}" - cp ${_v} ${isomounts_file} $work_dir/iso/ + 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/*.sqfs $work_dir/iso/${_arch}/ + cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/*.sqfs ${work_dir}/iso/${install_dir}/${_arch}/ done } @@ -87,7 +89,7 @@ make_iso() { _qflag="" fi mkisofs ${_v} ${_qflag} -r -l \ - -b boot/syslinux/isolinux.bin -c boot/syslinux/boot.cat \ + -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" \ @@ -105,9 +107,9 @@ unsquashfs_image() { arch=${2} rm -rf ${work_dir}/tmp/${arch}/${img} if [ "${quiet}" = "y" ]; then - unsquashfs -d ${work_dir}/tmp/${arch}/${img} $work_dir/iso/${arch}/${img}.sqfs > /dev/null + 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/${arch}/${img}.sqfs + unsquashfs -d ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs fi } @@ -115,11 +117,11 @@ mksquashfs_image() { echo "Executing: ${FUNCNAME}" img=${1} arch=${2} - rm -f ${work_dir}/iso/${arch}/${img}.sqfs + rm -f ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs if [ "${quiet}" = "y" ]; then - mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${arch}/${img}.sqfs -comp ${compression} > /dev/null + 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/${arch}/${img}.sqfs -comp ${compression} + mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${install_dir}/${arch}/${img}.sqfs -comp ${compression} fi } @@ -202,13 +204,13 @@ root_image_make_image() { make_workspace() { echo "Executing: ${FUNCNAME}" for _arch in i686 x86_64; do - mkdir ${_v} -p ${work_dir}/iso/${_arch} - mkdir ${_v} -p ${work_dir}/iso/boot/${_arch} + 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/boot/syslinux - mkdir ${_v} -p ${work_dir}/iso/any + mkdir ${_v} -p ${work_dir}/iso/syslinux + mkdir ${_v} -p ${work_dir}/iso/${install_dir}/any mkdir ${_v} -p ${work_dir}/tmp/any } @@ -248,7 +250,11 @@ show_help() echo " NOTES:" echo " lzma: not officially supported yet by Linux (2.6.36)" echo " lzo: needs Linux >= 2.6.36" - + echo " -D <install_dir> Set an install_dir + (default to '${install_dir}')" + echo " NOTES:" + echo " Must match install_dir from both .iso sources" + echo " Max 8 characters, use only [a-z0-9]" echo " -y Confirm execution (otherwise only show configuration)" echo " -v Enable verbose output" echo " -h This message" @@ -261,6 +267,7 @@ show_config() { echo " source iso i686 image: ${isofile_i686}" echo " source iso x86_64 image: ${isofile_x86_64}" echo " target iso image: ${imgname}" + echo " install directory on ISO: ${install_dir}" echo " isomounts file: ${isomounts_file}" echo " syslinux.cfg path: ${syslinuxcfg_dir}" echo " removefiles.lst file: ${removefiles_file}" diff --git a/archiso2dual/syslinux.cfg b/archiso2dual/syslinux.cfg index b53b883..fbe3405 100644 --- a/archiso2dual/syslinux.cfg +++ b/archiso2dual/syslinux.cfg @@ -1,7 +1,7 @@ DEFAULT vesamenu.c32 PROMPT 0 MENU TITLE Arch Linux -MENU BACKGROUND /boot/splash.png +MENU BACKGROUND /%INSTALL_DIR%/boot/splash.png TIMEOUT 3000 # TODO: Replace these crappy messages with something useful @@ -37,8 +37,8 @@ Boot the Arch Linux (i686) live medium. It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux (i686) -LINUX /boot/i686/vmlinuz26 -APPEND initrd=/boot/i686/archiso.img archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 +LINUX /%INSTALL_DIR%/boot/i686/vmlinuz26 +APPEND initrd=/%INSTALL_DIR%/boot/i686/archiso.img archisobasedir=%INSTALL_DIR% archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 # Next line should be uncommented when prepare enviroment to boot from PXE. #IPAPPEND 3 @@ -48,8 +48,8 @@ Boot the Arch Linux (x86_64) live medium. It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux (x86_64) -LINUX /boot/x86_64/vmlinuz26 -APPEND initrd=/boot/x86_64/archiso.img archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 +LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz26 +APPEND initrd=/%INSTALL_DIR%/boot/x86_64/archiso.img archisobasedir=%INSTALL_DIR% archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 # Next line should be uncommented when prepare enviroment to boot from PXE. #IPAPPEND 3 @@ -65,7 +65,7 @@ APPEND hd0 0 # http://www.memtest.org/ LABEL memtest MENU LABEL Run Memtest86+ (RAM test) -LINUX /boot/memtest +LINUX /%INSTALL_DIR%/boot/memtest # http://hdt-project.org/ LABEL hdt -- 1.7.3.1
participants (2)
-
Gerardo Exequiel Pozzi
-
Thomas Bächler