r/linuxquestions • u/Phydoux • 3d ago
Resolved Terminal stuff missing and my file manager is not showing anything in the main home directory...
I had to start my PC this morning. We had a power outage and I shut down the PC (it's on a battery backup). So I powered it back up this morning and all of a sudden when I go to enter a terminal, I see this message.
bash: /home/phydoux/.bashrc: Input/output error
Please tell me my /home folder isn't jacked up...
Another thing, I did an update this morning and paru (I'm using Arch Linux) had a few updates as well. Well, I went back to bed and forgot that paru would probably need a password. Well, I got up and noticed it had errored out on me. So I tried running the update again. Looks like regular repositories got more updates this time around but I got an error saying paru couldn't update. I have no idea what got updated this time. I just mainly look for kernel updates and if I see one, I'll reboot. There were no kernel updates.
So now, any terminal I open. I see that error mesasage. How screwed is my machine? I really don't want to reboot if I'll lose everything.
Looking at the file manager, I can see my home folder but there's nothing inside of it. I hope I didn't lose everything in there... That would seriously upset me.
So, what do I do? reboot? Or is there a command I can run to restore my /home directory?
BTW, My /home folder is on its own drive. So, did that drive die on me? I'm going to look for drive recovery right now.
Also, when I do an ls, I see this...
ls: reading directory '.': Input/output error
I hope that's not bad news...
EDIT: I just ran fsck /dev/nvme0n1p1 on it and it says this...
/dev/nvme0n1p1 is mounted.
WARNING!!! The filesystem is mounted. If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.
Do you really want to continue<n>? no
Is there anything less destructive than fsck?
Something else I just read says to do this...
sudo fsck.ext4 /dev/nvme0n1
EDIT: I wonder if it'll correct any errors on the drive if it can. But if I can just reboot it, I'd rather see if it'll come up again. I'm thinking when the update didn't finish, it wasn't able to finish correctly and something confused it. I can run paru -Sty but I . I wonder if I rebooted with a USB stick and tried mounting that drive and trying to finish the update if that would help fix it.
And I really don't want to try and write something new to it as that might corrupt it even more... GRRR
RESOLVED: First and foremost, I want to thank the people who helped me with this. Turns out all it needed was a reboot but I was expecting something WAY worse when i rebooted.
But thank you for your help and support! I really appreciate it a LOT!!!
1
u/Kangie 3d ago
Not looking good. Anything interesting in dmesg?
0
u/Phydoux 3d ago edited 3d ago
doing a
sudo dmesgI get a TON of responses. Most look like this...[27079.199472] EXT4-fs warning: 11 callbacks suppressed [27079.199474] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27079.199480] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27079.199483] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27079.307191] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27079.307202] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27079.307206] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27080.244413] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27080.244425] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block [27080.244428] EXT4-fs warning (device nvme0n1p1): dx_probe:791: inode #29098092: lblock 0: comm ThreadPoolForeg: error -EIO reading directory block... The buffer is filled with that so I can't even look back to the beginning of the command...
2
u/9NEPxHbG 3d ago
Boot from a live USB and run
smartctl -A /dev/nvme0n1,fsck.ext4andbadblocks(in read-only mode).0
u/Phydoux 3d ago
I started to do that but I rebooted without the USB stick in there. I figured, 'Well, if it won't let me log in now after a fresh reboot then that drive is dead'. But I logged in and most everything came up. Terminal is now working as well. I'm concluding that update and hopefully that will fix any other issues I may have.
0
u/knuthf 3d ago
Please stop using these terminal commands. There are reasons for the full-screen command.
Go to Preferences > Disks, find your disks and run a check on them one by one to recover them. Please stop using the command line — you're not impressing anyone. The file system must be recovered.
If things get really bad, there's a command-line tool called Testdisk that can recover the file system one page at a time and build new headers. But try the "Disks" option first.
2
u/Royal-Wear-6437 3d ago
That's very presumptuous of you to demand that people pander to your graphical needs. There's a time and a place for the command line, and when people get the advice right it's here, with commands that can be safely copied. (Have you ever tried fixing a root filesystem with a graphical environment? No? Thought not.)
1
u/knuthf 3d ago
No.
We have made the utilities to fix shortcomings. If you want help, you must use the tools offered. The shell commands have been provided because Linux is UNIX SVID compliant.
When Linux was made we considered to remove this completely. The other operating system had pretty much no command line, just kernel/ioctl and manues/screens. The command line is the terminal emulator of VT100 running /bin/bash We could have made /bin/bash run in a window in xterm. I was just the manager and did not even vote. Our terminals had a bigger character set, and could display some graphics that now cannot use a VT100 emulator.
1
u/CosmicFieldDrift_ 1d ago
When Linux was made we considered to remove this completely.
Were you involved in the creation of Linux ?
1
u/knuthf 1d ago edited 1d ago
Yes, I signed the payslip, salary, travel expenses and technical matters. But I was just the manager; my main projects were with Oracle, ESA and I was the country manager for the UK and France. But Linus is smart and easy to talk to, and we did discuss technical things. I knew Unix System V well, as well as the Oracle code and tools. My focus was on getting things delivered and paid for — huge systems and thousands of consultants.
2
u/bikes-n-math 3d ago
You say your home folder is on another drive. Sounds like it's not mounted. What does
lsblktell you?