LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-13-2015, 11:23 PM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 157

Rep: Reputation: Disabled
How to check the current file system with fsck?


fdisk -l

Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x197fb8ed

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sda2 206848 141195263 140988416 67.2G 7 HPFS/NTFS/exFAT
/dev/sda3 141195346 467910655 326715310 155.8G f W95 Ext'd (LBA)
/dev/sda4 470011904 488392703 18380800 8.8G 7 HPFS/NTFS/exFAT
/dev/sda5 141195348 188153279 46957932 22.4G 7 HPFS/NTFS/exFAT
/dev/sda6 188201538 262919789 74718252 35.6G 7 HPFS/NTFS/exFAT
/dev/sda7 262920192 267016191 4096000 2G 82 Linux swap / Solaris
/dev/sda8 385992704 455940095 69947392 33.4G 83 Linux
/dev/sda9 455954432 467910655 11956224 5.7G 83 Linux
/dev/sda10 267018240 385978367 118960128 56.7G 83 Linux

fsck -y /dev/sda1
fsck from util-linux 2.25.2
fsck -y /dev/sda2
fsck from util-linux 2.25.2
fsck -y /dev/sda5
fsck from util-linux 2.25.2
fsck -y /dev/sda6
fsck from util-linux 2.25.2
fsck -y /dev/sda7
fsck from util-linux 2.25.2
fsck -y /dev/sda8
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
/dev/sda8: clean, 144749/2187264 files, 1028435/8743424 blocks
fsck -y /dev/sda9
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)

fsck -y /dev/sda10
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
/dev/sda10 is mounted.
e2fsck: Cannot continue, aborting.

How to check sda10 with command fsck? My debian8 was installed here.
 
Old 11-13-2015, 11:44 PM   #2
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Back to Debian, and only Debian.
Posts: 1,146
Blog Entries: 7

Rep: Reputation: 321Reputation: 321Reputation: 321Reputation: 321
Boot in single user - "rescue" or "failsafe" mode - then run fsck.
 
Old 11-14-2015, 12:23 AM   #3
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,689

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by goumba View Post
Boot in single user - "rescue" or "failsafe" mode - then run fsck.
Other options:

fsck -n /dev/sd10
read-only, therefore safe, but might report errors because the filesystem is in an inconsistent state while mounted.

Some distros allow forcing fsck at boot time by creating the empty file /forcefsck, or perhaps other means.

Or use tune2fs to change the fsck interval and reboot.

Last edited by berndbausch; 11-14-2015 at 12:27 AM.
 
1 members found this post helpful.
Old 11-14-2015, 03:40 AM   #4
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,288
Blog Entries: 2

Rep: Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939
Could use a live Medium... or, trigger to run on boot?

http://www.ducea.com/2008/10/24/linu...e-next-reboot/
http://www.cyberciti.biz/faq/linux-f...boot-sequence/
 
Old 11-14-2015, 04:59 PM   #5
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Back to Debian, and only Debian.
Posts: 1,146
Blog Entries: 7

Rep: Reputation: 321Reputation: 321Reputation: 321Reputation: 321
Unfortunately the OP didn't mention the distribution, but likely at this point it's using systemD which ignores the traditional methods of forcing fsck at boot.

Instead with systemd, the OP must add

Code:
fsck.mode=force
to the boot time command line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fsck root file system packets Linux - Newbie 3 11-01-2014 01:48 AM
fsck and root file system xj25vm Slackware 4 10-20-2011 02:11 PM
fsck a file system on a dm-crypt'ed partition Willard Linux - Hardware 1 05-27-2011 11:46 AM
fsck damaged my file system Dr_Death_UAE Linux - General 10 02-03-2010 09:21 AM
SnapSevr 4100 File System Check : FSCK fatal error = 39 Disk 40000 Alexey Nazarov Linux - General 0 11-22-2009 08:41 PM


All times are GMT -5. The time now is 08:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration