@@ -731,8 +731,9 @@ make_boot() {
731731# Add other aditional/extra files to ${install_dir}/boot/
732732make_boot_extra () {
733733 if [[ -e " ${airootfs_dir} /boot/memtest86+/memtest.bin" ]]; then
734- cp " ${airootfs_dir} /boot/memtest86+/memtest.bin" " ${isofs_dir} /${install_dir} /boot/memtest"
735- cp " ${airootfs_dir} /usr/share/licenses/common/GPL2/license.txt" " ${isofs_dir} /${install_dir} /boot/memtest.COPYING"
734+ install -m 0644 -- " ${airootfs_dir} /boot/memtest86+/memtest.bin" " ${isofs_dir} /${install_dir} /boot/memtest"
735+ install -d -m 0755 -- " ${isofs_dir} /${install_dir} /boot/licenses/memtest86+/"
736+ install -m 0644 -- " ${airootfs_dir} /usr/share/licenses/common/GPL2/license.txt" " ${isofs_dir} /${install_dir} /boot/licenses/memtest86+/"
736737 fi
737738
738739 local _ucode_image
@@ -753,7 +754,7 @@ make_boot_extra() {
753754# Prepare /${install_dir}/boot/syslinux
754755make_syslinux () {
755756 _uname_r=" $( file -b ${airootfs_dir} /boot/${kernel_filename} | awk ' f{print;f=0} /version/{f=1}' RS=' ' ) "
756- mkdir -p " ${isofs_dir} /${install_dir} /boot/ syslinux"
757+ mkdir -p " ${isofs_dir} /syslinux"
757758
758759 # 一時ディレクトリに設定ファイルをコピー
759760 mkdir -p " ${work_dir} /${arch} /syslinux/"
@@ -768,7 +769,7 @@ make_syslinux() {
768769 s|%OS_NAME%|${os_name} |g;
769770 s|%KERNEL_FILENAME%|${kernel_filename} |g;
770771 s|%ARCH%|${arch} |g;
771- s|%INSTALL_DIR%|${install_dir} |g" " ${_cfg} " > " ${isofs_dir} /${install_dir} /boot/ syslinux/${_cfg##*/ } "
772+ s|%INSTALL_DIR%|${install_dir} |g" " ${_cfg} " > " ${isofs_dir} /syslinux/${_cfg##*/ } "
772773 done
773774
774775 # Replace the SYSLINUX configuration file with or without boot splash.
@@ -781,49 +782,48 @@ make_syslinux() {
781782 _no_use_config_name=splash
782783 fi
783784 for _pxe_or_sys in " sys" " pxe" ; do
784- remove " ${isofs_dir} /${install_dir} /boot/ syslinux/archiso_${_pxe_or_sys} _${_no_use_config_name} .cfg"
785- mv " ${isofs_dir} /${install_dir} /boot/ syslinux/archiso_${_pxe_or_sys} _${_use_config_name} .cfg" " ${isofs_dir} / ${install_dir} /boot /syslinux/archiso_${_pxe_or_sys} .cfg"
785+ remove " ${isofs_dir} /syslinux/archiso_${_pxe_or_sys} _${_no_use_config_name} .cfg"
786+ mv " ${isofs_dir} /syslinux/archiso_${_pxe_or_sys} _${_use_config_name} .cfg" " ${isofs_dir} /syslinux/archiso_${_pxe_or_sys} .cfg"
786787 done
787788
788789 # Set syslinux wallpaper
789790 if [[ -f " ${channel_dir} /splash.png" ]]; then
790- cp " ${channel_dir} /splash.png" " ${isofs_dir} /${install_dir} /boot/ syslinux"
791+ cp " ${channel_dir} /splash.png" " ${isofs_dir} /syslinux"
791792 else
792- cp " ${script_path} /syslinux/splash.png" " ${isofs_dir} /${install_dir} /boot/ syslinux"
793+ cp " ${script_path} /syslinux/splash.png" " ${isofs_dir} /syslinux"
793794 fi
794795
795796 # remove config
796797 local _remove_config
797798 function _remove_config() {
798- remove " ${isofs_dir} /${install_dir} /boot/ syslinux/${1} "
799- sed -i " s|$( cat " ${isofs_dir} /${install_dir} /boot/ syslinux/archiso_sys_load.cfg" | grep " ${1} " ) ||g" " ${isofs_dir} / ${install_dir} /boot /syslinux/archiso_sys_load.cfg"
799+ remove " ${isofs_dir} /syslinux/${1} "
800+ sed -i " s|$( cat " ${isofs_dir} /syslinux/archiso_sys_load.cfg" | grep " ${1} " ) ||g" " ${isofs_dir} /syslinux/archiso_sys_load.cfg"
800801 }
801802
802- if [[ " ${norescue_entry} " = true ]]; then
803- _remove_config archiso_sys_rescue.cfg
804- fi
805-
806- if [[ " ${memtest86} " = false ]]; then
807- _remove_config memtest86.cfg
808- fi
803+ if [[ " ${norescue_entry} " = true ]]; then _remove_config archiso_sys_rescue.cfg; fi
804+ if [[ " ${memtest86} " = false ]]; then _remove_config memtest86.cfg; fi
809805
810806 # copy files
811- cp " ${work_dir} " /${arch} /airootfs/usr/lib/syslinux/bios/* .c32 " ${isofs_dir} /${install_dir} /boot/syslinux"
812- cp " ${airootfs_dir} /usr/lib/syslinux/bios/lpxelinux.0" " ${isofs_dir} /${install_dir} /boot/syslinux"
813- cp " ${airootfs_dir} /usr/lib/syslinux/bios/memdisk" " ${isofs_dir} /${install_dir} /boot/syslinux"
814- mkdir -p " ${isofs_dir} /${install_dir} /boot/syslinux/hdt"
815- gzip -c -9 " ${airootfs_dir} /usr/share/hwdata/pci.ids" > " ${isofs_dir} /${install_dir} /boot/syslinux/hdt/pciids.gz"
816- gzip -c -9 " ${airootfs_dir} /usr/lib/modules/${_uname_r} /modules.alias" > " ${isofs_dir} /${install_dir} /boot/syslinux/hdt/modalias.gz"
807+ cp " ${work_dir} " /${arch} /airootfs/usr/lib/syslinux/bios/* .c32 " ${isofs_dir} /syslinux"
808+ cp " ${airootfs_dir} /usr/lib/syslinux/bios/lpxelinux.0" " ${isofs_dir} /syslinux"
809+ cp " ${airootfs_dir} /usr/lib/syslinux/bios/memdisk" " ${isofs_dir} /syslinux"
810+
811+
812+ if [[ -e " ${isofs_dir} /syslinux/hdt.c32" ]]; then
813+ install -d -m 0755 -- " ${isofs_dir} /syslinux/hdt"
814+ if [[ -e " ${airootfs_dir} /usr/share/hwdata/pci.ids" ]]; then
815+ gzip -c -9 " ${airootfs_dir} /usr/share/hwdata/pci.ids" > " ${isofs_dir} /syslinux/hdt/pciids.gz"
816+ fi
817+ find " ${airootfs_dir} /usr/lib/modules" -name ' modules.alias' -print -exec gzip -c -9 ' {}' ' ;' -quit > " ${isofs_dir} /syslinux/hdt/modalias.gz"
818+ fi
817819}
818820
819821# Prepare /isolinux
820822make_isolinux () {
821- mkdir -p " ${isofs_dir} /isolinux"
822- sed " s|%INSTALL_DIR%|${install_dir} |g" \
823- " ${script_path} /system/isolinux.cfg" > " ${isofs_dir} /isolinux/isolinux.cfg"
824- cp " ${airootfs_dir} /usr/lib/syslinux/bios/isolinux.bin" " ${isofs_dir} /isolinux/"
825- cp " ${airootfs_dir} /usr/lib/syslinux/bios/isohdpfx.bin" " ${isofs_dir} /isolinux/"
826- cp " ${airootfs_dir} /usr/lib/syslinux/bios/ldlinux.c32" " ${isofs_dir} /isolinux/"
823+ install -d -m 0755 -- " ${isofs_dir} /syslinux"
824+ sed " s|%INSTALL_DIR%|${install_dir} |g" " ${script_path} /system/isolinux.cfg" > " ${isofs_dir} /syslinux/isolinux.cfg"
825+ install -m 0644 -- " ${airootfs_dir} /usr/lib/syslinux/bios/isolinux.bin" " ${isofs_dir} /syslinux/"
826+ install -m 0644 -- " ${airootfs_dir} /usr/lib/syslinux/bios/isohdpfx.bin" " ${isofs_dir} /syslinux/"
827827}
828828
829829# Prepare /EFI
@@ -1039,13 +1039,6 @@ make_overisofs() {
10391039# Build ISO
10401040make_iso () {
10411041 local _iso_efi_boot_args=" "
1042- if [[ ! -f " ${work_dir} /iso/isolinux/isolinux.bin" ]]; then
1043- _msg_error " The file '${work_dir} /iso/isolinux/isolinux.bin' does not exist." 1
1044- fi
1045- if [[ ! -f " ${work_dir} /iso/isolinux/isohdpfx.bin" ]]; then
1046- _msg_error " The file '${work_dir} /iso/isolinux/isohdpfx.bin' does not exist." 1
1047- fi
1048-
10491042 # If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image.
10501043 if [[ -f " ${work_dir} /iso/EFI/alteriso/efiboot.img" ]]; then
10511044 _iso_efi_boot_args=" -eltorito-alt-boot -e EFI/alteriso/efiboot.img -no-emul-boot -isohybrid-gpt-basdat"
@@ -1063,10 +1056,10 @@ make_iso() {
10631056 -appid " ${iso_application} " \
10641057 -publisher " ${iso_publisher} " \
10651058 -preparer " prepared by AlterISO" \
1066- -eltorito-boot isolinux /isolinux.bin \
1067- -eltorito-catalog isolinux /boot.cat \
1059+ -eltorito-boot syslinux /isolinux.bin \
1060+ -eltorito-catalog syslinux /boot.cat \
10681061 -no-emul-boot -boot-load-size 4 -boot-info-table \
1069- -isohybrid-mbr ${work_dir} /iso/isolinux /isohdpfx.bin \
1062+ -isohybrid-mbr ${work_dir} /iso/syslinux /isohdpfx.bin \
10701063 ${_iso_efi_boot_args} \
10711064 -output " ${out_dir} /${iso_filename} " \
10721065 " ${work_dir} /iso/"
0 commit comments