From 187aac2a35662f295f0412958f1e4b7695784465 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 29 Mar 2017 19:03:29 +0200 Subject: [PATCH 01/11] util-iso: try to fix uefi usb boot --- lib/util-iso.sh | 59 +++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index f0d68162..fa4c64b9 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -188,28 +188,45 @@ assemble_iso(){ # -output "${iso_dir}/${iso_file}" \ # "${iso_root}/" +# xorriso -as mkisofs \ +# --protective-msdos-label \ +# -volid "${iso_label}" \ +# -appid "${iso_app_id}" \ +# -publisher "${iso_publisher}" \ +# -preparer "Prepared by manjaro-tools/${0##*/}" \ +# -b boot/grub/i386-pc/eltorito.img \ +# -c boot.catalog \ +# -no-emul-boot \ +# -boot-load-size 4 \ +# -boot-info-table \ +# -graft-points \ +# --grub2-boot-info \ +# --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \ +# --sort-weight 0 / --sort-weight 1 /boot \ +# -eltorito-alt-boot \ +# -efi-boot-part --efi-boot-image \ +# -e efi.img \ +# -no-emul-boot \ +# -isohybrid-gpt-basdat \ +# -output "${iso_dir}/${iso_file}" \ +# "${iso_root}/" + xorriso -as mkisofs \ - --protective-msdos-label \ - -volid "${iso_label}" \ - -appid "${iso_app_id}" \ - -publisher "${iso_publisher}" \ - -preparer "Prepared by manjaro-tools/${0##*/}" \ - -b boot/grub/i386-pc/eltorito.img \ - -c boot.catalog \ - -no-emul-boot \ - -boot-load-size 4 \ - -boot-info-table \ - -graft-points \ - --grub2-boot-info \ - --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \ - --sort-weight 0 / --sort-weight 1 /boot \ - -eltorito-alt-boot \ - -efi-boot-part --efi-boot-image \ - -e efi.img \ - -no-emul-boot \ - -isohybrid-gpt-basdat \ - -output "${iso_dir}/${iso_file}" \ - "${iso_root}/" + -r -graft-points -no-pad \ + --sort-weight 0 / \ + --sort-weight 1 /boot \ + --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \ + -partition_offset 16 \ + -append_partition 2 0xef efi.img \ + -b boot/grub/i386-pc/eltorito.img \ + -c boot.catalog \ + -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \ + -eltorito-alt-boot \ + -e --interval:appended_partition_2:all:: \ + -no-emul-boot \ + -iso-level 3 \ + -o ${iso_dir}/${iso_file} \ + ${iso_root}/ } # Build ISO -- GitLab From 92aaea769405f8aed7e2560a68d811ade9ac05d1 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 29 Mar 2017 20:47:17 +0200 Subject: [PATCH 02/11] util-iso-*: put grub-theme in livefs --- lib/util-iso-boot.sh | 8 +++---- lib/util-iso.sh | 51 +++++--------------------------------------- 2 files changed, 9 insertions(+), 50 deletions(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index 90d0d3fc..98b8d9d8 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -45,11 +45,11 @@ prepare_boot_extras(){ prepare_grub(){ local platform=i386-pc img='core.img' grub=$2/boot/grub efi=$2/efi/boot \ - data=$1/usr/share/grub lib=$1/usr/lib/grub prefix=/boot/grub + data_live=$1/usr/share/grub lib=/usr/lib/grub prefix=/boot/grub data=/usr/share/grub prepare_dir ${grub}/${platform} - cp ${data}/cfg/*.cfg ${grub} + cp ${data_live}/cfg/*.cfg ${grub} cp ${lib}/${platform}/* ${grub}/${platform} @@ -80,9 +80,9 @@ prepare_grub(){ grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660 prepare_dir ${grub}/themes - cp -r ${data}/themes/${iso_name}-live ${grub}/themes/ + cp -r ${data_live}/themes/${iso_name}-live ${grub}/themes/ cp ${data}/unicode.pf2 ${grub} - cp -r ${data}/{locales,tz,video} ${grub} + cp -r ${data_live}/{locales,tz,video} ${grub} local size=8M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img" msg2 "Creating fat image of %s ..." "${size}" diff --git a/lib/util-iso.sh b/lib/util-iso.sh index fa4c64b9..3a1cbb07 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -167,55 +167,11 @@ assemble_iso(){ iso_app_id="$(get_osname) Live/Rescue CD" -# xorriso -as mkisofs \ -# --protective-msdos-label \ -# -volid "${iso_label}" \ -# -appid "${iso_app_id}" \ -# -publisher "${iso_publisher}" \ -# -preparer "Prepared by manjaro-tools/${0##*/}" \ -# -e /efi.img \ -# -b boot/grub/i386-pc/eltorito.img \ -# -c boot.catalog \ -# -no-emul-boot \ -# -boot-load-size 4 \ -# -boot-info-table \ -# -graft-points \ -# --grub2-boot-info \ -# --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \ -# --sort-weight 0 / --sort-weight 1 /boot \ -# -isohybrid-gpt-basdat \ -# -eltorito-alt-boot \ -# -output "${iso_dir}/${iso_file}" \ -# "${iso_root}/" - -# xorriso -as mkisofs \ -# --protective-msdos-label \ -# -volid "${iso_label}" \ -# -appid "${iso_app_id}" \ -# -publisher "${iso_publisher}" \ -# -preparer "Prepared by manjaro-tools/${0##*/}" \ -# -b boot/grub/i386-pc/eltorito.img \ -# -c boot.catalog \ -# -no-emul-boot \ -# -boot-load-size 4 \ -# -boot-info-table \ -# -graft-points \ -# --grub2-boot-info \ -# --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \ -# --sort-weight 0 / --sort-weight 1 /boot \ -# -eltorito-alt-boot \ -# -efi-boot-part --efi-boot-image \ -# -e efi.img \ -# -no-emul-boot \ -# -isohybrid-gpt-basdat \ -# -output "${iso_dir}/${iso_file}" \ -# "${iso_root}/" - xorriso -as mkisofs \ -r -graft-points -no-pad \ --sort-weight 0 / \ --sort-weight 1 /boot \ - --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \ + --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img \ -partition_offset 16 \ -append_partition 2 0xef efi.img \ -b boot/grub/i386-pc/eltorito.img \ @@ -227,6 +183,9 @@ assemble_iso(){ -iso-level 3 \ -o ${iso_dir}/${iso_file} \ ${iso_root}/ + +# arg to add with xorriso-1.4.7 +# -iso_mbr_part_type 0x00 } # Build ISO @@ -429,7 +388,7 @@ make_grub(){ if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then msg "Prepare [/iso/boot/grub]" - local path="${work_dir}/rootfs" + local path="${work_dir}/livefs" prepare_grub "${path}" "${iso_root}" -- GitLab From d477c42ecbb27e335019ef5c676f483c7e0bb928 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 29 Mar 2017 21:48:00 +0200 Subject: [PATCH 03/11] util-iso-boot: reduce efi.img size --- lib/util-iso-boot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index 98b8d9d8..4b547810 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -84,7 +84,7 @@ prepare_grub(){ cp ${data}/unicode.pf2 ${grub} cp -r ${data_live}/{locales,tz,video} ${grub} - local size=8M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img" + local size=4M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img" msg2 "Creating fat image of %s ..." "${size}" truncate -s ${size} "${efi_img}" mkfs.fat -n MISO_EFI "${efi_img}" &>/dev/null -- GitLab From 734ea24b578e33ae5ff0d1755c63973236337bf5 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 29 Mar 2017 21:48:38 +0200 Subject: [PATCH 04/11] util-iso: readd xorriso args --- lib/util-iso.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 3a1cbb07..b12a9863 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -161,13 +161,23 @@ make_sfs() { assemble_iso(){ msg "Creating ISO image..." - local iso_publisher iso_app_id + local iso_publisher iso_app_id mod_date iso_publisher="$(get_osname) <$(get_disturl)>" iso_app_id="$(get_osname) Live/Rescue CD" + mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00) + + touch ${iso_root}/boot/grub/${mod_date} + xorriso -as mkisofs \ + --modification-date=${mod_date} \ + --protective-msdos-label \ + -volid "${iso_label}" \ + -appid "${iso_app_id}" \ + -publisher "${iso_publisher}" \ + -preparer "Prepared by manjaro-tools/${0##*/}" \ -r -graft-points -no-pad \ --sort-weight 0 / \ --sort-weight 1 /boot \ -- GitLab From 8a5fc4e0b050754cf84c7f8ec2cf95ba1764a6f9 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 29 Mar 2017 21:53:47 +0200 Subject: [PATCH 05/11] util-iso: fox mod_date length --- lib/util-iso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index b12a9863..08fa7bd7 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -167,7 +167,7 @@ assemble_iso(){ iso_app_id="$(get_osname) Live/Rescue CD" - mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00) + mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00 | sed -e s/-//g) touch ${iso_root}/boot/grub/${mod_date} -- GitLab From ed95e249a2e4e7acb325884f2f7757ce761cf065 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 29 Mar 2017 22:19:44 +0200 Subject: [PATCH 06/11] util-iso: don't create mod_dte file for now --- lib/util-iso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 08fa7bd7..803afc31 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -169,7 +169,7 @@ assemble_iso(){ mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00 | sed -e s/-//g) - touch ${iso_root}/boot/grub/${mod_date} +# touch ${iso_root}/boot/grub/${mod_date} xorriso -as mkisofs \ --modification-date=${mod_date} \ -- GitLab From 9533b8ce935b2dca34ccd15e6bcee165a12e3ce7 Mon Sep 17 00:00:00 2001 From: Philip Date: Thu, 30 Mar 2017 00:34:24 +0200 Subject: [PATCH 07/11] [util-iso] try to fix issue with efi.img --- lib/util-iso.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 803afc31..6021d16f 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -181,13 +181,13 @@ assemble_iso(){ -r -graft-points -no-pad \ --sort-weight 0 / \ --sort-weight 1 /boot \ - --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img \ + --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \ -partition_offset 16 \ - -append_partition 2 0xef efi.img \ -b boot/grub/i386-pc/eltorito.img \ -c boot.catalog \ -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \ -eltorito-alt-boot \ + -append_partition 2 0xef ${iso_root}/efi.img \ -e --interval:appended_partition_2:all:: \ -no-emul-boot \ -iso-level 3 \ -- GitLab From 93626731c70df5d67c587ad881d728a0f7a175d3 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 30 Mar 2017 15:51:44 +0200 Subject: [PATCH 08/11] util-iso-boot: remove grub video dir --- lib/util-iso-boot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index 4b547810..3e16403a 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -82,7 +82,7 @@ prepare_grub(){ prepare_dir ${grub}/themes cp -r ${data_live}/themes/${iso_name}-live ${grub}/themes/ cp ${data}/unicode.pf2 ${grub} - cp -r ${data_live}/{locales,tz,video} ${grub} + cp -r ${data_live}/{locales,tz} ${grub} local size=4M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img" msg2 "Creating fat image of %s ..." "${size}" -- GitLab From 37b9feb061502a617d5bcb5646f9e5101849dc63 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 30 Mar 2017 23:07:09 +0200 Subject: [PATCH 09/11] util-iso: clean up assemble_iso() --- lib/util-iso.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 6021d16f..513858c7 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -161,15 +161,9 @@ make_sfs() { assemble_iso(){ msg "Creating ISO image..." - local iso_publisher iso_app_id mod_date - - iso_publisher="$(get_osname) <$(get_disturl)>" - - iso_app_id="$(get_osname) Live/Rescue CD" - - mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00 | sed -e s/-//g) - -# touch ${iso_root}/boot/grub/${mod_date} + local iso_publisher="$(get_osname) <$(get_disturl)>" \ + iso_app_id="$(get_osname) Live/Rescue CD" \ + mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00 | sed -e s/-//g) xorriso -as mkisofs \ --modification-date=${mod_date} \ -- GitLab From 25ddeb15935f4c85f2107699243375ba0acee91b Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 30 Mar 2017 23:20:41 +0200 Subject: [PATCH 10/11] doc: remove obsolete entry from deployiso util-yaml: formating fix --- docbook/deployiso.xml | 6 ------ lib/util-yaml.sh | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docbook/deployiso.xml b/docbook/deployiso.xml index ecb2863e..9326e0d3 100644 --- a/docbook/deployiso.xml +++ b/docbook/deployiso.xml @@ -76,12 +76,6 @@ along with systemd; If not, see . you will upload. - - - - Create new remote release. - - diff --git a/lib/util-yaml.sh b/lib/util-yaml.sh index 51bd11f1..0c649b4b 100644 --- a/lib/util-yaml.sh +++ b/lib/util-yaml.sh @@ -370,7 +370,7 @@ write_calamares_yaml(){ for conf in "${yaml_dir}"/etc/calamares/modules/*.conf "${yaml_dir}"/etc/calamares/settings.conf; do check_yaml "$conf" done - fi + fi } write_netgroup_yaml(){ @@ -385,7 +385,7 @@ write_netgroup_yaml(){ for p in ${packages[@]};do echo " - $p" >> "$2" done - ${validate} && check_yaml "$2" + ${validate} && check_yaml "$2" } write_pacman_group_yaml(){ -- GitLab From a1492e8d1eb929075ad369cc336efc2ecd0eb13b Mon Sep 17 00:00:00 2001 From: udeved Date: Fri, 31 Mar 2017 17:45:16 +0200 Subject: [PATCH 11/11] util-iso: set the grub theme by $iso_name --- lib/util-iso.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 513858c7..e7357924 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -388,6 +388,10 @@ configure_grub(){ -i $1 } +configure_grub_theme(){ + sed -e "s|@ISO_NAME@|${iso_name}|" -i "$1" +} + make_grub(){ if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then msg "Prepare [/iso/boot/grub]" @@ -397,6 +401,7 @@ make_grub(){ prepare_grub "${path}" "${iso_root}" configure_grub "${iso_root}/boot/grub/kernels.cfg" + configure_grub_theme "${iso_root}/boot/grub/variable.cfg" : > ${work_dir}/build.${FUNCNAME} msg "Done [/iso/boot/grub]" -- GitLab