Help repairing grub on encrypted drive

Shortly after the latest update, I got a “harddrive not installed” message at boot. After rebooting, the usual Attempt to encrypt master key, Enter passphrase appeared, I enter the password and Slot 0 opened, so password was okay, followed by error: symbol grub_calloc not found. Entering rescue mode...

So I booted a live manjaro and tried to repair grub, but it won’t work:

sudo cryptsetup open /dev/nvme0n1p2 whatever
Enter passphrase for /dev/nvme0n1p2:

sudo manjaro-chroot -a                                                                                                                     
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> ERROR: No Linux partitions detected!

sudo mount /dev/mapper/whatever /mnt

manjaro-chroot /mnt
                                                                                                                   
sh-5.2# update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.12-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.12-x86_64.img
Found initrd fallback image: /boot/initramfs-6.12-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.6-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

sda1 is the flash disk of the live manjaro.
nvme0n1p1 is boot/esp
nvme0n1p2 is manjaro
nvme0n1p3 is linux-swap

Please help.

According to your sequence of events, you forgot to mount nvme0n1p1 to /boot before you entered chroot.


update-grub does not reinstall Grub -
it just updates the grub configuration file /boot/grub/grub.cfg

1 Like

Okay, so I tried

sudo mkdir /mnt/myos
sudo mkdir /mnt/myesp
sudo cryptsetup open /dev/nvme0n1p2 whatever
sudo mount /dev/mapper/whatever /mnt/myos
sudo mount /dev/nvme0n1p1 /mnt/myesp
sudo manjaro-chroot /mnt/myos
sudo grub-install --target=x86_64-efi --efi-directory=/mnt/myesp

but there was this error:
grub-install: error: failed to get canonical path of /mnt/myesp/'.`

  • you open the container
  • you mount the / file system (which is then available under /dev/mapper/whatever) to /mnt
  • you then, afterwards, mount the nvme0n1p1 - which contains your /boot
    to /mnt/boot
    so that the contents of /boot are where they are supposed to be

sudo mount /dev/mapper/whatever /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot

then chroot

and then you can start repairing, updating, whatever

Inside chroot there is no need for sudo …

Thanks, my error was using --efi-directory=/mnt/boot while inside chroot, it becomes /boot obviously.

sudo cryptsetup open /dev/nvme0n1p2 whatever
sudo mount /dev/mapper/whatever /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot
sudo manjaro-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot

Installation finished. No error reported.
But after reboot, I am not even getting the Attempt to encrypt master key, Enter passphrase anymore. Instead, it’s just:

GNU GRUB version 2.12-3
Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions. To enable less(1)-like paging, "set pager=1".
grub>_

Perhaps I should have used --recheck? No, did not change anything.

We would need to see the actual layout of your partitions.

The Calamares installer puts everything inside the encrypted container.
There is (normally) no unencrypted /boot - your

would be non standard

I didn’t notice that fact because that is what I have done, so it didn’t stand out as unusual to me at first.

Dual boot maybe? Is this the Windows ESP?


lsblk -f
once before decrypting the container
and once after

and /etc/fstab

and inxi -zv8
(before you enter chroot)

When in chroot - run a full system update
pacman -Syu

Have you “messed” with .pacnew files?
/etc/mkinitcpio.conf
for example?

Is the “encrypt” hook in there?

Rebuild the initrd(s)
mkinitcpio -P
update-grub

I do not know whether your grub reinstall command was correct - or even needed.
or if it has caused more damage than good …

There are wikis and howtos here on the forum about that - look them up.

this sounds more like a hardware issue - not like something caused by updates

1 Like

before decrypting

lsblk -f
NAME      FSTYPE      FSVER          LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0     squashfs    4.0                                                                         0   100% /run/miso/sfs/livefs
loop1     squashfs    4.0                                                                         0   100% /run/miso/sfs/mhwdfs
loop2     squashfs    4.0                                                                         0   100% /run/miso/sfs/desktopfs
loop3     squashfs    4.0                                                                         0   100% /run/miso/sfs/rootfs
sda       iso9660     Joliet Extensi MANJARO_XFCE_2421 2024-12-16-11-22-45-00                     0   100% /run/miso/bootmnt
├─sda1    iso9660     Joliet Extensi MANJARO_XFCE_2421 2024-12-16-11-22-45-00                              
└─sda2    vfat        FAT12          MISO_EFI          redacted                                           
nvme0n1                                                                                                    
├─nvme0n1p1
│         vfat        FAT32                            redacted                                           
├─nvme0n1p2
│         crypto_LUKS 1                                redacted                
└─nvme0n1p3
          crypto_LUKS 1                                redacted

after decrypting:


lsblk -f
NAME         FSTYPE      FSVER            LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0        squashfs    4.0                                                                           0   100% /run/miso/sfs/livefs
loop1        squashfs    4.0                                                                           0   100% /run/miso/sfs/mhwdfs
loop2        squashfs    4.0                                                                           0   100% /run/miso/sfs/desktopfs
loop3        squashfs    4.0                                                                           0   100% /run/miso/sfs/rootfs
sda          iso9660     Joliet Extension MANJARO_XFCE_2421 2024-12-16-11-22-45-00                     0   100% /run/miso/bootmnt
├─sda1       iso9660     Joliet Extension MANJARO_XFCE_2421 2024-12-16-11-22-45-00                              
└─sda2       vfat        FAT12            MISO_EFI          redacted                                           
nvme0n1                                                                                                         
├─nvme0n1p1  vfat        FAT32                              redacted                                           
├─nvme0n1p2  crypto_LUKS 1                                  redacted                
│ └─whatever ext4        1.0                                redacted                
└─nvme0n1p3  crypto_LUKS 1                                  redacted
#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
/dev/mapper/root-image /             auto      defaults           0      0
inxi -zv8                                                                                                                             
System:
  Kernel: 6.12.4-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=us
    tz=UTC misobasedir=manjaro misolabel=MANJARO_XFCE_2421 quiet
    systemd.show_status=1 splash apparmor=1 security=apparmor driver=free
    nouveau.modeset=1 i915.modeset=1 radeon.modeset=1
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.43 wm: xfwm4 v: 4.18.0
    with: xfce4-panel tools: xfce4-screensaver vt: 7 dm: LightDM v: 1.32.0
    Distro: Manjaro base: Arch Linux
Machine:
  Type: Laptop System: Dell product: XPS 13 9350 v: N/A
    serial: <superuser required> Chassis: type: 9 serial: <superuser required>
  Mobo: Dell model: 07TYC2 v: A01 serial: <superuser required> part-nu: 0704
    uuid: <superuser required> UEFI: Dell v: 1.13.0 date: 02/10/2020
Battery:
  ID-1: BAT0 charge: 22.9 Wh (67.6%) condition: 33.9/57.5 Wh (58.9%)
    volts: 7.5 min: 7.6 model: SMP DELL JHXPY53 type: Li-poly serial: <filter>
    status: discharging
Memory:
  System RAM: total: 8 GiB available: 7.6 GiB used: 2.25 GiB (29.6%)
  Message: For most reliable report, use superuser + dmidecode.
  Array-1: capacity: 16 GiB slots: 2 modules: 2 EC: None
    max-module-size: 8 GiB note: est.
  Device-1: System Board Memory type: LPDDR3 detail: synchronous size: 4 GiB
    speed: 1867 MT/s volts: curr: 1 width (bits): data: 64 total: 64
    manufacturer: SK Hynix part-no: H9CCNNNBJTMLAR-NUD serial: <filter>
  Device-2: System Board Memory type: LPDDR3 detail: synchronous size: 4 GiB
    speed: 1867 MT/s volts: curr: 1 width (bits): data: 64 total: 64
    manufacturer: SK Hynix part-no: H9CCNNNBJTMLAR-NUD serial: <filter>
PCI Slots:
  Permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i5-6200U bits: 64 type: MT MCP arch: Skylake
    gen: core 6 level: v3 note: check built: 2015 process: Intel 14nm family: 6
    model-id: 0x4E (78) stepping: 3 microcode: 0xF0
  Topology: cpus: 1x dies: 1 clusters: 2 cores: 2 threads: 4 tpc: 2
    smt: enabled cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB
    desc: 2x256 KiB L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 739 min/max: 400/2800 scaling: driver: intel_pstate
    governor: powersave cores: 1: 739 2: 739 3: 739 4: 739 bogomips: 19204
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida
    intel_pt invpcid lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr
    mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge
    pln pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep
    smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2
    tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic
    xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: KVM: Split huge pages
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow 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: IBRS; IBPB: conditional; STIBP: conditional;
    RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Dell driver: i915
    v: kernel arch: Gen-9 process: Intel 14n built: 2015-16 ports: active: eDP-1
    empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:1916
    class-ID: 0300
  Device-2: Microdia Integrated Webcam HD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-5:4 chip-ID: 0c45:670c
    class-ID: 0e02
  Display: x11 server: X.org v: 1.21.1.14 compositor: xfwm4 v: 4.18.0
    driver: X: loaded: modesetting alternate: fbdev,vesa dri: iris gpu: i915
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1600x900 s-size: <missing: xdpyinfo>
  Monitor-1: eDP-1 model: Sharp 0x1421 built: 2014 res: 1600x900 hz: 60
    dpi: 138 gamma: 1.2 chroma: red: x: 0.639 y: 0.329 green: x: 0.298 y: 0.600
    blue: x: 0.149 y: 0.059 white: x: 0.314 y: 0.329
    size: 294x165mm (11.57x6.5") diag: 337mm (13.3") ratio: 16:9
    modes: 3200x1800
  EDID-Warnings: 1: parse_edid: unknown flag 0
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast gbm: drv: iris surfaceless: drv: iris x11: drv: iris
    inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.2.8-arch1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 520 (SKL GT2)
    device-ID: 8086:1916 memory: 3.71 GiB unified: yes
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel
    v: kernel alternate: snd_soc_avs bus-ID: 00:1f.3 chip-ID: 8086:9d70
    class-ID: 0403
  API: ALSA v: k6.12.4-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Broadcom BCM4350 802.11ac Wireless Network Adapter vendor: Dell
    driver: brcmfmac v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    bus-ID: 3a:00.0 chip-ID: 14e4:43a3 class-ID: 0280
  IF: wlp58s0 state: down mac: <filter>
  Device-2: ASIX AX88179 Gigabit Ethernet driver: ax88179_178a type: USB
    rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-2.1:4
    chip-ID: 0b95:1790 class-ID: ff00 serial: <filter>
  IF: enp0s20f0u2u1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
  WAN IP: <filter>
Bluetooth:
  Device-1: Broadcom BCM2045A0 driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-3:2 chip-ID: 0a5c:6412
    class-ID: fe01 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
  Device-1: whatever maj-min: 254:0 type: LUKS dm: dm-0 size: 229.38 GiB
  Components:
  p-1: nvme0n1p2 maj-min: 259:2 size: 229.38 GiB
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 298.1 GiB used: 0 KiB (0.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: PM951 NVMe 256GB
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: BXV77D0Q temp: 32.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Kingston model: DataTraveler size: 59.63 GiB
    block-size: physical: 512 B logical: 512 B type: USB rev: 3.0 spd: 5 Gb/s
    lanes: 1 mode: 3.2 gen-1x1 tech: N/A serial: <filter> fw-rev: 0001
    scheme: MBR
  Message: No optical or floppy data found.
Partition:
  Message: No partition data found.
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/dm-0 maj-min: 254:0 mapped: whatever size: 229.38 GiB fs: ext4
    label: N/A uuid: redacted
  ID-2: /dev/nvme0n1p1 maj-min: 259:1 size: 300 MiB fs: vfat label: N/A
    uuid: redacted
  ID-3: /dev/sda1 maj-min: 8:1 size: 3.63 GiB fs: iso9660
  ID-4: /dev/sda2 maj-min: 8:2 size: 4 MiB fs: vfat label: MISO_EFI
    uuid: redacted
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: redacted
    class-ID: 0900
  Hub-2: 1-2:5 info: VIA Labs VL812 Hub ports: 4 rev: 2.1
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: redacted
    class-ID: redacted
  Device-1: 1-3:2 info: Broadcom BCM2045A0 type: Bluetooth driver: btusb
    interfaces: 4 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1
    chip-ID: redacted class-ID: redacted serial: <filter>
  Device-2: 1-4:3 info: Elan Micro Touchscreen type: HID
    driver: hid-multitouch,usbhid interfaces: 1 rev: 2.0
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 100mA
    chip-ID: redacted class-ID: redacted
  Device-3: 1-5:4 info: Microdia Integrated Webcam HD type: video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s (57.2 MiB/s)
    lanes: 1 mode: 2.0 power: 500mA chip-ID: redacted class-ID: redacted
  Hub-3: 2-0:1 info: super-speed hub ports: 6 rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: redacted
    class-ID: redacted
  Device-1: 2-1:2 info: Kingston DataTraveler Flash Drive type: mass storage
    driver: usb-storage interfaces: 1 rev: 3.0 speed: 5 Gb/s (596.0 MiB/s)
    lanes: 1 mode: 3.2 gen-1x1 power: 400mA chip-ID: redacted class-ID: redacted
    serial: <filter>
  Hub-4: 2-2:3 info: VIA Labs VL812 Hub ports: 4 rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: redacted
    class-ID: redacted
  Device-1: 2-2.1:4 info: ASIX AX88179 Gigabit Ethernet type: Network
    driver: ax88179_178a interfaces: 1 rev: 3.0 speed: 5 Gb/s (596.0 MiB/s)
    lanes: 1 mode: 3.2 gen-1x1 power: 496mA chip-ID: redacted class-ID: redacted
    serial: <filter>
Sensors:
  System Temperatures: cpu: 45.0 C pch: 36.5 C mobo: 35.0 C sodimm: SODIMM C
  Fan Speeds (rpm): cpu: 0
Repos:
  Packages: pm: pacman pkgs: 1117 libs: 323 tools: pamac pm: flatpak pkgs: 0
  Active pacman repo servers in: /etc/pacman.d/mirrorlist
    1: https://mnvoip.mm.fcix.net/manjaro/stable/$repo/$arch
    2: https://mirrors.ucr.ac.cr/manjaro/stable/$repo/$arch
    3: https://edgeuno-bog2.mm.fcix.net/manjaro/stable/$repo/$arch
    4: https://mirror.bardia.tech/manjaro/stable/$repo/$arch
    5: https://mirror.xenyth.net/manjaro/stable/$repo/$arch
    6: https://mirror.csclub.uwaterloo.ca/manjaro/stable/$repo/$arch
    7: https://codingflyboy.mm.fcix.net/manjaro/stable/$repo/$arch
    8: https://mirror.raiolanetworks.com/manjaro/stable/$repo/$arch
    9: https://mirrors.manjaro.org/repo/stable/$repo/$arch
    10: https://mirrors.ustc.edu.cn/manjaro/stable/$repo/$arch
    11: https://ziply.mm.fcix.net/manjaro/stable/$repo/$arch
    12: http://mirror.fcix.net/manjaro/stable/$repo/$arch
    13: https://repo.ialab.dsu.edu/manjaro/stable/$repo/$arch
    14: https://irltoolkit.mm.fcix.net/manjaro/stable/$repo/$arch
    15: https://mirror.yandex.ru/mirrors/manjaro/stable/$repo/$arch
    16: https://mirror.math.princeton.edu/pub/manjaro/stable/$repo/$arch
    17: https://mirror.kamtv.ru/manjaro/stable/$repo/$arch
    18: https://mirrors.pku.edu.cn/manjaro/stable/$repo/$arch
    19: https://manjaro.mirror.garr.it/manjaro/stable/$repo/$arch
    20: http://free.nchc.org.tw/manjaro/stable/$repo/$arch
    21: https://ftp.psnc.pl/linux/manjaro/stable/$repo/$arch
    22: https://mirrors.nic.cz/manjaro/stable/$repo/$arch
    23: https://mirror.seahost.de/manjaro/stable/$repo/$arch
    24: https://mirrors.cicku.me/manjaro/stable/$repo/$arch
    25: https://manjaro.mirrors.lavatech.top/stable/$repo/$arch
    26: https://mirror.koddos.net/manjaro/stable/$repo/$arch
    27: https://mirror.dkm.cz/manjaro/stable/$repo/$arch
    28: https://manjaro.kurdy.org/stable/$repo/$arch
    29: https://gsl-syd.mm.fcix.net/manjaro/stable/$repo/$arch
    30: https://ftp.caliu.cat/pub/distribucions/manjaro/stable/$repo/$arch
    31: https://ftp.gwdg.de/pub/linux/manjaro/stable/$repo/$arch
    32: http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
    33: https://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch
    34: http://ossmirror.mycloud.services/os/linux/manjaro/stable/$repo/$arch
    35: http://ftp.dei.uc.pt/pub/linux/manjaro/stable/$repo/$arch
    36: https://mirror.2degrees.nz/manjaro/stable/$repo/$arch
    37: https://repo.iut.ac.ir/repo/manjaro/stable/$repo/$arch
    38: http://manjaro.grena.ge/stable/$repo/$arch
    39: https://nnenix.mm.fcix.net/manjaro/stable/$repo/$arch
    40: https://muug.ca/mirror/manjaro/stable/$repo/$arch
    41: https://volico.mm.fcix.net/manjaro/stable/$repo/$arch
    42: http://mirror.datacenter.by/pub/mirrors/manjaro/stable/$repo/$arch
    43: https://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
    44: https://ct.mirror.garr.it/mirrors/manjaro/stable/$repo/$arch
    45: http://mirror.is.co.za/mirrors/manjaro.org/stable/$repo/$arch
    46: https://mirrors2.manjaro.org/stable/$repo/$arch
    47: https://fastmirror.pp.ua/manjaro/stable/$repo/$arch
    48: http://manjaro.mirror.ac.za/stable/$repo/$arch
    49: https://manjaro.c3sl.ufpr.br/stable/$repo/$arch
    50: https://manjaro.mirror.liquidtelecom.com/stable/$repo/$arch
    51: https://mirror.nyist.edu.cn/manjaro/stable/$repo/$arch
    52: http://mirror.xeonbd.com/manjaro/stable/$repo/$arch
    53: http://ftp.riken.jp/Linux/manjaro/stable/$repo/$arch
    54: https://mirrors.ocf.berkeley.edu/manjaro/stable/$repo/$arch
    55: https://mirror.netcologne.de/manjaro/stable/$repo/$arch
    56: https://mirror.truenetwork.ru/manjaro/stable/$repo/$arch
    57: https://mirror.ufro.cl/manjaro/stable/$repo/$arch
    58: https://mirrors.netix.net/manjaro/stable/$repo/$arch
    59: https://ipng.mm.fcix.net/manjaro/stable/$repo/$arch
    60: https://ftpmirror1.infania.net/mirror/manjaro/stable/$repo/$arch
    61: http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/stable/$repo/$arch
    62: https://mirror.nju.edu.cn/manjaro/stable/$repo/$arch
    63: https://mirrors.xtom.de/manjaro/stable/$repo/$arch
    64: https://mirror.archlinux.tw/Manjaro/stable/$repo/$arch
    65: http://kartolo.sby.datautama.net.id/manjaro/stable/$repo/$arch
    66: https://mirrors.sonic.net/manjaro/stable/$repo/$arch
    67: https://mirror.phoepsilonix.love/manjaro/stable/$repo/$arch
    68: https://mirrors.gigenet.com/manjaro/stable/$repo/$arch
    69: https://opencolo.mm.fcix.net/manjaro/stable/$repo/$arch
    70: https://mirror.funami.tech/manjaro/stable/$repo/$arch
    71: https://manjarolinux-mirror.cloud.mu/stable/$repo/$arch
    72: http://ftp.free.org/mirrors/repo.manjaro.org/repos/stable/$repo/$arch
    73: https://mirror.leitecastro.com/manjaro/stable/$repo/$arch
    74: https://forksystems.mm.fcix.net/manjaro/stable/$repo/$arch
    75: https://manjaro.mirror.wearetriple.com/stable/$repo/$arch
    76: http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
    77: http://manjaro.mirrors.uk2.net/stable/$repo/$arch
    78: https://linorg.usp.br/manjaro/stable/$repo/$arch
    79: https://cofractal-ewr.mm.fcix.net/manjaro/stable/$repo/$arch
    80: https://mirror.alpix.eu/manjaro/stable/$repo/$arch
    81: https://mirror.ufam.edu.br/manjaro/stable/$repo/$arch
    82: https://mirror.dc.uz/manjaro/stable/$repo/$arch
    83: https://mirror.alwyzon.net/manjaro/stable/$repo/$arch
    84: http://ftp.belnet.be/mirrors/manjaro/repos/stable/$repo/$arch
    85: https://manjaro.ipacct.com/manjaro/stable/$repo/$arch
    86: https://ba.mirror.garr.it/mirrors/manjaro/stable/$repo/$arch
    87: https://repos.silknet.com/manjaro/stable/$repo/$arch
    88: https://mirror.kku.ac.th/manjaro/stable/$repo/$arch
    89: https://mirrors.aliyun.com/manjaro/stable/$repo/$arch
    90: https://nocix.mm.fcix.net/manjaro/stable/$repo/$arch
    91: https://mirror.ibakerserver.pt/manjaro/stable/$repo/$arch
    92: https://mirrors.jlu.edu.cn/manjaro/stable/$repo/$arch
    93: https://mirrors.up.pt/pub/manjaro/stable/$repo/$arch
    94: https://mirrors.dotsrc.org/manjaro/stable/$repo/$arch
    95: https://mirror.it4i.cz/manjaro/stable/$repo/$arch
    96: https://southfront.mm.fcix.net/manjaro/stable/$repo/$arch
    97: https://ftp.lysator.liu.se/pub/manjaro/stable/$repo/$arch
    98: https://mirror.futureweb.be/manjaro/stable/$repo/$arch
    99: https://bd.mirror.vanehost.com/Manjaro/stable/$repo/$arch
    100: https://ridgewireless.mm.fcix.net/manjaro/stable/$repo/$arch
    101: https://manjaro.repo.cure.edu.uy/stable/$repo/$arch
    102: https://mirror1.sox.rs/manjaro/stable/$repo/$arch
    103: https://ask4.mm.fcix.net/manjaro/stable/$repo/$arch
    104: https://mirrors.atlas.net.co/manjaro/stable/$repo/$arch
    105: https://coresite.mm.fcix.net/manjaro/stable/$repo/$arch
    106: https://mirrors.sjtug.sjtu.edu.cn/manjaro/stable/$repo/$arch
    107: https://uvermont.mm.fcix.net/manjaro/stable/$repo/$arch
    108: https://ftp.linux.org.tr/manjaro/stable/$repo/$arch
    109: http://mirror.terrahost.no/linux/manjaro/stable/$repo/$arch
    110: https://mirrors.piconets.webwerks.in/manjaro-mirror/stable/$repo/$arch
    111: https://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$arch
    112: https://mirror.23m.com/manjaro/stable/$repo/$arch
    113: http://ftp.snt.utwente.nl/pub/linux/manjaro/stable/$repo/$arch
    114: https://mirror.freedif.org/Manjaro/stable/$repo/$arch
    115: https://quantum-mirror.hu/mirrors/pub/manjaro/stable/$repo/$arch
    116: https://mirrors.xtom.ee/manjaro/stable/$repo/$arch
    117: https://ftp.cc.uoc.gr/mirrors/linux/manjaro/stable/$repo/$arch
    118: https://mirror.telepoint.bg/manjaro/stable/$repo/$arch
    119: http://ftp.uni-kl.de/pub/linux/manjaro/stable/$repo/$arch
    120: https://mirror.vinehost.net/manjaro/stable/$repo/$arch
    121: https://manjaro.ynh.ovh/stable/$repo/$arch
    122: https://mirrors.xtom.jp/manjaro/stable/$repo/$arch
    123: https://mirror.albony.xyz/manjaro/stable/$repo/$arch
    124: https://mirrors.ft.uam.es/manjaro/stable/$repo/$arch
    125: https://mirror.bouwhuis.network/manjaro/stable/$repo/$arch
    126: https://ohioix.mm.fcix.net/manjaro/stable/$repo/$arch
    127: https://mirror.zetup.net/manjaro/stable/$repo/$arch
    128: https://fosszone.csd.auth.gr/manjaro/stable/$repo/$arch
    129: https://mirror.init7.net/manjaro/stable/$repo/$arch
    130: https://mirror.aarnet.edu.au/pub/manjaro/stable/$repo/$arch
    131: https://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
    132: https://mirror.easyname.at/manjaro/stable/$repo/$arch
Processes:
  CPU top: 5 of 222
  1: cpu: 100% command: ps pid: 2960 mem: 3.50 MiB (0.0%)
  2: cpu: 11.0% command: firefox pid: 2104 mem: 425.8 MiB (5.4%)
  3: cpu: 5.1% command: firefox pid: 2332 mem: 223.5 MiB (2.8%)
  4: cpu: 4.3% command: Xorg pid: 1140 mem: 90.1 MiB (1.1%)
  5: cpu: 1.2% command: mousepad pid: 2701 mem: 59.0 MiB (0.7%)
  Memory top: 5 of 222
  1: mem: 425.8 MiB (5.4%) command: firefox pid: 2104 cpu: 11.0%
  2: mem: 223.5 MiB (2.8%) command: firefox pid: 2332 cpu: 5.1%
  3: mem: 135.1 MiB (1.7%) command: firefox pid: 2237 cpu: 0.3%
  4: mem: 95.8 MiB (1.2%) command: firefox pid: 2209 cpu: 0.1%
  5: mem: 90.1 MiB (1.1%) command: Xorg pid: 1140 cpu: 4.3%
Info:
  Processes: 222 Power: uptime: 15m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 3 GiB services: upowerd,xfce4-power-manager
    Init: systemd v: 256 default: graphical tool: systemctl
  Compilers: N/A Shell: Zsh v: 5.9 running-in: xfce4-terminal inxi: 3.3.36

The system was just updated, so pacman -Syu just downloaded the latest firefox.
Some months ago, I cleaned up some pacnew files that seemed comprehensible and left the ones I do not understand for sometimes far in the future.

The encrypt hook is present.

mkinitcpio -P does not look good or is that normal?

mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux519.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-5.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-x86_64.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-5.19-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux519.preset: 'fallback'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-5.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-x86_64-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-5.19-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux612.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.12-x86_64 -g /boot/initramfs-6.12-x86_64.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-6.12-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux612.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.12-x86_64 -g /boot/initramfs-6.12-x86_64-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-6.12-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux66.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.6-x86_64 -g /boot/initramfs-6.6-x86_64.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-6.6-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux66.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.6-x86_64 -g /boot/initramfs-6.6-x86_64-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-6.6-x86_64'

Yes, I am worried, but keeping my hopes up.

It has to do with the way you assembled the file system prior to entering chroot.

It looked like / you made it look like you had a separate unencrypted /boot partition.
But you don’t.

Yes, there is a vfat partition.
But this does not belong to your encrypted install.

What you did is attaching /dev/nvme0n1p1 to boot - because I said so.
But, of course, this doesn’t belong there -
and that is why no kernels where there and none of the initrd’s as well.

! now they are present - and it’s even more confusing …

Why you have that partition present is something you should know - I don’t.
It is not a part of your Manjaro installation.
From what I can see.
(if it would belong to your installation, it would be mentioned in /etc/fstab - but it isn’t …)

chroot procedure should only consist of

  • opening the container
  • sudo mount /dev/mapper/whatever /mnt (mounting it to /mnt)
  • sudo manjaro-chroot /mnt (chroot)

You did it right the first time - then I got confused by that partition on /dev/nvme0n1p1 and lead you astray.

Whilst not a subject of this topic, it deserves mentioning.

I strongly advise to do these essential system tasks whilst plugged in; that battery is on its last legs! I’ve had several fail completely (and suddenly) once the capacity dropped to around 50% of original.

1 Like

In nvme0n1p2, there is a folder “boot”, containing

efi   initramfs-6.12-x86_64-fallback.img  initramfs-6.6-x86_64-fallback.img  intel-ucode.img	   linux66-x86_64.kver	vmlinuz-6.12-x86_64
grub  initramfs-6.12-x86_64.img		  initramfs-6.6-x86_64.img	     linux612-x86_64.kver  memtest86+		vmlinuz-6.6-x86_64

but grub-install to that location does not work:

sudo cryptsetup open /dev/nvme0n1p2 whatever                                                                  
sudo mount /dev/mapper/whatever /mnt                                                                  sudo manjaro-chroot /mnt                                                                                       
sh-5.2# grub-install --target=x86_64-efi --efi-directory=boot
Installing for x86_64-efi platform.
grub-install: error: boot doesn't look like an EFI partition.

Although I don’t remember how I set it up, I assume it was set up with a boot partition. Why would a boot partition be non standard, I thought that is the default?

After that I tried it again

mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux519.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-5.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-x86_64.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-5.19-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux519.preset: 'fallback'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-5.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.19-x86_64-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-5.19-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux612.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.12-x86_64 -g /boot/initramfs-6.12-x86_64.img
==> Starting build: '6.12.12-2-MANJARO'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [encrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
  -> Running build hook: [openswap]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-6.12-x86_64.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux612.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.12-x86_64 -g /boot/initramfs-6.12-x86_64-fallback.img -S autodetect
==> Starting build: '6.12.12-2-MANJARO'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [encrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
  -> Running build hook: [openswap]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-6.12-x86_64-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux66.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.6-x86_64 -g /boot/initramfs-6.6-x86_64.img
==> Starting build: '6.6.75-2-MANJARO'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [encrypt]
  -> Running build hook: [openswap]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-6.6-x86_64.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux66.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-6.6-x86_64 -g /boot/initramfs-6.6-x86_64-fallback.img -S autodetect
==> Starting build: '6.6.75-2-MANJARO'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [encrypt]
  -> Running build hook: [openswap]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-6.6-x86_64-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
sh-5.2# update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.12-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.12-x86_64.img
Found initrd fallback image: /boot/initramfs-6.12-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.6-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Then I checked fstab again and this time it showed a boot partition. The last one I posted must have been the fstab of the live manjaro. Sorry, no idea what went wrong.

UUID=redacted                            /boot/efi      vfat    umask=0077 0 2
/dev/mapper/luks-redacted /              ext4    defaults,noatime 0 1
/dev/mapper/luks-redacted swap           swap    defaults,noatime 0 2

But grub-install (with --efi-directory=/boot) still fails like before.
Also tried
grub-install --target=x86_64-efi --efi-directory=/boot/efi
but that is worse, since it creates a new folder /boot/EFI/EFI.

I am still not getting the passphrase prompt at boot. What things need to be in place for this prompt - adding --modules=“luks” to the grub-install command did not help.

@BG405
Good to know, thanks for the warning!

1 Like

What a mess. :wink:

I have just done a standard encrypted installation in a VM.

This is what it looks like - what your installation should also look like:
lsblk -f
NAME                                   FSTYPE      FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sr0                                                                                                                
vda                                                                                                                
├─vda1                                 vfat        FAT32       2630-51D3                             298,9M     0% /boot/efi
└─vda2                                 crypto_LUKS 1           2aefff29-916e-47fe-959e-2213881b5487                
  └─luks-2aefff29-916e-47fe-959e-2213881b5487
                                       ext4        1.0         373ef7bb-ae65-4d7f-8f08-d7b429466940   26,1G    18% /

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=2630-51D3                            /boot/efi      vfat    defaults,umask=0077 0 2
/dev/mapper/luks-2aefff29-916e-47fe-959e-2213881b5487 /              ext4    defaults   0 1

What it means when compared to what you have:

Your /etc/fstab shows that the vfat partition /dev/nvme0n1p1 is part of the system and does need to be mounted before you chroot.

But not to /boot but to /boot/efi

(… why would you “redact” the UUIDs in your output? No matter - just make sure they match.)

The correct procedure to assemble the file system before you chroot into your system would therefore be:

sudo cryptsetup open /dev/nvme0n1p2 whatever
sudo mount /dev/mapper/whatever /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo manjaro-chroot /mnt

Then, see here for reinstall of grub (if necessary):

GRUB/Restore the GRUB Bootloader - Manjaro

the section about EFI system

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

grub-mkconfig -o /boot/grub/grub.cfg

Hopefully we finally solved the riddle. :slight_smile:

3 Likes

That’s it, thanks for your help!

1 Like

of course :slight_smile:

Good to know it helped you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.