LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Scandisk under linux? (https://www.linuxquestions.org/questions/fedora-35/scandisk-under-linux-337409/)

kevingpo 06-26-2005 04:09 PM

Scandisk under linux?
 
Does anyone know any Windows Scandisk like linux programs?

I have Fedora Core 3 installed. ext3

Noth 06-26-2005 04:15 PM

There should be a fsck tool for every filesystem Linux supports. What kind of filesystem are you trying to fix?

kevingpo 06-26-2005 04:37 PM

Quote:

Originally posted by Noth
There should be a fsck tool for every filesystem Linux supports. What kind of filesystem are you trying to fix?
It's ext3

Noth 06-26-2005 04:44 PM

Generally if there's a problem it will be scanned on bootup, but if you really want to do it yourself you need to unmount the filesystem and run fsck.ext3 on it.

kevingpo 06-26-2005 04:58 PM

Quote:

Originally posted by Noth
Generally if there's a problem it will be scanned on bootup, but if you really want to do it yourself you need to unmount the filesystem and run fsck.ext3 on it.
Is it possible to unmount the file system, even when am using it?

Please tell me step by step... process to scan my only ext3 fs

Noth 06-26-2005 05:01 PM

You can't umount a filesystem in use, if you want to scan the root filesystem you'll need a Live CD like Gnoppix, Knoppix, etc.

kevingpo 06-26-2005 05:14 PM

Quote:

Originally posted by Noth
You can't umount a filesystem in use, if you want to scan the root filesystem you'll need a Live CD like Gnoppix, Knoppix, etc.
Yep, using Knoppix 3.3 just now.

Damn, it says:

e2fsck 1.35-WIP (31-Jan-2004)
e2fsck: Filesystem has unsupported feature(s) (/1)
e2fsck: Get a newer version of e2fsck!

Man!

Noth 06-26-2005 05:20 PM

That version is quite old, I have e2fsck 1.38-WIP (20-Jun-2005) in my Debian sid installation. If you have broadband, I saw that Knoppix 4 was just released.

You never did say why you were trying to scan this filesystem in the first place.

kevingpo 06-26-2005 05:21 PM

Quote:

Originally posted by Noth
That version is quite old, I have e2fsck 1.38-WIP (20-Jun-2005) in my Debian sid installation. If you have broadband, I saw that Knoppix 4 was just released.

You never did say why you were trying to scan this filesystem in the first place.

I dropped my laptop by 1 or 2 feet. Just curious whether any physical damage to disk.

Noth 06-26-2005 05:23 PM

That's a tough one to judge, but if it were mine and I didn't hear any funny noises I would assume it's ok.

kevingpo 06-26-2005 05:28 PM

Quote:

Originally posted by Noth
That's a tough one to judge, but if it were mine and I didn't hear any funny noises I would assume it's ok.
It looks and sounds fine (I think). But sometimes I get chug-chug movements, like minor system hangs from time to time... maybe it's coz I left linux running for long time..... but still linux should be able to handle/manage processes efficiently.

Think I gave it swap 512MB. Laptop's got 512MB RAM. Centrino 1.4GHz.

kevingpo 06-26-2005 05:37 PM

I downloaded e2fsck-1.38 and e2fsck-lib.

Compiled them both on only 2.5MB root space given by Knoppix 3.3 Live CD. I typed:

export LD_LIBRARY_PATH=/livecd/home/knoppix/e2fsck-lib/lib:/livecd/home/knoppix/e2fsck-1.38/lib

That will link / path in those libraries I just built. I couldn't make install coz it was trying to copy them onto the CD or something.

Then I ran ./e2fsck -c /dev/hda2

That -c parameter check for bad blocks and add them to the badblock list.

Now my laptop is hanged.

Just curious, how can one layout/prepare linux partitions so that he can fsck his disk without resorting to live-cds?

Create a:

/
/usr
swap

?

PTrenholme 06-26-2005 07:11 PM

Just boot into init 1.

But, once you've got it properly installed, "fsck" (which calle e2fsck for ext2 or ext3 file systems) is normally called automatically between the initrd and mounting the file systems in rw mode. (For the ones with the flag set at the end of the line in /etc/fstab. See man fstab for details.)

When Fedora boots, there is a message that the file systems are being mounted, and that it "may take some time." That time is, I believe, taken by fsck checking the file systems before remounting them in rw mode.

kevingpo 06-26-2005 08:18 PM

Quote:

Originally posted by PTrenholme
Just boot into init 1.

But, once you've got it properly installed, "fsck" (which calle e2fsck for ext2 or ext3 file systems) is normally called automatically between the initrd and mounting the file systems in rw mode. (For the ones with the flag set at the end of the line in /etc/fstab. See man fstab for details.)

When Fedora boots, there is a message that the file systems are being mounted, and that it "may take some time." That time is, I believe, taken by fsck checking the file systems before remounting them in rw mode.

Interesting.. the fsck check during bootup is a lot far quicker than the fsck I manually ran. When I ran it, it took like 30-40 minutes.

Noth 06-26-2005 09:25 PM

Quote:

Interesting.. the fsck check during bootup is a lot far quicker than the fsck I manually ran. When I ran it, it took like 30-40 minutes.
If you ran a badblock check it'll take a lot longer, but I would think that 40min is short for a full badblock check.


All times are GMT -5. The time now is 02:27 PM.