Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830753 - sys-boot/os-prober: can't find windows on ntfs3 FS from kernel 5.15
Summary: sys-boot/os-prober: can't find windows on ntfs3 FS from kernel 5.15
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Peter Levine
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-01-08 05:22 UTC by Sergey Galkin
Modified: 2022-01-11 17:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Galkin 2022-01-08 05:22:43 UTC
On the 5.15 kernel the new FS ntfs3 appeared. 
If you mount windows system partition as ntfs3 and run `grub-mkconfig -o /boot/grub/grub.cfg` the Window will be lost from grub menu because os-probe can't try ntfs3 partition

Reproducible: Always

Steps to Reproduce:
1. Update to kernel 5.15.13-gentoo and reboot
2. Update fstab from  ntfs-3g to ntfs3
3. mount /boot
4. run grub-mkconfig -o /boot/grub/grub.cfg


Actual Results:  
Line with Windows will be lost in boot menu

Expected Results:  
Line with Windows in boot menu

The patch is

--- a/os-probes/mounted/arm64/20microsoft
+++ b/os-probes/mounted/arm64/20microsoft
@@ -15,7 +15,7 @@ fi
 
 # Weed out stuff that doesn't apply to us
 case "$type" in
-       ntfs|ntfs-3g) debug "$1 is a NTFS partition" ;;
+       ntfs|ntfs-3g|ntfs3) debug "$1 is a NTFS partition" ;;
        vfat) debug "$1 is a FAT32 partition" ;;
        msdos) debug "$1 is a FAT16 partition" ;;
        fat) debug "$1 is a FAT partition (mounted by GRUB)" ;;
diff --git a/os-probes/mounted/x86/20microsoft b/os-probes/mounted/x86/20microsoft
index 06bb807..1f97654 100755
--- a/os-probes/mounted/x86/20microsoft
+++ b/os-probes/mounted/x86/20microsoft
@@ -15,7 +15,7 @@ fi
 
 # Weed out stuff that doesn't apply to us
 case "$type" in
-       ntfs|ntfs-3g) debug "$1 is a NTFS partition" ;;
+       ntfs|ntfs-3g|ntfs3) debug "$1 is a NTFS partition" ;;
        vfat) debug "$1 is a FAT32 partition" ;;
        msdos) debug "$1 is a FAT16 partition" ;;
        fat) debug "$1 is a FAT partition (mounted by GRUB)" ;;
Comment 1 Sergey Galkin 2022-01-08 06:28:46 UTC
https://github.com/gentoo/gentoo/pull/23692
Comment 2 Larry the Git Cow gentoo-dev 2022-01-11 17:54:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2195898d5f9ed4cd445758c7616c0d46ce03a947

commit 2195898d5f9ed4cd445758c7616c0d46ce03a947
Author:     Sergey Galkin <sergey.gals@gmail.com>
AuthorDate: 2022-01-08 05:28:10 +0000
Commit:     Ben Kohler <bkohler@gentoo.org>
CommitDate: 2022-01-11 17:53:58 +0000

    sys-boot/os-prober: fix for kernel 5.15 with ntfs3
    
    Closes: https://bugs.gentoo.org/830753
    Signed-off-by: Sergei Galkin <sergey.gals@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/23694
    Signed-off-by: Ben Kohler <bkohler@gentoo.org>

 .../os-prober/files/os-prober-1.79-ntfs3.patch     |  26 +++++
 sys-boot/os-prober/os-prober-1.79-r2.ebuild        | 105 +++++++++++++++++++++
 2 files changed, 131 insertions(+)