Update-grub doesn't work (takes ages and then crashes OS)

I’ve been trying to update-grub and it takes ~30 mins and then crashes Manjaro (black screen).
Have any of you encountered this before and know a solution? Please tell me if I can provide some more information, I’m new and don’t know how to do that.

result of inxi --admin --verbosity=7 --filter --no-host --width :

System:
  Kernel: 5.18.7-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.18-x86_64
    root=UUID=9e40985b-cd55-40b5-8a42-ce29331d84a2 rw quiet
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.5 wm: kwin_wayland vt: 2
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20T8006QGE v: ThinkPad E15 Gen 2
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20T8006QGE serial: <superuser required> UEFI: LENOVO
    v: R1AET41W (1.17 ) date: 11/11/2021
Battery:
  ID-1: BAT0 charge: 38.5 Wh (86.3%) condition: 44.6/45.0 Wh (99.1%)
    volts: 11.9 min: 11.1 model: Sunwoda 5B10X025 type: Li-poly serial: <filter>
    status: discharging cycles: 63
Memory:
  RAM: total: 14.86 GiB used: 1.89 GiB (12.7%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 5 PRO 4650U with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 2 gen: 3 built: 2020-22 process: TSMC n7 (7nm)
    family: 0x17 (23) model-id: 0x60 (96) stepping: 1 microcode: 0x8600103
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 8 MiB
    desc: 2x4 MiB
  Speed (MHz): avg: 1396 high: 1404 min/max: 1400/2100 boost: enabled
    scaling: driver: acpi-cpufreq governor: ondemand cores: 1: 1397 2: 1396
    3: 1397 4: 1397 5: 1397 6: 1396 7: 1397 8: 1397 9: 1396 10: 1387 11: 1404
    12: 1395 bogomips: 50321
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cppc cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid
    f16c flushbyasid fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibrs ibs
    irperf lahf_lm lbrv lm mba mca mce misalignsse mmx mmxext monitor movbe
    msr mtrr mwaitx nonstop_tsc nopl npt nrip_save nx osvw overflow_recov pae
    pat pausefilter pclmulqdq pdpe1gb perfctr_core perfctr_llc perfctr_nb
    pfthreshold pge pni popcnt pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a
    rdtscp rep_good sep sha_ni skinit smap smca smep ssbd sse sse2 sse4_1
    sse4_2 sse4a ssse3 stibp succor svm svm_lock syscall tce topoext tsc
    tsc_scale umip v_spec_ctrl v_vmsave_vmload vgif vmcb_clean vme vmmcall
    wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel arch: GCN 5.1
    process: TSMC n7 (7nm) built: 2018-21 pcie: gen: 4 speed: 16 GT/s lanes: 16
    ports: active: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 04:00.0
    chip-ID: 1002:1636 class-ID: 0300
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-3:2 chip-ID: 04f2:b725 class-ID: fe01 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.2
    compositor: kwin_wayland driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A modes: N/A
  OpenGL: renderer: AMD RENOIR (LLVM 13.0.1 DRM 3.46 5.18.7-1-MANJARO)
    v: 4.6 Mesa 22.1.2 direct render: Yes
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 04:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
    alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x,
    snd_acp_pci, snd_sof_amd_renoir
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 04:00.5 chip-ID: 1022:15e2
    class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 04:00.6
    chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.18.7-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.52 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8168 v: 8.049.02-NAPI modules: r8169 pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
    vendor: Lenovo driver: rtw89_8852ae v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8852 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 3-4:3 chip-ID: 0bda:4852 class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 238.47 GiB used: 126.52 GiB (53.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba
    model: KBG40ZNT256G MEMORY size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 0109AELA temp: 29.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 238.17 GiB size: 233.38 GiB (97.99%)
    used: 126.52 GiB (54.2%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: N/A uuid: 9e40985b-cd55-40b5-8a42-ce29331d84a2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: NO_LABEL uuid: 15F1-0E6A
Swap:
  Alert: No swap data was found.
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:2 info: Chicony Integrated Camera type: Video
    driver: uvcvideo interfaces: 3 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 04f2:b725 class-ID: fe01 serial: <filter>
  Hub-2: 2-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-3:2 info: Shenzhen Goodix FingerPrint Device
    type: <vendor specific> driver: N/A interfaces: 1 rev: 2.0 speed: 480 Mb/s
    power: 100mA chip-ID: 27c6:55a4 class-ID: ef00
  Device-2: 3-4:3 info: Realtek Bluetooth Radio type: Bluetooth
    driver: btusb interfaces: 2 rev: 1.0 speed: 12 Mb/s power: 500mA
    chip-ID: 0bda:4852 class-ID: e001 serial: <filter>
  Hub-4: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 43.0 C mobo: N/A gpu: amdgpu temp: 43.0 C
  Fan Speeds (RPM): fan-1: 1800 fan-2: 1800
Info:
  Processes: 282 Uptime: 0m wakeups: 1 Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 clang: 13.0.1 Packages: pacman: 1342
  lib: 366 Shell: Bash v: 5.1.16 running-in: konsole inxi: 3.3.19

you can boot on USB live iso Manjaro
open a terminal and a browser on this topic
and return

inxi -Fza
sudo manjaro-chroot -a
pacman-mirrors -c all
pacman -Syyu
exit ( end-chroot ) 

then you can reboot

Why do I have to boot a USB install? My Manjaro is still bootable, I just can’t update grub.

Why would writing a file crash manjaro? There has to be something else going on. You changed/modified/installed/removed/edited one or multiple things.

Does sudo grub-mkconfig print config into terminal?

There are how-tos on this very forum how to provide basic info, search for them.

grub-mkconfig crashes Manjaro the same way update-grub does.

Well, the only thing I can think of is something wrong with os-prober and/or you have something weird installed/configured.

Post output of:

pacman -Qm
cat /etc/default/grub

Try disabling os-prober in etc/defaut/grub.

update-grub is just calling grub-mkconfig. It’s always grub-mkconfig causing the problem.
What do you mean by crashing? Is your system going out of memory (check memory while that command is running)?

Yeah, I know. It was my suggestion - in case something funky was in /usr/bin/update-grub

Welcome to Manjaro! :smiling_face_with_three_hearts:

  1. Please read the information behind this link. It will help you to post necessary information. [HowTo] Provide System Information
  2. Please press the three dots below your post and then press the :pencil2:
  • If you give us information about your system, we can see what we’re talking about and make better suggestions.
  • You can do this by using inxi in a terminal or in console.
inxi --admin --verbosity=7 --filter --no-host --width
  • Personally identifiable information such as serial numbers and MAC addresses are filtered out by this command
  • Presenting the information in this way allows everyone to be familiar with the format and quickly find the items they need without missing anything.
  1. Copy the output from inxi (including the command) and paste it into your post.
  • To make it more readable, add 3 backticks ``` on an extra line before and after the pasted text.