[Bug 767272] New: Missing boot entries for other distros.
https://bugzilla.novell.com/show_bug.cgi?id=767272 https://bugzilla.novell.com/show_bug.cgi?id=767272#c0 Summary: Missing boot entries for other distros. Classification: openSUSE Product: openSUSE 12.2 Version: Milestone 3 Platform: All OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: hippolyte@shaw.ca QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0 Sometimes os-prober fails to mount a partition, often Ubuntu root partition but not always. As a consequence it cannot read the the Grub menu and add a boot entry. It happens randomly but regularly with different os-prober versions, on different distros and different machines. This bug is NOT the same as the one decribed here https://bugzilla.novell.com/show_bug.cgi?id=759635 which affects only ufs2 partitions (solved in version 1.5.3 in my repo). Reproducible: Sometimes Steps to Reproduce: Boot openSUSE and run os-prober. If all systems are detected, reboot another OS, such as Ubuntu, (so its root partition will be mounted), then reboot openSUSE and run os-prober again. It may take several tries before it fails. Once it fails, running os-prober multiple times will consistently fail to access the other OS, thinking it needs a file system check. Actual Results: # OSPDEBUG=yes os-prober No volume groups found /dev/sda1:Windows NT/2000/XP (loader):Windows:chain /dev/sda13:Fedora release 16 (Verne):Fedora:linux /dev/sda15:Debian GNU/Linux (squeeze/sid):Debian:linux /dev/sda3:FreeBSD:FreeBSD 8.1-RELEASE:freebsd mount: wrong fs type, bad option, bad superblock on /dev/sda6, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so /dev/sdb1:Windows NT/2000/XP (loader):Windows1:chain /dev/sdc1:Windows NT/2000/XP (loader):Windows2:chain /dev/sdc6:Gentoo Base System release 1.12.13:Gentoo:linux Expected Results: # OSPDEBUG=yes os-prober No volume groups found /dev/sda1:Windows NT/2000/XP (loader):Windows:chain /dev/sda13:Fedora release 16 (Verne):Fedora:linux /dev/sda15:Debian GNU/Linux (squeeze/sid):Debian:linux /dev/sda3:FreeBSD:FreeBSD 8.1-RELEASE:freebsd /dev/sda6:Ubuntu 11.10 (11.10):Ubuntu:linux /dev/sdb1:Windows NT/2000/XP (loader):Windows1:chain /dev/sdc1:Windows NT/2000/XP (loader):Windows2:chain /dev/sdc6:Gentoo Base System release 1.12.13:Gentoo:linux OSPDEBUG is a flag I added to prevent redirecting standard error and see what happened. Mount failures can be seen in /var/log/messages: Jun 15 05:00:35 bareil os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda6 Jun 15 05:00:35 bareil kernel: [36610.164065] EXT4-fs (sda6): INFO: recovery required on readonly filesystem Jun 15 05:00:35 bareil kernel: [36610.164069] EXT4-fs (sda6): write access unavailable, cannot proceed It seems that this partition would need a file system check (however it is not the case), which can not proceed because it is mounted read only. This is due to a call to the function ro_partition, defined in /usr/share/os-prober/common.sh: ro_partition () { if type blockdev >/dev/null 2>&1 && \ [ "$(blockdev --getro "$1")" = 0 ] && \ blockdev --setro "$1"; then cleanup_ro_partitions="${cleanup_ro_partitions:+$cleanup_ro_partitions }$1" trap cleanup EXIT HUP INT QUIT TERM fi } It explicitely sets the partition read only (blockdev --setro). Commenting out this function call in /usr/lib/os-probes/50mounted-tests solves the problem but I'm not sure how safe it is, because all partitions will be accessed read-write in this case (I guess). # ro_partition "$partition" Now sda6 can be mounted, grub.cfg can be read and the boot entry will be added (see expected results above). Next, you could uncomment ro_partition in /usr/lib/os-probes/50mounted-tests, and os-prober would mount it this time. Once a partition has been already mounted, os-prober has no problem to mount it again. Therefore a safer workaround would be to mount the failing partition manually until this bug has been fixed. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c2
Andreas Jaeger
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c3
--- Comment #3 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c4
--- Comment #4 from Agnelo de la Crotche
Perhaps it got un-properly shutdown in foreign OS ?
Yes probably. But those file systems get checked at boot and they don't need to be repared. Further, when I mount the failing file system manually, it doesn't complain or tell me that I should run fsck. That's what I don't understand. Something in the state of the file system is not critical enough (doesn't require fsck) but still bothers when the script tries to mount it read only. That would be my guess, but I'm not a file system expert either. Next time I get the issue, I will try to mount the file system read only. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c5
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c6
--- Comment #6 from Agnelo de la Crotche
Next time I get the issue, I will try to mount the file system read only.
Makes me think I have to remember to do that. The work around is to mount/umount the failing file sytem manually, then run os-prober again. That's what I do every time I notice that a boot entry for an OS is missing. But it requires user intervention, and os-prober is usually executed by another script. As far as I can tell, it has always worked. In any case, the foreign OS - the one os-prober is looking for - is the culprit. I don't think I have seen issues with Ubuntu 12.04 so far, but I have a lot of issues with Ubuntu 11.10 and several with Fedora and openSUSE (no matter which kernel - nothing to do with kernel 3.1.10-1.13, which is known not to always shut down properly.) -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c7
--- Comment #7 from Agnelo de la Crotche
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c9
--- Comment #9 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c10
--- Comment #10 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c11
pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c12
--- Comment #12 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c13
Andrey Borzenkov
os-prober , grub-customizer and other dont find other Os
If I mount the partition the root of the other OS is found Os-prober Find tThe os
Could you attach /var/log/messages which spans time before you run os-prober first time (which did not find entries) and after you run os-prober second time (when entries were found). -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c14
--- Comment #14 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c15
--- Comment #15 from Agnelo de la Crotche
I cant do it at the moment because , to day it is ok , I have to wait the problem , and I will do it
That's one of the problem with this bug: you know that it will happen again some time but it is hard to reproduce. Apparently the file system is OK (fsck doesn't complain). However os-prober fails to mount the root partition of the foreign OS. To reproduce the bug, you will have to reboot Kubuntu a couple times. Notice that after you mount the partition once, os-prober should still detect the OS, even if you umount the partition. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c16
--- Comment #16 from Andrey Borzenkov
That's one of the problem with this bug: you know that it will happen again some time but it is hard to reproduce.
I did not ask to reproduce. I asked for logs of something that already happened. /var/log/messages is normally stored persistently and is kept for at least some time ... in my case history goes as far as one year. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c17
--- Comment #17 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c18
--- Comment #18 from Andrey Borzenkov
Created an attachment (id=529296) --> (http://bugzilla.novell.com/attachment.cgi?id=529296) [details] compressed fles of messages
Hmm ... bor@opensuse:~/tmp/bnc/767272> unxz messages-20130* unxz: messages-20130211.xz: File format not recognized unxz: messages-20130224.xz: File format not recognized unxz: messages-20130307.xz: File format not recognized -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c19
--- Comment #19 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c20
--- Comment #20 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c21
--- Comment #21 from Andrey Borzenkov
Created an attachment (id=529368) --> (http://bugzilla.novell.com/attachment.cgi?id=529368) [details] The directory log compressed
Thank you, but it does not contain messages, and files you attached the first time are all zeros. So it looks like logs are lost. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c22
--- Comment #22 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c23
--- Comment #23 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c24
--- Comment #24 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c25
--- Comment #25 from Andrey Borzenkov
To day after update bubuntu in suse 12.2 kde I have done this in a terminal Please attach current /var/log/messages
-- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c26
--- Comment #26 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c27
--- Comment #27 from pierre Labarbe
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c28
Andrey Borzenkov
Created an attachment (id=529665) --> (http://bugzilla.novell.com/attachment.cgi?id=529665) [details] last messagesfrom var/log
I houpe taht you will bee able to resad this file and find the solution
Well, this is the same well known issue Mar 7 19:10:38 linux-ftyb os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda7 Mar 7 19:10:38 linux-ftyb kernel: [ 6652.325506] EXT4-fs (sda7): INFO: recovery required on readonly filesystem Mar 7 19:10:38 linux-ftyb kernel: [ 6652.325511] EXT4-fs (sda7): write access unavailable, cannot proceed os-prober in 12.3 is using grub2-mount so it /may/ cope better with such condition. grub2-mount has its share of problems too, but it is what upstream is using, so hopefully we may profit from it. I'm reluctant to backport it to 12.2 though. It needs changes in grub2 too and it is still not sufficiently tested for stable update. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c29
ahlner ahlner
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c30
--- Comment #30 from ahlner ahlner
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c31
--- Comment #31 from Andrey Borzenkov
On my pc64, NetBSD is missing in grub.cfg and was missing on my pc32.
Please open separate bug report so it can be properly tracked. It is unrelated to this problem. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c32
--- Comment #32 from ahlner ahlner
https://bugzilla.novell.com/show_bug.cgi?id=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c33
--- Comment #33 from Agnelo de la Crotche
(In reply to comment #30)
On my pc64, NetBSD is missing in grub.cfg and was missing on my pc32.
Please open separate bug report so it can be properly tracked. It is unrelated to this problem.
There is already a bug report about missing ufs support in os-prober, but I can not find it right now. I'm sure you will find it, Andrey. See this bug report about this issue and how I addressed it in my port of os-prober (1.56). os-prober treated ufs2 as ufs1 and failed to mount the slices. Further there wasn't code in Grub2 scripts to handle BSD detection output and create boot entries (I added some in my updateGrub2). I read (io some Changelog) that ufs support had been added and withdrawn in os-prober upstream. I have no idea why. I haven't seen the old code. Thus my patches are probably completely different. To fix this bug you need two things: . make os-prober aware of ufs1 and ufs2 file systems, so that it can mount them properly and tell it where to look for the different BSD kernels (I did that in my patches for NetBSD, OpenBSD and FreeBSD - not for DragonFly though) . add code in Grub2 scripts to deal with this output and write the boot entries. It's a while ago, I know. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c34
--- Comment #34 from Agnelo de la Crotche
Sorry : grub2 does not detect all OS of a machine. My English is poor and I don't know how to say to you what I think. There is a correlation.
Both bugs have the consequence that the boot entries for foreign operating systems are missing, but there is no other correlation. The Linux bug discussed here is related to the ext2 file system and journaling at a pretty low level, I think. IMO, only a ext2 expert will be able to sort it (without using hacks). The BSD bug is either ignoring ufs partitions or failing to mount them properly, due to a syntax error (wrong mount option: 44bsd vs ufs2) in os-prober scripts. This bug will be easy to fix, as soon as maintainers are interested in fixing it (I fixed it a long time ago). Further you'll have to add a script in Grub2 to write NetBSD or other BSD entries, but this is not difficult. Whether they will effectively boot BSD kernels is another problem. In the past (with legacy Grub), it used to work or not. In any case, chainloading - as you already mentioned - is always possible, but it's a work around to a specific problem in a given situation, and not a bugfix. -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c35
--- Comment #35 from Agnelo de la Crotche
(In reply to comment #31)
(In reply to comment #30)
On my pc64, NetBSD is missing in grub.cfg and was missing on my pc32.
Please open separate bug report so it can be properly tracked. It is unrelated to this problem.
There is already a bug report about missing ufs support in os-prober, but I can not find it right now.
Here is it: https://bugzilla.novell.com/show_bug.cgi?id=759635 -- 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=767272
https://bugzilla.novell.com/show_bug.cgi?id=767272#c36
Jeffrey Cheung
participants (1)
-
bugzilla_noreply@novell.com