DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th October 2008
ccc ccc is offline
Shell Scout
 
Join Date: May 2008
Posts: 97
Default check for badblocks

hi

howto check freeBSD 7.0 for badblocks ?
is it possible to start the badblocks check on running freeBSD without damage the system ?
Reply With Quote
  #2   (View Single Post)  
Old 18th October 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Go to the website of the manufacturer of your disk and download an utility to scan the drive for bad blocks. (Usually a MS-DOS or Windows utility)

If you want to pay some bucks and make Steve Gibson rich, get his Spinrite program from grc.com
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 18th October 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

You can do it like that:
Code:
% dd < /dev/ad0 > /dev/null
it will read every block of your hard drive, if you get any read errors, then you have bad sectors.

You can also try to "fix" these bad sectors with gshred from coreutils package:
Code:
# gshred --verbose /dev/ad0
But keep in mind that gshred will erase all your data from this drive.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #4   (View Single Post)  
Old 18th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

man dd example section says?:
Code:
     Check that a disk drive contains no bad blocks:

	   dd if=/dev/ad0 of=/dev/null bs=1m

     Do a refresh of a disk drive, in order to prevent presently recoverable
     read errors from progressing into unrecoverable read errors:

	   dd if=/dev/ad0 of=/dev/ad0 bs=1m
Reply With Quote
  #5   (View Single Post)  
Old 30th October 2008
ccc ccc is offline
Shell Scout
 
Join Date: May 2008
Posts: 97
Default

thx,

can I check the system for bad sectors (just a test) using read only option
on a running system without single mode or unmout the partitions ?
Reply With Quote
  #6   (View Single Post)  
Old 30th October 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

yes, with that:
% dd < /dev/ad0 > /dev/null
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No spell check in openoffice? Mantazz FreeBSD Ports and Packages 13 29th July 2009 04:30 PM
Check this out (funny contest). fbsduser Off-Topic 6 4th March 2009 10:48 PM
please check my pf.conf gosha OpenBSD Security 10 30th January 2009 12:32 AM
Best way to check and fix corrupt disk? bsdme2 FreeBSD General 5 29th January 2009 06:10 PM
how to check package dependencies? bsdnewbie999 OpenBSD Packages and Ports 5 31st July 2008 04:05 AM


All times are GMT. The time now is 04:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick