Rewriting bad sectors

Questions about applications and software
Forum rules
Before you post please read this

Rewriting bad sectors

Postby jbs30000 on Sun May 13, 2012 12:54 am

I posted a thread, but have yet to see it. I am typing this to see if this will get posted or disappear too.
jbs30000
Level 1
Level 1
 
Posts: 6
Joined: Sat May 12, 2012 11:12 pm

Linux Mint is funded by ads and donations.
 

Rewriting bad sectors

Postby jbs30000 on Sun May 13, 2012 12:57 am

OK, this got posted, so I [don't know what happened] with my first post. Guess I'll have to repost.
Last edited by zerozero on Sun May 13, 2012 6:47 am, edited 2 times in total.
Reason: edited for language
jbs30000
Level 1
Level 1
 
Posts: 6
Joined: Sat May 12, 2012 11:12 pm

Rewriting bad sectors

Postby jbs30000 on Sun May 13, 2012 1:09 am

I tried posted this earlier, but though some mistake it never happened. So here's my second attempt.

I am new to Linux Mint and have limited Linux experience overall. I have some bad sectors so I wanted to have them written as unusable but I'm not sure if I can do so on the Disk Utility, so through some Googling I found a way to do it command line for Ubuntu. Since Mint is based on Ubuntu and Debian I thought I'd give it a try but I guess it isn't exactly the same.

First I wrote the bad sectors to a bad-blocks file sucessfully.
Code: Select all
sudo badblocks /dev/sdb > /home/joel/bad-blocks

But I'm having problems marking the sectors as bad.
Code: Select all
sudo mkfs -c bad-blocks /dev/sdb
[sudo] password for joel:
mke2fs 1.41.14 (22-Dec-2010)
mkfs.ext2: invalid blocks count '/dev/sdb' on device 'bad-blocks'

And
Code: Select all
sudo fsck -l bad-blocks /dev/sdb

Just brings up the help file on how to use fsck.

So, what am I doing wrong and how can I mark the bad sectors? Thank you.
jbs30000
Level 1
Level 1
 
Posts: 6
Joined: Sat May 12, 2012 11:12 pm

Re: Rewriting bad sectors

Postby jbs30000 on Sun May 13, 2012 4:10 am

I guess after reading up on mkfs that would be a huge mistake.
jbs30000
Level 1
Level 1
 
Posts: 6
Joined: Sat May 12, 2012 11:12 pm

Re: Rewriting bad sectors

Postby zerozero on Sun May 13, 2012 6:49 am

[topics merged, subject correct for clarification on the merged topic, language edited in one of the posts]
User avatar
zerozero
Level 16
Level 16
 
Posts: 6330
Joined: Tue Jul 07, 2009 2:29 pm

Re: Rewriting bad sectors

Postby jbs30000 on Sun May 13, 2012 7:13 am

Thanks zerozero.

Googling for help and not specifying Linux Mint lead me to try this, sudo e2fsck -c -c -k -C 0 /dev/sdb1

Fingers crossed this will do the trick.
jbs30000
Level 1
Level 1
 
Posts: 6
Joined: Sat May 12, 2012 11:12 pm

Re: Rewriting bad sectors

Postby jbs30000 on Sun May 13, 2012 4:03 pm

That seemed to have worked, so I guess I learned that if I don't necessarily need to search for solutions specific to the Mint distro.

I'm still learning Linux, and I know that some ways of doing things are specific to a distribution and others universal. I'm just trying to work out which is which.
jbs30000
Level 1
Level 1
 
Posts: 6
Joined: Sat May 12, 2012 11:12 pm

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: Bing [Bot] and 15 guests