Bug 902385

Summary: Yast2-Bootloader module does not start with error 'Unknown device'
Product: [openSUSE] openSUSE Distribution Reporter: Forgotten User xRcrmyYBVX <forgotten_xRcrmyYBVX>
Component: YaST2Assignee: Arvin Schnell <aschnell>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: aschnell, chri, fazerxlo, forgotten_1alVLDdb15, forgotten_6Bw0Ifx-X6, forgotten_7bbI62VZki, forgotten_DAOOQRPXab, forgotten_dBpEIsMMD7, forgotten_NX4nrDp_bN, forgotten_PMIZxl2pGW, forgotten_zxeoRDWLI0, forgotten__01A_dEXgn, hpj, jreidinger, mpluskal, pastas4, philip.raets, stifi.s, strzol, thomi.schmid, trenn, tschaefer, varkoly, vovochka13
Version: 13.2Flags: aschnell: needinfo? (forgotten_1alVLDdb15)
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 913515    
Attachments: error message
y2log
y2log from yast-bootloader
y2log
fstab
mtab
simple workaround not fully tested
Yast2 Log running Bootloader with NFS-mount-free fstab
requested logs
simple workaround not fully tested - fixed
proposed patch for yast2-storage
y2log with patch
Yast Logs from Samsung R60Plus .tar.gz
Yast Log files Travelmate 6592 tar.gz
Error message of Bootloader: Screenshot

Description Forgotten User xRcrmyYBVX 2014-10-23 11:34:40 UTC
Created attachment 611078 [details]
error message

I am getting the attached error message when starting the yast2 bootloader module in a openSUSE 13.2 RC1+ virtualbox.
Comment 1 Forgotten User xRcrmyYBVX 2014-10-23 11:35:12 UTC
Created attachment 611079 [details]
y2log
Comment 2 Josef Reidinger 2014-10-29 10:12:40 UTC
Thanks for report. 
It should be fixed in 3.1.98 and opensuse 13.2 GM should have 3.1.101, so 13.2 contain fix.
Comment 3 Philip Raets 2014-10-30 18:44:18 UTC
Created attachment 611908 [details]
y2log from yast-bootloader

I've upgraded to factory and have yast2-bootloader 3.1.100 installed, but it seems the problem is still there.

output zypper info yast2-bootloader:

Information for package yast2-bootloader:
-----------------------------------------
Repository: factory
Name: yast2-bootloader
Version: 3.1.100-1.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 400.7 KiB
Summary: YaST2 - Bootloader Configuration
Description: 
  This package contains the YaST2 component for bootloader configuration.

attached is my log from YaST
Comment 4 Christian Hägele 2014-11-04 21:35:04 UTC
Created attachment 612352 [details]
y2log

Log of yast2 containing the error
Comment 5 Christian Hägele 2014-11-04 21:35:57 UTC
I have the same problem with the latest version of yast

output zypper info yast2-bootloader

Informationen für Paket yast2-bootloader:
-----------------------------------------
Repository: openSUSE-13.2-Oss
Name: yast2-bootloader
Version: 3.1.101a-5.1
Arch: x86_64
Anbieter: openSUSE
Installiert: Ja
Status: aktuell
Installierte Größe: 384,6 KiB
Zusammenfassung: YaST2 - Bootloader-Konfiguration
Beschreibung: 
  Dieses Paket enthält die YaST2 Komponente zur Konfiguration des Bootloaders.
Comment 6 Josef Reidinger 2014-11-05 06:26:52 UTC
Very strange, as it works for me and I also have tmpfs in my fstab.

Arvin - I use for detect special devices this code:

disk = target_map[Yast::Storage.GetDiskPartition(kernel_dev)["disk"]]
# if device is not disk, then it can be virtual device like tmpfs or
# disk no longer exists
return kernel_dev unless disk

(from https://github.com/yast/yast-bootloader/blob/master/src/lib/bootloader/udev_mapping.rb#L55 ). Is it reliable method to detect it? Idea is that I need to get disk for given device and if disk do not exists it is not partition, but special device and returned as it is.
Comment 7 Philip Raets 2014-11-05 17:11:38 UTC
Created attachment 612525 [details]
fstab

I've upgraded to "Tumbleweed", attached is my fstab:

Information for package yast2-bootloader:
-----------------------------------------
Repository: openSUSE-Tumbleweed-Oss
Name: yast2-bootloader
Version: 3.1.108-1.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 373.7 KiB
Summary: YaST2 - Bootloader Configuration
Description: 
  This package contains the YaST2 component for bootloader configuration.

Information for package kernel-desktop:
---------------------------------------
Repository: openSUSE-Tumbleweed-Oss
Name: kernel-desktop
Version: 3.17.1-1.2.g5c4d099
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 216.1 MiB
Summary: Kernel optimized for the desktop
Comment 8 Philip Raets 2014-11-05 17:13:10 UTC
Created attachment 612526 [details]
mtab

and this my mtab
Comment 9 Philip Raets 2014-11-05 17:14:59 UTC
This also occures if you try yo open "kernel-settings" in YaST. It is the exact same error.

Philip
Comment 10 Stratos Zolotas 2014-11-05 19:41:05 UTC
I have the same error on just dist-upgraded system (from 13.1).

I had used this to mount tmp on tmpfs


# mkdir -p /etc/systemd/system/local-fs.target.wants
# ln -s /usr/lib/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
Comment 11 Josef Reidinger 2014-11-06 08:16:56 UTC
*** Bug 904069 has been marked as a duplicate of this bug. ***
Comment 12 Josef Reidinger 2014-11-07 08:55:42 UTC
*** Bug 904264 has been marked as a duplicate of this bug. ***
Comment 13 Forgotten User zxeoRDWLI0 2014-11-07 16:07:16 UTC
Not sure if Stratos suggested in #10 that mounting tmpfs on /tmp would fix the issue -- it does not, the bug persists. My log looks essentially the same as the others'.
Comment 14 Stratos Zolotas 2014-11-07 16:13:00 UTC
Correct Armin, it does not.

I just said that I had this setting on 13.1 (the /tmp on tmpfs) without issues and thought that this is causing the problem on 13.2 after the dist-upgrade.
Comment 15 Dainius Masiliunas 2014-11-07 16:18:03 UTC
I am having this issue as well, after a dist-upgrade from 13.1.
Comment 16 Forgotten User _01A_dEXgn 2014-11-07 20:22:52 UTC
After upgrading 13.1 to 13.2 I got the YaST2 Bootloader Module to show the the same internal error. After taking a peek at the ruby code mentioned in the error I was able to work around the bug.

My /etc/fstab from the 13.1 install contains NFS mounts.
After booting into the newly upgraded 13.2 they are mounted as usual.
Thus besides names like

/dev/sda3
fusectl
cgroup
tmpfs
proc
sysfs

> mount

has names like 

192.168.1.2:/Multimedia
192.168.1.2:/Public
192.168.1.2:/Download
192.168.1.2:/Web

The ruby code for the udev/kernel-names conversion seems not to be able to deal with this type of names and raises an exception.

simply umounting every NFS mount clears the list of the unsupported names and the bootloader module works as expected.
Comment 17 Stratos Zolotas 2014-11-07 20:30:28 UTC
I have also NFS mounts (only one) so probably this is it (I'm away from my system now so I haven't checked), but the error mentions "tmpfs".
Comment 18 Forgotten User _01A_dEXgn 2014-11-07 20:37:36 UTC
The appearance of the word "tmpfs" in the error msg is misleading imho. The code for the name conversion chokes on the names of the NFS mounts and from there it goes down the drain.
Comment 19 Dainius Masiliunas 2014-11-07 22:09:54 UTC
I can confirm that, I have an NFS mount as well.
Comment 20 Stifi Natur 2014-11-08 11:43:15 UTC
I can confirm that nfs mounts lead to the error. However, already the definition in fstab causes the error. It is not necessary that the device is actually mounted.

I am using tumbleweed:
Name: yast2-bootloader
Version: 3.1.109-1.1
Arch: x86_64
Anbieter: openSUSE
Comment 21 Szymon Kowalczyk 2014-11-09 13:13:22 UTC
I also have this issue because NFS. But it appear in more ugly way. After setting NFS I decided to install nvidia proprietary driver. After reboot  I loose grub menu.

My temporary solution is just to skip nfs from scanning adding the following line in 

/usr/share/YaST2/modules/BootStorage.rb

next if Ops.get_symbol(info, "type", :CT_UNKNOWN) == :CT_NFS

after

next [] if Ops.get_symbol(info, "type", :CT_UNKNOWN) == :CT_EVMS

It work for me I did only small test.

There should be probably generic solution non boot mount options as NFS
Comment 22 Szymon Kowalczyk 2014-11-09 13:25:38 UTC
Created attachment 612903 [details]
simple workaround not fully tested
Comment 23 Forgotten User DAOOQRPXab 2014-11-09 15:08:09 UTC
I'm having the same issue on a clean install of 13.2. It only appears when I have an NFS share setup. If I remove the NFS share then this issue doesn't appear. 

Szymon's workaround seems to work here.
Comment 24 Josef Reidinger 2014-11-10 06:39:50 UTC
Can you please attach logs with nfs without workaround? So I can add it as automatic testcase and try to release update for 13.2?
Comment 25 Thomas Schmid 2014-11-10 09:35:09 UTC
I tested the "remove NFS mount from fstab" and it worked on my machine:

Old fstab:
/dev/disk/by-id/ata-Samsung_SSD_840_Series_S14ENEACC04463D-part2 swap  swap       defaults              0 0
/dev/disk/by-id/ata-Samsung_SSD_840_Series_S14ENEACC04463D-part1 /     ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-SAMSUNG_HD321KJ_S0MQJ1KP801867-part3 /home         ext4       defaults              1 2
<IP>:/volume6/Images     /ruag/Images                           nfs        noauto,defaults       0 0

New fstab:
/dev/disk/by-id/ata-Samsung_SSD_840_Series_S14ENEACC04463D-part2 swap  swap       defaults              0 0
/dev/disk/by-id/ata-Samsung_SSD_840_Series_S14ENEACC04463D-part1 /     ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-SAMSUNG_HD321KJ_S0MQJ1KP801867-part3 /home         ext4       defaults              1 2

Attached the y2log from running Bootloader with the new, NFS-mount-free fstab.
Comment 26 Thomas Schmid 2014-11-10 09:36:20 UTC
Created attachment 612974 [details]
Yast2 Log running Bootloader with NFS-mount-free fstab
Comment 27 Szymon Kowalczyk 2014-11-10 09:48:42 UTC
below you can find zip with:

fstab  - with 2 nfs
y2log.old   -  without patch
y2log.new   -  with patch
Comment 28 Szymon Kowalczyk 2014-11-10 09:49:08 UTC
Created attachment 612978 [details]
requested logs
Comment 29 Szymon Kowalczyk 2014-11-11 01:17:10 UTC
Created attachment 613093 [details]
simple workaround not fully tested - fixed

The previous patch wasn't work, this is still only workaround.

The main problem is that: 

Yast::Storage.GetDiskPartition("tmpfs") 

return (modules/Storage.rb:752): 

[{ "disk" => "/dev/nfs", "nr" => device }]

and is failing when user has any nfs.

solution is to mannualy return kernel_dev if kernel_dev is tmpfs:

device_mapping.rb:

return kernel_dev if (dev == kernel_dev && dev == "tmpfs")

disk = target_map[Yast::Storage.GetDiskPartition(kernel_dev)["disk"]]

before:

disk = target_map[Yast::Storage.GetDiskPartition(kernel_dev)["disk"]]
Comment 30 Josef Reidinger 2014-11-11 06:50:14 UTC
Arvin - I can also reproduce it. For me it looks like bug in yast2-storage as I do not expect to get this result ( commands run in irb with fstab with nfs entry )

irb(main):001:0> require "yast"
=> true
irb(main):002:0> Yast.import "Storage"
=> nil
irb(main):004:0> Yast::Storage.InitLibstorage(true)
=> true
irb(main):005:0> Yast::Storage.GetDiskPartition("tmpfs")
=> {"disk"=>"/dev/nfs", "nr"=>"tmpfs"}

I expect that it returns "tmpfs" as disk and not nfs for which I do not see any reason.
Comment 31 Arvin Schnell 2014-11-11 09:40:21 UTC
Yes, looks like a bug in yast2-storage. I'll look at it when time permits.
Comment 32 Arvin Schnell 2014-11-12 14:09:23 UTC
Created attachment 613376 [details]
proposed patch for yast2-storage
Comment 33 Arvin Schnell 2014-11-12 14:11:37 UTC
I would like to get feedback for the patch in comment #32. A maintenance
update will take it's time.
Comment 34 Christian Hägele 2014-11-12 17:44:05 UTC
(In reply to Arvin Schnell from comment #33)
> I would like to get feedback for the patch in comment #32.

Your patch fixes the issue for me
Comment 35 Stifi Natur 2014-11-12 18:34:14 UTC
(In reply to Arvin Schnell from comment #33)
> I would like to get feedback for the patch in comment #32.

In my case: Only after applying the patch, the yast2 bootloader module starts without errors when NFS shares are present in fstab.
Comment 36 Christian galeffi 2014-11-12 19:53:56 UTC
(In reply to Arvin Schnell from comment #32)
> Created attachment 613376 [details]
> proposed patch for yast2-storage

After applying the patch, the yast2 bootloader module starts without errors.
I have NFS shares mounted.
Comment 37 Szymon Kowalczyk 2014-11-12 21:05:15 UTC
The patch is working for me too.
Comment 38 Szymon Kowalczyk 2014-11-12 21:06:35 UTC
Created attachment 613422 [details]
y2log with patch
Comment 39 Josef Reidinger 2014-11-14 12:17:46 UTC
*** Bug 904874 has been marked as a duplicate of this bug. ***
Comment 40 Thomas Renninger 2014-11-21 09:24:27 UTC
I have a 13.2 with all updates and got this or similar (not seen before) when installing kvm/xen tools via yast.

First I expected a duplicate, but from the logs it looks like the error is not in yast2-storage and the errors in the log are slightly different at least the one I had a look at.
Still I like to mention that I see a similar, but possibly unrelated error:
-------------
Internal error. Please report a bug report with logs.
Details: Unknown device tmpfs
Caller:  /usr/share/YaST2/lib/bootloader/device_mapping.rb:65:in `to_mountby_d.
-------------
and created a new bug for it:
https://bugzilla.suse.com/show_bug.cgi?id=906548
Comment 42 Josef Reidinger 2014-11-21 11:12:51 UTC
(In reply to Peter Varkoly from comment #41)
> (In reply to Thomas Renninger from comment #40)
> > I have a 13.2 with all updates and got this or similar (not seen before)
> > when installing kvm/xen tools via yast.
> I've the same problem with new installed openSUSE 13.2 installed all updates.
> @jreidinger shall I provide logs or do you have enough :-)

I think reason is already known. Just waiting to release fix.
Comment 43 Josef Reidinger 2014-11-21 17:41:38 UTC
*** Bug 906548 has been marked as a duplicate of this bug. ***
Comment 44 Forgotten User dBpEIsMMD7 2014-12-01 05:07:59 UTC
just an fyi -- i _think_ this is related

on 13.2, *after* applying the patches from comments #22 & #32, above, I still see

yast2 <any command>
 YaST got signal 11 at file /usr/share/YaST2/modules/Wizard.rb:836
 /sbin/yast2: line 440:  6768 Segmentation fault      $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS

Is this dealt with by additional fixes? 

I can provide any info needed to further diagnose ...
Comment 45 Forgotten User dBpEIsMMD7 2014-12-01 06:13:09 UTC
appears QT/KF5 pacakges crept in and caused problems.

doing a brute force

rpm -e `rpm -qa | egrep -i "KF5|qt5" | egrep -v "libyui-qt-pkg|libQt5DBus|libQt5Core|libQt5Gui|libQt5Widgets|libyui-qt-pkg|libqt5-qtbase-common-devel|libkgeomap|digikam"` kio-extras5-5.1.1-5.2.x86_64 kio-5.4.0-4.5.x86_64 oxygen5-decoration-5.1.1-4.1.x86_64 drkonqi5-5.1.1-10.1.x86_64 kglobalaccel5-5.1.1-10.1.x86_64 kservice-5.4.0-4.1.x86_64 drkonqi5-5.1.1-10.1.x86_64 kconf_update5-5.4.0-4.1.x86_64 oxygen5-style-5.1.1-4.1.x86_64 kio-lang-5.4.0-4.5.noarch libkdecorations5-5.1.1-4.5.x86_64  kservice-lang-5.4.0-4.1.noarch oxygen5-5.1.1-4.1.x86_64 libQtQuick5-5.4.0~rc-76.1.x86_64 libyui-qt6-2.46.13-2.1.9.x86_64 libyui-qt-pkg6-2.44.7-1.8.x86_64 solid-imports-5.4.0-4.1.x86_64 kimageformats-5.4.0-4.1.x86_64 solid-tools-5.4.0-4.1.x86_64 kdbusaddons-tools-5.4.0-4.4.x86_64 calibre libmarblewidget20-4.99.40-21.1.x86_64 libastro1-4.99.40-21.1.x86_64 libmarblewidget19-4.14.3-4.3.x86_64 libkgeomap2-4.5.0-30.1.x86_64 patterns-openSUSE-kde4_yast-20141007-2.1.x86_64 patterns-openSUSE-gnome_yast-20141007-2.1.x86_64 libkgeomap-lang-4.5.0-30.1.noarch libkgeomap-devel-4.5.0-30.1.x86_64

then

zypper in libyui-qt libyui-qt-pkg

and all's working again
Comment 46 Lukas Ocilka 2014-12-02 10:51:40 UTC
*** Bug 907795 has been marked as a duplicate of this bug. ***
Comment 47 Arvin Schnell 2014-12-02 11:17:17 UTC
Maintenance incident created:
https://build.opensuse.org/request/show/263732
Comment 48 Arvin Schnell 2014-12-05 16:31:14 UTC
The maintenance incident was accepted. Closing bugzilla issue.
Comment 49 Swamp Workflow Management 2014-12-09 09:04:51 UTC
openSUSE-RU-2014:1606-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 902385
CVE References: 
Sources used:
openSUSE 13.2 (src):    yast2-storage-3.1.50-4.1
Comment 50 Forgotten User 1alVLDdb15 2015-11-15 09:39:10 UTC
Yesterday I had both errors again on one Laptop and on the other one error when I updated from 13.2 to TW. 
Therefore I reopened the bug- hope I am allowed to do that. 
64 bit version. 
Maybe anybody is so kind (how does it work here) to transfer my other Bug report to this place, but I think it's not necessary. 
I have exactly the same error messages during boot and 
on one of my Laps I can't access some points in yast2 (and yast).

Hermann
Comment 51 Arvin Schnell 2015-11-16 11:28:12 UTC
Please provide YaST logs, see http://en.opensuse.org/openSUSE:Bugreport_YaST.
Comment 52 Forgotten User 1alVLDdb15 2015-11-17 21:11:14 UTC
Created attachment 656298 [details]
Yast Logs from Samsung R60Plus .tar.gz

One machine. It takes a Very long time to boot (anywhere a timeout) and during this time three a's with a caret and another special sign appear. Same during shutdown. 
Running LXDE- usually very fast up. 
Hermann R.
Comment 53 Forgotten User 1alVLDdb15 2015-11-17 21:25:38 UTC
Created attachment 656299 [details]
Yast Log files Travelmate 6592 tar.gz

This is the machine with the two start entries in Grub.
This was not the case before the update. 

This machine does not shut down correctly. 
I've (not always) to push the big button....
Comment 54 Arvin Schnell 2015-11-20 11:59:57 UTC
The log is strange in that at the end of y2log lines appear twice
from different pids.

I cannot find the old errors in the new log, e.g. "Client call failed with 'Unknown device tmpfs' and backtrace...".

Please explain in more detail the issue you have now and why it should
be the old bug.
Comment 55 Forgotten User 1alVLDdb15 2015-11-20 16:40:45 UTC
First I had Suse 13.2 without any error and I changed to tumbleweed because this is the new continuous maintained stable SUse Version.

The error message during Start is exactly the same compared to the old bug.
Furthermore this error-message did not appear for Suse 13.2. 

And here it was detected that it's not a double entry in fstab - although the error message had the idea that this is the problem reason. 
It's also similar. 

-----------------------
Maybe it's another bug- again- I have it twice. 
Therefore I think I am not the only one. 

The same problem in both of my logs? 
It's crazy: On the machine I am runnung only Suse there's the double entry. On the other machine with parallel Windows (Not activated) this problem is not existent. Both machines take minutes to boot.
Comment 56 Josef Reidinger 2015-11-20 16:45:05 UTC
(In reply to Hermann Rochholz from comment #53)
> Created attachment 656299 [details]
> Yast Log files Travelmate 6592 tar.gz
> 
> This is the machine with the two start entries in Grub.
> This was not the case before the update. 
> 
> This machine does not shut down correctly. 
> I've (not always) to push the big button....

Please open separate bug report for double start entries in grub. I also see it and it is different bug that probably lives somewhere in grub2 as yast2 do not generate menu. Thanks
Comment 57 Forgotten User 1alVLDdb15 2015-11-21 15:45:47 UTC
1) OK.

2) Would you please be so kind to tell me where the boot log is?

I know there's a file where all boot messages are in.  
But I can't remember where it is placed (Anybody told me in linux-club.de, but I didn't find the mail). 

3) How to find the bug why a machine has always to be switched off with the "big button?" 
Is there a log anywhere?  

4) In linux-club there are also some complaints about grub2.
e.g. win10 does not appear in grub.
Comment 58 Josef Reidinger 2015-11-23 09:48:04 UTC
(In reply to Hermann Rochholz from comment #57)
> 1) OK.
> 
> 2) Would you please be so kind to tell me where the boot log is?
> 
> I know there's a file where all boot messages are in.  
> But I can't remember where it is placed (Anybody told me in linux-club.de,
> but I didn't find the mail). 

if you mean configuration of bootlaoder then it can be collected by save_y2logs script
if you mean logs from booting machine, then journalctl can be used to view. for storing to file you can use something like 

# journalctl > dump-of-journalctl.txt

maybe even better to use only kernel messages for current boot like

# journalctl --dmesg > dump-of-journalctl.txt

> 
> 3) How to find the bug why a machine has always to be switched off with the
> "big button?" 
> Is there a log anywhere?

Please open for separate bugs separate bug reports. This is probably related to systemd, so I suspend journalctl from the last shutdown should help in this case. But please open separate bug report for it.

> 
> 4) In linux-club there are also some complaints about grub2.
> e.g. win10 does not appear in grub.

Again, if something do not work, please open separate bug report. Missing win10 is probably problem in os-prober, so again different developer.
Comment 59 Arvin Schnell 2015-11-25 09:49:50 UTC
Sorry, the last comments are incomprehensible. Please make new bug reports with logs
and good description.

Setting to FIXED as it was before REOPENED.
Comment 60 Forgotten User 1alVLDdb15 2015-11-25 21:58:11 UTC
For the sake of completeness.

Set hostname to <acerlilap>.
Nov 25 22:08:58 acerlilap systemd-fstab-generator[75]: Failed to create mount unit file /run/systemd/generator/sysroot.mount, as it already exists. Duplicate entry in /etc/fstab?
Nov 25 22:08:58 acerlilap systemd[72]: /usr/lib/systemd/system-generators/systemd-fstab-generator failed with error code 1.
Nov 25 22:08:58 acerlilap systemd[1]: Reached target Local File Systems.
Comment 61 Forgotten User 1alVLDdb15 2015-11-26 08:10:16 UTC
Created attachment 657403 [details]
Error message of Bootloader: Screenshot

Similar error to Message 1 - I don't know where it belongs to.