lsgm/live/source/boot.sh

44 lines
1,012 B
Bash
Raw Normal View History

2023-09-30 17:52:10 +00:00
function debsquash {
lmp="${1}"
sfs="filesystem.squashfs"
2023-11-05 20:56:45 +00:00
#
2023-11-21 08:13:18 +00:00
if [ "${check_squashfs}" == 'enforce' ] ; then
chk="(${data})${lmp}/${sfs}"
echo 'verify_detached'
echo "${chk}"
if ! verify_detached "${chk}" "${chk}.sig" ; then
grub_pause
return 1
2023-11-10 19:09:15 +00:00
fi
2023-11-21 08:13:18 +00:00
fi
if [ -f "(${data})${lmp}/vmlinuz" ] ; then
linux_path="(${data})${lmp}/vmlinuz"
initrd_path="(${data})${lmp}/initrd.img"
else
linux_path="(squash)/vmlinuz"
initrd_path="(squash)/initrd.img"
loopback "squash" "${lmp}/${sfs}"
fi
#
echo
echo 'linux'
echo "${linux_path}"
2023-11-21 13:29:08 +00:00
toram='toram'
if [ "${to_ram}" == 'enforce' ] ; then
toram="${toram}=${sfs}"
fi
2023-11-21 08:13:18 +00:00
linux \
2023-11-03 23:30:39 +00:00
"${linux_path}" \
boot="live" \
elevator="deadline" \
ip="frommedia" \
live-media-path="${lmp}" \
live-media-uuid="${data_uuid}" \
2023-11-21 13:29:08 +00:00
"${toram}"
2023-11-21 08:13:18 +00:00
#
echo
echo 'initrd'
echo "${initrd_path}"
initrd "${initrd_path}"
2023-09-30 17:52:10 +00:00
}