forked from mirrored-repos/manjaro-tools
0.15.2 (#263)
* util-iso: try to fix uefi usb boot * util-iso-*: put grub-theme in livefs * util-iso-boot: reduce efi.img size * util-iso: readd xorriso args * util-iso: fox mod_date length * util-iso: don't create mod_dte file for now * [util-iso] try to fix issue with efi.img * util-iso-boot: remove grub video dir * util-iso: clean up assemble_iso() * doc: remove obsolete entry from deployiso util-yaml: formating fix * util-iso: set the grub theme by $iso_name
This commit is contained in:
parent
feda1e7659
commit
8a6cb28be6
4 changed files with 40 additions and 61 deletions
|
@ -76,12 +76,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
you will upload.</para></listitem>
|
you will upload.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>-c</option></term>
|
|
||||||
|
|
||||||
<listitem><para>Create new remote release.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-l</option></term>
|
<term><option>-l</option></term>
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,11 @@ prepare_boot_extras(){
|
||||||
|
|
||||||
prepare_grub(){
|
prepare_grub(){
|
||||||
local platform=i386-pc img='core.img' grub=$2/boot/grub efi=$2/efi/boot \
|
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}
|
prepare_dir ${grub}/${platform}
|
||||||
|
|
||||||
cp ${data}/cfg/*.cfg ${grub}
|
cp ${data_live}/cfg/*.cfg ${grub}
|
||||||
|
|
||||||
cp ${lib}/${platform}/* ${grub}/${platform}
|
cp ${lib}/${platform}/* ${grub}/${platform}
|
||||||
|
|
||||||
|
@ -80,11 +80,11 @@ prepare_grub(){
|
||||||
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
|
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
|
||||||
|
|
||||||
prepare_dir ${grub}/themes
|
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 ${data}/unicode.pf2 ${grub}
|
||||||
cp -r ${data}/{locales,tz,video} ${grub}
|
cp -r ${data_live}/{locales,tz} ${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}"
|
msg2 "Creating fat image of %s ..." "${size}"
|
||||||
truncate -s ${size} "${efi_img}"
|
truncate -s ${size} "${efi_img}"
|
||||||
mkfs.fat -n MISO_EFI "${efi_img}" &>/dev/null
|
mkfs.fat -n MISO_EFI "${efi_img}" &>/dev/null
|
||||||
|
|
|
@ -161,55 +161,35 @@ make_sfs() {
|
||||||
|
|
||||||
assemble_iso(){
|
assemble_iso(){
|
||||||
msg "Creating ISO image..."
|
msg "Creating ISO image..."
|
||||||
local iso_publisher iso_app_id
|
local iso_publisher="$(get_osname) <$(get_disturl)>" \
|
||||||
|
iso_app_id="$(get_osname) Live/Rescue CD" \
|
||||||
iso_publisher="$(get_osname) <$(get_disturl)>"
|
mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00 | sed -e s/-//g)
|
||||||
|
|
||||||
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 \
|
xorriso -as mkisofs \
|
||||||
--protective-msdos-label \
|
--modification-date=${mod_date} \
|
||||||
-volid "${iso_label}" \
|
--protective-msdos-label \
|
||||||
-appid "${iso_app_id}" \
|
-volid "${iso_label}" \
|
||||||
-publisher "${iso_publisher}" \
|
-appid "${iso_app_id}" \
|
||||||
-preparer "Prepared by manjaro-tools/${0##*/}" \
|
-publisher "${iso_publisher}" \
|
||||||
-b boot/grub/i386-pc/eltorito.img \
|
-preparer "Prepared by manjaro-tools/${0##*/}" \
|
||||||
-c boot.catalog \
|
-r -graft-points -no-pad \
|
||||||
-no-emul-boot \
|
--sort-weight 0 / \
|
||||||
-boot-load-size 4 \
|
--sort-weight 1 /boot \
|
||||||
-boot-info-table \
|
--grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \
|
||||||
-graft-points \
|
-partition_offset 16 \
|
||||||
--grub2-boot-info \
|
-b boot/grub/i386-pc/eltorito.img \
|
||||||
--grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \
|
-c boot.catalog \
|
||||||
--sort-weight 0 / --sort-weight 1 /boot \
|
-no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \
|
||||||
-eltorito-alt-boot \
|
-eltorito-alt-boot \
|
||||||
-efi-boot-part --efi-boot-image \
|
-append_partition 2 0xef ${iso_root}/efi.img \
|
||||||
-e efi.img \
|
-e --interval:appended_partition_2:all:: \
|
||||||
-no-emul-boot \
|
-no-emul-boot \
|
||||||
-isohybrid-gpt-basdat \
|
-iso-level 3 \
|
||||||
-output "${iso_dir}/${iso_file}" \
|
-o ${iso_dir}/${iso_file} \
|
||||||
"${iso_root}/"
|
${iso_root}/
|
||||||
|
|
||||||
|
# arg to add with xorriso-1.4.7
|
||||||
|
# -iso_mbr_part_type 0x00
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build ISO
|
# Build ISO
|
||||||
|
@ -408,15 +388,20 @@ configure_grub(){
|
||||||
-i $1
|
-i $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_grub_theme(){
|
||||||
|
sed -e "s|@ISO_NAME@|${iso_name}|" -i "$1"
|
||||||
|
}
|
||||||
|
|
||||||
make_grub(){
|
make_grub(){
|
||||||
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
||||||
msg "Prepare [/iso/boot/grub]"
|
msg "Prepare [/iso/boot/grub]"
|
||||||
|
|
||||||
local path="${work_dir}/rootfs"
|
local path="${work_dir}/livefs"
|
||||||
|
|
||||||
prepare_grub "${path}" "${iso_root}"
|
prepare_grub "${path}" "${iso_root}"
|
||||||
|
|
||||||
configure_grub "${iso_root}/boot/grub/kernels.cfg"
|
configure_grub "${iso_root}/boot/grub/kernels.cfg"
|
||||||
|
configure_grub_theme "${iso_root}/boot/grub/variable.cfg"
|
||||||
|
|
||||||
: > ${work_dir}/build.${FUNCNAME}
|
: > ${work_dir}/build.${FUNCNAME}
|
||||||
msg "Done [/iso/boot/grub]"
|
msg "Done [/iso/boot/grub]"
|
||||||
|
|
|
@ -370,7 +370,7 @@ write_calamares_yaml(){
|
||||||
for conf in "${yaml_dir}"/etc/calamares/modules/*.conf "${yaml_dir}"/etc/calamares/settings.conf; do
|
for conf in "${yaml_dir}"/etc/calamares/modules/*.conf "${yaml_dir}"/etc/calamares/settings.conf; do
|
||||||
check_yaml "$conf"
|
check_yaml "$conf"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
write_netgroup_yaml(){
|
write_netgroup_yaml(){
|
||||||
|
@ -385,7 +385,7 @@ write_netgroup_yaml(){
|
||||||
for p in ${packages[@]};do
|
for p in ${packages[@]};do
|
||||||
echo " - $p" >> "$2"
|
echo " - $p" >> "$2"
|
||||||
done
|
done
|
||||||
${validate} && check_yaml "$2"
|
${validate} && check_yaml "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
write_pacman_group_yaml(){
|
write_pacman_group_yaml(){
|
||||||
|
|
Loading…
Reference in a new issue