1616
1717# Internal config
1818# Do not change these values.
19- script_path=" $( readlink -f ${0 %/* } ) "
19+ script_path=" $( cd -P " $( dirname " $( readlink -f " $0 " ) " ) " && pwd ) "
2020defaultconfig=" ${script_path} /default.conf"
2121rebuild=false
2222customized_username=false
@@ -638,11 +638,9 @@ make_pacman_conf() {
638638 sed -r " s|^#?\\ s*CacheDir.+|CacheDir = $( echo -n ${_cache_dirs[@]} ) |g" ${build_pacman_conf} > " ${work_dir} /pacman-${arch} .conf"
639639}
640640
641- # Base installation, plus needed packages (airootfs)
641+ # Base installation (airootfs)
642642make_basefs () {
643643 ${mkalteriso} ${mkalteriso_option} -w " ${work_dir} /${arch} " -C " ${work_dir} /pacman-${arch} .conf" -D " ${install_dir} " init
644- # ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh efitools" install
645- ${mkalteriso} ${mkalteriso_option} -w " ${work_dir} /${arch} " -C " ${work_dir} /pacman-${arch} .conf" -D " ${install_dir} " -p " bash haveged intel-ucode amd-ucode mkinitcpio-nfs-utils nbd" install
646644
647645 # Install plymouth.
648646 if [[ " ${boot_splash} " = true ]]; then
@@ -910,6 +908,10 @@ make_customize_airootfs() {
910908 # Delete customize_airootfs.sh.
911909 remove " ${work_dir} /${arch} /airootfs/root/customize_airootfs.sh"
912910 remove " ${work_dir} /${arch} /airootfs/root/customize_airootfs_${channel_name} .sh"
911+
912+ # /root permission
913+ # https://github.com/archlinux/archiso/commit/d39e2ba41bf556674501062742190c29ee11cd59
914+ chmod -f 750 " ${work_dir} /x86_64/airootfs/root"
913915}
914916
915917# Copy mkinitcpio archiso hooks and build initramfs (airootfs)
@@ -932,7 +934,7 @@ make_setup_mkinitcpio() {
932934 gnupg_fd=
933935 if [[ " ${gpg_key} " ]]; then
934936 gpg --export " ${gpg_key} " > " ${work_dir} /gpgkey"
935- exec 17<> $" {work_dir}/gpgkey"
937+ exec 17<> " $ {work_dir} /gpgkey"
936938 fi
937939
938940 if [[ ! ${kernel} = " core" ]]; then
@@ -960,10 +962,18 @@ make_boot() {
960962
961963# Add other aditional/extra files to ${install_dir}/boot/
962964make_boot_extra () {
963- cp " ${work_dir} /${arch} /airootfs/boot/intel-ucode.img" " ${work_dir} /iso/${install_dir} /boot/intel_ucode.img"
964- cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/intel-ucode/LICENSE" " ${work_dir} /iso/${install_dir} /boot/intel_ucode.LICENSE"
965- cp " ${work_dir} /${arch} /airootfs/boot/amd-ucode.img" " ${work_dir} /iso/${install_dir} /boot/amd_ucode.img"
966- cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/amd-ucode/LICENSE.amd-ucode" " ${work_dir} /iso/${install_dir} /boot/amd_ucode.LICENSE"
965+ if [[ -e " ${work_dir} /${arch} /airootfs/boot/memtest86+/memtest.bin" ]]; then
966+ cp " ${work_dir} /${arch} /airootfs/boot/memtest86+/memtest.bin" " ${work_dir} /iso/${install_dir} /boot/memtest"
967+ cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/common/GPL2/license.txt" " ${work_dir} /iso/${install_dir} /boot/memtest.COPYING"
968+ fi
969+ if [[ -e " ${work_dir} /${arch} /airootfs/boot/intel-ucode.img" ]]; then
970+ cp " ${work_dir} /${arch} /airootfs/boot/intel-ucode.img" " ${work_dir} /iso/${install_dir} /boot/intel_ucode.img"
971+ cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/intel-ucode/LICENSE" " ${work_dir} /iso/${install_dir} /boot/intel_ucode.LICENSE"
972+ fi
973+ if [[ -e " ${work_dir} /${arch} /airootfs/boot/amd-ucode.img" ]]; then
974+ cp " ${work_dir} /${arch} /airootfs/boot/amd-ucode.img" " ${work_dir} /iso/${install_dir} /boot/amd_ucode.img"
975+ cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/amd-ucode/LICENSE.amd-ucode" " ${work_dir} /iso/${install_dir} /boot/amd_ucode.LICENSE"
976+ fi
967977}
968978
969979# Prepare /${install_dir}/boot/syslinux
@@ -1042,7 +1052,7 @@ make_efi() {
10421052
10431053 # edk2-shell based UEFI shell
10441054 # shellx64.efi is picked up automatically when on /
1045- cp " /usr/share/edk2-shell/x64/Shell_Full.efi" " ${work_dir} /iso/shellx64.efi"
1055+ cp " ${work_dir} /x86_64/airootfs /usr/share/edk2-shell/x64/Shell_Full.efi" " ${work_dir} /iso/shellx64.efi"
10461056}
10471057
10481058# Prepare efiboot.img::/EFI for "El Torito" EFI boot mode
0 commit comments