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

View file

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