Kernel panic after running an install script

posting this before I proceed:

./pacman-static -S pacman --overwrite "*"
warning: config file /etc/pacman.conf, line 20: directive 'SyncFirst' in section 'options' not recognized.
resolving dependencies...
looking for conflicting packages...

Packages (1) pacman-6.0.1-12

Total Installed Size:   4.80 MiB
Net Upgrade Size:      -0.04 MiB

:: Proceed with installation? [Y/n]

Is the warning anything I should pay mind?
I put the ./ in front of your command as it seemed to be how we did that before. otherwise it was not recognized.

yes proceed

Same keyring errors as usual.

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
warning: Public keyring not found; have you run ‘pacman-key --init’?
downloading required keys…
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (could not find or read file)
Errors occurred, no packages were upgraded.

and this:
rm -r /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate archlinux manjaro
pacman-key --refresh-keys
pacman -Scc

[manjaro /]# rm -r /etc/pacman.d/gnupg
rm: cannot remove ‘/etc/pacman.d/gnupg’: No such file or directory
[manjaro /]# pacman-key --populate archlinux manjaro~
pacman-conf: /usr/lib/libc.so.6: version GLIBC_2.34' not found (required by pacman-conf) gettext: /usr/lib/libc.so.6: version GLIBC_2.34’ not found (required by gettext)
gettext: /usr/lib/libc.so.6: version GLIBC_2.34' not found (required by gettext) ==> gettext: /usr/lib/libc.so.6: version GLIBC_2.34’ not found (required by gettext)
==>

Didn’t go further. Since this installation seems completely beyond repair, would I be able to safely partition my work files before wiping the rest of the HDD so I don’t have to wait an entire day to copy files to and from hard drives, before reinstalling the other system? I understood this was not possible in windows, but someone told me it is in Linux, apparently?

first lets try this possible solution here:

exit chroot, install the install scripts, mount your system and reinstall the glibc

Couple points of confusion here, bear in mind that I am kind of a noob, but

install the install scripts

I’m assuming it’s this one (mind the couple failed attempts at copy-pasting)

[manjaro@manjaro ~]$ sudo pacman -S arch-install-scripts
warning: database file for 'core' does not exist (use '-Sy' to download)
warning: database file for 'extra' does not exist (use '-Sy' to download)
warning: database file for 'community' does not exist (use '-Sy' to download)
warning: database file for 'multilib' does not exist (use '-Sy' to download)
error: target not found: arch-install-scripts
[manjaro@manjaro ~]$ sudo pacman -Sy^Crch-install-scripts
[manjaro@manjaro ~]$ ^C
[manjaro@manjaro ~]$ ^C
[manjaro@manjaro ~]$ ^C
[manjaro@manjaro ~]$ sudo pacman -Sy arch-install-scripts
:: Synchronizing package databases...
 core                  166.3 KiB  51.5 KiB/s 00:03 [######################] 100%
 extra                1861.3 KiB   293 KiB/s 00:06 [######################] 100%
 community               7.1 MiB  1184 KiB/s 00:06 [######################] 100%
 multilib              174.3 KiB   524 KiB/s 00:00 [######################] 100%
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Packages (4) base-3-2  archlinux-keyring-20220713-2  manjaro-keyring-20220514-2
             manjaro-system-20220727-1

Total Download Size:   1.64 MiB
Total Installed Size:  2.24 MiB
Net Upgrade Size:      0.70 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 archlinux-keyrin...  1101.0 KiB   418 KiB/s 00:03 [######################] 100%
 manjaro-keyring-...   548.8 KiB   582 KiB/s 00:01 [######################] 100%
 manjaro-system-2...    18.1 KiB  4.26 KiB/s 00:04 [######################] 100%
 base-3-2-any           14.0 KiB  4.43 KiB/s 00:03 [######################] 100%
 Total (4/4)          1681.8 KiB   127 KiB/s 00:13 [######################] 100%
(4/4) checking keys in keyring                     [######################] 100%
(4/4) checking package integrity                   [######################] 100%
(4/4) loading package files                        [######################] 100%
(4/4) checking for file conflicts                  [######################] 100%
(4/4) checking available disk space                [######################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap because system is booted in Live CD mode...
:: Processing package changes...
(1/4) upgrading manjaro-keyring                    [######################] 100%
==> Appending keys from manjaro.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signed 1 keys.
==> Importing owner trust values...
==> Updating trust database...
gpg: next trustdb check due at 2022-08-09
(2/4) upgrading archlinux-keyring                  [######################] 100%
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signed 1 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
==> Disabling revoked keys in keyring...
  -> Disabled 2 keys.
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  22  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  22  signed:  93  trust: 0-, 0q, 0n, 22m, 0f, 0u
gpg: depth: 2  valid:  70  signed:  30  trust: 70-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-08-09
==> Updating trust database...
gpg: next trustdb check due at 2022-08-09
(3/4) installing base                              [######################] 100%
Optional dependencies for base
    linux: bare metal support [installed]
(4/4) upgrading manjaro-system                     [######################] 100%
==> Checking for 'os-prober' setup ...
    We will reenable 'os-prober' for you ...
/usr/bin/grub-probe: error: failed to get canonical path of `overlay'.
==> Checking if graphic drivers need an update ...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

resolving dependencies...
looking for conflicting packages...

Packages (1) arch-install-scripts-25-2

Total Download Size:   0.01 MiB
Total Installed Size:  0.05 MiB

:: Proceed with installation? [Y/n] ^C
Interrupt signal received

[manjaro@manjaro ~]$ sudo pacman -Sy arch-install-scripts
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...

Packages (1) arch-install-scripts-25-2

Total Download Size:   0.01 MiB
Total Installed Size:  0.05 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 arch-install-scr...    15.3 KiB  25.4 KiB/s 00:01 [######################] 100%
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) installing arch-install-scripts              [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[manjaro@manjaro ~]$

mount your system and reinstall the glibc

The guide there also says to mount manjaro partitions, but I was under the impression it was already mounted when I booted from the live usb?

[manjaro@manjaro ~]$ lsblk
NAME MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0
       7:0    0 129.5M  1 loop /run/miso/sfs/livefs
loop1
       7:1    0   692M  1 loop /run/miso/sfs/mhwdfs
loop2
       7:2    0   1.7G  1 loop /run/miso/sfs/desktopfs
loop3
       7:3    0 636.6M  1 loop /run/miso/sfs/rootfs
sda    8:0    0 931.5G  0 disk 
└─sda1
       8:1    0 931.5G  0 part /run/media/manjaro/67f3ecf5-6ada-41e5-955d-62f4c47b6bd6
sdb    8:16   1   7.4G  0 disk /run/miso/bootmnt
├─sdb1
│      8:17   1   3.2G  0 part 
└─sdb2
       8:18   1     4M  0 part 
[manjaro@manjaro ~]$ mount -l -t ext4
/dev/sda1 on /run/media/manjaro/67f3ecf5-6ada-41e5-955d-62f4c47b6bd6 type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2)

Am I doing it wrong? After doing the previous step, do I just proceed to
pacstrap -i /mnt glibc lib32-glibc
or am I missing some steps here? Sorry if this sounds stupid, but I don’t want to mess up any order of operation here, especially when I hardly understand what I’m doing.

you mount it like this:
mount /dev/sda1 /mnt
then you install the glibc:
pacstrap -i /mnt glibc lib32-glibc

[manjaro@manjaro ~]$ sudo mount /dev/sda1 /mnt
[manjaro@manjaro ~]$ pacstrap -i /mnt glibc lib32-glibc
unshare: unshare failed: Operation not permitted
[manjaro@manjaro ~]$ sudo pacstrap -i /mnt glibc lib32-glibc
==> Creating install root at /mnt
==> Installing packages to /mnt
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Packages (4) base-3-2  archlinux-keyring-20220713-2  manjaro-keyring-20220514-2
             manjaro-system-20220727-1

Total Installed Size:  2.24 MiB
Net Upgrade Size:      0.70 MiB

:: Proceed with installation? [Y/n] y
(4/4) checking keys in keyring                     [######################] 100%
(4/4) checking package integrity                   [######################] 100%
(4/4) loading package files                        [######################] 100%
(4/4) checking for file conflicts                  [######################] 100%
(4/4) checking available disk space                [######################] 100%
:: Processing package changes...
vercmp: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by vercmp)
(1/4) upgrading manjaro-keyring                    [######################] 100%
 >>> Run `pacman-key --init` to set up your pacman keyring.
 >>> Then run `pacman-key --populate manjaro` to install the Manjaro keyring.
(2/4) upgrading archlinux-keyring                  [######################] 100%
(3/4) installing base                              [######################] 100%
Optional dependencies for base
    linux: bare metal support [installed]
(4/4) upgrading manjaro-system                     [######################] 100%
vercmp: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by vercmp)
==> Checking for 'os-prober' setup ...
    'os-prober' was already enabled by the user.
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
vercmp: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by vercmp)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
vercmp: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by vercmp)
==> Fix default path config issue in sddm.conf ...
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman)
pacman-conf: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman-conf)
pacman-conf: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by pacman-conf)
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

resolving dependencies...
looking for conflicting packages...

Packages (2) glibc-2.35-6  lib32-glibc-2.35-6

Total Installed Size:  65.90 MiB
Net Upgrade Size:       1.53 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
(2/2) checking available disk space                [######################] 100%
:: Processing package changes...
(1/2) upgrading glibc                              [######################] 100%
Generating locales...
  en_US.UTF-8... done
  et_EE.UTF-8... done
Generation complete.
New optional dependencies for glibc
    perl: for mtrace [installed]
(2/2) upgrading lib32-glibc                        [######################] 100%
:: Running post-transaction hooks...
(1/5) Reloading system manager configuration...
  Skipped: Running in chroot.
(2/5) Creating temporary files...
Failed to open file "/sys/devices/system/cpu/microcode/reload": Read-only file system
error: command failed to execute correctly
(3/5) Arming ConditionNeedsUpdate...
(4/5) Restarting cronie for libc upgrade...
Running in chroot, ignoring command 'try-restart'
(5/5) Updating the info directory file...
[manjaro@manjaro ~]$

What now? Is it done? Do I reboot and try to run off my HDD?

Seriously, stop. You are just throwing random commands, some in chroot, some on live iso and you have no idea what you are doing and what any of the errors mean. I mean, do you expect something will just start working?

I’m sorry, I haven’t thrown anything randomly anywhere, I asked for help and earnestly tried to follow it to the best of my ability, so what did I do wrong? I was already willing to give up fixing it and asked advice on whether I could just reinstall the system without having to move tons of files back and forth between hard drives, and instead was advised to try one more solution…

Let’s go from the start. Reboot back to live iso and try this:

sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/util-mount.sh
exit | manjaro-chroot -a
sudo pacman-mirrors -f5
sudo pacman --sysroot /mnt -Qqn | sudo pacman --sysroot /mnt -Syu -
1 Like

Done. The entire output won’t fit in the character limit.

[manjaro@manjaro ~]$ sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/util-mount.sh
[manjaro@manjaro ~]$ exit | manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/sda1]
 --> mount: [/mnt]
[manjaro@manjaro ~]$ pacman-mirrors -f5
.: ERROR Must have root privileges
[manjaro@manjaro ~]$ sudo pacman-mirrors -f5
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  0.902 Austria        : https://mirror.easyname.at/manjaro/
  2.344 Thailand       : https://mirror.kku.ac.th/manjaro/
  0.606 Estonia        : https://mirrors.xtom.ee/manjaro/
  0.667 Germany        : https://mirror.moson.org/manjaro/
  ..... China          : https://mirrors.sjtug.sjtu.edu.cn/manjaro/
::INFO Writing mirror list
::Estonia         : https://mirrors.xtom.ee/manjaro/stable
::Germany         : https://mirror.moson.org/manjaro/stable
::Austria         : https://mirror.easyname.at/manjaro/stable
::Thailand        : https://mirror.kku.ac.th/manjaro/stable
::China           : https://mirrors.sjtug.sjtu.edu.cn/manjaro/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
[manjaro@manjaro ~]$ pacman --sysroot /mnt -Qqn | pacman --sysroot /mnt -Syu -
error: you cannot perform this operation unless you are root.
error: you cannot perform this operation unless you are root.
[manjaro@manjaro ~]$ sudo pacman --sysroot /mnt -Qqn | pacman --sysroot /mnt -Syu -
error: you cannot perform this operation unless you are root.
[manjaro@manjaro ~]$ sudo
usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: sudo [-ABbEHknPS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T
            timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-ABknS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T
            timeout] [-u user] file ...
[manjaro@manjaro ~]$ sudo pacman --sysroot /mnt -Qqn | sudo pacman --sysroot /mnt -Syu -
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date

::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
hint: use `pacman-mirrors` to generate and update your pacman mirrorlist.
(37/41) Updating the info directory file...
(38/41) Copy Thunderbird Distribution Settings
(39/41) Updating the desktop file MIME type cache...
(40/41) Updating the vlc plugin cache...
(41/41) Updating X fontdir indices...

Seemed to go through without problems.

Remove usb and try if the actual system works then.

Thank you very much, that seems to have worked. With some quirks. Like I mentioned before (post #23), I had for some reason several kernels installed, and only 5.4 and 5.10 booted into a gui. I could open tty2 in 5.13, but at least now I’m running 5.10.

I’m assuming I should update it, but honestly, that sounds like an incredibly daunting thing right now, and every time I’ve done a larger update via the graphical interface (which I assume is for dumb people like me), something catastrophic happens, usually related to the nvidia GPU. Before we’re done here, any pointers on how to update my system without destroying it again? A link to a helpful thread of avoiding pitfalls or something? A particular kernel version I should go with where I can avoid updating for as long as possible?

Well, you didn’t post important output at the end, so I don’t know what kernels you have. Remove all EOL kernels and re-/install others you want.

Don’t use rolling distro if you don’t want to update regulary, period. Other than that, use LTS kernels.

this is an excellent command:

sudo pacman --sysroot /mnt -Qqn | sudo pacman --sysroot /mnt -Syu -

does it work without this:

sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/util-mount.sh

or they have to be run together?

Thing is, you need to mount all partitions and /sys, /proc, /dev to prepare for chrooting (pacman --sysroot does the chrooting for you, similar to pacstrap which you use when you install Arch).

And I figured it’s easier if you just use manjaro-chroot -a which does everything for you. But you need to exit chroot then and perform pacman --sysroot outside, in live iso. The problem is that when you exit chroot, manjaro-chroot wil clean up aka unmount everything after itself so you didn’t achieve anything.

That sed command just comments out that section so that everything stays mounted after exiting chroot. Hacky way.

i see, so normally the sed -i command is not needed, just run the pacman sysroot …

No, it is needed if you use manjaro-chroot -a. It is not needed only if you mount things manually beforehand. TBH, I’m not sure how smart pacman --sysroot is, maybe it’s enough to only mount necessary partitions before you run the command.

Either way, this is mostly useful only when pacman in your system is broken. And there is also an alternative way with --root/-r, but you need to specify cachedir and other things AFAIK. And there is also pacman-static.