loop device not matching file size
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a sparse backing file (made via dd seek=
) that's a partial image of a damaged disk. The size as given by ls
matches the original disk. However, when looping it, /proc/partitions
shows it as about have the size as the original disk. It seems like losetup
is ignoring the final sparse extend of the file because it has no data following it.
As a result, if I use losetup -P
(or kpartx
) the partitioning fails on a partition extending past the size given by /proc/partitions
.
How can I resolve this without expanding the file? (Perhaps writing to the last sector will help, but I would like to avoid touching the image).
partition dd loop-device disk-image sparse-files
add a comment |Â
up vote
0
down vote
favorite
I have a sparse backing file (made via dd seek=
) that's a partial image of a damaged disk. The size as given by ls
matches the original disk. However, when looping it, /proc/partitions
shows it as about have the size as the original disk. It seems like losetup
is ignoring the final sparse extend of the file because it has no data following it.
As a result, if I use losetup -P
(or kpartx
) the partitioning fails on a partition extending past the size given by /proc/partitions
.
How can I resolve this without expanding the file? (Perhaps writing to the last sector will help, but I would like to avoid touching the image).
partition dd loop-device disk-image sparse-files
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a sparse backing file (made via dd seek=
) that's a partial image of a damaged disk. The size as given by ls
matches the original disk. However, when looping it, /proc/partitions
shows it as about have the size as the original disk. It seems like losetup
is ignoring the final sparse extend of the file because it has no data following it.
As a result, if I use losetup -P
(or kpartx
) the partitioning fails on a partition extending past the size given by /proc/partitions
.
How can I resolve this without expanding the file? (Perhaps writing to the last sector will help, but I would like to avoid touching the image).
partition dd loop-device disk-image sparse-files
I have a sparse backing file (made via dd seek=
) that's a partial image of a damaged disk. The size as given by ls
matches the original disk. However, when looping it, /proc/partitions
shows it as about have the size as the original disk. It seems like losetup
is ignoring the final sparse extend of the file because it has no data following it.
As a result, if I use losetup -P
(or kpartx
) the partitioning fails on a partition extending past the size given by /proc/partitions
.
How can I resolve this without expanding the file? (Perhaps writing to the last sector will help, but I would like to avoid touching the image).
partition dd loop-device disk-image sparse-files
partition dd loop-device disk-image sparse-files
asked 17 mins ago
afuna
1676
1676
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2funix.stackexchange.com%2fquestions%2f477818%2floop-device-not-matching-file-size%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