Resume "badblocks" command.

New to Debian (Or Linux in general)? Ask your questions here!

Resume "badblocks" command.

Postby hack3rcon » 2020-12-04 13:14

Hello,
Is it possible to resume badblocks command?
I did:
Code: Select all
$ sudo badblocks -vw /dev/sdc
Checking for bad blocks in read-write mode
From block 0 to 7562495
Testing with pattern 0xaa:

And canceled that command:
Code: Select all
...
3607
3608
3609
3610
3611
3612
3613
3614
^C

Interrupted at block 3615

Is it possible to resume it?

Thank you.
hack3rcon
 
Posts: 530
Joined: 2015-02-16 09:54

Re: Resume "badblocks" command.

Postby RU55EL » 2020-12-04 13:45

man badblocks

first-block is an optional parameter specifying the starting block number for the test, which allows the testing to start in the middle of the disk.
User avatar
RU55EL
 
Posts: 530
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Resume "badblocks" command.

Postby hack3rcon » 2020-12-04 18:46

RU55EL wrote:man badblocks

first-block is an optional parameter specifying the starting block number for the test, which allows the testing to start in the middle of the disk.


Thank you.
Code: Select all
$ sudo badblocks -vw /dev/sdc 7562495 3614
hack3rcon
 
Posts: 530
Joined: 2015-02-16 09:54

Re: Resume "badblocks" command.

Postby p.H » 2020-12-05 16:00

hack3rcon wrote:Is it possible to resume badblocks command?

It depends of the full command arguments. Sometimes yes, sometimes no.

RU55EL wrote:first-block is an optional parameter specifying the starting block

Specifying a starting block is not the same as resuming at this block. In the example given here, badblocks is supposed to do 4 write+read passes using different test patterns but was interrupted during the first write pass. Resuming would mean skip completed passes, skip blocks 0-3613 for the interrupted pass only and do all subsequent read and write passes starting at block 0. Specifying 3614 as the starting position means start over and skip blocks 0-3613 at all write+read passes.
p.H
 
Posts: 1735
Joined: 2017-09-17 07:12


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable