Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
07-16-2005, 11:35 AM
|
#1
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Rep:
|
badblocks time
My sturdy 20 GB Wester Digital Caviar Drive just failed. Fortunately Linux gave me some warning signs (Buffer I/O error) before I started having major problems and I was able to back up important data. My drive has 4 partitions that I made with the Western Digital Low Level Format Software. Here it is:
cfdisk 2.12p
Disk Drive: /dev/hda
Size: 20525137920 bytes, 20.5 GB
Heads: 255 Sectors per Track: 63 Cylinders: 2495
Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------------------------------
hda1 Boot Primary Linux ext3 [/boot] 98.71
hda5 Logical Linux swap / Solaris 641.58
hda6 Logical Linux 197.41
hda7 Logical Linux ext3 [/] 19584.40
----------------------------------------------------------------------------------------------
The fdisk output is a bit different and shows that hda5-7 are a part of hda2 and was formatted as W95 Ext'd:
Disk /dev/hda: 20.5 GB, 20525137920 bytes
255 heads, 63 sectors/track, 2495 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 12 96358+ 83 Linux
/dev/hda2 13 2495 19944697+ f W95 Ext'd (LBA)
/dev/hda5 13 90 626503+ 82 Linux swap / Solaris
/dev/hda6 91 114 192748+ 83 Linux
/dev/hda7 115 2495 19125351 83 Linux
I'm hoping to salvage this drive. fsck shows no problem on hda1 and 6 and says errors are on hda7 (not sure how to check swap space). Right now I'm using badblocks on hda7 (19.5 GB) to mark the bad blocks in a map. I hear the harddrive working but I'm not getting any progress indication. Any idea how long this will take me on a 40 pin IDE connection and a 600 MHz P3?
Here's what I typed:
badblocks -sv -i - /dev/hda7
|
|
|
07-16-2005, 01:27 PM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
i think you just need : badblocks -sv /dev/hda7
the -i option is to specifie an input file that contains
the block numbers that are already known to be bad.
you could also run fsck with the "-c" option, to scan for bad blocks.
egag
|
|
|
07-16-2005, 01:45 PM
|
#3
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
fsck -c /dev/hda7 says my superblock is bad and wants me to specify the superblock location-can the superblock be random? I'm thinking one of the blocks towards the end of my 19.5 GB partition. Which block is that?
|
|
|
07-16-2005, 01:51 PM
|
#4
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
i'm sorry for not being clear,
i meant " e2fsck " for ext2/3 and "reiserfsck" for reiserfs.
egag
|
|
|
07-16-2005, 01:55 PM
|
#5
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
I understood what you meant-e2fsck -c /dev/hda7 doesn't like my superblock and wants me to specify another. Can I use any block? Any which block is toward the end of my partition?
EDIT:
It works now-I had badblocks on it and I guess it fixed the superblock. I did a -C 0 so that I could see the progress, but it says it is read only....is it going to mark the badblocks?
This is what I typed:
e2fsck -c -C 0 /dev/hda7
Last edited by linuxhippy; 07-16-2005 at 02:07 PM.
|
|
|
07-16-2005, 03:52 PM
|
#6
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
i think you should take a look at " man e2fsck "
it sais :
-----------
-b superblock
Instead of using the normal superblock, use an alternative
superblock specified by superblock. This option is normally used
when the primary superblock has been corrupted. The location of the
backup superblock is dependent on the filesystem's blocksize. For
filesystems with 1k blocksizes, a backup superblock can be found at
block 8193; for filesystems with 2k blocksizes, at block 16384; and
for 4k blocksizes, at block 32768.
Additional backup superblocks can be determined by using the mke2fs
program using the -n option to print out where the superblocks were
created. The -b option to mke2fs, which specifies blocksize of the
filesystem must be specified in order for the superblock locations
that are printed out to be accurate.
-------------
but i guess you got it working...
egag
|
|
|
07-16-2005, 05:00 PM
|
#7
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
This is taking forever-I imagine it won't be done till tomorrow. Does it actually block off bad blocks from being used by Linux even though it says "Read Only"?
This is what I typed:
e2fsck -c -C 0 /dev/hda7
|
|
|
07-16-2005, 05:24 PM
|
#8
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
how large is that partition ?
egag
|
|
|
07-16-2005, 05:26 PM
|
#9
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
19.5 GB
|
|
|
07-16-2005, 05:39 PM
|
#10
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
that can't take that long.
i think that disk is nogood anymore.
i would stop it, and go to the W.D. website.
they will have some kind of low-level checking tool.
download it, and check the disk with that program.
egag
|
|
|
07-16-2005, 05:48 PM
|
#11
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
The disks (I've used 5) have always been slow on this pc in Linux. I have an old pc-600 MHz and this is a 40 pin IDE connection.
I have the WD diagnostic tools already and did a LLF first with that. It could not fix my bad blocks, though.
Also, the pc Win guy at work recommended scandisk. When I said it was for a 20 GB drive he said scandisk would probably take at least 9 hours. I'm at 6 hours and not half way done, though. Anyway, he was thinking it would take a real long time.
What I'm wondering, though. Is this similar to scandisk in that it will mark these blocks as unusable?
Last edited by linuxhippy; 07-16-2005 at 05:52 PM.
|
|
|
07-16-2005, 06:03 PM
|
#12
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
i don't think it should take so long...
IIRC the Slackware setup script runs a badblock check,
and i cannot remember it taking more than a few minutes.
i have a P1-200mhz pc with a 20 GB hd.
that one was also checked with a badblock check.
i believe scandisk is MS software, so that winguy might be right about that. ( 9 hrs. )
...but a badblock check will mark all bad parts as unusable...
egag
|
|
|
07-16-2005, 06:10 PM
|
#13
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
If this doesn't work, I'll be putting a new drive in. May buy a new one...not sure. My pc is 6 years old and I've upgraded all the hardware in it except for the motherboard and nothing overheats (I put a new powerpack/fan in the pc). Is it probable that anything besides the harddrive will go bad in an old pc....or should I put money in savings for a new pc?
|
|
|
07-16-2005, 06:21 PM
|
#14
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
if you're happy with the speed it has, then just keep it.
any disk you buy now will be usable in a new setup.
egag
|
|
|
07-16-2005, 06:25 PM
|
#15
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
Actually, I have the original Conner 4 GB drive that came with it. I already have a 2nd drive in there-a Fujitsu 6 GB. I would have 10 GB which is plenty. The Conner drive that came with my pc was faster in Win98SE than with Linux-you're saying that's not your experience?
|
|
|
All times are GMT -5. The time now is 10:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|