LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-20-2005, 11:19 AM   #1
matrim
Member
 
Registered: Dec 2002
Location: utah
Distribution: Redhat; Fedora 2, 6
Posts: 114

Rep: Reputation: 15
How to bypass bad block on Hard drive


I've some bad blocks, that redhat stops and does a force check to fix/ignore upon boot up. Is there a way to bypass at boot, remove, or repair the bad blocks?
 
Old 01-20-2005, 02:58 PM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
An option for e2fsck is to mark the bad blocks and flag them so that data will not be saved onto it. 'man e2fsck' to look at the different arguments you can pass.

-twantrd
 
Old 01-20-2005, 03:17 PM   #3
matrim
Member
 
Registered: Dec 2002
Location: utah
Distribution: Redhat; Fedora 2, 6
Posts: 114

Original Poster
Rep: Reputation: 15
Thanks,
After looking at man for e2fsck, I couldn't find anything that flagged the bad superblock so that data would not be saved to it. Only thing close was the -l option to write the bad block to a badblock file, but I have no idea what the file is called. I tried making one using the command e2fsck -pv -L badblocks /dev/hdc , but it just keeps saying Bad magic number in super-block, while trying to open /dev/hdc. It can't read the block or something.
 
Old 01-20-2005, 04:42 PM   #4
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
My 'man e2fsck' shows:

-c
This option causes e2fsck to run the badblocks(8) program to find any blocks which are bad on the filesystem, and then marks them as bad by adding them to the bad block inode. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test.


Therefore, run e2fsck -c /dev/hdc

-twantrd
 
  


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
Bad hard drive? Kitohe Linux - Hardware 4 09-25-2004 07:32 PM
hard drive, going bad? cheater1034 Linux - Hardware 7 09-13-2004 03:02 PM
Bad Sector Hard Drive tsigane Linux - Hardware 16 08-15-2004 03:07 AM
Hard Drive going bad seldomseen Linux - Hardware 3 12-10-2003 02:13 PM
Is my hard-drive bad? moger Linux - Hardware 10 01-18-2003 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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