void [mini-]info

This commit is contained in:
Marc Beninca 2023-11-05 21:56:45 +01:00
parent 6b80fe6bfc
commit 62f0556e01
2 changed files with 62 additions and 34 deletions

View file

@ -158,32 +158,57 @@ mkdir --parents "${GRUB_ROOT}"
# grub / cfg ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # grub / cfg ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
echo -n "\ echo -n "\
echo ' function list_vars {
grub.cfg ↓ echo -n \"\\
' root | \${root}
prefix | \${prefix}
check_signatures | \${check_signatures}
\"
list_trusted
}
clear
ls ls
echo -n \"\\ echo -n \"\\
cmdpath: \${cmdpath} ---
root: \${root} cpu-platform | \${grub_cpu}-\${grub_platform}
cmdpath | \${cmdpath}
---
\" \"
if [ -f '/.disk/info' -o -f '/.disk/mini-info' ] ; then
for f in '/.disk/info' '/.disk/mini-info' ; do for f in '/.disk/info' '/.disk/mini-info' ; do
echo -n ' |'
if [ -f \"\${f}\" ] ; then if [ -f \"\${f}\" ] ; then
echo \" (\${root})\${f}\" echo -n '*'
else
echo -n ' '
fi fi
echo \"(\${root})\${f}\"
done done
unset f unset f
echo \"\\ echo ' *'
prefix: \${prefix} fi
\" list_vars
echo ' ---'
unset cmdroot
regexp --set cmdroot '^\((.*)\)' \"\${cmdpath}\"
echo \" cmdroot | \${cmdroot}\"
if [ \"\${cmdroot}\" != \"\${root}\" ] ; then
if [ -d \"(\${cmdroot})/boot/grub/\${grub_cpu}-\${grub_platform}\" ] ; then
prefix=\"(\${cmdroot})/boot/grub\"
root=\"\${cmdroot}\"
fi
fi
unset cmdroot
function set_init { function set_init {
data_uuid='${DATA}' data_uuid='${DATA}'
search --no-floppy --set data \\ search --no-floppy --set data \\
--fs-uuid \"\${data_uuid}\" --fs-uuid \"\${data_uuid}\"
# #
search --no-floppy --set esp \\ unset esp
--fs-uuid '${ESP}' regexp --set esp '^\((.*)\)' \"\${prefix}\"
if [ \"\${esp}\" ] ; then
env=\"(\${esp})/grub.env\" env=\"(\${esp})/grub.env\"
live=\"(\${esp})/${PROJECT}/live\" live=\"(\${esp})/${PROJECT}/live\"
# #
@ -191,28 +216,23 @@ function set_init {
source \"\${file}\" source \"\${file}\"
done done
unset file unset file
fi
} }
function normal_init { function normal_init {
check_signatures='no' check_signatures='no'
#
set_init set_init
if [ \"\${esp}\" ] ; then
prefix=\"(\${esp})/boot/grub\"
root=\"\${esp}\"
fi
} }
normal_init normal_init
echo 'main.sh ↓'
source \"\${live}/main.sh\" source \"\${live}/main.sh\"
echo 'main.sh ↑'
echo -n ' echo ' *'
grub.cfg ↑ ' list_vars
sleep --interruptible --verbose 60 echo -n \"\\
---
escape | \"
sleep --interruptible --verbose 1000
" > "${GRUB_CFG}" " > "${GRUB_CFG}"
# grub / env ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # grub / env ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅

View file

@ -9,6 +9,9 @@ function debsquash {
initrd_path="(squash)/initrd.img" initrd_path="(squash)/initrd.img"
loopback "squash" "${lmp}/${sfs}" loopback "squash" "${lmp}/${sfs}"
fi fi
#
echo 'linux'
echo "${linux_path}"
linux \ linux \
"${linux_path}" \ "${linux_path}" \
boot="live" \ boot="live" \
@ -17,5 +20,10 @@ ip="frommedia" \
live-media-path="${lmp}" \ live-media-path="${lmp}" \
live-media-uuid="${data_uuid}" \ live-media-uuid="${data_uuid}" \
toram="${sfs}" toram="${sfs}"
#
echo
#
echo 'initrd'
echo "${initrd_path}"
initrd "${initrd_path}" initrd "${initrd_path}"
} }