You are not logged in.
Today I was cleaning my system, and without paying attention to what was I removing, I remove all files listed in the following command from the wiki:
https://wiki.archlinux.org/title/Pacman … ny_package
# find /etc /usr /opt | LC_ALL=C.UTF-8 pacman -Qqo - 2>&1 >&- >/dev/null | cut -d ' ' -f 5-After rebooting I noticed I fucked up, my user didn't have any root rights, as I dont have the root account enabled I booted into the live cd and add my user to the sudoers file.
Rebooted and now I get "failed to mount /boot" and I cannot access the root console to find what went wrong.
I checked the fstab file and all seems normal, I don't know what else to look at.
Last edited by Xsofito (2024-05-02 13:21:21)
Offline
files of interest … common false positives
Can you access your shell history or the output of that command (if you redirected it into a file) to see what files you deleted?
Offline
There's no output, I switched to root using sudo su and run:
find /etc /usr /opt | LC_ALL=C.UTF-8 pacman -Qqo - 2>&1 >&- >/dev/null | cut -d ' ' -f 5- | xargs rm -rfI have no idea how many critical files I must have deleted, so I don't know where to start searching for missing system files.
Offline
Xsofito, If you were wondering where your posts went, I think you hit 'report', not 'reply'. It happens.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
You likely can't mount /boot because the files generated by depmod got deleted. The mkinitcpio presets would be missing as well, so you would need to reinstall the kernel packages to take care of both of those things. I would reinstall all packages.
Offline
I think you hit 'report', not 'reply'.
Yeah, I did, my bad.
I would reinstall all packages.
I reinstalled all packages but had some issues with the certificates and mirrorlist, after fixing that I reinstalled packages but still /boot is not able to mount when starting the system.
[FAILED] Failed to mount /boot.
See 'systemctl status boot.mount' for details.
[DEPEND] Dependency failed for Local File Systems.
...
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, or "exit" to continue bootup.
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more detailsOffline
This typically also happens if you forgot to mount the boot partition before updating the kernel - the installed modules and booting kernel fall out of sync, the (likely) vfat module can't be loaded (because it doesn't exist for the version of the booting kernel) and consequently /boot cannot be mounted.
You've to fix this offline, ie. from an installation iso, mount the root of the installed system, the boot partition into /mnt/boot, arch-chroot into /mnt and re-install the kernel.
I'm not exactly sure how you got there w/ your mass deletion script, though.
Offline
Reinstalling all packages with the roon and boot partitions mounted solved, now I need to reconfigure all the system.
Does system config files created in the live cd doesnt have ownership? Thus being deleted by the command?
Anyways, thanks for the help.
Offline
You originally probably only lost /usr/lib/modules/*/modules.* but then the re-installation w/o the boot partition mounted got the booting kernel out of sync.
You'll probably have some residuals in the /boot mountpoint (ie. the directory when the partition isn't mounted there) that you want to clean up.
Make sure you're actually booting from a boot partition (cat /proc/cmdline doesn't reference the kernel relative to a "boot/" path) and that you don't accidentally delete the file on the boot partition.
Ie. don't try to automatize that ![]()
Offline