0

I'm getting a error. See:

Prt Sc

What I'm supose to do?

Tx, everyone!

Thomas Ward
  • 74,764
Mosna
  • 3
  • 1
    A couple of things. First, please copy and paste text from the terminal windows, rather than posting pictures. Second, running fsck with no arguments requires reading /etc/fstab - do you have appropriate permissions for that? – Charles Green Mar 08 '23 at 23:20
  • Here's the message I get after type "fsck" in terminal: "fsck de util-linux 2.38" | "fsck.fat 4.2 (2021-01-31)" | "open: Permission denied". I have no idea about permissions. I'm a new Ubuntu user... I want to use "fsck" command to check my OS files and repair anything that need's repair. Any tip? – Mosna Mar 08 '23 at 23:34
  • You need to use sudo in order to do an fsck on your system. However, you cannot safely do an fsck on a running partition such as your root partition and you need to boot into a liveusb or similar environment in order to actually run the fsck on your proper disk. Unless you know there's a problem with the filesystem though you don't really need to run fsck. – Thomas Ward Mar 08 '23 at 23:58
  • Thanks @ThomasWard. Any safe way to check my system files? – Mosna Mar 09 '23 at 00:15
  • 1
    @Uirokag not while your system is booted to itself, no. Your "system files" also don't have the same kind of integrity checks that Windows has. Windows' integrity checks are very strict, Linux is less so with 'system files' - if something breaks, you'll know it's broken when you try and use it, especially with critical system files. At which point you'll probably have a question here to post as a new question. – Thomas Ward Mar 09 '23 at 00:43
  • Tx for you kindness, Mr. @ThomasWard! – Mosna Mar 09 '23 at 06:22

1 Answers1

0

From the comments, it looks like there's a couple of questions here, so I'll try to answer both.

Firstly, how to run an fsck on your system?

There are a few ways of doing this. The most intuitive way would be to boot from a live USB, then run sudo fsck /dev/sd**, replacing /dev/sd** with the partition ID of the partition Ubuntu is installed on. For instance, if Ubuntu is installed to /dev/sda2, you'd run sudo fsck /dev/sda2 from a live USB.

(Heads up, disk IDs under the /dev directory are liable to be different from one bootup to the next, so you'd want to use lsblk on the live USB to figure out which partition contains your Ubuntu installation, then run fsck based on that data.)

If booting from a live USB is too much trouble, you can use tune2fs to get the system to run an fsck at bootup. This answer has details on how to do that: https://askubuntu.com/a/1352782/1598467

Secondly, how to scan system files?

An fsck will only catch some kinds of corruption. If you want to check that system files are unmodified, the command to use is sudo dpkg -V. This command will output a list of all of the system files and configuration files on your system that have been modified from their original state in some way.

Don't be surprised if this prints output (possibly a lot of output), as dpkg is able to detect a lot of different changes, including changes you probably made on purpose. For instance, running sudo dpkg -V on my machine reveals that there are a bunch of missing .list and .asc files under /usr/lib/kfocus, which is probably a normal consequence of how my laptop manufacturer's setup mechanisms work. /usr/share/misc/pci.ids is also modified, which I think is probably normal. Then there are three other files that I know I modified on purpose.

Some output from sudo dpkg -V may be normal. However, if you see that binary files (like executables, .so files, etc.) are changed, or you see that some files have been modified that you didn't modify and can't figure out why they would have become modified, that may be something to look into further.

ArrayBolt3
  • 3,129