Skip to content

ntfs regression (Grub hangs indefinitely)

Description:

With the latest grub package updates, Grub hangs indefinitely for me when using 'search' or similar commands in grub.cfg.

It appears to go into infinite loop when it encounters my Windows recovery partition. Trying to use ls on it directly also triggers the hang. It works fine in older Grub, and the filesystem also mounts fine outside of Grub.

I'm not sure if this affects everyone [with dualboot/ntfs setups]. There seems to be one more affected user in Archlinux forums: https://bbs.archlinux.org/viewtopic.php?pid=2228660#p2228660

The hang was introduced in commit 067b6d225d482280abad03944f04e30abcbdafa1 fs/ntfs: Implement attribute verification. Adding it to _reverts in PKGBUILD works around the issue.

I'm still trying to figure out how this happens in more detail. Not sure if I'll be successful though.

Additional info:

  • package version(s): core/grub 2:2.12.r212.g4dc616657-2, 2:2.12.r226.g56ccc5ed-1
  • config and/or log files:
  • link to upstream bug report, if any: (not yet reported upstream)

Steps to reproduce:

grub> set pager=1
grub> set debug=fs,ntfs
grub> ls (hd1,gpt4)/ # my windows recovery partition
[…]
kern/fs.c:56:fs: Detecting ntfs...
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
--MORE--
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
fs/ntfs.c/212:ntfs. spare=3220672493 min_size=30008 attr_size=28773
[… message repeats ad nauseum …]

Debug message is from grub-core/fs/ntfs.c :: validate_attribute which triggers a fail condition (and then it loops).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information