URL: <https://savannah.gnu.org/bugs/?64475>
Summary: grub failed to initrd /boot/amd-ucode.img in btrfs partition with bees Group: GNU GRUB Submitter: watermelonrei Submitted: Wed 26 Jul 2023 12:17:14 PM UTC Category: Filesystem Severity: Major Priority: 5 - Normal Item Group: Software Error Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Release: Git master Release: Discussion Lock: Any Reproducibility: Every Time Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Wed 26 Jul 2023 12:17:14 PM UTC By: Watermelon Rei <watermelonrei> Grub version 2.12rc1 OS: archlinux x86_64 The output of "fdisk -l": Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors Disk model: SAMSUNG MZVLQ512HALU-00000 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Device Start End Sectors Size Type /dev/nvme0n1p1 2048 206847 204800 100M EFI System /dev/nvme0n1p2 206848 239615 32768 16M Microsoft reserved /dev/nvme0n1p3 239616 499009031 498769416 237.8G Microsoft basic data /dev/nvme0n1p4 499009536 500226047 1216512 594M Windows recovery environment /dev/nvme0n1p5 500228096 1000215182 499987087 238.4G Linux filesystem fstab: # /dev/nvme1n1p5 UUID=ed48d493-7777-451e-b7c5-fd4929b80146 / *btrfs* rw,relatime,compress= *zstd*,ssd,space_cache,subvolid=5,subvol=/ 0 0 # /dev/nvme1n1p1 UUID=90F9-3E63 /efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2 I updated amd-ucode package from a old version A to the new version B, then reboot system, I got following error during grub loading microcode: > error: start_image() returned 0x8000000000000001 changed the line "initrd /boot/amd-ucode.img /boot/initramfs-linux.img" to "initrd /boot/initramfs-linux.img" in /boot/grub/grub.cfg, the system booted. I just downgraded amd-ucode back to version A, but the system boot was still failed. After multiple attempts, I found that boot failed is not associated with amd-ucode, I had enabled *beesd* service for deduplicating root partition nvme1n1p5, and bees just deduplicated the /boot/amd-ucode.img, which caused the failed. Disabled & stopped beesd, reinstall amd-ucode with any version, system boot successfully. There might be something wrong with grub btrfs model. Maybe this procedure can reproduce the issue: 1. enable & start a beesd service for root partition; 2. pre-save the amd-ucode.img to somewhere in root partition; 3. install the amd-ucode package, that the package manager install the same amd-ucode.img file to /boot/, and triggering bees deduplicate /boot/amd-ucode.img 4. reboot, grub fail in boot. these are output of "btrfs inspect-internal dump-tree " about amd-ucode.img file with and without beesd enabled: without dedup: item 76 key (14156031 DIR_ITEM 2438870455) itemoff 6638 itemsize 43 location key (24128949 INODE_ITEM 0) type FILE transid 63598 data_len 0 name_len 13 name: amd-ucode.img item 4 key (14156031 DIR_INDEX 168) itemoff 16056 itemsize 43 location key (24128949 INODE_ITEM 0) type FILE transid 63598 data_len 0 name_len 13 name: amd-ucode.img item 31 key (24128949 INODE_ITEM 0) itemoff 13460 itemsize 160 generation 63598 transid 63598 size 61440 nbytes 61440 block group 0 mode 100644 links 1 uid 0 gid 0 rdev 0 sequence 3 flags 0x0(none) atime 1690359197.0 (2023-07-26 16:13:17) ctime 1690359197.297284954 (2023-07-26 16:13:17) mtime 1690334459.0 (2023-07-26 09:20:59) otime 1690359197.297284954 (2023-07-26 16:13:17) item 32 key (24128949 INODE_REF 14156031) itemoff 13437 itemsize 23 index 168 namelen 13 name: amd-ucode.img item 33 key (24128949 EXTENT_DATA 0) itemoff 13384 itemsize 53 generation 63598 type 1 (regular) extent data disk byte 637091115008 nr 61440 extent data offset 0 nr 61440 ram 61440 extent compression 0 (none) with dudep: item 76 key (14156031 DIR_ITEM 2438870455) itemoff 6638 itemsize 43 location key (24126976 INODE_ITEM 0) type FILE transid 63502 data_len 0 name_len 13 name: amd-ucode.img item 4 key (14156031 DIR_INDEX 167) itemoff 16056 itemsize 43 location key (24126976 INODE_ITEM 0) type FILE transid 63502 data_len 0 name_len 13 name: amd-ucode.img item 63 key (24126976 INODE_ITEM 0) itemoff 10170 itemsize 160 generation 63502 transid 63540 size 61440 nbytes 57344 block group 0 mode 100644 links 1 uid 0 gid 0 rdev 0 sequence 8 flags 0x0(none) atime 1690355371.0 (2023-07-26 15:09:31) ctime 1690357303.165164843 (2023-07-26 15:41:43) mtime 1690334459.0 (2023-07-26 09:20:59) otime 1690355371.34542255 (2023-07-26 15:09:31) item 64 key (24126976 INODE_REF 14156031) itemoff 10147 itemsize 23 index 167 namelen 13 name: amd-ucode.img item 65 key (24126976 EXTENT_DATA 0) itemoff 10094 itemsize 53 generation 62918 type 1 (regular) extent data disk byte 551198310400 nr 4096 extent data offset 0 nr 4096 ram 4096 extent compression 0 (none) item 66 key (24126976 EXTENT_DATA 4096) itemoff 10041 itemsize 53 generation 58924 type 1 (regular) extent data disk byte 612950372352 nr 90112 extent data offset 24576 nr 16384 ram 131072 extent compression 3 (zstd) item 67 key (24126976 EXTENT_DATA 20480) itemoff 9988 itemsize 53 generation 62296 type 1 (regular) extent data disk byte 620042072064 nr 36864 extent data offset 0 nr 36864 ram 36864 extent compression 0 (none) _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64475> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/