How to add a sector to the list of badblocks for ext4?
up vote
1
down vote
favorite
dumpe2fs -b /dev/sdd1
can dump blocks that are known to be bad by ext4.
How do I manually add a block to that list without redoing mkfs ?
ext4 bad-blocks
add a comment |
up vote
1
down vote
favorite
dumpe2fs -b /dev/sdd1
can dump blocks that are known to be bad by ext4.
How do I manually add a block to that list without redoing mkfs ?
ext4 bad-blocks
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
dumpe2fs -b /dev/sdd1
can dump blocks that are known to be bad by ext4.
How do I manually add a block to that list without redoing mkfs ?
ext4 bad-blocks
dumpe2fs -b /dev/sdd1
can dump blocks that are known to be bad by ext4.
How do I manually add a block to that list without redoing mkfs ?
ext4 bad-blocks
ext4 bad-blocks
asked yesterday
Benoit-Pierre DEMAINE
142
142
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
From man 8 e2fsck
:
-l filename
Add the block numbers listed in the file specified byfilename
to the list of bad blocks. The format of this file is the same as the one generated by thebadblocks(8)
program. Note that the block numbers are based on the blocksize of the filesystem. Hence,badblocks(8)
must be given the blocksize of the filesystem in order to obtain correct results. As a result, it is much simpler and safer to use the-c
option toe2fsck
, since it will assure that the correct parameters are passed to thebadblocks
program.
-L filename
Set the bad blocks list to be the list of blocks specified byfilename
. (This option is the same as the-l
option, except the bad blocks list is cleared before the blocks listed in the file are added to the bad blocks list.)
I've seen few output files from badblocks
that were not empty, so I can tell the general format is simple: one decimal number per line. Numbering starts from 0
but as far as I know e2fsck -l
won't accept 0
and will complain about few initial blocks (where some crucial filesystem metadata exist).
Example file content:
12345
678900
My tests were limited. Try the solution on a scratch monkey first.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
From man 8 e2fsck
:
-l filename
Add the block numbers listed in the file specified byfilename
to the list of bad blocks. The format of this file is the same as the one generated by thebadblocks(8)
program. Note that the block numbers are based on the blocksize of the filesystem. Hence,badblocks(8)
must be given the blocksize of the filesystem in order to obtain correct results. As a result, it is much simpler and safer to use the-c
option toe2fsck
, since it will assure that the correct parameters are passed to thebadblocks
program.
-L filename
Set the bad blocks list to be the list of blocks specified byfilename
. (This option is the same as the-l
option, except the bad blocks list is cleared before the blocks listed in the file are added to the bad blocks list.)
I've seen few output files from badblocks
that were not empty, so I can tell the general format is simple: one decimal number per line. Numbering starts from 0
but as far as I know e2fsck -l
won't accept 0
and will complain about few initial blocks (where some crucial filesystem metadata exist).
Example file content:
12345
678900
My tests were limited. Try the solution on a scratch monkey first.
add a comment |
up vote
0
down vote
From man 8 e2fsck
:
-l filename
Add the block numbers listed in the file specified byfilename
to the list of bad blocks. The format of this file is the same as the one generated by thebadblocks(8)
program. Note that the block numbers are based on the blocksize of the filesystem. Hence,badblocks(8)
must be given the blocksize of the filesystem in order to obtain correct results. As a result, it is much simpler and safer to use the-c
option toe2fsck
, since it will assure that the correct parameters are passed to thebadblocks
program.
-L filename
Set the bad blocks list to be the list of blocks specified byfilename
. (This option is the same as the-l
option, except the bad blocks list is cleared before the blocks listed in the file are added to the bad blocks list.)
I've seen few output files from badblocks
that were not empty, so I can tell the general format is simple: one decimal number per line. Numbering starts from 0
but as far as I know e2fsck -l
won't accept 0
and will complain about few initial blocks (where some crucial filesystem metadata exist).
Example file content:
12345
678900
My tests were limited. Try the solution on a scratch monkey first.
add a comment |
up vote
0
down vote
up vote
0
down vote
From man 8 e2fsck
:
-l filename
Add the block numbers listed in the file specified byfilename
to the list of bad blocks. The format of this file is the same as the one generated by thebadblocks(8)
program. Note that the block numbers are based on the blocksize of the filesystem. Hence,badblocks(8)
must be given the blocksize of the filesystem in order to obtain correct results. As a result, it is much simpler and safer to use the-c
option toe2fsck
, since it will assure that the correct parameters are passed to thebadblocks
program.
-L filename
Set the bad blocks list to be the list of blocks specified byfilename
. (This option is the same as the-l
option, except the bad blocks list is cleared before the blocks listed in the file are added to the bad blocks list.)
I've seen few output files from badblocks
that were not empty, so I can tell the general format is simple: one decimal number per line. Numbering starts from 0
but as far as I know e2fsck -l
won't accept 0
and will complain about few initial blocks (where some crucial filesystem metadata exist).
Example file content:
12345
678900
My tests were limited. Try the solution on a scratch monkey first.
From man 8 e2fsck
:
-l filename
Add the block numbers listed in the file specified byfilename
to the list of bad blocks. The format of this file is the same as the one generated by thebadblocks(8)
program. Note that the block numbers are based on the blocksize of the filesystem. Hence,badblocks(8)
must be given the blocksize of the filesystem in order to obtain correct results. As a result, it is much simpler and safer to use the-c
option toe2fsck
, since it will assure that the correct parameters are passed to thebadblocks
program.
-L filename
Set the bad blocks list to be the list of blocks specified byfilename
. (This option is the same as the-l
option, except the bad blocks list is cleared before the blocks listed in the file are added to the bad blocks list.)
I've seen few output files from badblocks
that were not empty, so I can tell the general format is simple: one decimal number per line. Numbering starts from 0
but as far as I know e2fsck -l
won't accept 0
and will complain about few initial blocks (where some crucial filesystem metadata exist).
Example file content:
12345
678900
My tests were limited. Try the solution on a scratch monkey first.
edited yesterday
answered yesterday
Kamil Maciorowski
22.2k155072
22.2k155072
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1374911%2fhow-to-add-a-sector-to-the-list-of-badblocks-for-ext4%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password