Bug#1035332: grub-efi-arm64: "error: failed to install/update FDT." after bullseye upgrade

2023-05-05 Thread Steve McIntyre
On Mon, May 01, 2023 at 12:08:38PM -0700, Vagrant Cascadian wrote:
>On 2023-04-30, Vagrant Cascadian wrote:
>> After updating to the latest point release, these apm mustang systems
>> fail to boot the kernel, all I see is:
>>
>> error: failed to install/update FDT.
>> Loading Linux 5.10.0-22-arm64 ...
>> Loading initial ramdisk ...
>>
>> Press any key to continue...
>
>The workaround was to uninstall shim-signed and re-install grub
>(grub-install /dev/sda ; grub-install /dev/sdb).
>
>Worked for three of three machines so far... I tested re-installing
>shim-signed on one machine and re-installing grub and the problem came
>back.
>
>No idea why this started happening just now, as shim-signed and related
>packages were all installed before the bullseye point release, but did
>not have this problem...

As described in IRC, I can reproduce this on a mustang here. The grub
binary itself is fine, and boots ok when started directly from the
firmware. But put shim in first and things break. I've turned debug up
to see what's happening.

On a working boot, I can see:

...
kern/efi/fdt.c:38: found registered FDT @ 0x43fd2c3000
loader/efi/fdt.c:63: allocating 26028 bytes for fdt
loader/arm64/linux.c:90: Initrd @ 0x43924fc000-0x4393fff69a
loader/efi/fdt.c:98: Installed/updated FDT configuration table @ 0x43f8b7
...

On a failing boot:
...
kern/efi/fdt.c:38: found registered FDT @ 0x43fd2c4000
loader/efi/fdt.c:63: allocating 26028 bytes for fdt
error: failed to install/update FDT.
...

Digging further...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
  Armed with "Valor": "Centurion" represents quality of Discipline,
  Honor, Integrity and Loyalty. Now you don't have to be a Caesar to
  concord the digital world while feeling safe and proud.



Bug#1035332: grub-efi-arm64: "error: failed to install/update FDT." after bullseye upgrade

2023-05-01 Thread Vagrant Cascadian
On 2023-04-30, Vagrant Cascadian wrote:
> After updating to the latest point release, these apm mustang systems
> fail to boot the kernel, all I see is:
>
> error: failed to install/update FDT.
> Loading Linux 5.10.0-22-arm64 ...
> Loading initial ramdisk ...
>
> Press any key to continue...

The workaround was to uninstall shim-signed and re-install grub
(grub-install /dev/sda ; grub-install /dev/sdb).

Worked for three of three machines so far... I tested re-installing
shim-signed on one machine and re-installing grub and the problem came
back.

No idea why this started happening just now, as shim-signed and related
packages were all installed before the bullseye point release, but did
not have this problem...

live well,
  vagrant


signature.asc
Description: PGP signature


Bug#1035332: grub-efi-arm64: "error: failed to install/update FDT." after bullseye upgrade

2023-04-30 Thread Vagrant Cascadian
Package: grub-efi-arm64
Version: 2.06-3~deb11u5
Severity: important
X-Debbugs-Cc: vagr...@debian.org

After updating to the latest point release, these apm mustang systems fail to 
boot the kernel, all I see is:

error: failed to install/update FDT.
Loading Linux 5.10.0-22-arm64 ...
Loading initial ramdisk ...

Press any key to continue...

Same result with two different machines. Both worked fine since before
the upgrade (although not entirely sure how long since they last were
rebooted, but surely since the previous point release).

I do not recall seeing the error message before when it was working;
it flashes by quite quickly... and if the boot was successful, I might
have never noticed.

Technically, the system details from this bug report are from a
machine I have not yet rebooted, but it is configured essentially
identically to the two machines that are failing to boot (mainly a
different amount of ram).

Will try to figure out how to boot these things into rescue mode and
see if an older grub still works...


Apparently this is "Vagrant files bugs on grub day." :/


live well,
  vagrant


-- Package-specific info:

*** BEGIN /proc/mounts
/dev/mapper/mst0vg-mst00--root / ext4 rw,noatime,errors=remount-ro 0 0
/dev/sdb1 /boot/efi vfat 
rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro
 0 0
*** END /proc/mounts

*** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
insmod all_video
  else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod part_gpt
insmod diskfilter
insmod mdraid1x
insmod lvm
insmod ext2
set 
root='lvmid/lN0djM-1VCP-W6Lg-coTr-sVKq-Orum-JlTxLx/STv12u-sENg-7TZu-28ge-IqjP-ya8c-QaYtKb'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root 
--hint='lvmid/lN0djM-1VCP-W6Lg-coTr-sVKq-Orum-JlTxLx/STv12u-sENg-7TZu-28ge-IqjP-ya8c-QaYtKb'
  085e1704-07fe-4ef4-9bc7-7feb51411222
else
  search --no-floppy --fs-uuid --set=root 085e1704-07fe-4ef4-9bc7-7feb51411222
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-085e1704-07fe-4ef4-9bc7-7feb51411222' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod part_gpt
insmod diskfilter
insmod mdraid1x
insmod lvm
insmod ext2
set 
root='lvmid/lN0djM-1VCP-W6Lg-coTr-sVKq-Orum-JlTxLx/STv12u-sENg-7TZu-28ge-IqjP-ya8c-QaYtKb'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root 
--hint='lvmid/lN0djM-1VCP-W6Lg-coTr-sVKq-Orum-JlTxLx/STv12u-sENg-7TZu-28ge-IqjP-ya8c-QaYtKb'
  085e1704-07fe-4ef4-9bc7-7feb51411222
else
  search --no-floppy --fs-uuid --set=root 
085e1704-07fe-4ef4-9bc7-7feb51411222
fi
echo'Loading Linux 5.10.0-22-arm64 ...'
linux   /boot/vmlinuz-5.10.0-22-arm64 
root=/dev/mapper/mst0vg-mst00--root ro  quiet
echo'Loading initial ramdisk ...'