LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-20-2009, 05:55 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Rep: Reputation: 51
Corrupted disk and use of fsck


In the recent interview I was asked a Question "How can you find if the Disk is corrupted on Linux?"

Last edited by pixellany; 07-20-2009 at 06:15 AM. Reason: new title for merged threads
 
Old 07-20-2009, 05:58 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Read "man fsck".
 
Old 07-20-2009, 05:58 AM   #3
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Experimenting with fsck???

I have Ubuntu Linux 9.04 Jaunty running on Dell Lappy. I want to experiment with fsck command. How Can I learn as I need to forcibly damage the filesystem.Pls Suggest how can I learn fsck issue?
 
Old 07-20-2009, 06:08 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,533

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
I use a USB stick. Arc up some heavy (write) I/O to it, and pull it out.
You'll get some recovery practice. Interrupted mkfs or mkswap works too ...
 
Old 07-20-2009, 06:10 AM   #5
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I have already read the man page but dint understand.
Can you please explain in brief.
 
Old 07-20-2009, 06:19 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I have merged your two closely related threads......Please keep similar topics together in one thread.
Quote:
I have already read the man page but dint understand.
Can you please explain in brief.
Please tell us WHAT you did not understand. Have you tried "fsck"?
 
Old 07-20-2009, 06:32 AM   #7
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I read couple of articles related to fsck but never got a chance to come across one.Is there any way I can corrupt my Filesystem and try troubleshooting the same?I heard that fsck shudnt be run on / and /usr directory.But say, I came across soemthing like You have corrupted filesystem and need to press Ctrl+Z to reboot after asking root password. How Can I know which Superblock is damaged?
 
Old 07-20-2009, 06:46 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Did you see the post by syg00?

More generally, you could run fsck on any partition where you do not care about the data.

Are you more concerned about how to run fsck---or how to create a corrupted filesystem. For the latter, I'll add using dd to write to random locations on the partition.
 
Old 07-20-2009, 07:11 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,714
Blog Entries: 27

Rep: Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055
Hi,

I would add that you should not run 'fsck' on a active filesystem. You should run in 'single' user mode whenever you must repair a filesystem that may be accessed by others. The best way to ensure this is to either reboot then enter 'single' as a kernel parameter or just use your install cd/dvd to boot. That way you will be insured not to be in a multi-user environment without your filesystem(s).
 
  


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
How do I (re)install a partition table on a corrupted SATA disk? Kamoflauge Linux - General 11 05-22-2008 06:31 AM
dd corrupted my hard disk asridhars Linux - General 5 09-05-2007 02:40 AM
SATA Hard disk(Windows) MBR corrupted by IDE hard disk(Linux) Peter_APIIT Fedora 6 07-07-2007 12:20 AM
Corrupted boot disk sj12345 Fedora - Installation 3 12-03-2005 08:47 PM
Linux corrupted due to full hard disk ravykanth Linux - Newbie 7 10-20-2003 06:42 PM


All times are GMT -5. The time now is 12:39 PM.

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