[Bug 1161823] New: Adding compress=zstd in fstab option in YaST2 on / partition result in "compression type 0x3 not supported"

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 Bug ID: 1161823 Summary: Adding compress=zstd in fstab option in YaST2 on / partition result in "compression type 0x3 not supported" Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 Assignee: yast2-maintainers@suse.de Reporter: andythe_great@pm.me QA Contact: jsrain@suse.com Found By: --- Blocker: --- Created attachment 828281 --> http://bugzilla.opensuse.org/attachment.cgi?id=828281&action=edit Step 1 of installation When installing OpenSUSE TW, by adding compress=zstd in fstab arbitrary option value will result in broken grub "compression type 0x3 not supported" even it grub already support zstd compression on btrfs. Or maybe I did something wrong. Installation process photos were attached. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c1 --- Comment #1 from andy great <andythe_great@pm.me> --- Created attachment 828282 --> http://bugzilla.opensuse.org/attachment.cgi?id=828282&action=edit Step 2 of installation -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c2 --- Comment #2 from andy great <andythe_great@pm.me> --- Created attachment 828283 --> http://bugzilla.opensuse.org/attachment.cgi?id=828283&action=edit Step 3 of installation: select expert partitioner with current proposal. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c3 --- Comment #3 from andy great <andythe_great@pm.me> --- Created attachment 828284 --> http://bugzilla.opensuse.org/attachment.cgi?id=828284&action=edit Step 4 of installation: Select /dev/sda2 -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c4 --- Comment #4 from andy great <andythe_great@pm.me> --- Created attachment 828285 --> http://bugzilla.opensuse.org/attachment.cgi?id=828285&action=edit Step 5 of installation: Select Fstab option... -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c5 --- Comment #5 from andy great <andythe_great@pm.me> --- Created attachment 828286 --> http://bugzilla.opensuse.org/attachment.cgi?id=828286&action=edit Step 6 of installation: Add compress=zstd -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c6 --- Comment #6 from andy great <andythe_great@pm.me> --- Created attachment 828287 --> http://bugzilla.opensuse.org/attachment.cgi?id=828287&action=edit Step 7 of installation: Summary -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c7 --- Comment #7 from andy great <andythe_great@pm.me> --- Created attachment 828288 --> http://bugzilla.opensuse.org/attachment.cgi?id=828288&action=edit Step 8 of installation: Grub died -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c9 --- Comment #9 from andy great <andythe_great@pm.me> --- (In reply to Ancor Gonzalez Sosa from comment #8)
This is not an YaST bug at all. At most, a lack of a feature in Grub2. Reassigning.
Isn't grub support zstd compression on btrfs since 2.04? The current grub version on TW is 2.04. https://git.savannah.gnu.org/cgit/grub.git/commit/?id=386128648606a3aa6ae710... -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsrain@suse.com Assignee|jsrain@suse.com |mchang@suse.com -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c11 Yamashita Ren <yamashita.ren@yandex.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P1 - Urgent CC| |mchang@suse.com, | |yamashita.ren@yandex.com Flags| |needinfo?(mchang@suse.com) Severity|Normal |Major --- Comment #11 from Yamashita Ren <yamashita.ren@yandex.com> --- Actually, @Michael Chang disabled zstd support from Grub for openSUSE... https://bugzilla.opensuse.org/show_bug.cgi?id=1154809 https://build.opensuse.org/package/view_file/openSUSE:Factory/grub2/0001-btr... Upstream patch request : https://lists.gnu.org/archive/html/grub-devel/2019-11/msg00025.html "So far didn't have the request to enable btrfs zstd compression for the root filesystem. But with new grub supporting it, the request might come up in the future and hope we could have solution for i386-pc at that time." Surprise ! Surprise ! Now that Grub 2.04 has been released, users want to compress the whole root (including /boot) with zstd. This patch should be reverted ASAP or a better solution should be found. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c12 --- Comment #12 from andy great <andythe_great@pm.me> --- @Yamashita Ren Thanks for the update, where to ask this feature to be re-enable? -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c13 --- Comment #13 from Yamashita Ren <yamashita.ren@yandex.com> --- I think this is the right place. We just need to wait for Michael Chang to have a look at this bug. You can have a look at my bug too : https://bugzilla.opensuse.org/show_bug.cgi?id=1169211 They are duplicates. In the meantime, you can disable the patch and rebuild grub. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c14 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(mchang@suse.com) | --- Comment #14 from Michael Chang <mchang@suse.com> --- This new zstd feature introduced by 2.04 only got disabled for i386-pc because it broke some running setup if installing grub to partition, ie btrfs bootloader area or mbr gap aligned to cylinder boundary with which some dual boot system with Micorsof Windows may suffer. Such regression is not allowed in migration path so it was disabled until good solution can be found then we can enable this "new" feature. That being said if you want compression for btrfs on i386-pc you need to use zlib or lzo. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c15 --- Comment #15 from Yamashita Ren <yamashita.ren@yandex.com> --- Thanks for the explanation. However, upstream does not seem interested in keeping the 62 sectors MBR gap support alive. I can understand their stance. "Finally we are planning to admit officially that GRUB upstream does not support 62 sectors MBR gap on i386-pc targets. This can be painful for some distros due to lack of simple migration mechanism to newer partitions layouts, e.g. GPT with BIOS boot partitions. However, on the other hand it is not possible to cut the arbitrary code from the core.img endlessly. And at some point there would not be anything to cut... And we think that we are close to this point." https://fosdem.org/2020/schedule/event/guadc/attachments/slides/3820/export/... What if no "good solution exists" ? What is the plan then ? Keeping the zstd support patched out from the i386 bootloader ? Does it not lead to forking out grub in the long term ? I do not see how small MBR gap can be kept alive otherwise. Why not provide 2 packages then ? One for safe migration path and another one keeping up with grub upstream. Having to patch the feature back in myself is not fun at all. And using the other compression algorithms like you are suggesting is a way uglier workaround... -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c16 --- Comment #16 from andy great <andythe_great@pm.me> --- @Michael Chang You mention that only got disabled for i386-pc, but this bug was on x86, I was trying to installed it on x86. So why it happen? -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c17 --- Comment #17 from Michael Chang <mchang@suse.com> --- (In reply to andy great from comment #16)
@Michael Chang You mention that only got disabled for i386-pc, but this bug was on x86, I was trying to installed it on x86. So why it happen?
Are you testing on efi ? It shouldn't happen at all for efi. For legacy bios, grub runs in 32bit protected mode even on 64-bit processor. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c18 S. B. <sb56637@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sb56637@gmail.com --- Comment #18 from S. B. <sb56637@gmail.com> --- (In reply to Michael Chang from comment #17)
(In reply to andy great from comment #16)
@Michael Chang You mention that only got disabled for i386-pc, but this bug was on x86, I was trying to installed it on x86. So why it happen?
Are you testing on efi ? It shouldn't happen at all for efi. For legacy bios, grub runs in 32bit protected mode even on 64-bit processor.
Thanks for this explanation, I was also confused by the i386 terminology and assumed that the openSUSE patch to disable Zstd was only for 32-bit Tumbleweed installations. The workaround that I found for this limitation is to enable Zstd compression and run: sudo chattr -R -c +m /boot -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 Dmitry Markov <werwolf131313@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werwolf131313@gmail.com -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c19 --- Comment #19 from Yamashita Ren <yamashita.ren@yandex.com> --- I am surprised that one year later, this bug is still not fixed. This is really confusing for some users who don't understand why they are met with an error message when they enable zstd compression. Especially since this bug is exclusive to opensuse, hence not widely documented. "But with new grub supporting it, the request might come up in the future and hope we could have solution for i386-pc at that time." So, let me ask again, is there a planned solution ? `chattr -R -c +m /boot` does not work here. I have to use `btrfs filesystem defragment -clzo /boot` every kernel update. I really don't understand what is the point of updating the grub package while patching out features of said update. If you do not want to support grub updates, you should freeze grub in Leap and be done with it. People wanting to update grub could use Tumbleweed's package. At least, there should be a semi-official ungimped grub package. Or maybe you could provide an official workaround ? -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 Fusion Future <qydwhotmail@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qydwhotmail@gmail.com -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c20 --- Comment #20 from Fusion Future <qydwhotmail@gmail.com> --- Leap 15.3 same error if compressed=zstd is set. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c26 --- Comment #26 from Yamashita Ren <yamashita.ren@yandex.com> --- Same here :) -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c27 --- Comment #27 from andy great <andythe_great@pm.me> --- Hi, I could not participate in this test since I have change my hardware, I did not use the same one from I found this issue. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c29 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED Flags|needinfo?(mchang@suse.com) | --- Comment #29 from Michael Chang <mchang@suse.com> --- Set resolved fixed as the patch has been submitted to openSUSE factory and should land in staging test (openQA) soon. Another copy of the patch also sent to upstream mailing list for review and discussion. Feel free to reopen if you still have problem. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c31 S. B. <sb56637@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- Flags| |needinfo?(mchang@suse.com) --- Comment #31 from S. B. <sb56637@gmail.com> --- Hi there, it appears that this fix never made it into Tumbleweed? I just `zypper dup` updated a very old Tumbleweed installation on a BIOS system (with /boot on the / filesystem) with Btrfs and `compress=zstd`, and I had set it to not compress /boot with `chattr -R -c +m /boot`. But for some reason this update left it with a broken GRUB, same error as in the title of this bug report. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c32 --- Comment #32 from Michael Chang <mchang@suse.com> --- (In reply to S. B. from comment #31)
Hi there, it appears that this fix never made it into Tumbleweed? I just `zypper dup` updated a very old Tumbleweed installation on a BIOS system (with /boot on the / filesystem) with Btrfs and `compress=zstd`, and I had set it to not compress /boot with `chattr -R -c +m /boot`. But for some reason this update left it with a broken GRUB, same error as in the title of this bug report.
I'm sure it is in Tumbleweed. Would you mind to give it a try ```btrfs filesystem defragment -r -clzo /boot``` from comment#19 which also had stated that chattr didn't work for some reason ... -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c33 --- Comment #33 from S. B. <sb56637@gmail.com> --- Thanks Michael for the reply. Yes, I tried that command, and I ended up with just: "unaligned pointer 0x1 Aborted. Press any key to exit." -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c34 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(sb56637@gmail.com | |) --- Comment #34 from Michael Chang <mchang@suse.com> --- (In reply to S. B. from comment #33)
Thanks Michael for the reply. Yes, I tried that command, and I ended up with just:
"unaligned pointer 0x1 Aborted. Press any key to exit."
I couldn't reproduce the problem. Could you please help to provide these logs to help me get better idea on knowing what's going on ? Thanks. 1. /var/log/pbl.log 2. compsize /boot 3. lsblk -f 4. dd if=<your_mbr_disk> bs=512 count=1 | hexdump -C -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c35 S. B. <sb56637@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(mchang@suse.com), | |needinfo?(sb56637@gmail.com | |) | --- Comment #35 from S. B. <sb56637@gmail.com> --- 1. (attached) 2. (running from a live CD) compsize /run/media/linux/17b1dde6-2af2-4405-a0b2-5dca2dfc586f/@/boot Processed 311 files, 230 regular extents (230 refs), 133 inline. Type Perc Disk Usage Uncompressed Referenced TOTAL 93% 59M 64M 64M none 100% 55M 55M 55M lzo 48% 4.1M 8.5M 8.5M zstd 53% 756B 1.3K 1.3K 3. (running from a live CD) sda ������sda1 btrfs 17b1dde6-2af2-4405-a0b2-5dca2dfc586f 3.5G 54% /run/media/linux/17b1dde6-2af2-4405-a0b2-5dca2dfc586f 4. (attached) -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c36 --- Comment #36 from S. B. <sb56637@gmail.com> --- Created attachment 854578 --> http://bugzilla.opensuse.org/attachment.cgi?id=854578&action=edit pbl.log -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c37 --- Comment #37 from S. B. <sb56637@gmail.com> --- Created attachment 854579 --> http://bugzilla.opensuse.org/attachment.cgi?id=854579&action=edit dd if=/dev/sda bs=512 count=1 | hexdump -C -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c38 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(sb56637@gmail.com | |) --- Comment #38 from Michael Chang <mchang@suse.com> --- (In reply to S. B. from comment #36)
Created attachment 854578 [details] pbl.log
This looks wrong ... <<<<<<<<<<<<<<<< target = x86_64-efi ls: cannot access '/sys/firmware/efi/efivars': No such file or directory + /usr/sbin/shim-install --config-file=/boot/grub2/grub.cfg --no-nvram --removable No valid EFI partition
>>>>>>>>>>
Would you please attach /etc/sysconfig/bootloader ? Did you LOADER_TYPE="grub2-efi" in it ? My theory to this cause is that shim-install would update grub modules, in this case for i386-pc because it is not efi system. However It didn't update boot sectors, because it was intended to copy shim and grub.efi and running into "No valid EFI partition" in the end. This renders grub in a very inconsistent state. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c39 --- Comment #39 from S. B. <sb56637@gmail.com> --- Hi Michael, ahhh nice catch:
Would you please attach /etc/sysconfig/bootloader ? Did you LOADER_TYPE="grub2-efi" in it ?
Yep, that's the problem. I didn't put it there, but rather I use a custom ISO generated with Kiwi and installed via Calamares, and it appears that Kiwi is pre-filling this since the ISO is compatible with EFI: /etc/sysconfig/bootloader -------------------------- DEFAULT_APPEND="quiet splash apparmor=0 " FAILSAFE_APPEND="quiet splash apparmor=0 ide=nodma apm=off noresume edd=off nomodeset 3 " LOADER_LOCATION=none LOADER_TYPE=grub2-efi SECURE_BOOT=yes -------------------------- So I did a clean install from my old ISO and replaced it with this before the `zypper dup`: /etc/sysconfig/bootloader -------------------------- DEFAULT_APPEND="quiet splash " FAILSAFE_APPEND="quiet splash ide=nodma apm=off noresume edd=off nomodeset 3 " LOADER_LOCATION="none" LOADER_TYPE="grub2" SECURE_BOOT="yes" TRUSTED_BOOT="no" UPDATE_NVRAM="yes" -------------------------- This time GRUB survived without issues. So could you please confirm if I even need to do the chattr trick anymore to disable compression on /boot if GRUB now supports zstd? Thanks a lot! -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c40 --- Comment #40 from Michael Chang <mchang@suse.com> --- (In reply to S. B. from comment #39) [snip]
This time GRUB survived without issues.
Cool! Thanks for the confirmation.
So could you please confirm if I even need to do the chattr trick anymore to disable compression on /boot if GRUB now supports zstd? Thanks a lot!
If your grub gets installed to mbr then you don't have to, the restriction only apply to btrfs partition because the space is not fully utilized (first 64kB). We are working on a solution [1] so in the future there will be no restriction at all (hopefully). For now we still have to live with that sometimes, fortunately when necessary we would only play the chattr trick once as long as subsequent file updates would honor the flags unless it is explicitly changed again. [1] https://lists.gnu.org/archive/html/grub-devel/2021-12/msg00089.html -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 http://bugzilla.opensuse.org/show_bug.cgi?id=1161823#c41 --- Comment #41 from S. B. <sb56637@gmail.com> --- It looks like I have to take back my reply in comment #39. I tested my ISOs on two different laptops running in legacy BIOS mode, with GRUB installed to the MBR, and zstd compression enabled on / and all the other subvolumes. What happens is that both of them go into a GRUB boot loop. Just after the initial text that GRUB prints something about "loading GRUB2" the oldest laptop immediately reboots to POST and keeps looping. The newer laptop after the initial loading text freezes on a black screen and then later reboots. So it looks like the VirtualBox implementation of a legacy BIOS doesn't faithfully imitate the behaviour of a real legacy BIOS in this case, as the exact same installation in VirtualBox (which I also used before to test) works fine in legacy mode. I should mention that I also used the "chattr trick" on /boot , but it apparently no longer works. -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=1161823 Anya Anya <47f40qm5p@relay.firefox.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |47f40qm5p@relay.firefox.com -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com