1

My root partition had no space to the point that couldn't login.

So invoked Ctrl+Alt+F2 and ran to free disk space:

find / -xdev -name core -ls -o  -path "/lib*" -delete

Now can't even initialize OS after GRUB, it days:

run-init: can't execute '/sbin/init' No such file or directory
run-init: can't execute '/etc/init' No such file or directory
run-init: can't execute '/bin/init' No such file or directory

How can solve that?

1
  • At least in RPM based distros it's trivial to find missing files for the installed packages and there's no need to reinstall anything - you could simply reinstall the damaged packages. Probably reinstalling the kernel will be enough. Apr 6, 2023 at 11:57

2 Answers 2

0

You deleted a lot of kernel stuff. For example:

kernel/drivers/infiniband/core
kernel/drivers/memstick/core
kernel/drivers/mmc/core
kernel/drivers/net/ethernet/mellanox/mlx5/core
kernel/drivers/usb/core
kernel/drivers/video/fbdev/core
kernel/net/core
kernel/sound/core
kernel/drivers/infiniband/core
kernel/drivers/memstick/core
kernel/drivers/mmc/core
kernel/drivers/net/ethernet/mellanox/mlx5/core
kernel/drivers/usb/core
kernel/drivers/video/fbdev/core
kernel/net/core
kernel/sound/core
kernel/drivers/infiniband/core
kernel/drivers/memstick/core
kernel/drivers/mmc/core
kernel/drivers/net/ethernet/mellanox/mlx5/core
kernel/drivers/usb/core
kernel/drivers/video/fbdev/core
kernel/net/core
kernel/sound/core

If you have no backup, you should reinstall your computer (and use LVM).

5
  • there's no way to use a recovery image or whatever?
    – jck
    Apr 6, 2023 at 11:24
  • 1
    No they didn't, they did something more creative than that. Notice the -o in their find command: they execute -ls for anything named core, but -delete for anything matching the path pattern /lib/*. If you suggest restoring these files from backup, you should also suggest how they may do that, as they can't boot their system.
    – Kusalananda
    Apr 6, 2023 at 11:25
  • there's a way to recover that?
    – jck
    Apr 6, 2023 at 11:28
  • @jck Personally, I would reinstall everything, then restore important data (home directory files, most likely) from an external backup.
    – Kusalananda
    Apr 6, 2023 at 11:29
  • @jck: If you are afraid of data loss, I would start with a live-CD and copy the needed data to an external drive. In theory you could try to find the deleted files in a similar installation and copy them back. From my point of view this is more work and also not guaranteed that it will work.
    – ulrich17
    Apr 6, 2023 at 11:34
0

Have decided to use a LiveOS to save all my data and reinstall the whole OS.

Thank you for advice.

Now I see that 30 GB for the root partition isn't enough (it had all the filesystem except /home).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .