check_squashfs,memdisk,readme
This commit is contained in:
parent
cac74aef9d
commit
4f563bcc20
6 changed files with 118 additions and 47 deletions
|
@ -8,9 +8,10 @@ menuentry '↑ env →' { menu 'env' }
|
|||
menuentry '↑ set →' { menu 'set' }
|
||||
menuentry '↑ cmd →' { menu 'cmd' }
|
||||
menu_split
|
||||
menuentry 'check_squashfs = enforce' { check_squashfs='enforce' }
|
||||
menuentry 'check_squashfs = no' { check_squashfs='no' }
|
||||
menu_split
|
||||
menuentry 'bash / stable / tui' { debsquash '/boot/bash/stable/tui' }
|
||||
menuentry 'bash / stable / gui' { debsquash '/boot/bash/stable/gui' }
|
||||
menuentry 'bash / latest / tui' { debsquash '/boot/bash/latest/tui' }
|
||||
menuentry 'check_signatures = enforce' { check_signatures='enforce' }
|
||||
menuentry 'check_signatures = no' { check_signatures='no' }
|
||||
menuentry 'bash / latest / gui' { debsquash '/boot/bash/latest/gui' }
|
||||
|
|
|
@ -11,3 +11,5 @@ menu_split 'split'
|
|||
menuentry "esp: ${esp} → data: ${data}" { nop }
|
||||
menuentry "env: ${env} → env_mod: ${env_mod}" { nop }
|
||||
menuentry "live: ${live}" { nop }
|
||||
menu_split
|
||||
menuentry "check_squashfs: ${check_squashfs}" { nop }
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
function debsquash {
|
||||
lmp="${1}"
|
||||
sfs="filesystem.squashfs"
|
||||
chk="(${data})${lmp}/${sfs}"
|
||||
#
|
||||
echo 'verify_detached'
|
||||
echo "${chk}"
|
||||
if verify_detached "${chk}" "${chk}.sig" ; then
|
||||
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}"
|
||||
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
|
||||
fi
|
||||
#
|
||||
echo
|
||||
echo 'linux'
|
||||
echo "${linux_path}"
|
||||
linux \
|
||||
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}"
|
||||
linux \
|
||||
"${linux_path}" \
|
||||
boot="live" \
|
||||
elevator="deadline" \
|
||||
|
@ -26,10 +31,9 @@ ip="frommedia" \
|
|||
live-media-path="${lmp}" \
|
||||
live-media-uuid="${data_uuid}" \
|
||||
toram="${sfs}"
|
||||
#
|
||||
echo
|
||||
echo 'initrd'
|
||||
echo "${initrd_path}"
|
||||
initrd "${initrd_path}"
|
||||
fi
|
||||
#
|
||||
echo
|
||||
echo 'initrd'
|
||||
echo "${initrd_path}"
|
||||
initrd "${initrd_path}"
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
function env {
|
||||
action="${1}"
|
||||
setparams \
|
||||
'time_out'
|
||||
'check_squashfs' 'time_out'
|
||||
if [ "${action}" == 'load' ] ; then
|
||||
load_env \
|
||||
--skip-sig \
|
||||
|
@ -48,5 +48,6 @@ function env_mod {
|
|||
}
|
||||
|
||||
function env_set {
|
||||
check_squashfs='enforce'
|
||||
time_out=10
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue