Unable to format disk: Invalid argument
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I am trying to format an external hard disk in Ubuntu 18.04 following the description given here. However, after having deleted all partitions in fdisk
and created a new one, and entered w
to write it to disk, I get the following output:
Command (m for help): w
The partition table has been altered.
Failed to remove partition 1 from system: Invalid argument
Failed to remove partition 2 from system: Invalid argument
Failed to remove partition 3 from system: Invalid argument
Failed to remove partition 4 from system: Invalid argument
Failed to add partition 1 to system: Invalid argument
The kernel still uses the old partitions. The new table will be used at the next reboot.
/dev/sdc1: close device failed: Input/output error
The disk is potentially damaged! How to figure out if there is a way to format (part) of the disk, or if the disk is really damaged beyond any use? (I am able to access MOST of the content on the disk, so the disk cannot be that damaged. But I am unable to repair/reformat it).
So what can I do?
partitioning hard-drive
add a comment |Â
up vote
0
down vote
favorite
I am trying to format an external hard disk in Ubuntu 18.04 following the description given here. However, after having deleted all partitions in fdisk
and created a new one, and entered w
to write it to disk, I get the following output:
Command (m for help): w
The partition table has been altered.
Failed to remove partition 1 from system: Invalid argument
Failed to remove partition 2 from system: Invalid argument
Failed to remove partition 3 from system: Invalid argument
Failed to remove partition 4 from system: Invalid argument
Failed to add partition 1 to system: Invalid argument
The kernel still uses the old partitions. The new table will be used at the next reboot.
/dev/sdc1: close device failed: Input/output error
The disk is potentially damaged! How to figure out if there is a way to format (part) of the disk, or if the disk is really damaged beyond any use? (I am able to access MOST of the content on the disk, so the disk cannot be that damaged. But I am unable to repair/reformat it).
So what can I do?
partitioning hard-drive
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to format an external hard disk in Ubuntu 18.04 following the description given here. However, after having deleted all partitions in fdisk
and created a new one, and entered w
to write it to disk, I get the following output:
Command (m for help): w
The partition table has been altered.
Failed to remove partition 1 from system: Invalid argument
Failed to remove partition 2 from system: Invalid argument
Failed to remove partition 3 from system: Invalid argument
Failed to remove partition 4 from system: Invalid argument
Failed to add partition 1 to system: Invalid argument
The kernel still uses the old partitions. The new table will be used at the next reboot.
/dev/sdc1: close device failed: Input/output error
The disk is potentially damaged! How to figure out if there is a way to format (part) of the disk, or if the disk is really damaged beyond any use? (I am able to access MOST of the content on the disk, so the disk cannot be that damaged. But I am unable to repair/reformat it).
So what can I do?
partitioning hard-drive
I am trying to format an external hard disk in Ubuntu 18.04 following the description given here. However, after having deleted all partitions in fdisk
and created a new one, and entered w
to write it to disk, I get the following output:
Command (m for help): w
The partition table has been altered.
Failed to remove partition 1 from system: Invalid argument
Failed to remove partition 2 from system: Invalid argument
Failed to remove partition 3 from system: Invalid argument
Failed to remove partition 4 from system: Invalid argument
Failed to add partition 1 to system: Invalid argument
The kernel still uses the old partitions. The new table will be used at the next reboot.
/dev/sdc1: close device failed: Input/output error
The disk is potentially damaged! How to figure out if there is a way to format (part) of the disk, or if the disk is really damaged beyond any use? (I am able to access MOST of the content on the disk, so the disk cannot be that damaged. But I am unable to repair/reformat it).
So what can I do?
partitioning hard-drive
asked May 17 at 5:19
Alex
31441124
31441124
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
By the looks of it you have successfully created a new partition table.
The errors point to the aftermath jobs of closing the device. Since you have deleted previous partitions it cannot remove partition 1,2,3,4 because they don't exist anymore. And likewise cannot load the new table as removal of old ones failed. You should just reboot and start formatting it.
why reboot? The computer or the disk?
â Alex
May 17 at 5:41
Reboot because the kernel failed to load the new partition table.Try doing both computer and disk.
â anjanik012
May 17 at 5:43
add a comment |Â
up vote
0
down vote
To be able to answer this question, one would have to see how you went about making your changes including how fdisk was invoked. With fdisk, you can follow your progress by using the 'p' (print) command to view the partition table, use it to see if your commands to delete partitions and create new (command 'n') partitions actually did what you thought it should. You can create a completely new partition table with the 'o' command (for a DOS type of table). Use the command 'v' to verify the table, if there are no errors, you should be able to write it out to the disk.
Keep in mind, only a partition can be 'formatted'. What is your reason to redo the partition tables and format the disk? Are you getting read/write errors with this disk? If that is the case, you should replace the disk, it won't get better.
Sorry to go on here, but I went and looked at the your source of information.
Ahh! I just looked at the directions for using fdisk, that you refered to, it leaves out an important step, choosing the type of partition that you want, using the 't' command to change (set) the partition type. Use 83 for a "normal" linux partition, use 82 for a linux swap partition. Use the 'l' command to list the values for different OS's. You may also want to toggle whether the disk is bootable or not, using the 'a' command.
Hope this helps!
Please edit your answer and omit the parts that don't contribute to the answer. Also please use some formatting to make it more readable.
â danzel
May 17 at 9:36
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
By the looks of it you have successfully created a new partition table.
The errors point to the aftermath jobs of closing the device. Since you have deleted previous partitions it cannot remove partition 1,2,3,4 because they don't exist anymore. And likewise cannot load the new table as removal of old ones failed. You should just reboot and start formatting it.
why reboot? The computer or the disk?
â Alex
May 17 at 5:41
Reboot because the kernel failed to load the new partition table.Try doing both computer and disk.
â anjanik012
May 17 at 5:43
add a comment |Â
up vote
0
down vote
By the looks of it you have successfully created a new partition table.
The errors point to the aftermath jobs of closing the device. Since you have deleted previous partitions it cannot remove partition 1,2,3,4 because they don't exist anymore. And likewise cannot load the new table as removal of old ones failed. You should just reboot and start formatting it.
why reboot? The computer or the disk?
â Alex
May 17 at 5:41
Reboot because the kernel failed to load the new partition table.Try doing both computer and disk.
â anjanik012
May 17 at 5:43
add a comment |Â
up vote
0
down vote
up vote
0
down vote
By the looks of it you have successfully created a new partition table.
The errors point to the aftermath jobs of closing the device. Since you have deleted previous partitions it cannot remove partition 1,2,3,4 because they don't exist anymore. And likewise cannot load the new table as removal of old ones failed. You should just reboot and start formatting it.
By the looks of it you have successfully created a new partition table.
The errors point to the aftermath jobs of closing the device. Since you have deleted previous partitions it cannot remove partition 1,2,3,4 because they don't exist anymore. And likewise cannot load the new table as removal of old ones failed. You should just reboot and start formatting it.
answered May 17 at 5:39
![](https://i.stack.imgur.com/VFSfK.jpg?s=32&g=1)
![](https://i.stack.imgur.com/VFSfK.jpg?s=32&g=1)
anjanik012
966
966
why reboot? The computer or the disk?
â Alex
May 17 at 5:41
Reboot because the kernel failed to load the new partition table.Try doing both computer and disk.
â anjanik012
May 17 at 5:43
add a comment |Â
why reboot? The computer or the disk?
â Alex
May 17 at 5:41
Reboot because the kernel failed to load the new partition table.Try doing both computer and disk.
â anjanik012
May 17 at 5:43
why reboot? The computer or the disk?
â Alex
May 17 at 5:41
why reboot? The computer or the disk?
â Alex
May 17 at 5:41
Reboot because the kernel failed to load the new partition table.Try doing both computer and disk.
â anjanik012
May 17 at 5:43
Reboot because the kernel failed to load the new partition table.Try doing both computer and disk.
â anjanik012
May 17 at 5:43
add a comment |Â
up vote
0
down vote
To be able to answer this question, one would have to see how you went about making your changes including how fdisk was invoked. With fdisk, you can follow your progress by using the 'p' (print) command to view the partition table, use it to see if your commands to delete partitions and create new (command 'n') partitions actually did what you thought it should. You can create a completely new partition table with the 'o' command (for a DOS type of table). Use the command 'v' to verify the table, if there are no errors, you should be able to write it out to the disk.
Keep in mind, only a partition can be 'formatted'. What is your reason to redo the partition tables and format the disk? Are you getting read/write errors with this disk? If that is the case, you should replace the disk, it won't get better.
Sorry to go on here, but I went and looked at the your source of information.
Ahh! I just looked at the directions for using fdisk, that you refered to, it leaves out an important step, choosing the type of partition that you want, using the 't' command to change (set) the partition type. Use 83 for a "normal" linux partition, use 82 for a linux swap partition. Use the 'l' command to list the values for different OS's. You may also want to toggle whether the disk is bootable or not, using the 'a' command.
Hope this helps!
Please edit your answer and omit the parts that don't contribute to the answer. Also please use some formatting to make it more readable.
â danzel
May 17 at 9:36
add a comment |Â
up vote
0
down vote
To be able to answer this question, one would have to see how you went about making your changes including how fdisk was invoked. With fdisk, you can follow your progress by using the 'p' (print) command to view the partition table, use it to see if your commands to delete partitions and create new (command 'n') partitions actually did what you thought it should. You can create a completely new partition table with the 'o' command (for a DOS type of table). Use the command 'v' to verify the table, if there are no errors, you should be able to write it out to the disk.
Keep in mind, only a partition can be 'formatted'. What is your reason to redo the partition tables and format the disk? Are you getting read/write errors with this disk? If that is the case, you should replace the disk, it won't get better.
Sorry to go on here, but I went and looked at the your source of information.
Ahh! I just looked at the directions for using fdisk, that you refered to, it leaves out an important step, choosing the type of partition that you want, using the 't' command to change (set) the partition type. Use 83 for a "normal" linux partition, use 82 for a linux swap partition. Use the 'l' command to list the values for different OS's. You may also want to toggle whether the disk is bootable or not, using the 'a' command.
Hope this helps!
Please edit your answer and omit the parts that don't contribute to the answer. Also please use some formatting to make it more readable.
â danzel
May 17 at 9:36
add a comment |Â
up vote
0
down vote
up vote
0
down vote
To be able to answer this question, one would have to see how you went about making your changes including how fdisk was invoked. With fdisk, you can follow your progress by using the 'p' (print) command to view the partition table, use it to see if your commands to delete partitions and create new (command 'n') partitions actually did what you thought it should. You can create a completely new partition table with the 'o' command (for a DOS type of table). Use the command 'v' to verify the table, if there are no errors, you should be able to write it out to the disk.
Keep in mind, only a partition can be 'formatted'. What is your reason to redo the partition tables and format the disk? Are you getting read/write errors with this disk? If that is the case, you should replace the disk, it won't get better.
Sorry to go on here, but I went and looked at the your source of information.
Ahh! I just looked at the directions for using fdisk, that you refered to, it leaves out an important step, choosing the type of partition that you want, using the 't' command to change (set) the partition type. Use 83 for a "normal" linux partition, use 82 for a linux swap partition. Use the 'l' command to list the values for different OS's. You may also want to toggle whether the disk is bootable or not, using the 'a' command.
Hope this helps!
To be able to answer this question, one would have to see how you went about making your changes including how fdisk was invoked. With fdisk, you can follow your progress by using the 'p' (print) command to view the partition table, use it to see if your commands to delete partitions and create new (command 'n') partitions actually did what you thought it should. You can create a completely new partition table with the 'o' command (for a DOS type of table). Use the command 'v' to verify the table, if there are no errors, you should be able to write it out to the disk.
Keep in mind, only a partition can be 'formatted'. What is your reason to redo the partition tables and format the disk? Are you getting read/write errors with this disk? If that is the case, you should replace the disk, it won't get better.
Sorry to go on here, but I went and looked at the your source of information.
Ahh! I just looked at the directions for using fdisk, that you refered to, it leaves out an important step, choosing the type of partition that you want, using the 't' command to change (set) the partition type. Use 83 for a "normal" linux partition, use 82 for a linux swap partition. Use the 'l' command to list the values for different OS's. You may also want to toggle whether the disk is bootable or not, using the 'a' command.
Hope this helps!
edited May 17 at 12:10
danzel
1,316512
1,316512
answered May 17 at 6:20
Bruce Lytle
242
242
Please edit your answer and omit the parts that don't contribute to the answer. Also please use some formatting to make it more readable.
â danzel
May 17 at 9:36
add a comment |Â
Please edit your answer and omit the parts that don't contribute to the answer. Also please use some formatting to make it more readable.
â danzel
May 17 at 9:36
Please edit your answer and omit the parts that don't contribute to the answer. Also please use some formatting to make it more readable.
â danzel
May 17 at 9:36
Please edit your answer and omit the parts that don't contribute to the answer. Also please use some formatting to make it more readable.
â danzel
May 17 at 9:36
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2faskubuntu.com%2fquestions%2f1037235%2funable-to-format-disk-invalid-argument%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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