Securely erase single (Windows) partitionWindows disk's partition(s) are misaligned: Can't mountHow can I expand a partition into non adjacent unallocated space?Unable to extend ubuntu partitonUbuntu Live CD does not recognize a Windows partition with data on itHow to create a separate home partition after installing Ubuntu under single / partitionWindows doesn't see gparted partition doneHow to expand boot partition in front of LVM partitionCannot dual boot windows after ubuntu (gpt partition issue)Ubuntu 16.04 new home partition
What powers aircraft prior to APU being switched on?
How to discipline overeager engineer
AD823 current sense
A Society Built Around Theft?
An employee has low self-confidence, and is performing poorly. How can I help?
Little Endian Number to String Conversion
How effective are nunchaku as a choking weapon?
Why CMYK & PNG is not possible?
Test if two food are the same
What does "bracketing" a UK political party mean?
Why didn't Kes send Voyager home?
Why is the intercept changing in a logistic regression when all predictors are standardized?
Could a small private island protect its sovereignty?
Is any device installed on airplane to measure wind speed relative to the ground, and its direction?
What can I do to avoid potential charges for bribery?
Shuffling multiple iterators in order
Always show full URL in Safari address bar
What is the meaning of "log" in this sentence?
Translation Golf XLVIII — We're sorry to see you go
How to not lose focus after each disruption in flow
Can I use I2C over 2m cables?
Are there any privately owned large commercial airports?
Fill the Image Sequence Ep. 2
Does journal access significantly influence choice in which journal to publish in?
Securely erase single (Windows) partition
Windows disk's partition(s) are misaligned: Can't mountHow can I expand a partition into non adjacent unallocated space?Unable to extend ubuntu partitonUbuntu Live CD does not recognize a Windows partition with data on itHow to create a separate home partition after installing Ubuntu under single / partitionWindows doesn't see gparted partition doneHow to expand boot partition in front of LVM partitionCannot dual boot windows after ubuntu (gpt partition issue)Ubuntu 16.04 new home partition
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I am currently dual booted Windows 10 and Ubuntu 18.10. I know I can "erase" the Windows partition with gparted, but does that really erase the data?
I would like to run something like DBAN on the windows partition before I delete it and expand the Ubuntu one. This is an older computer (and not my primary) that I have been using to experiment with Ubuntu. I do not have much data yet, so completely wiping the drive and starting over is a possibility if wiping just the windows partition is not an option.
But, I wanted to ask... Is there any tool that will wipe the windows partition but leave the Ubuntu one intact?
dual-boot partitioning
|
show 1 more comment
I am currently dual booted Windows 10 and Ubuntu 18.10. I know I can "erase" the Windows partition with gparted, but does that really erase the data?
I would like to run something like DBAN on the windows partition before I delete it and expand the Ubuntu one. This is an older computer (and not my primary) that I have been using to experiment with Ubuntu. I do not have much data yet, so completely wiping the drive and starting over is a possibility if wiping just the windows partition is not an option.
But, I wanted to ask... Is there any tool that will wipe the windows partition but leave the Ubuntu one intact?
dual-boot partitioning
You could do this, but it seems like extra effort unless you believe that someone is going to take physical posession of your computer, and find something you don't want them to.
– Charles Green
Apr 18 at 1:25
It is my old work computer and has clients' data on it. I suppose I could wipe individual folders with something like ccleaner or bcwipe.
– Driver8
Apr 18 at 1:56
You could also look at bleachbit - but - I think that I have read that the normal file wipes are not terribly effective on ext3/ext4 file systems. I am totally in the dark about NTFS - seeman shred
– Charles Green
Apr 18 at 3:43
@CharlesGreen actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
@heynnema i am an freelancer so it has always been my computer... it is just old so i was experimenting with Linux for the first time... now that i want to keep linux on the machine, i was thinking i should wipe the old data on the windows partition before i delete it to expand the linux partition to the full disk
– Driver8
Apr 19 at 22:02
|
show 1 more comment
I am currently dual booted Windows 10 and Ubuntu 18.10. I know I can "erase" the Windows partition with gparted, but does that really erase the data?
I would like to run something like DBAN on the windows partition before I delete it and expand the Ubuntu one. This is an older computer (and not my primary) that I have been using to experiment with Ubuntu. I do not have much data yet, so completely wiping the drive and starting over is a possibility if wiping just the windows partition is not an option.
But, I wanted to ask... Is there any tool that will wipe the windows partition but leave the Ubuntu one intact?
dual-boot partitioning
I am currently dual booted Windows 10 and Ubuntu 18.10. I know I can "erase" the Windows partition with gparted, but does that really erase the data?
I would like to run something like DBAN on the windows partition before I delete it and expand the Ubuntu one. This is an older computer (and not my primary) that I have been using to experiment with Ubuntu. I do not have much data yet, so completely wiping the drive and starting over is a possibility if wiping just the windows partition is not an option.
But, I wanted to ask... Is there any tool that will wipe the windows partition but leave the Ubuntu one intact?
dual-boot partitioning
dual-boot partitioning
edited Apr 18 at 3:25
Zzzach...
2,47418 silver badges30 bronze badges
2,47418 silver badges30 bronze badges
asked Apr 18 at 1:20
Driver8Driver8
61 bronze badge
61 bronze badge
You could do this, but it seems like extra effort unless you believe that someone is going to take physical posession of your computer, and find something you don't want them to.
– Charles Green
Apr 18 at 1:25
It is my old work computer and has clients' data on it. I suppose I could wipe individual folders with something like ccleaner or bcwipe.
– Driver8
Apr 18 at 1:56
You could also look at bleachbit - but - I think that I have read that the normal file wipes are not terribly effective on ext3/ext4 file systems. I am totally in the dark about NTFS - seeman shred
– Charles Green
Apr 18 at 3:43
@CharlesGreen actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
@heynnema i am an freelancer so it has always been my computer... it is just old so i was experimenting with Linux for the first time... now that i want to keep linux on the machine, i was thinking i should wipe the old data on the windows partition before i delete it to expand the linux partition to the full disk
– Driver8
Apr 19 at 22:02
|
show 1 more comment
You could do this, but it seems like extra effort unless you believe that someone is going to take physical posession of your computer, and find something you don't want them to.
– Charles Green
Apr 18 at 1:25
It is my old work computer and has clients' data on it. I suppose I could wipe individual folders with something like ccleaner or bcwipe.
– Driver8
Apr 18 at 1:56
You could also look at bleachbit - but - I think that I have read that the normal file wipes are not terribly effective on ext3/ext4 file systems. I am totally in the dark about NTFS - seeman shred
– Charles Green
Apr 18 at 3:43
@CharlesGreen actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
@heynnema i am an freelancer so it has always been my computer... it is just old so i was experimenting with Linux for the first time... now that i want to keep linux on the machine, i was thinking i should wipe the old data on the windows partition before i delete it to expand the linux partition to the full disk
– Driver8
Apr 19 at 22:02
You could do this, but it seems like extra effort unless you believe that someone is going to take physical posession of your computer, and find something you don't want them to.
– Charles Green
Apr 18 at 1:25
You could do this, but it seems like extra effort unless you believe that someone is going to take physical posession of your computer, and find something you don't want them to.
– Charles Green
Apr 18 at 1:25
It is my old work computer and has clients' data on it. I suppose I could wipe individual folders with something like ccleaner or bcwipe.
– Driver8
Apr 18 at 1:56
It is my old work computer and has clients' data on it. I suppose I could wipe individual folders with something like ccleaner or bcwipe.
– Driver8
Apr 18 at 1:56
You could also look at bleachbit - but - I think that I have read that the normal file wipes are not terribly effective on ext3/ext4 file systems. I am totally in the dark about NTFS - see
man shred
– Charles Green
Apr 18 at 3:43
You could also look at bleachbit - but - I think that I have read that the normal file wipes are not terribly effective on ext3/ext4 file systems. I am totally in the dark about NTFS - see
man shred
– Charles Green
Apr 18 at 3:43
@CharlesGreen actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
@CharlesGreen actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
@heynnema i am an freelancer so it has always been my computer... it is just old so i was experimenting with Linux for the first time... now that i want to keep linux on the machine, i was thinking i should wipe the old data on the windows partition before i delete it to expand the linux partition to the full disk
– Driver8
Apr 19 at 22:02
@heynnema i am an freelancer so it has always been my computer... it is just old so i was experimenting with Linux for the first time... now that i want to keep linux on the machine, i was thinking i should wipe the old data on the windows partition before i delete it to expand the linux partition to the full disk
– Driver8
Apr 19 at 22:02
|
show 1 more comment
2 Answers
2
active
oldest
votes
Erasing data from the disk in the manner that is definitive is non-trivial. You could attempt to follow Charles Green's answer, but there are caveats:
- Overwriting data once may still leave it recoverable by specialist tools. So you may need to use something stronger than
dd
, for example this command will do this:sudo wipe -k /dev/sda9
(make sure to put in the correct partition), you do not need to delete the partition and then recreate it, simply do that with the current NTFS partition, it will be wiped. - Even if you use
wipe
sometimes harddrives cache the data and only write it when they think it is necessary. So it is possible that your drive will do that, and not actually physically remove the data by overwriting it.wipe
is better thandd
, because at least it will do multiple passes lessening the chance of that happening. - While these command will overwrite blocks deemed bad by Windows operating system (because you are writing to a block device rather than to a file system), it will be unable to access those sectors that harddrive's firmware has marked as damaged. Contemporary drives silently redirect addresses from the damaged sectors to writable ones, and the data there cannot be overwritten.
- Since you are concerned about data leak, you may prepare for future issues and encrypt the new drive. You can look at
dm-crypt
, but it is non-trivial. The beauty of this setup is that the data appears to be random if the attacker does not have a password or a keyfile.
Actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
You'll be surprised. Some companies have even been "hacked" by somebody simply looking through their trash and finding paper with passwords written on it.
– v010dya
Apr 18 at 9:51
add a comment
|
One method I could device to do this, would be to first use dd
to overwrite your windows partition, and then use gparted
to create a new format for use in linux, or remove the old partition and incorporate the space into your existing Linux disk.
Assuming your disk is /dev/sda
and the Windows partition is /dev/sda9
, you might try a command like
sudo dd --progress ifile=/dev/zero ofile=/dev/sda9 bs=4g
This will fill the partition with zero's, and continue until the partition is full and the command returns with an error. You could do the math, and figure a blocksize (bs=) and count (count=) to fill the partition exactly. Additionally, you could use /dev/urandom
to fill the partition with random data.
But be very, very careful with dd.
Following this, you could then use gparted to format it as a file system that you would like to use for your Linux system.
Finally, be very careful with dd
. It is not a forgiving program.
Why ext2 partition?
– heynnema
Apr 18 at 2:12
@heynnema Reduce overhead? No journal? Maybe one of the other fs would be faster.
– Charles Green
Apr 18 at 3:41
@CharlesGreen Overhead is minimal, but chance of data loss is non-trivial. Do not use ext2 if you plan to be writing to that system a lot. It is useful still for things like/boot
or similar, but definitely not for anything that user will be writing to a lot. This is a horrible case of micro-optimisation.
– v010dya
Apr 18 at 3:48
@v010dya Data loss is exactly what the OP is asking for...
– Charles Green
Apr 18 at 3:58
1
@v010dya You are correct - the whole "make a partition, format..." is useless in this case - I will revise my answer to point to that.
– Charles Green
Apr 18 at 4:43
|
show 2 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134791%2fsecurely-erase-single-windows-partition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Erasing data from the disk in the manner that is definitive is non-trivial. You could attempt to follow Charles Green's answer, but there are caveats:
- Overwriting data once may still leave it recoverable by specialist tools. So you may need to use something stronger than
dd
, for example this command will do this:sudo wipe -k /dev/sda9
(make sure to put in the correct partition), you do not need to delete the partition and then recreate it, simply do that with the current NTFS partition, it will be wiped. - Even if you use
wipe
sometimes harddrives cache the data and only write it when they think it is necessary. So it is possible that your drive will do that, and not actually physically remove the data by overwriting it.wipe
is better thandd
, because at least it will do multiple passes lessening the chance of that happening. - While these command will overwrite blocks deemed bad by Windows operating system (because you are writing to a block device rather than to a file system), it will be unable to access those sectors that harddrive's firmware has marked as damaged. Contemporary drives silently redirect addresses from the damaged sectors to writable ones, and the data there cannot be overwritten.
- Since you are concerned about data leak, you may prepare for future issues and encrypt the new drive. You can look at
dm-crypt
, but it is non-trivial. The beauty of this setup is that the data appears to be random if the attacker does not have a password or a keyfile.
Actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
You'll be surprised. Some companies have even been "hacked" by somebody simply looking through their trash and finding paper with passwords written on it.
– v010dya
Apr 18 at 9:51
add a comment
|
Erasing data from the disk in the manner that is definitive is non-trivial. You could attempt to follow Charles Green's answer, but there are caveats:
- Overwriting data once may still leave it recoverable by specialist tools. So you may need to use something stronger than
dd
, for example this command will do this:sudo wipe -k /dev/sda9
(make sure to put in the correct partition), you do not need to delete the partition and then recreate it, simply do that with the current NTFS partition, it will be wiped. - Even if you use
wipe
sometimes harddrives cache the data and only write it when they think it is necessary. So it is possible that your drive will do that, and not actually physically remove the data by overwriting it.wipe
is better thandd
, because at least it will do multiple passes lessening the chance of that happening. - While these command will overwrite blocks deemed bad by Windows operating system (because you are writing to a block device rather than to a file system), it will be unable to access those sectors that harddrive's firmware has marked as damaged. Contemporary drives silently redirect addresses from the damaged sectors to writable ones, and the data there cannot be overwritten.
- Since you are concerned about data leak, you may prepare for future issues and encrypt the new drive. You can look at
dm-crypt
, but it is non-trivial. The beauty of this setup is that the data appears to be random if the attacker does not have a password or a keyfile.
Actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
You'll be surprised. Some companies have even been "hacked" by somebody simply looking through their trash and finding paper with passwords written on it.
– v010dya
Apr 18 at 9:51
add a comment
|
Erasing data from the disk in the manner that is definitive is non-trivial. You could attempt to follow Charles Green's answer, but there are caveats:
- Overwriting data once may still leave it recoverable by specialist tools. So you may need to use something stronger than
dd
, for example this command will do this:sudo wipe -k /dev/sda9
(make sure to put in the correct partition), you do not need to delete the partition and then recreate it, simply do that with the current NTFS partition, it will be wiped. - Even if you use
wipe
sometimes harddrives cache the data and only write it when they think it is necessary. So it is possible that your drive will do that, and not actually physically remove the data by overwriting it.wipe
is better thandd
, because at least it will do multiple passes lessening the chance of that happening. - While these command will overwrite blocks deemed bad by Windows operating system (because you are writing to a block device rather than to a file system), it will be unable to access those sectors that harddrive's firmware has marked as damaged. Contemporary drives silently redirect addresses from the damaged sectors to writable ones, and the data there cannot be overwritten.
- Since you are concerned about data leak, you may prepare for future issues and encrypt the new drive. You can look at
dm-crypt
, but it is non-trivial. The beauty of this setup is that the data appears to be random if the attacker does not have a password or a keyfile.
Erasing data from the disk in the manner that is definitive is non-trivial. You could attempt to follow Charles Green's answer, but there are caveats:
- Overwriting data once may still leave it recoverable by specialist tools. So you may need to use something stronger than
dd
, for example this command will do this:sudo wipe -k /dev/sda9
(make sure to put in the correct partition), you do not need to delete the partition and then recreate it, simply do that with the current NTFS partition, it will be wiped. - Even if you use
wipe
sometimes harddrives cache the data and only write it when they think it is necessary. So it is possible that your drive will do that, and not actually physically remove the data by overwriting it.wipe
is better thandd
, because at least it will do multiple passes lessening the chance of that happening. - While these command will overwrite blocks deemed bad by Windows operating system (because you are writing to a block device rather than to a file system), it will be unable to access those sectors that harddrive's firmware has marked as damaged. Contemporary drives silently redirect addresses from the damaged sectors to writable ones, and the data there cannot be overwritten.
- Since you are concerned about data leak, you may prepare for future issues and encrypt the new drive. You can look at
dm-crypt
, but it is non-trivial. The beauty of this setup is that the data appears to be random if the attacker does not have a password or a keyfile.
answered Apr 18 at 4:11
v010dyav010dya
7342 gold badges9 silver badges30 bronze badges
7342 gold badges9 silver badges30 bronze badges
Actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
You'll be surprised. Some companies have even been "hacked" by somebody simply looking through their trash and finding paper with passwords written on it.
– v010dya
Apr 18 at 9:51
add a comment
|
Actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
You'll be surprised. Some companies have even been "hacked" by somebody simply looking through their trash and finding paper with passwords written on it.
– v010dya
Apr 18 at 9:51
Actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
Actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
You'll be surprised. Some companies have even been "hacked" by somebody simply looking through their trash and finding paper with passwords written on it.
– v010dya
Apr 18 at 9:51
You'll be surprised. Some companies have even been "hacked" by somebody simply looking through their trash and finding paper with passwords written on it.
– v010dya
Apr 18 at 9:51
add a comment
|
One method I could device to do this, would be to first use dd
to overwrite your windows partition, and then use gparted
to create a new format for use in linux, or remove the old partition and incorporate the space into your existing Linux disk.
Assuming your disk is /dev/sda
and the Windows partition is /dev/sda9
, you might try a command like
sudo dd --progress ifile=/dev/zero ofile=/dev/sda9 bs=4g
This will fill the partition with zero's, and continue until the partition is full and the command returns with an error. You could do the math, and figure a blocksize (bs=) and count (count=) to fill the partition exactly. Additionally, you could use /dev/urandom
to fill the partition with random data.
But be very, very careful with dd.
Following this, you could then use gparted to format it as a file system that you would like to use for your Linux system.
Finally, be very careful with dd
. It is not a forgiving program.
Why ext2 partition?
– heynnema
Apr 18 at 2:12
@heynnema Reduce overhead? No journal? Maybe one of the other fs would be faster.
– Charles Green
Apr 18 at 3:41
@CharlesGreen Overhead is minimal, but chance of data loss is non-trivial. Do not use ext2 if you plan to be writing to that system a lot. It is useful still for things like/boot
or similar, but definitely not for anything that user will be writing to a lot. This is a horrible case of micro-optimisation.
– v010dya
Apr 18 at 3:48
@v010dya Data loss is exactly what the OP is asking for...
– Charles Green
Apr 18 at 3:58
1
@v010dya You are correct - the whole "make a partition, format..." is useless in this case - I will revise my answer to point to that.
– Charles Green
Apr 18 at 4:43
|
show 2 more comments
One method I could device to do this, would be to first use dd
to overwrite your windows partition, and then use gparted
to create a new format for use in linux, or remove the old partition and incorporate the space into your existing Linux disk.
Assuming your disk is /dev/sda
and the Windows partition is /dev/sda9
, you might try a command like
sudo dd --progress ifile=/dev/zero ofile=/dev/sda9 bs=4g
This will fill the partition with zero's, and continue until the partition is full and the command returns with an error. You could do the math, and figure a blocksize (bs=) and count (count=) to fill the partition exactly. Additionally, you could use /dev/urandom
to fill the partition with random data.
But be very, very careful with dd.
Following this, you could then use gparted to format it as a file system that you would like to use for your Linux system.
Finally, be very careful with dd
. It is not a forgiving program.
Why ext2 partition?
– heynnema
Apr 18 at 2:12
@heynnema Reduce overhead? No journal? Maybe one of the other fs would be faster.
– Charles Green
Apr 18 at 3:41
@CharlesGreen Overhead is minimal, but chance of data loss is non-trivial. Do not use ext2 if you plan to be writing to that system a lot. It is useful still for things like/boot
or similar, but definitely not for anything that user will be writing to a lot. This is a horrible case of micro-optimisation.
– v010dya
Apr 18 at 3:48
@v010dya Data loss is exactly what the OP is asking for...
– Charles Green
Apr 18 at 3:58
1
@v010dya You are correct - the whole "make a partition, format..." is useless in this case - I will revise my answer to point to that.
– Charles Green
Apr 18 at 4:43
|
show 2 more comments
One method I could device to do this, would be to first use dd
to overwrite your windows partition, and then use gparted
to create a new format for use in linux, or remove the old partition and incorporate the space into your existing Linux disk.
Assuming your disk is /dev/sda
and the Windows partition is /dev/sda9
, you might try a command like
sudo dd --progress ifile=/dev/zero ofile=/dev/sda9 bs=4g
This will fill the partition with zero's, and continue until the partition is full and the command returns with an error. You could do the math, and figure a blocksize (bs=) and count (count=) to fill the partition exactly. Additionally, you could use /dev/urandom
to fill the partition with random data.
But be very, very careful with dd.
Following this, you could then use gparted to format it as a file system that you would like to use for your Linux system.
Finally, be very careful with dd
. It is not a forgiving program.
One method I could device to do this, would be to first use dd
to overwrite your windows partition, and then use gparted
to create a new format for use in linux, or remove the old partition and incorporate the space into your existing Linux disk.
Assuming your disk is /dev/sda
and the Windows partition is /dev/sda9
, you might try a command like
sudo dd --progress ifile=/dev/zero ofile=/dev/sda9 bs=4g
This will fill the partition with zero's, and continue until the partition is full and the command returns with an error. You could do the math, and figure a blocksize (bs=) and count (count=) to fill the partition exactly. Additionally, you could use /dev/urandom
to fill the partition with random data.
But be very, very careful with dd.
Following this, you could then use gparted to format it as a file system that you would like to use for your Linux system.
Finally, be very careful with dd
. It is not a forgiving program.
edited Apr 18 at 4:48
answered Apr 18 at 1:35
Charles GreenCharles Green
15.6k7 gold badges42 silver badges63 bronze badges
15.6k7 gold badges42 silver badges63 bronze badges
Why ext2 partition?
– heynnema
Apr 18 at 2:12
@heynnema Reduce overhead? No journal? Maybe one of the other fs would be faster.
– Charles Green
Apr 18 at 3:41
@CharlesGreen Overhead is minimal, but chance of data loss is non-trivial. Do not use ext2 if you plan to be writing to that system a lot. It is useful still for things like/boot
or similar, but definitely not for anything that user will be writing to a lot. This is a horrible case of micro-optimisation.
– v010dya
Apr 18 at 3:48
@v010dya Data loss is exactly what the OP is asking for...
– Charles Green
Apr 18 at 3:58
1
@v010dya You are correct - the whole "make a partition, format..." is useless in this case - I will revise my answer to point to that.
– Charles Green
Apr 18 at 4:43
|
show 2 more comments
Why ext2 partition?
– heynnema
Apr 18 at 2:12
@heynnema Reduce overhead? No journal? Maybe one of the other fs would be faster.
– Charles Green
Apr 18 at 3:41
@CharlesGreen Overhead is minimal, but chance of data loss is non-trivial. Do not use ext2 if you plan to be writing to that system a lot. It is useful still for things like/boot
or similar, but definitely not for anything that user will be writing to a lot. This is a horrible case of micro-optimisation.
– v010dya
Apr 18 at 3:48
@v010dya Data loss is exactly what the OP is asking for...
– Charles Green
Apr 18 at 3:58
1
@v010dya You are correct - the whole "make a partition, format..." is useless in this case - I will revise my answer to point to that.
– Charles Green
Apr 18 at 4:43
Why ext2 partition?
– heynnema
Apr 18 at 2:12
Why ext2 partition?
– heynnema
Apr 18 at 2:12
@heynnema Reduce overhead? No journal? Maybe one of the other fs would be faster.
– Charles Green
Apr 18 at 3:41
@heynnema Reduce overhead? No journal? Maybe one of the other fs would be faster.
– Charles Green
Apr 18 at 3:41
@CharlesGreen Overhead is minimal, but chance of data loss is non-trivial. Do not use ext2 if you plan to be writing to that system a lot. It is useful still for things like
/boot
or similar, but definitely not for anything that user will be writing to a lot. This is a horrible case of micro-optimisation.– v010dya
Apr 18 at 3:48
@CharlesGreen Overhead is minimal, but chance of data loss is non-trivial. Do not use ext2 if you plan to be writing to that system a lot. It is useful still for things like
/boot
or similar, but definitely not for anything that user will be writing to a lot. This is a horrible case of micro-optimisation.– v010dya
Apr 18 at 3:48
@v010dya Data loss is exactly what the OP is asking for...
– Charles Green
Apr 18 at 3:58
@v010dya Data loss is exactly what the OP is asking for...
– Charles Green
Apr 18 at 3:58
1
1
@v010dya You are correct - the whole "make a partition, format..." is useless in this case - I will revise my answer to point to that.
– Charles Green
Apr 18 at 4:43
@v010dya You are correct - the whole "make a partition, format..." is useless in this case - I will revise my answer to point to that.
– Charles Green
Apr 18 at 4:43
|
show 2 more comments
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134791%2fsecurely-erase-single-windows-partition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You could do this, but it seems like extra effort unless you believe that someone is going to take physical posession of your computer, and find something you don't want them to.
– Charles Green
Apr 18 at 1:25
It is my old work computer and has clients' data on it. I suppose I could wipe individual folders with something like ccleaner or bcwipe.
– Driver8
Apr 18 at 1:56
You could also look at bleachbit - but - I think that I have read that the normal file wipes are not terribly effective on ext3/ext4 file systems. I am totally in the dark about NTFS - see
man shred
– Charles Green
Apr 18 at 3:43
@CharlesGreen actually, I'm a little surprised that any company would release a computer with customer/client data still on the hard drive. I'd think that most companies would physically destroy the hard drive before allowing the computer to leave the premises.
– heynnema
Apr 18 at 7:25
@heynnema i am an freelancer so it has always been my computer... it is just old so i was experimenting with Linux for the first time... now that i want to keep linux on the machine, i was thinking i should wipe the old data on the windows partition before i delete it to expand the linux partition to the full disk
– Driver8
Apr 19 at 22:02