Power outage during update

Did I brick my machine ?

I launched today’s update and had a power outage during process.

Now, it doesn’t boot and tell me the famous

error : file "boot/vmlinux-6.6.x86_64" unavailable

So I booted on a live USB and tried the sudo manjaro-chroot with the path of my broken system (witch is /dev/nvme1n1p1), but I get a can't change root on non-directory /dev/nvme1n1p1

Something I don’t get ?

Any help will be welcome

the command would normally be:
manjaro-chroot -a
(that will attempt to autodetect the correct partitions to mount and then chroot)

It didn’t work for you because
/dev/nvme1n1p1
isn’t a PATH - that is a device
It was simply a wrong command that had no hope of succeeding.

If autodetection doesn’t work for some reason, you mount the partitions yourself
to /mnt for example
and then issue
manjaro-chroot /mnt /bin/bash

That will chroot into the /mnt directory, where you mounted your system to
and start the bash shell

No.
It’s quite easily fixable.

If you would have given system info
inxi -Fazy
for example …
the information here could have been even more specific.

1 Like

Let’s go step by step if you agree, I’m on a live USB and sudo -i

#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.
==> Mounting (ManjaroLinux) [/dev/nvme1n1p1]
 --> mount: [/mnt]
 --> mount: [/mnt/home]
 --> mount: [/mnt/boot/efi]
 --> mount: [/mnt/home/diego/VM]
chroot: failed to run command '/bin/bash': Input/output error
 --> umount: [/mnt/home/diego/VM]
 --> umount: [/mnt/boot/efi]
 --> umount: [/mnt/home]
 --> umount: [/mnt]

I don’t get what I should manually mount from that

#lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0  67.8M  1 loop /run/miso/sfs/livefs
loop1         7:1    0   1.1G  1 loop /run/miso/sfs/mhwdfs
loop2         7:2    0   1.7G  1 loop /run/miso/sfs/desktopfs
loop3         7:3    0 653.7M  1 loop /run/miso/sfs/rootfs
sda           8:0    1   7.3G  0 disk /run/miso/bootmnt
├─sda1        8:1    1   3.6G  0 part 
└─sda2        8:2    1     4M  0 part 
nvme0n1     259:0    0 953.9G  0 disk 
└─nvme0n1p1 259:1    0 953.9G  0 part /run/media/manjaro/Home
nvme1n1     259:2    0 465.8G  0 disk 
├─nvme1n1p1 259:3    0 244.1G  0 part /run/media/manjaro/System
├─nvme1n1p2 259:4    0   125G  0 part 
├─nvme1n1p3 259:5    0   600M  0 part 
└─nvme1n1p4 259:6    0    96G  0 part /run/media/manjaro/VM

Here’s my inix

#inxi -Fazy                                                                                 127 ✘ 
System:
  Kernel: 6.1.30-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=fr_CH keytable=ch tz=UTC
    misobasedir=manjaro misolabel=MANJARO_KDE_2213 quiet systemd.show_status=1
    splash driver=free nouveau.modeset=1 i915.modeset=1 radeon.modeset=1
  Desktop: KDE Plasma v: 5.27.4 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20TH000XMZ v: ThinkPad P1 Gen 3
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20TH000XMZ v: SDK0J40697 WIN
    serial: <superuser required> UEFI: LENOVO v: N2VET45W (1.30 )
    date: 08/29/2023
Battery:
  ID-1: BAT0 charge: 20.3 Wh (26.8%) condition: 75.7/80.0 Wh (94.7%)
    volts: 15.6 min: 15.4 model: Celxpert 5B10X19050 type: Li-poly
    serial: <filter> status: charging cycles: 57
CPU:
  Info: model: Intel Core i7-10750H bits: 64 type: MT MCP arch: Comet Lake
    gen: core 10 level: v3 note: check built: 2020 process: Intel 14nm family: 6
    model-id: 0xA5 (165) stepping: 2 microcode: 0xF8
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 2043 high: 2600 min/max: 800/5000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 974 2: 2600 3: 2600
    4: 2600 5: 2600 6: 1110 7: 2600 8: 2600 9: 2600 10: 843 11: 2600 12: 800
    bogomips: 62431
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  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: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU117GLM [Quadro T1000 Mobile] vendor: Lenovo
    driver: nouveau v: kernel non-free: 530.xx+ status: current (as of 2023-05)
    arch: Turing code: TUxxx process: TSMC 12nm FF built: 2018-22 pcie: gen: 1
    speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s ports:
    active: eDP-1 empty: DP-1,DP-2,HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:1fb9
    class-ID: 0300 temp: 37.0 C
  Device-2: IMC Networks Integrated Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-8:3 chip-ID: 13d3:5405
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: nouveau gpu: nouveau display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x150c built: 2018 res: 1920x1080
    hz: 60 dpi: 142 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: max: 1920x1080 min: 800x600
  API: OpenGL v: 4.3 Mesa 23.0.3 renderer: NV167 direct-render: Yes
Audio:
  Device-1: Intel Comet Lake PCH cAVS vendor: Lenovo
    driver: sof-audio-pci-intel-cnl alternate: snd_hda_intel, snd_soc_skl,
    snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:06c8 class-ID: 0401
  Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s
    bus-ID: 01:00.1 chip-ID: 10de:10fa class-ID: 0403
  API: ALSA v: k6.1.30-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: 0.3.70 status: off with: wireplumber status: active
    tools: pw-cli,wpctl
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:06f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:5 chip-ID: 8087:0026
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Drives:
  Local Storage: total: 1.4 TiB used: 635.88 GiB (44.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPEKNW010T8
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 002C temp: 30.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:2 vendor: Samsung
    model: SSD 970 EVO Plus 500GB size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 2B2QEXM7 temp: 41.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Kingston model: DataTraveler 2.0
    size: 7.27 GiB block-size: physical: 512 B logical: 512 B type: USB rev: 2.0
    spd: 480 Mb/s lanes: 1 mode: 2.0 tech: N/A serial: <filter> fw-rev: PMAP
    scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
  ID-4: /dev/sdb maj-min: 8:16 model: USB 2.0 Flash Disk size: 3.75 GiB
    block-size: physical: 512 B logical: 512 B type: USB rev: 2.0 spd: 480 Mb/s
    lanes: 1 mode: 2.0 tech: SSD serial: <filter> fw-rev: PMAP scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  Message: No partition data found.
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 49.0 C pch: 55.0 C mobo: N/A gpu: nouveau
    temp: 37.0 C
  Fan Speeds (RPM): fan-1: 2587 fan-2: 2372
Info:
  Processes: 298 Uptime: 22m wakeups: 6 Memory: available: 62.54 GiB
  used: 2.59 GiB (4.1%) Init: systemd v: 252 default: graphical tool: systemctl
  Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman pkgs: 1211
  libs: 330 tools: pamac pm: flatpak pkgs: 0 Shell: Zsh v: 5.9 default: Bash
  v: 5.1.16 running-in: konsole inxi: 3.3.27

Since chroot isn’t working, your system info’s are the wrong one’s because its from the liveboot, instead the Install.

Its recommend that you using a Iso that isn’t this old… Because of Plasma 5 and Kernel 6.1 (even when its LTS) this version is aged.

ok, managed to mount /dev/nvme1n1p1 on /mnt/sys and tried this:

#manjaro-chroot /mnt/sys
chroot: failed to run command '/bin/sh': Input/output error

Yep, indeed …

bad

to manually mount a chroot - you need to know the root partition

I assume /dev/nvme1n1p1 is the root partition

And the error message point to a severe filesystem error where files has been corrupted

from the lsblk output it looks like you have mounted the partitions in a file manager.

I suggest you unmount them all

umount -R /run/media/manjaro

unmount that as well

You will need to run a file systemcheck on the root partition and that can only be done after you unmount the device - use the -y argument to repair errors automagically

fsck /dev/nvmen1p1 -y

Let me know what the outcome is

1 Like
sudo fsck /dev/nvme1n1p1 -y                                                                  8 ✘ 
fsck from util-linux 2.40.2
e2fsck 1.47.1 (20-May-2024)
System contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Orphan file (inode 12) block 13 is not clean.
Clear? yes


System: ***** FILE SYSTEM WAS MODIFIED *****
System: 689763/16007168 files (0.2% non-contiguous), 14940840/64000000 blocks

It looks like it was not as bad as I thought.

Now I want you to mount the partition on /mnt - no other partitions mount - not on any subfolder - just /mnt.

mount /dev/nvmen1p1 /mnt

Just one more test with chroot - to deduce what’s next

chroot /mnt /bin/bash
sudo mount /dev/nvme1n1p1 /mnt                                                                 ✔ 
sudo chroot /mnt /bin/bash                                                                     ✔ 
chroot: failed to run command ‘/bin/bash’: Input/output error

That is not good

pacman has some switches that can make it work in alternate ways and we are going to do that to ensure we have valid versions of sh and bash

switch to root context

su -l root

Then

pacman -Syy --sysroot --root /mnt bash sh
sudo chroot /mnt /bin/bash

@linux-aarhus
perhaps /bin/zsh is still in working condition - it seems to be a Plasma system where this shell is available
or just /bin/sh

… don’t forget to mount /boot too

[manjaro ~]# pacman -Syy --sysroot --root /mnt bash sh
erreur : le fichier --root/etc/pacman.conf ne peut pas être lu : Aucun fichier ou dossier de ce nom

That is strange - I thought the parttition was your root partition?

What size is your root partition ?

What is the content of /mnt

ls /mnt

What is the output of

lsblk -f

Deducing from the above - since the partition we have mounted does not contain the file /etc/pacman.conf there is another candidate /dev/nvme1n1p2 for a root file system.

Run a filesystem check on that partition as well

fsck /dev/nvme1n1p2 -y
1 Like

I just moved the mount on /mnt/sys, but that’s what’s in:

[manjaro ~]# ls -l /mnt/sys
total 112
lrwxrwxrwx   1 root root     7  8 avr 15:26 bin -> usr/bin
drwxr-xr-x   5 root root  4096  8 aoû 10:15 boot
-rw-r--r--   1 root root 22826 29 mai  2023 desktopfs-pkgs.txt
drwxr-xr-x   2 root root  4096 19 jui  2023 dev
drwxr-xr-x 129 root root 12288  8 aoû 10:15 etc
drwxr-xr-x   2 root root  4096 19 jui  2023 home
lrwxrwxrwx   1 root root     7  8 avr 15:26 lib -> usr/lib
lrwxrwxrwx   1 root root     7  8 avr 15:26 lib64 -> usr/lib
drwx------   2 root root 16384 19 jui  2023 lost+found
drwxr-xr-x   3 root root  4096 20 jui  2023 mnt
drwxr-xr-x   7 root root  4096 31 jui 15:20 opt
drwxr-xr-x   2 root root  4096 19 jui  2023 proc
drwxr-x---   7 root root  4096 20 jui 08:15 root
-rw-r--r--   1 root root  5318 29 mai  2023 rootfs-pkgs.txt
drwxr-xr-x   2 root root  4096 19 jui  2023 run
lrwxrwxrwx   1 root root     7  8 avr 15:26 sbin -> usr/bin
drwxr-xr-x   5 root root  4096 22 jui  2023 srv
drwxr-xr-x   2 root root  4096 19 jui  2023 sys
drwxrwxrwt   2 root root  4096 19 jui  2023 tmp
drwxr-xr-x  10 root root  4096  7 aoû 06:48 usr
drwxr-xr-x  14 root root  4096  2 aoû 10:06 var
lsblk -f
NAME       FSTYPE FSVER   LABEL            UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0      squash 4.0                                                                 0   100% /run/miso/sfs/livefs
loop1      squash 4.0                                                                 0   100% /run/miso/sfs/mhwdfs
loop2      squash 4.0                                                                 0   100% /run/miso/sfs/desktopfs
loop3      squash 4.0                                                                 0   100% /run/miso/sfs/rootfs
sda        iso966 Joliet  MANJARO_KDE_2405 2024-07-30-08-30-25-00                     0   100% /run/miso/bootmnt
├─sda1     iso966 Joliet  MANJARO_KDE_2405 2024-07-30-08-30-25-00                              
└─sda2     vfat   FAT12   MISO_EFI         0DE6-E8D4                                           
nvme0n1                                                                                        
└─nvme0n1p1
           ext4   1.0     Home             780f7a6e-f521-4bd2-86e1-eaaefe2d49ca                
nvme1n1                                                                                        
├─nvme1n1p1
│          ext4   1.0     System           9007dd44-0f45-4e87-9b08-0f5683791833  174.9G    22% /mnt/sys
├─nvme1n1p2
│          swap   1       Swap             a492060d-ca46-4059-85c0-d0e430155978                
├─nvme1n1p3
│          vfat   FAT32   EFI              BBCC-445E                                           
└─nvme1n1p4
           ext4   1.0     VM               4cbe7ad7-1b68-4945-8646-40f4b0a7bad2 

nvme1n1p2 is swap

125G swap ?

My swap is 69G so OK - I was just surprised :slight_smile:

:shushing_face: I’m an old man, born when RAM was expensive

don’t tell - I have seen expensive ram too :shushing_face: an old man too …

There is a folder /etc in the root - so let’s list the content of /mnt/sys/etc/pacman

Then we try another approach - again assuming you are in a root context - I prepend commands with # - I accept your root is mount /mnt/sys - so I will use that path

 # pacman -S --root /mnt/sys --cache-dir /mnt/sys/var/cache/pacman/pkg - < /mnt/sys/rootfs-pkgs.txt
[manjaro ~]# sudo chroot /mnt/sys /bin/zsh
chroot: impossible d'exécuter la commande « /bin/zsh »: Input/output error
[manjaro ~]# sudo chroot /mnt/sys /bin/sh
chroot: impossible d'exécuter la commande « /bin/sh »: Input/output error

/boot is in /

it looked different from your second post

but I will shut up now and not interfere with @linux-aarhus