LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-05-2003, 06:54 PM   #1
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 598
Blog Entries: 1

Rep: Reputation: 45
Linux Scandisk equivalent.


What is the equivalent in Linux for scandisk in Windows? The Linux program that I need is one that will check the hard drive sector by sector and that will identify and mark out any bad sectors that are found.
 
Old 11-05-2003, 06:57 PM   #2
randomblast
Member
 
Registered: Aug 2003
Location: Manchester, England, UK, The World....
Distribution: Gentoo/SuSE 9.0
Posts: 291

Rep: Reputation: 30
badblocks or fsck
you'll find them in /sbin
 
Old 11-05-2003, 07:39 PM   #3
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 598
Blog Entries: 1

Original Poster
Rep: Reputation: 45
Next questions: when running as root, fsck and badblocks both say that running them while the file system is mounted will cause severe damage to the file system (i.e. the hard drive). The questions are: (1) how does root unmount the hard drive?; (2) how are badblocks and fsck accessed while the hard drive is unmounted?; (3) how is the hard drive remounted?.
 
Old 11-05-2003, 09:39 PM   #4
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Rep: Reputation: 30
1. the command: umount /dev/hda1 will unmount partition hda1. Wherever / is, is where you would unmount, however: you can't unmount it while using applications from it My / partition is at /dev/hda3. You can find this by doing: cat /proc/partitions.

I have not used either fsck or badblocks yet as my filesystem is always unmounted cleanly thanks to UPS and some good luck I'm sure there is an easier way to run fsck, but you could create a bootdisk, boot from it and run a scan while the drive/partition is not mounted.
 
Old 11-06-2003, 12:20 AM   #5
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
i think it i safe to run fsck if u could remount / as read-only but dont take my word for it. u'll need to shutdown every daemon and process (eg syslog)
that writes to the disk before remounting though.
 
Old 11-06-2003, 03:09 AM   #6
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Sounds like another job for Tom's Root/Boot. It's still one of the best rescue/recovery disks out there. Unless you don't have a floppy drive, then get Knoppix or Slackware Live.

Enjoy!
--- Cerbere
 
Old 11-06-2003, 06:43 AM   #7
randomblast
Member
 
Registered: Aug 2003
Location: Manchester, England, UK, The World....
Distribution: Gentoo/SuSE 9.0
Posts: 291

Rep: Reputation: 30
or alternatively you could just boot into rescue mode from your mandrake disc
 
Old 11-06-2003, 07:12 AM   #8
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
to check your root system:

Code:
telinit 1               # single user mode, closes all programs + network
mount -o remount,ro /   # remount read only 
fsck -f /dev/hd..       # run the checker
or: e2fsck -f /dev/hd..
mount -o remount,rw /   # read-write again.
runlevel                # see the current/previous runlevel
telinit 3               # use the previous runlevel in this command
 
  


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
What's the Linux-equivalent of MS scandisk? johnMG Debian 4 12-22-2004 08:27 PM
Scandisk Equivalent-Flag bad Sectors? joe56 Linux - Software 1 06-16-2004 12:12 PM
Scandisk in Linux ako Linux - Newbie 3 01-15-2004 05:36 AM
linux scandisk? versaulis Linux - Software 1 10-22-2003 06:51 PM
linux "scandisk" equivalent snow Linux - Software 3 12-27-2002 11:38 AM


All times are GMT -5. The time now is 02:05 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