Arraybolt3/better grub efi#1
Open
adrelanos wants to merge 9 commits into
Open
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}" |
| 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}" |
|
|
||
| if [ -z "${EFI_ID}" ]; then | ||
| EFI_ID="$( | ||
| source "${MNTPOINT}"/etc/default/grub |
| source "${MNTPOINT}"/etc/default/grub | ||
| for file in "${MNTPOINT}"/etc/default/grub.d/*.cfg; do | ||
| if [ -f "${file}" ]; then | ||
| source "${file}" |
| 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.
[shellcheck (suggestion)] reported by reviewdog 🐶
Suggested change
| 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? |
Author
|
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.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For CI testing.
Thanks to @ArrayBolt3!