No pacman feedback after interrupted update

My system hard crashed during an update and I had to do the usual recovery steps with the recovery usb stick.

However, now after recovery several packages and functionalities dont work.

Pacman -S returns empty to command prompt, same for fdisk, yay and thunderbird.

Please check if your filesystem is damaged. (Or do a rollback with timeshift)

Hi @raycoms,

I suspect you’ll have to chroot into your installation and run a complete update again to re-sync your system.

How to chroot

  1. Ensure you’ve got a relatively new ISO or at least one with a still supported LTS kernel.

  2. Write/copy/dd the ISO to a USB thumb drive.

  3. When done, boot with the above mentioned USB thumb drive into the live environment.

  4. Once booted, open a terminal and enter the following command to enter the chroot encironment:

manjaro-chroot -a
  1. If you have more than one Linux installation, select the correct one to use from the list provided.

When done, you should now be in the chroot environment.

But, be careful, as you’re now in an actual root environment on your computer, so any changes you make will persist after a restart.

Once you are in the chroot environment, you need to update/sync again.

Full update command

pamac upgrade && pamac upgrade --aur --devel || echo -e '\033[0;91mThere was an error upgrading the system. AUR packages not upgraded.\e[0m'

This will update your system and ONLY if that was successful update any AUR packages.

a Reminder: While use of the AUR is possible, it’s neither recommended nor supported.

I recommend pamac instead of pacman, especially for newcomers as pamac was developed by Manajaro (developers) for Manjaro and just takes care of more thing than pacman. For example:

Hope this helps!

I get

"System has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is down
"

When trying that pamac command

    ~  sudo manjaro-chroot -a                                                                                                                                                                                                                                                                        125 ✘  4m 25s  
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/nvme0n1p2]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]

Output from chroot

I’ve used it, tested it personally and know it works, it has for many people here, on the forum. So either:

  1. There is something bigger wrong than originally thought. In which case, do as @andreas85 advised; or
  2. you accidentally typed something else in front of the pamac part. So just double-check everything.

Either way, I’m off for the day, my day’s ending here, but perhaps someone else can help.

Edit:

This looks fine, so go from there.

fsck does not report any issues with the file-system

sudo fsck /dev/nvme0n1p2                                                                                                                                                                                                                                                                                   8 ✘ 
fsck from util-linux 2.39.3
e2fsck 1.47.0 (5-Feb-2023)
/dev/nvme0n1p2: clean, 4761189/61923328 files, 179012169/247665537 blocks

nvm, with the full one:

sudo fsck -p /dev/nvme0n1                                                                                                                                                                                                                                                                                  8 ✘ 
fsck from util-linux 2.39.3
fsck.ext2: Bad magic number in super-block while trying to open /dev/nvme0n1
/dev/nvme0n1: 
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

/dev/nvme0n1 contains `DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 2000409263 sectors, extended partition table (last)' data                                                                                                                                                                              

Nevermind again. Thats not a valid section anyway =D

You mean pacman -Syyu ?

Normal would be:

sudo pacman -S
[sudo] Passwort für andreas: 
Fehler: Keine Ziel-Dateien angegeben (benutzen Sie -h für Hilfe)

Empty is not good.

I think your installation seems to be missing a lot of files (may be especially libraries)
Maybe they have size==0 (But i could be wrong) :footprints:

Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: Micron_2450_MTFDKBA1T0TFK               
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
Disk identifier: 3D8B2E63-3ECB-8E43-ABFC-3E44335D9EEE

Device              Start        End    Sectors   Size Type
/dev/nvme0n1p1       4096     618495     614400   300M EFI System
/dev/nvme0n1p2     618496 1981942796 1981324301 944.8G Linux filesystem
/dev/nvme0n1p3 1981942797 2000397734   18454938   8.8G Linux swap


Disk /dev/sda: 28.65 GiB, 30765219840 bytes, 60088320 sectors
Disk model:  SanDisk 3.2Gen1
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: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sda1  *         64 7635643 7635580  3.6G  0 Empty
/dev/sda2       7635644 7643835    8192    4M ef EFI (FAT-12/16/32)


Disk /dev/loop0: 80.61 MiB, 84529152 bytes, 165096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 1.05 GiB, 1125187584 bytes, 2197632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 1.69 GiB, 1809408000 bytes, 3534000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 764.58 MiB, 801718272 bytes, 1565856 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
    ~  fdisk -l                                                                                                                                                                                                                                                                                                     ✔ 
    ~  sudo fsck -p /dev/nvme0n1p2                                                                                                                                                                                                                                                                              INT ✘ 
fsck from util-linux 2.39.3
/dev/nvme0n1p2: clean, 4761189/61923328 files, 179012169/247665537 blocks
    ~  sudo fsck -p /dev/nvme0n1p1                                                                                                                                                                                                                                                                                  ✔ 
fsck from util-linux 2.39.3
fsck.fat 4.2 (2021-01-31)
/dev/nvme0n1p1: 6 files, 78/76646 clusters
    ~  sudo fsck -p /dev/nvme0n1p3                                                                                                                                                                                                                                                                                  ✔ 
fsck from util-linux 2.39.3

Pacman -S pkg AND pacman -Syyu as well.

Things were working just fine before the mid-update crash. Is there a way to fix this?

  • Rollback with timeshift (100%)
    or
  • :warning: Do an backup of your valuable data (now - while it is readable)
  • complete the update from within a live manjaro (50%)
    or
  • If every thing fails, you have your backup
  • Reinstall and restore your backup (100%)
    :footprints:

I do not have any timeshift snapshots :crying_cat_face:

Just passing by.
It seems like you’re low on options.

  • Copy personal data to a USB, or somewhere safe.
  • Install a new system; preferably with a separate /home partition.

At least it’s quicker. Cheers.

Boot iso, mount root to /mnt and execute

pacman -r /mnt -Syu --cachedir /mnt/var/cache/pacman/pkg [ --dbpath /mnt/var/lib/pacman ] [ --gpgdir /mnt/etc/pacman.d/gnupg ]

Use what’s in brackets if it doesn’t work without.

Is there a way to get pamac to reinstall “all”?

man pamac
pamac --help

I try not to use pamac, if it can be avoided; however, I’m not aware of such an option (especially not in the GUI). I imagine it’s not too difficult to create a (one-line) list of additional packages and paste that to terminal.

pamac example:

pamac install code mc fontforge gimp handbrake inkscape krita vlc

pacman example:

sudo pacman -S code mc fontforge gimp handbrake inkscape krita vlc

Maybe someone has something already scripted which you could modify to suit your needs.

However, if you’re vaguely reaching for some way to magically avoid reinstalling your system, I dare say, you are out of luck.

Please heed the advice previously given by several people, which ultimately leads to reinstalling as being your remaining option.

For some (insert) reason … pamac does not accept direct input from itself, such as pamac install $(pamac list -iq) … and by default it prints all packages, including foreign, and while it provides a way to print only foreign packages … it does not provide a way to print only native packages.

So … we have to be hacky about it if we want to exclude AUR packages.
(which, even though pamac can handle both - require different flags, so cannot be combined)

pamac list -iq > ~/package_list.txt
pamac list -mq > ~/foreign.txt
grep -v -f ~/foreign.txt ~/package_list.txt > ~/native.txt

Now you can do

pamac install $(cat ~/native.txt)

and

pamac build $(cat ~/foreign.txt)

(and now I will do sudo pacman -Rns pamac-cli again :wave:)