Как проверить убунту на системные ошибки

Ошибки в Linux могут возникать из-за различных причин и могут проявляться в разных формах, таких как сообщения об ошибках в системных журналах, неожиданные завершения программ, неисправность оборудования.

Виды ошибок в операционной системе Линукс

Как проверить Линукс на ошибки

Некоторые типичные примеры ошибок в Linux:

1. Ядра: это ошибки, связанные с работой ядра операционной системы Linux. Они могут быть вызваны неправильной работой драйверов оборудования, ошибками в коде ядра или другими проблемами. Такие ошибки могут привести к сбою системы или неожиданному завершению работы.

2. Файловой системы: связаны с работой файловых систем, таких как ext4, Btrfs, NTFS и другие. Они могут проявляться в виде поврежденных файлов, невозможности монтировать диски или других проблем. Ошибки файловой системы могут быть вызваны некорректным отключением диска, ошибками записи или другими причинами.

3. Сети: обозначают проблемы в работе сети, такие как невозможность подключения к сети, медленная скорость передачи данных или другие проблемы. Ошибки сети могут быть вызваны неправильными настройками сетевых параметров, неисправностью оборудования или другими причинами.

4. Приложений: могут проявляться в виде неожиданного завершения работы программы, невозможности открыть файлы или других проблем. Ошибки приложений могут быть вызваны ошибками в коде программы, некорректными настройками или другими причинами.

5. Оборудования: связанные с работой оборудования, такие как жесткие диски, видеокарты, звуковые карты и другие. Они могут проявляться в виде неисправности оборудования, проблем с драйверами или других причин. Ошибки оборудования могут привести к сбою системы или неожиданному завершению работы.

Как проверить Linux на ошибки

Есть несколько способов проверить Linux на ошибки, в зависимости от того, какой тип ошибки вы хотите проверить.

Проверка журналов системы

Команда dmesg покажет журнал сообщений ядра. Вы можете использовать флаг -T для просмотра временных меток в удобном для чтения формате: dmesg -T

Команда journalctl позволяет просмотреть журнал системных сообщений. Вы можете использовать флаг -p для просмотра сообщений только с определенным уровнем приоритета, например: journalctl -p err -b — покажет только ошибки за последнюю загрузку системы.

Проверка жесткого диска

smartctl позволяет проверить состояние жесткого диска и диагностировать возможные проблемы: smartctl -a /dev/sda. Замените /dev/sda на путь к вашему жесткому диску.

fsck запускает проверку и позволяет исправить ошибки файловой системы на жестком диске: sudo fsck /dev/sda1. Замените /dev/sda1 на путь к вашей файловой системе.

Проверка памяти

memtest86 делает возможным проверки памяти на наличие ошибок: загрузите ее с загрузочного диска или флешки и запустите тест.

stress позволяет нагрузить систему, проверяя стабильность работы компьютера: sudo stress -c 4 -i 2 -m 1 -t 60s. Эта команда запустит тест, в котором будет использоваться 4 ядра CPU, 2 входа/выхода и 1 МБ оперативной памяти в течение 60 секунд.

Проверка сетевого соединения

ping делает возможным проверку связи с другими компьютерами и устройствами в сети: ping google.com.

при помощи traceroute можно определить маршрут, который данные проходят на пути к указанному хосту: traceroute google.com.

Эти команды помогут вам начать проверку системы на ошибки в Linux. Однако, для полной диагностики могут потребоваться дополнительные инструменты и методы, в зависимости от типа проблемы, которую вы хотите проверить.

Tag/tag.png

Duplicate Article
This article covers the same material as another article. More info…

See: SystemAdministration/Fsck and TestingStorageMedia

Introduction

Contents

  1. Introduction
  2. Basic filesystem checks and repairs

    1. e2fsprogs — ext2, ext3, ext4 filesystems
    2. dosfstools — FAT12, FAT16 and FAT32 (vfat) filesystem
    3. ntfs-3g (previously also ntfsprogs) — NTFS filesystem
    4. reiserfstools — reiserfs
    5. xfsprogs — xfs
  3. Missing superblock
  4. Bad blocks
  5. Sources and further reading

This guide will help diagnose filesystem problems one may come across on a GNU/Linux system. New sections are still being added to this howto.

Basic filesystem checks and repairs

The most common method of checking filesystem’s health is by running what’s commonly known as the fsck utility. This tool should only be run against an unmounted filesystem to check for possible issues. Nearly all well established filesystem types have their fsck tool. e.g.: ext2/3/4 filesystems have the e2fsck tool. Most notable exception until very recently was btrfs. There are also filesystems that do not need a filesystem check tool i.e.: read-only filesystems like iso9660 and udf.

e2fsprogs — ext2, ext3, ext4 filesystems

Ext2/3/4 have the previously mentioned e2fsck tool for checking and repairing filesystem. This is a part of e2fsprogs package — the package needs to be installed to have the fsck tool available. Unless one removes it in aptitude during installation, it should already be installed.

There are 4 ways the fsck tool usually gets run (listed in order of frequency of occurrence):

  1. it runs automatically during computer bootup every X days or Y mounts (whichever comes first). This is determined during the creation of the filesystem and can later be adjusted using tune2fs.
  2. it runs automatically if a filesystem has not been cleanly unmounted (e.g.: powercut)
  3. user runs it against an unmounted filesystem
  4. user makes it run at next bootup

case 1

When filesystem check is run automatically X days after the last check or after Y mounts, Ubuntu gives user the option to interrupt the check and continue bootup normally. It is recommended that user lets it finish the check.

case 2

If a filesystem has not been cleanly unmounted, the system detects a dirty bit on the filesystem during the next bootup and starts a check. It is strongly recommended that one lets it finish. It is almost certain there are errors on the filesystem that fsck will detect and attempt to fix. Nevertheless, one can still interrupt the check and let the system boot up on a possibly corrupted filesystem.

2 things can go wrong

  1. fsck dies — If fsck dies for whatever reason, you have the option to press ^D (Ctrl + D) to continue with an unchecked filesystem or run fsck manually. See e2fsck cheatsheet for details how.

  2. fsck fails to fix all errors with default settings — If fsck fails to fix all errors with default settings, it will ask to be run manually by the user. See e2fsck cheatsheet for details how.

case 3

User may run fsck against any filesystem that can be unmounted on a running system. e.g. if you can issue umount /dev/sda3 without an error, you can run fsck against /dev/sda3.

case 4

You can make your system run fsck by creating an empty ‘forcefsck’ file in the root of your root filesystem. i.e.: touch /forcefsck Filesystems that have 0 or nothing specified in the sixth column of your /etc/fstab, will not be checked

Till Ubuntu 6.06 you can also issue shutdown -rF now to reboot your filesystem and check all partitions with non-zero value in sixth column of your /etc/fstab. Later versions of Ubuntu use Upstart version of shutdown which does not support the -F option any more.

Refer to man fstab for what values are allowed.

e2fsck cheatsheet

e2fsck has softlinks in /sbin that one can use to keep the names of fsck tools more uniform. i.e. fsck.ext2, fsck.ext3 and fsck.ext4 (similarly, other filesystem types have e.g.: fsck.ntfs) This cheatsheet will make use of these softlinks and will use ext4 and /dev/sda1 as an example.

  • fsck.ext4 -p /dev/sda1 — will check filesystem on /dev/sda1 partition. It will also automatically fix all problems that can be fixed without human intervention. It will do nothing, if the partition is deemed clean (no dirty bit set).

  • fsck.ext4 -p -f /dev/sda1 — same as before, but fsck will ignore the fact that the filesystem is clean and check+fix it nevertheless.

  • fsck.ext4 -p -f -C0 /dev/sda1 — same as before, but with a progress bar.

  • fsck.ext4 -f -y /dev/sda1 — whereas previously fsck would ask for user input before fixing any nontrivial problems, -y means that it will simply assume you want to answer «YES» to all its suggestions, thus making the check completely non-interactive. This is potentially dangerous but sometimes unavoidable; especially when one has to go through thousands of errors. It is recommended that (if you can) you back up your partition before you have to run this kind of check. (see dd command for backing up filesystems/partitions/volumes)

  • fsck.ext4 -f -c -C0 /dev/sda1 — will attempt to find bad blocks on the device and make those blocks unusable by new files and directories.

  • fsck.ext4 -f -cc -C0 /dev/sda1 — a more thorough version of the bad blocks check.

  • fsck.ext4 -n -f -C0 /dev/sda1 — the -n option allows you to run fsck against a mounted filesystem in a read-only mode. This is almost completely pointless and will often result in false alarms. Do not use.

In order to create and check/repair these Microsoft(TM)’s filesystems, dosfstools package needs to be installed. Similarly to ext filesystems’ tools, dosfsck has softlinks too — fsck.msdos and fsck.vfat. Options, however, vary slightly.

dosfsck cheatsheet

These examples will use FAT32 and /dev/sdc1

  • fsck.vfat -n /dev/sdc1 — a simple non-interactive read-only check

  • fsck.vfat -a /dev/sdc1 — checks the file system and fixes non-interactively. Least destructive approach is always used.

  • fsck.vfat -r /dev/sdc1 — interactive repair. User is always prompted when there is more than a single approach to fixing a problem.

  • fsck.vfat -l -v -a -t /dev/sdc1 — a very verbose way of checking and repairing the filesystem non-interactively. The -t parameter will mark unreadable clusters as bad, thus making them unavailable to newly created files and directories.

Recovered data will be dumped in the root of the filesystem as fsck0000.rec, fsck0001.rec, etc. This is similar to CHK files created by scandisk and chkdisk on MS Windows.

ntfs-3g (previously also ntfsprogs) — NTFS filesystem

Due to the closed sourced nature of this filesystem and its complexity, there is no fsck.ntfs available on GNU/Linux (ntfsck isn’t being developed anymore). There is a simple tool called ntfsfix included in ntfs-3g package. Its focus isn’t on fixing NTFS volumes that have been seriously corrupted; its sole purpose seems to be making an NTFS volume mountable under GNU/Linux.

Normally, NTFS volumes are non-mountable if their dirty bit is set. ntfsfix can help with that by clearing trying to fix the most basic NTFS problems:

  • ntfsfix /dev/sda1 — will attempt to fix basic NTFS problems. e.g.: detects and fixes a Windows XP bug, leading to a corrupt MFT; clears bad cluster marks; fixes boot sector problems

  • ntfsfix -d /dev/sda1 — will clear the dirty bit on an NTFS volume.

  • ntfsfix -b /dev/sda1 — clears the list of bad sectors. This is useful after cloning an old disk with bad sectors to a new disk.

    Windows 8 and GNU/Linux cohabitation problems This segment is taken from http://www.tuxera.com/community/ntfs-3g-advanced/ When Windows 8 is restarted using its fast restarting feature, part of the metadata of all mounted partitions are restored to the state they were at the previous closing down. As a consequence, changes made on Linux may be lost. This can happen on any partition of an internal disk when leaving Windows 8 by selecting “Shut down” or “Hibernate”. Leaving Windows 8 by selecting “Restart” is apparently safe.

    To avoid any loss of data, be sure the fast restarting of Windows 8 is disabled. This can be achieved by issuing as an administrator the command : powercfg /h off

Install reiserfstools package to have reiserfsck and a softlink fsck.reiserfs available. Reiserfsck is a very talkative tool that will let you know what to do should it find errors.

  • fsck.reiserfs /dev/sda1 — a readonly check of the filesystem, no changes made (same as running with —check). This is what you should run before you include any other options.

  • fsck.reiserfs —fix-fixable /dev/sda1 — does basic fixes but will not rebuild filesystem tree

  • fsck.reiserfs —scan-whole-partition —rebuild-tree /dev/sda1 — if basic check recommends running with —rebuild-tree, run it with —scan-whole-partition and do NOT interrupt it! This will take a long time. On a non-empty 1TB partition, expect something in the range of 10-24 hours.

xfsprogs — xfs

If a check is necessary, it is performed automatically at mount time. Because of this, fsck.xfs is just a dummy shell script that does absolutely nothing. If you want to check the filesystem consistency and/or repair it, you can do so using the xfs_repair tool.

  • xfs_repair -n /dev/sda — will only scan the volume and report what fixes are needed. This is the no modify mode and you should run this first.

    • xfs_repair will exit with exit status 0 if it found no errors and with exit status 1 if it found some. (You can check exit status with echo $?)

  • xfs_repair /dev/sda — will scan the volume and perform all fixes necessary. Large volumes take long to process.

XFS filesystem has a feature called allocation groups (AG) that enable it to use more parallelism when allocating blocks and inodes. AGs are more or less self contained parts of the filesystem (separate free space and inode management). mkfs.xfs creates only a single AG by default.

xfs_repair checks and fixes your filesystems by going through 7 phases. Phase 3 (inode discovery and checks) and Phase 4 (extent discovery and checking) work sequentially through filesystem’s allocation groups (AG). With multiple AGs, this can be heavily parallelised. xfs_repair is clever enough to not process multiple AGs on same disks.

Do NOT bother with this if any of these is true for your system:

  • you created your XFS filesystem with only a single AG.
  • your xfs_repair is older than version 2.9.4 or you will make the checks even slower on GNU/Linux. You can check your version with xfs_repair -V

  • your filesystem does not span across multiple disks

otherwise:

  • xfs_repair -o ag_stride=8 -t 5 -v /dev/sda — same as previous example but reduces the check/fix time by utilising multiple threads, reports back on its progress every 5 minutes (default is 15) and its output is more verbose.

    • if your filesystem had 32 AGs, the -o ag_stride=8 would start 4 threads, one to process AGs 0-7, another for 8-15, etc… If ag_stride is not specified, it defaults to the number of AGs in the filesystem.

  • xfs_repair -o ag_stride=8 -t 5 -v -m 2048 /dev/sda — same as above but limits xfs_repair’s memory usage to a maximum of 2048 megabytes. By default, it would use up to 75% of available ram. Please note, -o bhash=xxx has been superseded by the -m option

== jfsutils — jfs == == btrfs ==

Missing superblock

Bad blocks

Sources and further reading

  • man pages
  • <XFS user guide> — more details about XFS filesystem

В любой живой системе неизбежны изменения и линукс здесь не исключение, когда обновляются пакеты, и такие важные части как драйвера и ядро ОС. Естественно, такие изменения могут приводить к ошибкам и сбоям, которые необходимо как-то находить и диагностировать, и для этого в Linux есть необходимые сподручные инструменты.

В свою очередь я пользуюсь двумя консольными утилитами:

dmesg (diagnostic message)

Просмотр и управление буфером сообщений ядра Linux. Любимый формат вызова:


sudo dmesg -H --level=err

Выводит сообщения уровня ошибки, приводя вывод в вид удобный для чтения, к примеру вот в такой, говорящий о наличии проблем с bluetooth:


[апр14 10:07] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр14 15:13] Bluetooth: hci0: Opcode 0x203b failed: -2
[апр14 15:14] Bluetooth: hci0: command 0xfcf0 tx timeout
[  +0,000039] Bluetooth: hci0: Failed to read MSFT supported features (-110)
[  +2,016210] Bluetooth: hci0: command 0xfd53 tx timeout
[  +0,000000] Bluetooth: hci0: AOSP get vendor capabilities (-110)
[  +0,386195] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр14 21:33] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр14 23:22] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр15 00:02] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр15 09:27] Bluetooth: hci0: AOSP capabilities length 1 too short
[  +2,639139] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр15 09:57] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр15 11:29] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр15 18:13] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр15 18:14] Bluetooth: hci0: AOSP capabilities length 1 too short
[апр15 19:05] [drm:dc_dmub_srv_wait_idle [amdgpu]] *ERROR* Error waiting for DMUB idle: status=3
[  +3,111900] Bluetooth: hci0: AOSP capabilities length 1 too short
[ +34,771521] Bluetooth: hci0: AOSP capabilities length 1 too short

journalctl (journal control)

Просмотр systemd журнала загрузки Linux. Просмотр текущей сессии загрузки:


journalctl -b

И бывает нередко необходимо просмотреть как осущствлялась загрузка предыдущей сессии:


journalctl -b -1

Эти простые утилиты позволяют довольно эффективно провести начальную диагностику возможных проблем в системе. Надеюсь и вам они пригодятся и помогут в трудную минуту.

Обязательные поля помечены *

In the terminal exist a number of tools to do a preliminary diagnosis:

Before mentioning some of the tools remember that adding --help to any of the commands will normally throw you some help for the command. For example dmesg --help. Why do I mention this, because most of the time this will give you very good information about how to use the command, make it more verbose or simple or how to output some info. The --help parameter is one of 3 that can show you information about a command. The other 2 are info and man. For example man dmesg or info dmesg. This 2 show more info about a command. In the order of --help showing you less help and man showing you the most.

The following list is a small list of commands I use to check problems:

dmesg — Shows Boot Up Message and other Kernel related messages like device connections (When you plug in a new device eg: external hard drives, webcams, bluetooth devices…). Type dmesg in console and it will show you how the system booted up. If you have hard drive problems or any other booting problem they might show here.

lshw — It shows you the Hardware List for all devices connected and in the PC.

lsusb — It shows you all USB devices connected.

lscpu — Shows you basic CPU information.

lspci — Shows you all PCI devices (Video Card, Sound Card, Capture Card…)

lsb_release -a — Shows you the Ubuntu Version, Codename, Release..

lspcmcia — Shows you all pcmcia devices connected to the PC.

lshal — Shows you all devices registered with HAL. If the device uses HAL it will appear.

lsmod — Shows you all modules loaded with the kernel

modprobe — Adds or Removes modules to and from the kernel.

lsblk — Shows you all block devices. In normal language it means it shows you a nice little list of how you partitioned you hard drives, size of each partition, where it is mounted, etc…

fsck — Used to fix several filesystem errors. DO NOT USE IT ON A MOUNTED PARTITION!. This is similar to chkdsk on Windows but with steroids.

X(Capital letter X) — The X system. If you have xorg.conf problems you can do X --configure to create a new xorg.conf and X -config XORGFILE to test a xorg.conf (XORGFILE is the path and name of the xorg.conf file). X also does many MANY things.

xrandr — To change, check and do custom changes to the resolution.

dmidecode — Shows memory specific information. Needs sudo to run.

add-apt-repository / apt-add-repository — Used to add PPAs. For example add-apt-repository ppa:ubuntu-wine/ppa. saves from having to add it manually and then add the key for it.

apt-get — Default installer for packages in Ubuntu. Example: apt-get install wine1.3

aptitude — Excellent installer for packages in Ubuntu. Example: aptitude install wine1.3. Includes search options, cleaning and other in one single command. This are also included in the apt packages but divided in several commands.

alsamixer — Sound mixer in console. This solves some sound problems related to microphone not working, sound not very loud…

dpkg — Official package manager for debian based packages.

df — shows free space and used space for each partition/mounted device.

glxinfo — Used to show OpenGL information about the video card. Needs to install the mesa-util package to use it.

glxheads — Used to show basic OpenGL video card information. Video card name, OpenGL version and Vendor.

hdparm — Used to check and perform several actions/tests/checks in regard to hard drives.

netstat — Shows you network connections, routing…

nano / pico — My best friend. Edit files in the terminal. I know..I know. vi or vim. But it has a very weird learning curve and I want something «user friendly» and not «hacker angry». It is true there are many things you can do with vi but it is easier to learn nano or pico than to learn vi. I will actually learn vi before the end of the year.. it is on my wish/work list.

ntfsfix — Fixes some ntfs partition problems.

wineserver — Manages wine apps. If you add the parameter -k like so wineserver -k it will close/kill any wine app opened. This will solve wine app problems that stay opened without closing or having some hanging problems.

testdisk — Recovers deleted partitions.

photorec — Recovers multiple files deleted overtime. Has a very good recovery percent.

foremost — Recovers multiple file deleted overtime. Has a better recovery than photorec in several formats but since it has not been updated since 2007 photorec with the work done in it has much of it surpassed it. Version 6.13 Beta is many times better. Although I still use both just in case.

parted — Partition manipulation software. Nice one.

fdisk — Similar to parted. Very good also.

ssh — Remote control protocol. Without this about 90% of all remote assistance for me would be gone.

kill — Kills a specific process using its ID. Add the parameter -9 to it to kill it with a machine gun filled with velociraptors holding scissors with bullets. Example: kill -9 12345

killall — Similar to kill but using the process name. Example: killall lightdm. You can also use the -9 parameter but using it with the ID as in the kill command.

top — Shows you all process active, zombies and whatnot. Real time check.

ps — Shows to a list of runnin process. Not in real time as in top. Add the paramater -ex to it to see a better list of the process with name, locations, parent ID… . Example: ps -ex

If you’re having trouble starting or running your Ubuntu system, you can check for errors by running the dmesg command. This utility displays log messages and is useful for troubleshooting post-error investigations. These logs also show how many times a user has attempted to breach a security system. You can check your system’s errors by understanding what they mean and how to fix them. To start, simply locate the command line and enter the command. Then, select the -show-all or’show-only’ option. The dmesg window will appear in the directory where Ubuntu was installed.

If your filesystem is damaged, you may need to repair it with the fsck command. You can also use the lsblk command to check whether your filesystem is mounted. Using this command will display the latest system logs, sorted by category. You can also view older log files to see what might have occurred. You may want to read the logs in chronological order for more detailed information.

How Do I Run Chkdsk on Ubuntu?

Running CHKDSK on your hard disk can help you protect your important files. It runs a diagnostic scan to check if there are any logical errors or bad sectors. This utility will often fix the problems on your disk, but sometimes you may need to perform additional scans to ensure the integrity of your data. Learn how to run Chkdsk on Ubuntu and other popular operating systems. Listed below are a few common problems that you might encounter when using the CHKDSK utility.

FSCK is another file system maintenance utility available in Linux. It checks the filesystem for errors and displays a report of the status of the file system. While the former is recommended in cases of disk failures, the latter is best suited for disk errors. The FSCK utility will also scan active partitions for bad sectors and other problems. If you are experiencing a disk failure, you may want to run chkdsk /f instead.

If you’re running Ubuntu and have noticed the “Check for system errors” option, you should know how to use it. Most users simply hit Ctrl+C to cancel this step, but it’s actually a good idea to let it run. By doing so, you’ll be able to fix any errors and ensure that your system remains error-free. In addition, by checking for system errors, you’ll also be able to determine which components of your operating system need repair.

After you’ve successfully run fsck, you can use ‘a’ option to fix any file system problems that fsck may have detected. Similarly, if you’ve selected ‘y’ when running fsck, you’ll be able to force the utility to fix any file system problems without involving the user. For example, if you run fsck on /dev/sda6 and it reports that it is corrupted, fsck will print ‘y’ before exiting, and fix any file attributes or directory problems that it has detected.

Where are System Logs in Ubuntu?

You may be wondering where you can find the system logs on your Ubuntu system. These files deal with the various operations that are performed on your system, such as security messages, daemons, and messages. Some of these systems even generate their own logs, called system daemons, and you can view these logs from the /var/log folder. For more information, read this article. You’ll discover how to read system log files and the differences between log files.

If you’re interested in examining a specific log, you can use the gnome-system-log command to display it. Entering gnome-system-log will launch the graphical tool. This allows you to view the logs for specific events. You can also look at individual logs by using keywords. The output of these searches can be helpful when troubleshooting issues with your system.

How Do I Check System Errors in Linux?

If you’re not sure how to check system errors in Ubuntu, you’re not alone. Luckily, Linux provides a handy tool that will let you see the most recent error message. The Tail command looks through all log files and displays the last line. Use this to identify if any of the errors were caused by a specific program or by a hardware issue. In addition, you can check which system processes have been affected by the error.

Common filesystem errors include bad sectors, bad blocks, and inconsistent filesystems. You can perform these tests using a number of standard Linux tools. First, make sure that your disk is not mounted. You may not be able to unmount the root filesystem, so you may need to use a live Linux system to do so. You can also use a disk-testing tool to recover the partition table if you’ve lost it.

How Do I Fix Disk Errors in Ubuntu?

If you’re wondering how to fix disk errors in Ubuntu, you’ve come to the right place. Linux hard drives aren’t perfect, and problems can happen at any time. Learning how to handle a bad disk will help you minimize the problem. This tutorial will show you how to perform a diagnostic test to find and fix errors on disks. Once you have determined the cause of the error, you can use the following tools to solve it.

The fsck command can be used to identify bad blocks. Once you have this command, run it as root. Make sure you have sudo privileges before running the command. Use the parameters “search for bad blocks” and “force file system check” to fix any errors. Note that the fsck command can take a long time – it may take 20 minutes to complete the process. Regardless, the results will be worth it.

Is There a Chkdsk For Linux?

If you’ve ever wanted to perform a hard disk check, you’ve probably wondered “Is There a Chkdsk for Linux?” This command will inspect your hard drive’s space and usage, and will display a file system status report. This command will also report any spurious errors that may exist on the active partitions of your system. The following steps will guide you through the process.

In order to run a chkdsk on a disk in Linux, you must have it locked. You can also use the /x parameter to invalidate open handles on the drive. You can find the command in the start menu or use the search bar. Run chkdsk to check the disk and recover any readable information. Once it’s finished, you can reconnect the hard drive or remove it.

How Do I Repair Ubuntu?

During the installation process, Ubuntu runs an automatic file system check. Most users cancel this step by pressing Ctrl + C, but it is best to allow the check to complete. A damaged file system can lead to random crashes, apps that don’t open, and frequent reboots. To repair a corrupted file system, you need to run the fsck command. This command can fix most common errors on your Ubuntu system.

To run the fsck command, locate the command line on your Ubuntu machine. To view the system error log, type dmesg on the command line. You can run the command with the -show-all or ‘-log’ options. After typing this command, a text window will appear. This window will show a list of the errors that occurred on the system. If you see multiple errors, choose ‘y’ to continue with the process.

Понравилась статья? Поделить с друзьями:
  • Как проверить текст на ошибки и знаки препинания
  • Как проверить солярис на ошибки
  • Как проверить том на наличие ошибок
  • Как проверить текст на ошибки орфографии и пунктуации
  • Как проверить смартфон на ошибки системы