set -e
# set -u
-export LANG=C
+#export LANG=C
script_path=$(readlink -f "${0%/*}")
work_dir="${script_path}/work"
make_squashfs() {
# prepare
[[ -d "${bootfiles_dir}" ]] && rm -r "${bootfiles_dir}"
- mkdir -p "${bootfiles_dir}"/{grub,LiveOS,boot}
+ mkdir -p "${bootfiles_dir}"/{grub,LiveOS,boot,isolinux}
#generate initrd
_msg_info "make initrd..."
run_cmd dracut --xz --add "dmsquash-live convertfs pollcdrom" --omit plymouth --no-hostonly --no-early-microcode /boot/initrd0 `run_cmd ls /lib/modules`
make_nfb() {
touch "${bootfiles_dir}/fedora_lfbs"
+ # isolinux setup
+ cp "${work_dir}"/airootfs/usr/lib/syslinux/modules/bios/*.c32 "${bootfiles_dir}/isolinux/"
+ cp "${work_dir}/airootfs/usr/lib/ISOLINUX/isolinux.bin" "${bootfiles_dir}/isolinux/"
+ cp "${work_dir}/airootfs/usr/lib/ISOLINUX/isohdpfx.bin" "${bootfiles_dir}/isolinux/"
+ sed "s|%OS_NAME%|${os_name}|g" "${nfb_dir}/isolinux.cfg" | sed "s|%CD_LABEL%|${iso_label}|g" > "${bootfiles_dir}/isolinux/isolinux.cfg"
+ #grub
sed "s|%OS_NAME%|${os_name}|g" "${nfb_dir}/grub.cfg" | sed "s|%CD_LABEL%|${iso_label}|g" > "${bootfiles_dir}/grub/grub.cfg"
}
make_efi() {
-appid "${iso_application}" \
-publisher "${iso_publisher}" \
-preparer "prepared by LFBS" \
+ -eltorito-boot isolinux/isolinux.bin \
+ -no-emul-boot \
+ -boot-load-size 4 \
+ -boot-info-table \
-eltorito-alt-boot \
-eltorito-platform efi \
-eltorito-boot EFI/efiboot.img \
-no-emul-boot \
+ -isohybrid-mbr "${bootfiles_dir}/isolinux/isohdpfx.bin" \
-isohybrid-gpt-basdat \
+ -eltorito-catalog isolinux/boot.cat \
-output "${out_dir}/${iso_filename}" \
-graft-points \
"." \
+ "/isolinux/isolinux.bin=isolinux/isolinux.bin" \
"/EFI/efiboot.img=grub/efiboot.img"
cd - > /dev/null
#
# grub.cfg
#
-set default="1"
+set default="0"
function load_video {
insmod efi_gop
linux /boot/vmlinuz root=live:CDLABEL=%CD_LABEL% rd.live.image selinux=0
initrd /boot/initrd
}
-menuentry "Test memory Memtest86 (long load time)" {
- insmod part_gpt
- insmod search_fs_uuid
- insmod chain
- loopback loop /install/memtest86
- chainloader (loop,gpt1)/efi/boot/BOOTX64.efi
-}
+# menuentry "Test memory Memtest86 (long load time)" {
+# insmod part_gpt
+# insmod search_fs_uuid
+# insmod chain
+# loopback loop /install/memtest86
+# chainloader (loop,gpt1)/efi/boot/BOOTX64.efi
+#}
--- /dev/null
+# SPDX-License-Identifier: GPL-3.0
+#
+# mk-linux419
+# Twitter: @fascoder_4
+# Email : m.k419sabuaka@gmail.com
+#
+# (c) 2019-2020 Fascode Network.
+#
+# isolinux.cfg
+#
+
+UI vesamenu.c32
+
+MENU TITLE %OS_NAME% Live Disc BIOS Mode Boot Options
+MENU BACKGROUND splash.png
+MENU COLOR title 1;37;44 #c0ffffff #00000000 std
+MENU COLOR sel 1;32;40 #ff4da435 #ff000000 none
+MENU COLOR hotsel 1;32;40 #ff4da435 #ff000000 none
+
+DEFAULT live
+TIMEOUT 30
+
+LABEL live
+ MENU LABEL BIOS Boot the %OS_NAME% Desktop
+ LINUX /boot/vmlinuz
+ APPEND initrd=/boot/initrd root=live:CDLABEL=%CD_LABEL% rd.live.image selinux=0 --
+
+LABEL existing
+ MENU LABEL Boot existing OS
+ COM32 chain.c32
+ APPEND hd0 0
+
+LABEL reboot
+ MENU LABEL Power Off
+ COM32 poweroff.c32