How should I format a USB prior to writing an ISO to it?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:
dd if=debian-*-netinst.iso of=/dev/sdX
- Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?
- Does it matter what filesystem is already present on the USB prior to running this command?
filesystems usb dd
add a comment |Â
up vote
4
down vote
favorite
I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:
dd if=debian-*-netinst.iso of=/dev/sdX
- Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?
- Does it matter what filesystem is already present on the USB prior to running this command?
filesystems usb dd
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:
dd if=debian-*-netinst.iso of=/dev/sdX
- Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?
- Does it matter what filesystem is already present on the USB prior to running this command?
filesystems usb dd
I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:
dd if=debian-*-netinst.iso of=/dev/sdX
- Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?
- Does it matter what filesystem is already present on the USB prior to running this command?
filesystems usb dd
filesystems usb dd
asked May 12 '13 at 1:19
Village
1,66873055
1,66873055
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
8
down vote
accepted
Writing to the device (/dev/sdX
) instead of to a file system (/mount/point
) deletes the file system on the device anyway so there's no need for mkfs
before.
There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.
add a comment |Â
up vote
3
down vote
The dd
command overwrites everything on the USB device. No preparaton is required.
add a comment |Â
up vote
2
down vote
You don't need to erase the old data first. But you can if you want to.
Sometimes it's a good idea. Particularly if you're giving it to someone.
This should do the trick:
Linux:
dd if=/dev/zero of=/dev/sdx
Macintosh:
dd if=/dev/zero of=/dev/diskx
diskutil zeroDisk /dev/diskx
Where sdx
or diskx
is the target disk. Usually, sda
/disk0
is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb
/disk1
, sdc
/disk2
, and so on.
If you have one internal disk (/dev/sda
or /dev/disk0
), and you connect an external drive via USB; the external drive will be /dev/sdb
or /dev/disk1
. You get the idea. SD cards are designated names like /dev/mmcblk0
and so on, in a similar fashion.
Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero
can be thought of as being similar to /dev/null
; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL
(0x00
) bytes to whatever process tries to read from it.
The original filesystem will be overwritten.
Some additional options that people commonly like to use with dd
, to manipulate block size & data read/write speeds follow the syntax:
bs=512kB count=1
Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:
status=progress
Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:
Linux:
lsblk
Macintosh:
diskutil list
The output will look something like this:
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
Writing to the device (/dev/sdX
) instead of to a file system (/mount/point
) deletes the file system on the device anyway so there's no need for mkfs
before.
There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.
add a comment |Â
up vote
8
down vote
accepted
Writing to the device (/dev/sdX
) instead of to a file system (/mount/point
) deletes the file system on the device anyway so there's no need for mkfs
before.
There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.
add a comment |Â
up vote
8
down vote
accepted
up vote
8
down vote
accepted
Writing to the device (/dev/sdX
) instead of to a file system (/mount/point
) deletes the file system on the device anyway so there's no need for mkfs
before.
There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.
Writing to the device (/dev/sdX
) instead of to a file system (/mount/point
) deletes the file system on the device anyway so there's no need for mkfs
before.
There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.
answered May 12 '13 at 1:27
Hauke Laging
54.3k1283130
54.3k1283130
add a comment |Â
add a comment |Â
up vote
3
down vote
The dd
command overwrites everything on the USB device. No preparaton is required.
add a comment |Â
up vote
3
down vote
The dd
command overwrites everything on the USB device. No preparaton is required.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
The dd
command overwrites everything on the USB device. No preparaton is required.
The dd
command overwrites everything on the USB device. No preparaton is required.
answered May 12 '13 at 1:26
vonbrand
14k22444
14k22444
add a comment |Â
add a comment |Â
up vote
2
down vote
You don't need to erase the old data first. But you can if you want to.
Sometimes it's a good idea. Particularly if you're giving it to someone.
This should do the trick:
Linux:
dd if=/dev/zero of=/dev/sdx
Macintosh:
dd if=/dev/zero of=/dev/diskx
diskutil zeroDisk /dev/diskx
Where sdx
or diskx
is the target disk. Usually, sda
/disk0
is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb
/disk1
, sdc
/disk2
, and so on.
If you have one internal disk (/dev/sda
or /dev/disk0
), and you connect an external drive via USB; the external drive will be /dev/sdb
or /dev/disk1
. You get the idea. SD cards are designated names like /dev/mmcblk0
and so on, in a similar fashion.
Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero
can be thought of as being similar to /dev/null
; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL
(0x00
) bytes to whatever process tries to read from it.
The original filesystem will be overwritten.
Some additional options that people commonly like to use with dd
, to manipulate block size & data read/write speeds follow the syntax:
bs=512kB count=1
Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:
status=progress
Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:
Linux:
lsblk
Macintosh:
diskutil list
The output will look something like this:
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
add a comment |Â
up vote
2
down vote
You don't need to erase the old data first. But you can if you want to.
Sometimes it's a good idea. Particularly if you're giving it to someone.
This should do the trick:
Linux:
dd if=/dev/zero of=/dev/sdx
Macintosh:
dd if=/dev/zero of=/dev/diskx
diskutil zeroDisk /dev/diskx
Where sdx
or diskx
is the target disk. Usually, sda
/disk0
is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb
/disk1
, sdc
/disk2
, and so on.
If you have one internal disk (/dev/sda
or /dev/disk0
), and you connect an external drive via USB; the external drive will be /dev/sdb
or /dev/disk1
. You get the idea. SD cards are designated names like /dev/mmcblk0
and so on, in a similar fashion.
Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero
can be thought of as being similar to /dev/null
; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL
(0x00
) bytes to whatever process tries to read from it.
The original filesystem will be overwritten.
Some additional options that people commonly like to use with dd
, to manipulate block size & data read/write speeds follow the syntax:
bs=512kB count=1
Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:
status=progress
Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:
Linux:
lsblk
Macintosh:
diskutil list
The output will look something like this:
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You don't need to erase the old data first. But you can if you want to.
Sometimes it's a good idea. Particularly if you're giving it to someone.
This should do the trick:
Linux:
dd if=/dev/zero of=/dev/sdx
Macintosh:
dd if=/dev/zero of=/dev/diskx
diskutil zeroDisk /dev/diskx
Where sdx
or diskx
is the target disk. Usually, sda
/disk0
is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb
/disk1
, sdc
/disk2
, and so on.
If you have one internal disk (/dev/sda
or /dev/disk0
), and you connect an external drive via USB; the external drive will be /dev/sdb
or /dev/disk1
. You get the idea. SD cards are designated names like /dev/mmcblk0
and so on, in a similar fashion.
Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero
can be thought of as being similar to /dev/null
; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL
(0x00
) bytes to whatever process tries to read from it.
The original filesystem will be overwritten.
Some additional options that people commonly like to use with dd
, to manipulate block size & data read/write speeds follow the syntax:
bs=512kB count=1
Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:
status=progress
Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:
Linux:
lsblk
Macintosh:
diskutil list
The output will look something like this:
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
You don't need to erase the old data first. But you can if you want to.
Sometimes it's a good idea. Particularly if you're giving it to someone.
This should do the trick:
Linux:
dd if=/dev/zero of=/dev/sdx
Macintosh:
dd if=/dev/zero of=/dev/diskx
diskutil zeroDisk /dev/diskx
Where sdx
or diskx
is the target disk. Usually, sda
/disk0
is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb
/disk1
, sdc
/disk2
, and so on.
If you have one internal disk (/dev/sda
or /dev/disk0
), and you connect an external drive via USB; the external drive will be /dev/sdb
or /dev/disk1
. You get the idea. SD cards are designated names like /dev/mmcblk0
and so on, in a similar fashion.
Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero
can be thought of as being similar to /dev/null
; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL
(0x00
) bytes to whatever process tries to read from it.
The original filesystem will be overwritten.
Some additional options that people commonly like to use with dd
, to manipulate block size & data read/write speeds follow the syntax:
bs=512kB count=1
Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:
status=progress
Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:
Linux:
lsblk
Macintosh:
diskutil list
The output will look something like this:
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
edited 8 mins ago
answered Feb 21 '17 at 20:18
tjt263
5001420
5001420
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%2funix.stackexchange.com%2fquestions%2f75477%2fhow-should-i-format-a-usb-prior-to-writing-an-iso-to-it%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