LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-19-2003, 10:19 PM   #1
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Rep: Reputation: 30
ScanDisk on RedHat Partition


How can I use scandisk on /dev/hda1 instead of c: because it is not in a c or d drive.

Is there a program like scandisk for Linux?
 
Old 07-19-2003, 10:21 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
fsck /dev/hda
 
Old 07-19-2003, 11:21 PM   #3
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by DrOzz
fsck /dev/hda
Where do I enter this?
 
Old 07-19-2003, 11:28 PM   #4
Cap'n Ahab
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
To enter it like that you'd have to open a terminal window, I believe. (Menu/ System Tools/ Terminal)

When I tried it bash didn't recognize it, but that's probably because I don't have that program installed. You can still give it a shot.
 
Old 07-19-2003, 11:33 PM   #5
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Cap'n Ahab
To enter it like that you'd have to open a terminal window, I believe. (Menu/ System Tools/ Terminal)

When I tried it bash didn't recognize it, but that's probably because I don't have that program installed. You can still give it a shot.
Quote:
bash: fsck: command not found
Any idea where to download the program?
 
Old 07-19-2003, 11:38 PM   #6
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
it is saying the command is not found because of probably:
a) your not running it as root
or..
b) your running it as root but /sbin is not in your path

so in order to run this to solve both circumstances you will have to:
su to root
type the full path
/sbin/fsck /dev/hda
 
Old 07-19-2003, 11:45 PM   #7
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Original Poster
Rep: Reputation: 30
Quote:
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
I take it that means don't use it?
 
Old 07-19-2003, 11:48 PM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
That means don't use it 'then'. You should never run a disk check on a mounted filesystem because of the read-write issues. Umount the drive (if this is your root drive boot up into rescue mode with your CD) and then run fsck on it.

Cool
 
Old 07-19-2003, 11:59 PM   #9
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by MasterC
That means don't use it 'then'. You should never run a disk check on a mounted filesystem because of the read-write issues. Umount the drive (if this is your root drive boot up into rescue mode with your CD) and then run fsck on it.

Cool
And how would I boot up in Rescue Mode?
 
Old 07-20-2003, 12:16 AM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Most likely it's going to be:
Drop in your INSTALL cd to your cdrom, start up your system, once you get to the point where you "press enter to continue or F1 for help" you press F1, type in rescue and it loads rescue mode. However, that's for a mandrake system, I'm sure RH isn't far different, but the documentation should discuss it.

Something to note:
Your drives are automatically checked with fsck after so many reboots or a given amount of time (usually 20-30 reboots and 50-70 days) to ensure data is not getting corrupted. This is done during bootup when the drives are not mounted.

Cool
 
Old 07-20-2003, 12:43 AM   #11
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Original Poster
Rep: Reputation: 30
ok went into rescue mode. I entered fsck And it says /etc/fstab does not exsist. Should I have turned off read/write, I made it an image I think...........
 
Old 07-20-2003, 12:48 AM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69


You don't have to have /etc/fstab to run fsck. Once you are in rescue mode, be sure your device that you want to scan isn't mounted (you can check with:
mount
If it's listed, umount it with:
umount /dev/hdx)
And then run fsck on it:
/sbin/fsck /dev/hdx

HTH

Cool
 
Old 07-20-2003, 01:00 AM   #13
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Original Poster
Rep: Reputation: 30
Quote:
/dev/hda3 : Device or resource busy
It won't let me unmout it.......
 
Old 07-20-2003, 01:06 AM   #14
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
In rescue mode? Make sure you aren't in the directory that it's mounted to...

Cool
 
Old 07-20-2003, 01:17 AM   #15
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by MasterC
In rescue mode? Make sure you aren't in the directory that it's mounted to...

Cool
And How would I do that?



hda3 is my only drive besides /boot and SWAP.
 
  


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
Scandisk under linux? kevingpo Fedora 20 07-06-2005 10:39 AM
ScanDisk Starch Linux - Newbie 1 04-10-2005 11:42 AM
Scandisk??? Or somthing like it drivesector Linux - Newbie 2 04-01-2004 05:52 PM
Well- XP scandisk destroyed my linux partition c_mitulescu Linux - Hardware 7 01-19-2004 08:58 AM
Scandisk bfloeagle Linux - General 3 07-25-2001 07:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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