特殊:Badtitle/NS100:SystemAdministration/Fsck:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第32行: | 第32行: | ||
fsck -F ufs /dev/sdb1 | fsck -F ufs /dev/sdb1 | ||
</nowiki></pre> | </nowiki></pre> | ||
It is also possible to run via the shutdown command: | |||
<pre><nowiki> | |||
shutdown -rF | |||
</nowiki></pre> | |||
Check in /var/log/fsck for results if running on a headless system or a VM where the console is not available during boot. | |||
== Errors == | == Errors == | ||
Still writing, finish tommorrow. | Still writing, finish tommorrow. |
2010年5月20日 (四) 00:21的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/SystemAdministration/Fsck }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/af | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Afrikaans| [[::SystemAdministration/Fsck/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ar | • {{#if: UbuntuHelp:SystemAdministration/Fsck|العربية| [[::SystemAdministration/Fsck/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/az | • {{#if: UbuntuHelp:SystemAdministration/Fsck|azərbaycanca| [[::SystemAdministration/Fsck/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/bcc | • {{#if: UbuntuHelp:SystemAdministration/Fsck|جهلسری بلوچی| [[::SystemAdministration/Fsck/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/bg | • {{#if: UbuntuHelp:SystemAdministration/Fsck|български| [[::SystemAdministration/Fsck/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/br | • {{#if: UbuntuHelp:SystemAdministration/Fsck|brezhoneg| [[::SystemAdministration/Fsck/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ca | • {{#if: UbuntuHelp:SystemAdministration/Fsck|català| [[::SystemAdministration/Fsck/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/cs | • {{#if: UbuntuHelp:SystemAdministration/Fsck|čeština| [[::SystemAdministration/Fsck/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/de | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Deutsch| [[::SystemAdministration/Fsck/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/el | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Ελληνικά| [[::SystemAdministration/Fsck/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/es | • {{#if: UbuntuHelp:SystemAdministration/Fsck|español| [[::SystemAdministration/Fsck/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/fa | • {{#if: UbuntuHelp:SystemAdministration/Fsck|فارسی| [[::SystemAdministration/Fsck/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/fi | • {{#if: UbuntuHelp:SystemAdministration/Fsck|suomi| [[::SystemAdministration/Fsck/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/fr | • {{#if: UbuntuHelp:SystemAdministration/Fsck|français| [[::SystemAdministration/Fsck/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/gu | • {{#if: UbuntuHelp:SystemAdministration/Fsck|ગુજરાતી| [[::SystemAdministration/Fsck/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/he | • {{#if: UbuntuHelp:SystemAdministration/Fsck|עברית| [[::SystemAdministration/Fsck/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/hu | • {{#if: UbuntuHelp:SystemAdministration/Fsck|magyar| [[::SystemAdministration/Fsck/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/id | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Bahasa Indonesia| [[::SystemAdministration/Fsck/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/it | • {{#if: UbuntuHelp:SystemAdministration/Fsck|italiano| [[::SystemAdministration/Fsck/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ja | • {{#if: UbuntuHelp:SystemAdministration/Fsck|日本語| [[::SystemAdministration/Fsck/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ko | • {{#if: UbuntuHelp:SystemAdministration/Fsck|한국어| [[::SystemAdministration/Fsck/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ksh | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Ripoarisch| [[::SystemAdministration/Fsck/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/mr | • {{#if: UbuntuHelp:SystemAdministration/Fsck|मराठी| [[::SystemAdministration/Fsck/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ms | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Bahasa Melayu| [[::SystemAdministration/Fsck/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/nl | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Nederlands| [[::SystemAdministration/Fsck/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/no | • {{#if: UbuntuHelp:SystemAdministration/Fsck|norsk| [[::SystemAdministration/Fsck/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/oc | • {{#if: UbuntuHelp:SystemAdministration/Fsck|occitan| [[::SystemAdministration/Fsck/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/pl | • {{#if: UbuntuHelp:SystemAdministration/Fsck|polski| [[::SystemAdministration/Fsck/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/pt | • {{#if: UbuntuHelp:SystemAdministration/Fsck|português| [[::SystemAdministration/Fsck/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ro | • {{#if: UbuntuHelp:SystemAdministration/Fsck|română| [[::SystemAdministration/Fsck/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/ru | • {{#if: UbuntuHelp:SystemAdministration/Fsck|русский| [[::SystemAdministration/Fsck/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/si | • {{#if: UbuntuHelp:SystemAdministration/Fsck|සිංහල| [[::SystemAdministration/Fsck/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/sq | • {{#if: UbuntuHelp:SystemAdministration/Fsck|shqip| [[::SystemAdministration/Fsck/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/sr | • {{#if: UbuntuHelp:SystemAdministration/Fsck|српски / srpski| [[::SystemAdministration/Fsck/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/sv | • {{#if: UbuntuHelp:SystemAdministration/Fsck|svenska| [[::SystemAdministration/Fsck/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/th | • {{#if: UbuntuHelp:SystemAdministration/Fsck|ไทย| [[::SystemAdministration/Fsck/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/tr | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Türkçe| [[::SystemAdministration/Fsck/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/vi | • {{#if: UbuntuHelp:SystemAdministration/Fsck|Tiếng Việt| [[::SystemAdministration/Fsck/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/yue | • {{#if: UbuntuHelp:SystemAdministration/Fsck|粵語| [[::SystemAdministration/Fsck/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/zh | • {{#if: UbuntuHelp:SystemAdministration/Fsck|中文| [[::SystemAdministration/Fsck/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/zh-hans | • {{#if: UbuntuHelp:SystemAdministration/Fsck|中文(简体)| [[::SystemAdministration/Fsck/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SystemAdministration/Fsck | UbuntuHelp:SystemAdministration/Fsck | {{#if: | :}}SystemAdministration/Fsck}}/zh-hant | • {{#if: UbuntuHelp:SystemAdministration/Fsck|中文(繁體)| [[::SystemAdministration/Fsck/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:SystemAdministration/Fsck|:SystemAdministration/Fsck|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :SystemAdministration/Fsck/zh | | {{#ifexist: SystemAdministration/Fsck/zh | | {{#ifeq: {{#titleparts:SystemAdministration/Fsck|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:SystemAdministration/Fsck|1|-1|}} | zh | | }}
This page is a default template for documentation on the wiki. To create a new guide on the wiki, read the page WikiGuide.
Please Include
I am listing information that I would like included in this article. Clearly, this article is a work in progress, and maybe I will clean it up a bit. Till then, I'm just listing the links I found. One question I have, is to how to run fsck on /. This link offers a solution. Also, please include the information in this link which describes how to change the frequency that a fsck is run at startup.
Introduction
This page introduces the fsck utility, used to check and repair file systems. File systems can become inconsistent. This can be caused by power failure, incomplete shut-down and hardware failure. This causes file system operations to be incomplete. This is less of a problem with journalized file systems (such as Ext3) which write changes to a log journal before committing to the main file system. In the case of a failure, the journal is re-executed until the system is consistent. If the system is interrupted and every thirty reboots, fsck is run.
The many faces of fsck
To the new user, there often seems to be a lot of applications with similar names to fsck, such as fsck, fsck.ext2 and e2fsck. This is because different applications have been written for each file system as it has been written. In order to consolidate this into one system, the file system name is appended to fsck to run that utility. For example: fsck.ext2 runs fsck on an ext2 file system.
How does it know which file systems to check?
The /etc/fstab file is scanned. All non-zero pass numbered partitions are checked starting with one (which is normally the root partition). Next all mounted file systems are scanned sequentially.
Running
Fsck should always be run in single user mode other wise data can be corrupted. Fsck runs in two modes: interactive - where each error encountered requires the users input and non-interactive where fsck attempts repair. The program is run using the command: Interactive:
fsck -F file_system_type partition
Non-interactive:
fsck -F file_system_type -y partition
For example, to check an ntfs partition, /dev/sdb1 non-interactively:
fsck -F ufs /dev/sdb1
It is also possible to run via the shutdown command:
shutdown -rF
Check in /var/log/fsck for results if running on a headless system or a VM where the console is not available during boot.
Errors
Still writing, finish tommorrow. This page is maintained by DougieRichardson.