Marking bad sectors
Jim Byrnes
jf_byrnes at comcast.net
Sat Mar 6 16:33:36 UTC 2010
Brian wrote:
> On Sat 06 Mar 2010 at 08:16:11 -0600, Jim Byrnes wrote:
>
>> That result is:
>>
>> ubuntu at ubuntu:~$ sudo fdisk -l /dev/sda
>>
>> Disk /dev/sda: 64.6 GB, 64558448640 bytes
>> 255 heads, 63 sectors/track, 7848 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>> Disk identifier: 0x00041f28
>>
>> Device Boot Start End Blocks Id System
>> /dev/sda1 1 131 1052226 83 Linux
>> /dev/sda2 132 7587 59890320 83 Linux
>> /dev/sda3 7588 7848 2096482+ 5 Extended
>> /dev/sda5 7588 7848 2096451 82 Linux swap / Solaris
>
> Looks ok. You indicated the first 1 GB is free space so you could try
> making an ext2 filesystem again on /dev/sda1:
>
> mke2fs /dev/sda1
>
> or
>
> mke2fs -c /dev/sda1
>
> to check for badblocks before the filesystem is created. Add the -j
> option if you want an ext3 journal.
>
> Then try e2fsck and e2fsck -c.
>
I don't care what file system is there. I created the 1GB of freespace
to try to get away from the bad blocks because I didn't know how to
handle them. If I learn how to take care of the bad blocks I can get
rid of that 1GB and just use the whole disk for ubuntu.
Anyway here is the result of e2fsck:
ubuntu at ubuntu:~$ sudo mke2fs -c /dev/sda1
mke2fs 1.41.9 (22-Aug-2009)
Warning: could not erase sector 2: Attempt to write block from
filesystem resulted in short write
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
65808 inodes, 263056 blocks
13152 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=272629760
9 block groups
32768 blocks per group, 32768 fragments per group
7312 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Checking for bad blocks (read-only test): done
Block 0 in primary superblock/group descriptor area bad.
Blocks 0 through 2 must be good in order to build a filesystem.
Aborting....
ubuntu at ubuntu:~$
More information about the ubuntu-users
mailing list