Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Nov 2017, 22:15
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
how to do a fsck on a linux filesystem
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
labbe5

Joined: 13 Nov 2013
Posts: 1023
Location: Canada

PostPosted: Thu 19 Oct 2017, 11:22    Post subject:  how to do a fsck on a linux filesystem  

https://setaoffice.com/2010/05/17/running-fsck-and-automatically-fix-any-errors-encountered/

You need to have utils-linux installed to do fsck.

Unmount your device, then do :
fsck -y /dev/sdb1

Note : depending on your device, it may be anything from sdb1 to sdbx. The flag -y is added to have your filesystem corrected automatically.
Do another pass to have a confirmation that your filesystem is cleaned.

To check your hard drive, you need to use a portable OS, such as Puppy or Dog, because it must be unmounted to do a fsck.

Further reading :
http://www.thegeekstuff.com/2012/08/fsck-command-examples/
https://www.howtogeek.com/howto/37659/the-beginners-guide-to-linux-disk-utilities/

Last edited by labbe5 on Mon 23 Oct 2017, 09:24; edited 1 time in total
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9526
Location: Charleston S.C. USA

PostPosted: Thu 19 Oct 2017, 13:11    Post subject:  

Thanks for the info!

In every version of Puppy I have used.
fsck is built in.

Simply do this:

File system check at terminal
Drive has to be unmounted.
Drive id to reflect what drive to check

Code:
e2fsck /dev/sda1


To see options enter e2fsck in terminal.

Quote:
root# e2fsck
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device

Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 696
Location: Altair IV , Just north of Eeyore Junction.

PostPosted: Thu 19 Oct 2017, 15:55    Post subject:  

How to do an fsck automatically every boot
http://www.murga-linux.com/puppy/viewtopic.php?p=756151&sid=c9c7069a92389ce72859ff159d61ae3d#756151

.

.

_________________
.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 813
Location: Oslo, Norway

PostPosted: Thu 19 Oct 2017, 18:44    Post subject:  

Quote:
The flag -y is added to have your filesystem corrected automatically.

NEVER let anything happen automatically to your system without making a backup first!

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1226s ][ Queries: 11 (0.0041s) ][ GZIP on ]