I want to know if I have badblocks on my sdb5 HDD.

Steven Vollom stevenvollom at sbcglobal.net
Thu Nov 20 19:46:03 UTC 2008


Gene Heskett wrote:
> On Thursday 20 November 2008, Steven Vollom wrote:
>   
>> I did the following in the Shell:
>> steven at Studio25:~$ e2fsck -c
>> Usage: e2fsck [-panyrcdfvstDFSV] [-b superblock] [-B blocksize]
>>               [-I inode_buffer_blocks] [-P process_inode_size]
>>               [-l|-L bad_blocks_file] [-C fd] [-j external_journal]
>>               [-E extended-options] device
>>
>> Emergency help:
>> -p                   Automatic repair (no questions)
>> -n                   Make no changes to the filesystem
>> -y                   Assume "yes" to all questions
>> -c                   Check for bad blocks and add them to the badblock list
>> -f                   Force checking even if filesystem is marked clean
>> -v                   Be verbose
>> -b superblock        Use alternative superblock
>> -B blocksize         Force blocksize when looking for superblock
>> -j external_journal  Set location of the external journal
>> -l bad_blocks_file   Add to badblocks list
>> -L bad_blocks_file   Set badblocks list
>> steven at Studio25:~$
>>
>> The following was included in a search:
>>
>> *Important note:* If the output of *badblocks* is going to be fed to the
>> *e2fsck* or *mke2fs* programs, it is important that the block size is
>> properly specified, since the block numbers which are generated are very
>> dependent on the block size in use by the filesystem. For this reason,
>> it is strongly recommended that users *not* run *badblocks* directly,
>> but rather use the *-c* option of the *e2fsck* and *mke2fs* programs.
>>
>>
>> Does the size of the blocks show here:
>>
>> 255 heads, 63 sectors/track, 24792 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>> Disk identifier: 0x47a447a3
>>
>>  Device Boot      Start         End      Blocks   Id  System
>> /dev/sda1   *           1        1824    14651248+  83  Linux
>> /dev/sda2            1825       24792   184490460    f  W95 Ext'd (LBA)
>> /dev/sda5           16523       24792    66428775   83  Linux
>> /dev/sda6            1825        2006     1461852   82  Linux swap /
>> Solaris
>> /dev/sda7            2007       16522   116599738+  83  Linux
>>
>> Partition table entries are not in disk order
>>
>> Disk /dev/sdb: 81.9 GB, 81964302336 bytes
>> 255 heads, 63 sectors/track, 9964 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>> Disk identifier: 0xffffffff
>>
>>  Device Boot      Start         End      Blocks   Id  System
>> /dev/sdb1               1        2591    20812176   83  Linux
>> /dev/sdb2            2592        2856     2128612+  82  Linux swap /
>> Solaris
>> /dev/sdb3            2857        9964    57095010    5  Extended
>> /dev/sdb5            2857        9964    57094978+  83  Linux
>> steven at Studio25:~$
>> If there are badblocks and they are identified on the HDD, can the HDD
>> still be used?  If I format the HDD, will the badblocks be wiped and
>> usable after format?  TIA.
>>
>> Steven
>>     
>
> You cannot format a recent hard drive, with recent being defined as nearly 20 
> years now.  The drives are factory formatted, and require instrumentation we 
> don't have, so they just spin for a bit and return with no error. All we do 
> is write the filesystems logical structure when we mke2fs a partition.
>   
I am confused, what if you were trying to get rid of a virus or 
something like that, how would you clean the drive of infections?  And 
if you want to change the OS, do you just install it over existing 
data.  When I use Gparted, it says that it formats a drive or partition 
when instructed.  Isn't it doing that when I click on format?
> I believe badblocks can work in that asked about mode, if e2fsck tells it 
> where to start and stop the scan at the partition boundaries.  That would 
> tend to automate the process for a beginner, at the expense of having to run 
> it on all the individual partitions in order to cover the whole disk.
>   
I don't understand what this does, or how to understand and then utilize 
the resultant information.
> >From the badblocks manpage, it can generate a file in the correct format to 
> send back to mke2fs or e2fsck and do it automatically from what I read.
>   
Would I be able to understand what happened and the information that was 
'send back to mke2fs'.  What is the result of the task?  Does it update 
something?  Does it fix something?  If it fixes something, what is 
damaged?  Is it physical damage or digital? 
> So I would run it to generate the file, (on a usb key
is this the same as a thumb drive or USB memory chip?
>  or someplace not on that 
> drive) and then feed that file to e2fsck
Is this like cutting and pasting the file to e2fsck?  How do I find 
e2fsck to open and paste the file?
>  as a separate operation, which would 
> check (and repair if it can) the whole drive in only 2 operations.  The first 
> run is a lengthy procedure timewise, so expect an hour or more dependent on 
> the hardware.
This partition is on an 80gb HDD.
>   The 500Gb Maxtor that just failed for me was about 11 hours to 
> check it all.
>
> I have now zeroed the bootable flag on it using fdisk,
What does zeroing the bootable flag do, and is using fdisk just typing 
fdisk into a shell?  If so, then what happens after you click enter, and 
how do you use the information?
>  so I can re-install the 
> card
What is 'the card'
>  and drive,
by drive, do you mean the partition sdb5 or the 80 gb drive?
>  and will see if its salvageable in the next day or so.
>   
I found out  something important yesterday.  Because I am an artist, I 
have been using only the right side of my brain for over 60 years.  I am 
not easily capable of understand a logical thing, unless it is visual or 
explained in those terms.  I talked with someone who had to learn to use 
the other side of his brain.  Another artist.  We just don't see thing 
in a Logical way like a computer guru.  It isn't that we won't be able, 
I am doing what I need to do now to exercise my left brain by learning 
from people like you.  It is why it is so difficult for you to help me, 
I think.  But I can absorb enormous amounts of visual information that 
you could not see unless taught, unless you teach your right-brain 
activity to become more important to you.  Do you notice how I have to 
break down the pieces of what you say?  Logic to Logic can communicate 
in a few words.  Visual to logic takes a lot of additional information.  
Logic to Visual also takes more information than a logical person thinks 
necessary.  If you don't lose patience with me, I am having 
breakthroughs.  I am getting able to understand how to ask questions in 
a way that you can understand me.  I am starting to learn how to process 
what is said.  It is glorious.  I didn't think I was stupid, but for me 
the way a computer specialist talks is about the same as trying to 
understand Chinese.  Until I learn the language it is babble to me.  
Every answer given to me creates new questions, and I have to take that 
information and figure out what you mean.  Please don't give up on me.  
Things are changing.  It is like coming from a dark room into the light.





More information about the kubuntu-users mailing list