Bug 1081425

Summary: grub 2 don't display snapshot entry
Product: [openSUSE] openSUSE Tumbleweed Reporter: Marc collin <marc.collin>
Component: BootloaderAssignee: Josef Reidinger <jreidinger>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: jreidinger, marc.collin, mchang
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: grub.cfg
grub-snapshot.cfg

Description Marc collin 2018-02-17 02:41:26 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Build Identifier: 

I use grub 2, when menu is displayed, i don't see any snapshot entry

Reproducible: Always

Steps to Reproduce:
1. start computer
2. grub menu display
3.
Actual Results:  
no snapshot is displayed

Expected Results:  
snapshot should be displayed in the grub menu

in /etc/default/grub, i have this entry

SUSE_BTRFS_SNAPSHOT_BOOTING="true"

snapper list give me

Type   | #   | Pre # | Date                            | User | Cleanup | Description           | Userdata     
-------+-----+-------+---------------------------------+------+---------+-----------------------+--------------
single | 0   |       |                                 | root |         | current               |              
single | 1   |       | Fri 15 Dec 2017 07:29:47 PM EST | root |         | first root filesystem |              
pre    | 263 |       | Wed 31 Jan 2018 09:20:29 PM EST | root | number  | zypp(packagekitd)     | important=yes
post   | 264 | 263   | Wed 31 Jan 2018 09:23:52 PM EST | root | number  |                       | important=yes
pre    | 276 |       | Fri 02 Feb 2018 04:39:06 PM EST | root | number  | zypp(packagekitd)     | important=yes
post   | 277 | 276   | Fri 02 Feb 2018 04:43:31 PM EST | root | number  |                       | important=yes
pre    | 280 |       | Sat 03 Feb 2018 11:36:17 AM EST | root | number  | zypp(packagekitd)     | important=yes
post   | 281 | 280   | Sat 03 Feb 2018 11:38:32 AM EST | root | number  |                       | important=yes
pre    | 288 |       | Tue 06 Feb 2018 05:16:37 PM EST | root | number  | zypp(packagekitd)     | important=yes
post   | 289 | 288   | Tue 06 Feb 2018 05:20:07 PM EST | root | number  |                       | important=yes
pre    | 290 |       | Wed 07 Feb 2018 08:30:06 PM EST | root | number  | zypp(packagekitd)     | important=no 
post   | 291 | 290   | Wed 07 Feb 2018 08:30:40 PM EST | root | number  |                       | important=no 
pre    | 292 |       | Thu 08 Feb 2018 04:30:53 PM EST | root | number  | zypp(packagekitd)     | important=yes
post   | 293 | 292   | Thu 08 Feb 2018 04:34:05 PM EST | root | number  |                       | important=yes
pre    | 294 |       | Thu 08 Feb 2018 04:45:53 PM EST | root | number  | zypp(packagekitd)     | important=no 
post   | 295 | 294   | Thu 08 Feb 2018 04:45:55 PM EST | root | number  |                       | important=no 
pre    | 296 |       | Thu 08 Feb 2018 06:39:21 PM EST | root | number  | zypp(packagekitd)     | important=no 
post   | 297 | 296   | Thu 08 Feb 2018 06:40:09 PM EST | root | number  |                       | important=no
Comment 1 Michael Chang 2018-02-21 07:36:20 UTC
Hi Marc,

This is fixed. See also bsc#1079780. 
Thanks for reporting.

*** This bug has been marked as a duplicate of bug 1079780 ***
Comment 2 Marc collin 2018-02-21 11:34:01 UTC
took today update with kernel 4.15.4-1... same issue...

will be available soon?
Comment 3 Marc collin 2018-02-23 20:27:49 UTC
get update and problem still there
Comment 4 Michael Chang 2018-02-26 03:59:37 UTC
Hi Marc,

Let's check first what is your in package changelog ? 

> rpm -q --changelog grub2-snapper-plugin
Thanks.
Comment 5 Marc collin 2018-02-26 10:24:25 UTC
content passte to https://pastebin.com/TS5Zi3Yj
Comment 6 Marc collin 2018-02-26 10:25:22 UTC
last entry is feb 13


* Tue Feb 13 2018 mchang@suse.com
- Fix incorrect check preventing the script from running (bsc#1078481)
  * 80_suse_btrfs_snapshot
Comment 7 Michael Chang 2018-02-27 04:22:33 UTC
Yes, you're running the latest build.

Would you please also attach the related grub configuration file ?

 /boot/grub2/grub.cfg
 /.snapshots/grub-snapshot.cfg

Thanks.
Comment 8 Marc collin 2018-02-27 11:36:41 UTC
Created attachment 761900 [details]
grub.cfg
Comment 9 Marc collin 2018-02-27 11:39:58 UTC
Created attachment 761903 [details]
grub-snapshot.cfg
Comment 10 Marc collin 2018-02-27 11:40:48 UTC
i provided you file asked
Comment 11 Michael Chang 2018-03-02 09:30:23 UTC
Your grub.cfg suggests that /boot is a separate partition which does not meet the requirement of snapshot booting. The /boot and / has to be the same btrfs partition and (default) subvolume managed by snapper.
Comment 12 Marc collin 2018-03-02 12:34:12 UTC
will need to do a full reinstall?
Comment 13 Marc collin 2018-03-02 21:49:11 UTC
is it possible with tumbleweed installer to have

lvm encrypted partition with snapshot?


seem like yast always propose a separate partition for boot when we use encryption
Comment 14 Michael Chang 2018-03-05 07:08:47 UTC
(In reply to Marc collin from comment #12)
> will need to do a full reinstall?

I think so. Although it is possible to tweak manually to make it work, there's no warranty then.
Comment 15 Michael Chang 2018-03-05 07:18:40 UTC
(In reply to Marc collin from comment #13)
> is it possible with tumbleweed installer to have
> lvm encrypted partition with snapshot?
> seem like yast always propose a separate partition for boot when we use
> encryption

Maybe Josef could help in explaining the behavior ?  I could not foresee problem of doing it but could be my lack of understanding to the scenario.
Comment 16 Josef Reidinger 2018-03-05 08:21:22 UTC
(In reply to Michael Chang from comment #15)
> (In reply to Marc collin from comment #13)
> > is it possible with tumbleweed installer to have
> > lvm encrypted partition with snapshot?
> > seem like yast always propose a separate partition for boot when we use
> > encryption
> 
> Maybe Josef could help in explaining the behavior ?  I could not foresee
> problem of doing it but could be my lack of understanding to the scenario.

Installer propose separated /boot when MBR gap on disk is not big enough to hold grub2, so we propose separate /boot to be able to boot.

To verify it I will need y2logs where it should be written.
Comment 17 Michael Chang 2018-03-12 09:00:18 UTC
Hi Josef,

Here I reassign to you, as it seems to be specific configuration/setup to be clarified.
Thanks.
Comment 18 Josef Reidinger 2018-03-12 09:27:31 UTC
Marc - I will need logs from installation to see that it is really caused by missing MBR gap
Comment 19 Marc collin 2018-03-12 11:25:38 UTC
seem my problem was because my boot partition was on different partition then my root...
Comment 20 Josef Reidinger 2018-03-12 11:29:08 UTC
(In reply to Marc collin from comment #19)
> seem my problem was because my boot partition was on different partition
> then my root...

yes, that is true. Only think we can do here is to check why /boot partition is created, which I can read from logs. The most probable variant is that disk does not have big enough space in MBR gap.
Comment 21 Marc collin 2018-03-20 13:27:11 UTC
i think we can close it