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>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-c</option></term>
|
||||
|
||||
<listitem><para>Create new remote release.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-l</option></term>
|
||||
|
||||
|
|
|
@ -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,11 +80,11 @@ 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} ${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
|
||||
|
|
|
@ -161,55 +161,35 @@ make_sfs() {
|
|||
|
||||
assemble_iso(){
|
||||
msg "Creating ISO image..."
|
||||
local iso_publisher iso_app_id
|
||||
|
||||
iso_publisher="$(get_osname) <$(get_disturl)>"
|
||||
|
||||
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}/"
|
||||
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 \
|
||||
--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}/"
|
||||
--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 \
|
||||
--grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \
|
||||
-partition_offset 16 \
|
||||
-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 \
|
||||
-o ${iso_dir}/${iso_file} \
|
||||
${iso_root}/
|
||||
|
||||
# arg to add with xorriso-1.4.7
|
||||
# -iso_mbr_part_type 0x00
|
||||
}
|
||||
|
||||
# Build ISO
|
||||
|
@ -408,15 +388,20 @@ 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]"
|
||||
|
||||
local path="${work_dir}/rootfs"
|
||||
local path="${work_dir}/livefs"
|
||||
|
||||
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]"
|
||||
|
|
|
@ -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(){
|
||||
|
|
Loading…
Reference in a new issue