diff --git a/system/boot/os-prober/files/fedora/os-prober-arm64-win11.patch b/system/boot/os-prober/files/fedora/os-prober-arm64-win11.patch new file mode 100644 index 00000000..07e5230f --- /dev/null +++ b/system/boot/os-prober/files/fedora/os-prober-arm64-win11.patch @@ -0,0 +1,15 @@ +diff --git a/os-probes/mounted/arm64/20microsoft b/os-probes/mounted/arm64/20microsoft +index 066918a..b69c2ba 100755 +--- a/os-probes/mounted/arm64/20microsoft ++++ b/os-probes/mounted/arm64/20microsoft +@@ -31,7 +31,9 @@ if item_in_dir -q bootmgr "$2"; then + for boot in $(item_in_dir boot "$2"); do + bcd=$(item_in_dir bcd "$2/$boot") + if [ -n "$bcd" ]; then +- if grep -aqs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then ++ if grep -aqs "W.i.n.d.o.w.s. .1.1" "$2/$boot/$bcd"; then ++ long="Windows 11" ++ elif grep -aqs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then + long="Windows 10" + elif grep -aqs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then + long="Windows 8" diff --git a/system/boot/os-prober/files/fedora/os-prober-efi-shell.patch b/system/boot/os-prober/files/fedora/os-prober-efi-shell.patch new file mode 100644 index 00000000..ee186d86 --- /dev/null +++ b/system/boot/os-prober/files/fedora/os-prober-efi-shell.patch @@ -0,0 +1,30 @@ +diff --git a/os-probes/mounted/common/efi/05shell b/os-probes/mounted/common/efi/05shell +new file mode 100644 +index 0000000..d4233c0 +--- /dev/null ++++ b/os-probes/mounted/common/efi/05shell +@@ -0,0 +1,24 @@ ++#!/usr/bin/sh ++# Detects a shell.efi bootloader on a EFI System Partition ++ ++. /usr/share/os-prober/common.sh ++ ++found= ++ ++efi_shell=`find $1 -iname "shell.efi"` ++if [ -n "${efi_shell}" ]; then ++ bdir="${efi_shell%/*}" ++ bdir="${efi_shell##*/}" ++ filename=`basename ${efi_shell}` ++ long="EFI firmware management shell" ++ short="EFI_SHELL" ++ path=${bdir}/${filename} ++ found=true ++fi ++ ++if [ -n "$found" ]; then ++ label="$(count_next_label "$short")" ++ result "${path}:${long}:${label}" ++fi ++ ++exit 0 diff --git a/system/boot/os-prober/files/fedora/os-prober-grub2-mount-workaround.patch b/system/boot/os-prober/files/fedora/os-prober-grub2-mount-workaround.patch new file mode 100644 index 00000000..5e8a092f --- /dev/null +++ b/system/boot/os-prober/files/fedora/os-prober-grub2-mount-workaround.patch @@ -0,0 +1,35 @@ +diff --git a/os-probes/mounted/common/90linux-distro b/os-probes/mounted/common/90linux-distro +index b9c24dd..52db3f6 100755 +--- a/os-probes/mounted/common/90linux-distro ++++ b/os-probes/mounted/common/90linux-distro +@@ -19,7 +19,7 @@ subvol="$5" + # symlinks we need to also check in $dir/usr/lib* for distributions that + # moved /lib* to /usr and only left symlinks behind. + # TODO: look for ld-linux.so on arches that have it +-if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then ++#if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then + if [ -e "$dir/etc/os-release" ]; then + short="$(grep ^NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')" + long="$(grep ^PRETTY_NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')" +@@ -146,8 +146,9 @@ if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) + short="Exherbo" + long="Exherbo Linux" + else +- short="Linux" +- long="unknown Linux distribution" ++ exit 1 ++# short="Linux" ++# long="unknown Linux distribution" + fi + + label="$(count_next_label "$short")" +@@ -157,6 +158,6 @@ if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) + result "$partition:$long:$label:linux" + fi + exit 0 +-else +- exit 1 +-fi ++#else ++# exit 1 ++#fi diff --git a/system/boot/os-prober/files/fedora/os-prober-grub2-parsefix.patch b/system/boot/os-prober/files/fedora/os-prober-grub2-parsefix.patch index 0ef8bdaf..7f856260 100644 --- a/system/boot/os-prober/files/fedora/os-prober-grub2-parsefix.patch +++ b/system/boot/os-prober/files/fedora/os-prober-grub2-parsefix.patch @@ -1,7 +1,7 @@ -Index: os-prober-1.58/linux-boot-probes/mounted/common/40grub2 -=================================================================== ---- os-prober-1.58.orig/linux-boot-probes/mounted/common/40grub2 -+++ os-prober-1.58/linux-boot-probes/mounted/common/40grub2 +diff --git a/linux-boot-probes/mounted/common/40grub2 b/linux-boot-probes/mounted/common/40grub2 +index 664505f..5895e45 100755 +--- a/linux-boot-probes/mounted/common/40grub2 ++++ b/linux-boot-probes/mounted/common/40grub2 @@ -77,7 +77,7 @@ parse_grub_menu () { ignore_item=1 fi @@ -17,6 +17,6 @@ Index: os-prober-1.58/linux-boot-probes/mounted/common/40grub2 ;; - initrd) + initrd*) - initrd="$(echo "$2" | sed 's/(.*)//')" - # Initrd same. - if [ "$partition" != "$bootpart" ]; then + shift + initrd="" + for initrd_path in "$@"; do diff --git a/system/boot/os-prober/files/fedora/os-prober-umount-fix.patch b/system/boot/os-prober/files/fedora/os-prober-umount-fix.patch index 6e7937c1..9ab0580d 100644 --- a/system/boot/os-prober/files/fedora/os-prober-umount-fix.patch +++ b/system/boot/os-prober/files/fedora/os-prober-umount-fix.patch @@ -2,17 +2,16 @@ Index: os-prober/common.sh =================================================================== --- os-prober.orig/common.sh +++ os-prober/common.sh -@@ -336,3 +336,13 @@ linux_mount_boot () { +@@ -336,3 +336,12 @@ linux_mount_boot () { mountboot="$bootpart $mounted" } + -+umount_exec=$(which umount) +umount() { -+ if ! $umount_exec $@ 2> /dev/null; then ++ if ! command umount $@ 2> /dev/null; then + error "umount error, retrying after 1 sec" + sleep 1 -+ $umount_exec $@ ++ command umount $@ + fi +} + diff --git a/system/boot/os-prober/pspec.xml b/system/boot/os-prober/pspec.xml index 1914461e..fcc74516 100644 --- a/system/boot/os-prober/pspec.xml +++ b/system/boot/os-prober/pspec.xml @@ -12,13 +12,17 @@ app:console Utility to detect other OSes on a set of drives os-probe detects other OSes available on a system and outputs the results in a generic machine-readable format. Support for new OSes and Linux distributions can be added easily. - http://cdn-fastly.deb.debian.org/debian/pool/main/o/os-prober/os-prober_1.79.tar.xz + http://cdn-fastly.deb.debian.org/debian/pool/main/o/os-prober/os-prober_1.81.tar.xz fedora/os-prober-bootpart-name-fix.patch fedora/os-prober-btrfsfix.patch fedora/os-prober-factor-out-logger.patch fedora/os-prober-factored-logger-efi-fix.patch - fedora/os-prober-gentoo-fix.patch + + fedora/os-prober-grub2-mount-workaround.patch + fedora/os-prober-efi-shell.patch + fedora/os-prober-arm64-win11.patch + fedora/os-prober-grepfix.patch fedora/os-prober-grub2-parsefix.patch fedora/os-prober-mdraidfix.patch @@ -40,6 +44,13 @@ + + 2022-08-17 + 1.81 + Version bump. + Mustafa Cinasal + muscnsl@gmail.com + 2021-07-18 1.79