-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arraybolt3/better grub efi #1
base: master
Are you sure you want to change the base?
Conversation
When booting Grml from a YUMI device (see https://yumiusb.com/) which was built with Ventoy, then executing `blkid -s TYPE -o value /dev/dm-0p1` might fail, if ventoy is behind the /dev/dm-0p1: | root@grml:~# dmsetup ls | ventoy (253:0) Fixes: ++ for i in $AVAILABLE_PARTITIONS +++ blkid -s TYPE -o value /dev/dm-0p1 ++++ error_handler ++++ last_exit_code=2 ++++ last_bash_command='blkid -s TYPE -o value "$i" 2> /dev/null' ++++ echo 'Unexpected non-zero exit code 2 in /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap at line 744 1151 1166 0 detected! last bash command: blkid -s TYPE -o value "$i" 2> /dev/null' ++++ '[' -r /mnt/debootstrap.5465/debootstrap/debootstrap.log ']' Thanks to klatls for the bug report
interactive mode: ignore failures when identifying file system fails
…ootloader actually gets installed
if [ -n "${grub_pc_package_name}" ]; then | ||
if ! clean_chroot "${MNTPOINT}" dpkg --list "${grub_pc_package_name}" 2>/dev/null | grep -q '^ii' ; then | ||
echo "Notice: ${grub_pc_package_name} package not present yet, installing it therefore." | ||
clean_chroot "$MNTPOINT" DEBIAN_FRONTEND=$DEBIAN_FRONTEND apt-get -y --no-install-recommends install $DPKG_OPTIONS "${grub_pc_package_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -n "${grub_pc_package_name}" ]; then | ||
if ! clean_chroot "${MNTPOINT}" dpkg --list "${grub_pc_package_name}" 2>/dev/null | grep -q '^ii' ; then | ||
echo "Notice: ${grub_pc_package_name} package not present yet, installing it therefore." | ||
clean_chroot "$MNTPOINT" DEBIAN_FRONTEND=$DEBIAN_FRONTEND apt-get -y --no-install-recommends install $DPKG_OPTIONS "${grub_pc_package_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdir -p "${MNTPOINT}"/boot/efi | ||
mount -t vfat "${EFI_TARGET}" "${MNTPOINT}"/boot/efi | ||
|
||
if [ -z "${EFI_ID}" ]; then | ||
EFI_ID="$( | ||
source "${MNTPOINT}"/etc/default/grub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source "${MNTPOINT}"/etc/default/grub | ||
for file in "${MNTPOINT}"/etc/default/grub.d/*.cfg; do | ||
if [ -f "${file}" ]; then | ||
source "${file}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -n "${grub_pc_package_name}" ]; then | ||
if ! clean_chroot "${MNTPOINT}" dpkg --list "${grub_pc_package_name}" 2>/dev/null | grep -q '^ii' ; then | ||
echo "Notice: ${grub_pc_package_name} package not present yet, installing it therefore." | ||
clean_chroot "$MNTPOINT" DEBIAN_FRONTEND=$DEBIAN_FRONTEND apt-get -y --no-install-recommends install $DPKG_OPTIONS "${grub_pc_package_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shellcheck (suggestion)] reported by reviewdog 🐶
clean_chroot "$MNTPOINT" DEBIAN_FRONTEND=$DEBIAN_FRONTEND apt-get -y --no-install-recommends install $DPKG_OPTIONS "${grub_pc_package_name}" | |
clean_chroot "$MNTPOINT" DEBIAN_FRONTEND="$DEBIAN_FRONTEND" apt-get -y --no-install-recommends install "$DPKG_OPTIONS" "${grub_pc_package_name}" |
It's worth noting that grml-debootstrap is not Shellcheck-compliant. Does this CI use exactly the same settings that grml-debootstrap uses? |
Yes. Exactly the same setting. I simply forked the repository, fetched your branch and pushed it here. |
It looks like the CI used by upstream only ran a small subset of those tests, including not having very strict Shellcheck rules and not testing stretch (the only reason bullseye failed was because of a flaky network connection it appears). So I don't think there are problems here. (Aside from the fact that I'd like all of grml-debootstrap to be Shellcheck-compliant, but... that's an undertaking all of its own.) |
For CI testing.
Thanks to @ArrayBolt3!