[Bug 851722] New: grub2's os-prober reports EMERGENCY corrupt xfs filesystem on extended partition
https://bugzilla.novell.com/show_bug.cgi?id=851722 https://bugzilla.novell.com/show_bug.cgi?id=851722#c0 Summary: grub2's os-prober reports EMERGENCY corrupt xfs filesystem on extended partition Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: x86-64 OS/Version: openSUSE 13.1 Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: jimc@math.ucla.edu QAContact: jsrain@suse.com Found By: --- Blocker: --- This is for os-prober-1.61-3.1.2.x86_64 required by grub2-2.00-39.1.3.x86_64 . I upgraded from OpenSuSE-12.3 to 13.1 final. Shortly after reboot, and again 25 minutes later, something unknown execed os-prober which reports in syslog probing all partitions, mostly uneventfully except for syslog reports of negative findings (I have a priority=debug log). /dev/sda4 is the extended partition on this disc. When 50mounted-tests tries to mount it (without specifying the filesystem type), most filesystem modules are not too verbose when they fail to mount /dev/sda4. However, when mounting is attempted as xfs, it spews out a full call trace and a lot more, plus a report to all logged-in users, presumably at priority = emergency. I haven't seen this before: maybe os-prober is new in 13.1-final (I didn't see the behavior in 13.1-RC1), or maybe this particular extended partition sets off the bug. Sooner or later, someone is going to have a partition containing garbage which looks like a real filesystem -- perhaps even a real filesystem that got trashed, which you're trying to do forensics on. If the filesystem module fails to reject a corrupt filesystem, or even one infested with some kind of virus (think Windows), you could have a really bad situation. What I would like the developers to do: I know I'm not going to get everything I'm asking for here, so I've put the more practical items first. Desist with os-prober. It's too dangerous and too noisy. Whatever ran it twice some time after reboot should not be doing that kind of thing autonomously. Identify it and kill it. At least make its operation configurable. I don't see any relevant unit files that could be disabled. Add a sysconfig parameter, probably in /etc/sysconfig/bootloader, which tells grub2-install to run os-prober just once, to detect dual-booting. Alter the logic of os-prober to exclude partitions that are already mounted, and those with implausible filesystem types like 0x0f (extended). But you might mount your Windows root partition in Linux; excluding such things should be configurable. os-prober should use the "file -s" command and should require it to definitively identify the filesystem type; unknown or implausible types (like swap) should be excluded. It should check the filesystem (readonly) and only then should it attempt to mount it (specifying the type) and then try to recognize a root partition of an alien operating system. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c1
--- Comment #1 from James Carter
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c2
Michael Chang
However, when mounting is attempted as xfs, it spews out a full call trace and a lot more, plus a report to all logged-in users, presumably at priority = emergency. I haven't seen this before: maybe os-prober is new in 13.1-final (I didn't see the behavior in 13.1-RC1), or maybe this particular extended partition sets off the bug.
Did you have the error in this thread? http://oss.sgi.com/archives/xfs/2013-05/msg00148.html -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c3
--- Comment #3 from Michael Chang
But I never found what is autonomously rebuilding /boot/grub2/grub.cfg .
In yast2 bootloader there's a checkbox to allow you to disable os-prober. Or you should run either "update-bootloader --refresh" or "grub2-mkconfig -o /boot/grub2/grub.cfg" to make your changes in /etc/default/grub effective. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c4
--- Comment #4 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c5
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c6
--- Comment #6 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c7
--- Comment #7 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c8
James Carter
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c9
--- Comment #9 from James Carter
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c10
--- Comment #10 from Michael Chang
I still haven't figured out what would have execed grub2-mkconfig so long after booting. Maybe purge-kernels.service, if it does purge a kernel. It has IOSchedulingClass=idle which could have made it start late.
Kernel package's %post (or %postun) scrip-let will call "update-bootloader --refresh" to update bootloader config with new kernel entries. In grub2 it will call grub2-mkconfig and in turn calls os-prober so it's probably the case.
It would be nice to only install btrfsprogs and snapper-zypp-plugin if the machine actually had (or gained in the future) a BTRFS partition, but I can't imagine how to do a dynamic dependency of this kind.
os-prober should only require btrfsprogs and no dependency to snapper(-zypp-plugin) at least the result of `rpm -q --requires os-prober` doesn't seem to be without snapper .. The btrfsprogs is used by os-prober to detect distributions on Btrfs subvolumes (not necessary in "/" as any subvol could set as default root tree..). Yes there's really no such dynamic dependency set by foreign partitions use Btrfs or not. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c11
--- Comment #11 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=851722
https://bugzilla.novell.com/show_bug.cgi?id=851722#c12
--- Comment #12 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com