You are not logged in.
Hello, i have deleted all in /tmp directory< system crashed, after rebooting there are no bootloaders (Neither Windows or Linux (grub)), I had Arch and Windows 11.
I tried to load from live cd to check out what is it.
lsbk (i had root, home and swap mounts - nothing there now):
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 683.9M 1 loop /run/archiso/sfs/airootfs
sda 8:0 1 119.3G 0 disk
└─sda1 8:1 1 119.2G 0 part /run/archiso/bootmnt
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:9 0 300M 0 part
├─nvme0n1p2 259:10 0 128M 0 part
├─nvme0n1p3 259:11 0 198.1G 0 part
├─nvme0n1p4 259:12 0 900M 0 part
├─nvme0n1p5 259:13 0 13.7G 0 part
├─nvme0n1p6 259:14 0 10G 0 part
├─nvme0n1p7 259:15 0 69.8G 0 part
└─nvme0n1p8 259:16 0 184.1G 0 partAfter i tried to mount all again the same way as an installation i could locate to all files of my system:
mkswap /dev/nvme0n1p6
swapon /dev/nvme0n1p6
mount /dev/nvme0n1p7 /mnt/
mount /dev/nvme0n1p8 /mnt/homeBut when i'm trying to arch-chroot, i'm getting an error:
[root@sysrescue /]# arch-chroot /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directoryHow can i resque my system? Help please..
Offline
100$ that you meant to remove all in /tmp dir but flubbed up the command and ended up deleting the entirety of your system - or you had some link linking back to your root - for what reason did you think you needed to do that in the first place?
Check file system size with df -h or so. Assuming you indeed killed everything, hope you have backups. If you don't have backups you're basically SoL, hope for Testdisk, but don't hope too much. See your available options in https://wiki.archlinux.org/title/File_recovery
Offline
100$ that you meant to remove all in /tmp dir but flubbed up the command and ended up deleting the entirety of your system - or you had some link linking back to your root - for what reason did you think you needed to do that in the first place?
Check file system size with df -h or so. Assuming you indeed killed everything, hope you have backups. If you don't have backups you're basically SoL, hope for Testdisk, but don't hope too much. See your available options in https://wiki.archlinux.org/title/File_recovery
No, i have all my system files at all in /mnt after mounting, but cant log to arch-root to make bootloader
Offline
i have all my system files at all in /mnt after mounting
[root@sysrescue /]# arch-chroot /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directory
stat /mnt/bin/bash /mnt/usr/bin/bashOffline
i have all my system files at all in /mnt after mounting
[root@sysrescue /]# arch-chroot /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directorystat /mnt/bin/bash /mnt/usr/bin/bash
stat: cannot statx '/mnt/bin/bash': No such file or directory
File: /mnt/usr/bin/bash
Size: 1075760 Blocks: 2104 IO Block: 4096 regular file
Device: 259,15 Inode: 7110 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-10-11 16:44:49.696657516 +0000
Modify: 2023-05-21 11:56:54.000000000 +0000
Change: 2023-09-19 21:12:42.809404990 +0000
Birth: 2023-09-19 21:12:42.806071618 +0000Offline
Please stop fully quoting previous posts, you're bloating the thread.
ls -l /mntWith a little luck, you
flubbed up the command and ended up deleting
only the symlinks in the root dir… (bin, sbin, lib & lib64)
Offline
ls -l /mnttotal 72
drwxr-xr-x 2 root root 4096 Jan 1 1970 boot
drwxr-xr-x 20 root root 4220 Oct 11 18:38 dev
drwxr-xr-x 2 root root 4096 Sep 19 21:49 efi
drwxr-xr-x 11 root root 4096 Oct 11 18:51 etc
drwxr-xr-x 4 root root 4096 Sep 19 22:11 home
lrwxrwxrwx 1 root root 7 Sep 18 13:18 lib -> usr/lib
lrwxrwxrwx 1 root root 7 Sep 18 13:18 lib64 -> usr/lib
drwx------ 2 root root 16384 Sep 19 20:56 lost+found
drwxr-xr-x 2 root root 4096 Jan 31 2023 mnt
lrwxrwxrwx 1 root root 33 Sep 19 21:33 Moscow -> /usr/share/zoneinfo/Europe/Moscow
drwxr-xr-x 8 root root 4096 Oct 4 14:49 opt
dr-xr-xr-x 329 root root 0 Oct 11 19:12 proc
drwxr-x--- 13 root root 4096 Oct 8 11:03 root
drwxr-xr-x 2 root root 4096 Sep 19 21:10 run
lrwxrwxrwx 1 root root 7 Sep 18 13:18 sbin -> usr/bin
lrwxrwxrwx 1 root root 19 Sep 20 10:29 snap -> /var/lib/snapd/snap
drwxr-xr-x 4 root root 4096 Sep 19 21:12 srv
dr-xr-xr-x 13 root root 0 Oct 11 17:50 sys
drwxrwxrwt 2 root root 4096 Oct 10 20:52 tmp
drwxr-xr-x 4 root root 4096 Oct 5 13:59 traefik
drwxr-xr-x 2 root root 4096 Oct 5 14:09 traefik.toml
drwxr-xr-x 9 root root 4096 Oct 8 10:55 usr
drwxr-xr-x 12 root root 4096 Oct 10 17:21 varOffline
Only /bin seems gone, so symlink that to usr/bin (like sbin) and try to chroot again.
Offline
ln -s /mnt/usr/bin/ /mnt/bin[root@sysrescue ~]# arch-chroot /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directory
umount: /mnt/proc: target is busy.Offline
That's not how ln works…
ln -s usr/bin /mnt/binOffline
If from a live USB you can see most of your filesystem is still there. Might be good time to make a copy btw if anything important. What I'd do is see what is there, if arch-chroot fails to /mnt then I'd almost
pacstrap /mnt base. But it sounds like a separate issue, the bootloader is somehow not installed ? Find out if you are on UEFI boot or BIOS boot, then just re-install the bootloader. Make sure bios/uefi is configured to boot from the right drive as well. With os-prober installed I'd just re-install grub and it will re-create it all.
And yeah that's weird /bin symlink is missing... something did something spooky it wasn't just clearing the /tmp directory
Last edited by zavage (2023-10-16 09:53:14)
Offline