LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 10:23 PM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

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, 10:44 PM   #2
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Boot in single user - "rescue" or "failsafe" mode - then run fsck.
 
Old 11-13-2015, 11:23 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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-13-2015 at 11:27 PM.
 
1 members found this post helpful.
Old 11-14-2015, 02:40 AM   #4
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
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, 03:59 PM   #5
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
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



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 12:48 AM
fsck and root file system xj25vm Slackware 4 10-20-2011 01:11 PM
fsck a file system on a dm-crypt'ed partition Willard Linux - Hardware 1 05-27-2011 10:46 AM
fsck damaged my file system Dr_Death_UAE Linux - General 10 02-03-2010 08:21 AM
SnapSevr 4100 File System Check : FSCK fatal error = 39 Disk 40000 Alexey Nazarov Linux - General 0 11-22-2009 07:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:12 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
Open Source Consulting | Domain Registration