Linux under the D-disk (for USB stick, hard disk and other mobile storage devices) strategy (than the format of the fierce, because it is not recoverable!) )

Source: Internet
Author: User

On this information, Baidu is still relatively small. Share it today, plug your USB flash drive into the host computer, and enter the following command:

DD If=/dev/zero of=/dev/sdb bs=1024 count=102400 and then just wait for your USB stick all the data destroyed into a thoroughly empty disk!

DD This command is Linux that copies a file with a specified size block and makes the specified conversion at the same time as the copy.

Introduction to the number of references:

1. if= file Name: Enter the file name, default to standard input.

The source file is specified. < If=input file >

2. of= file name: Output file name, default is standard output. That is, the specified destination file. < Of=output file >

3. Ibs=bytes: Reads a bytes byte at a time, that is, specifies a block size of bytes bytes.

Obs=bytes: Outputs bytes bytes at a time, that is, specifying a block size of bytes bytes.

Bs=bytes: The block size to set the read/output at the same time is bytes bytes.

4. Count=blocks: Copy only blocks blocks, the block size equals the number of bytes specified by IBS.

You can configure the corresponding parameters according to the size of your storage device.

Next look at the example, the example is when I learned to make the tiny4412 Development Board SD card when it is ready:

//******************************D Plate **************************************************//

//Display disk partition SDB is my USB flash drive, my USB drive divided two zones, one for Linux under the use of, one is to use under the window, the next time we introduce the partition to how to divide, SDA is system disk, pay attention to D wrong, the consequences are very serious of Oh!!

!

。
[Email protected] tiny4412]# fdisk-l

disk/dev/sda:500.1 GB, 500107862016 bytes
Heads, 2 sectors/track, 3255910 cylinders
Units = Cylinders = 153600 bytes

Device Boot Start End Blocks Id System
/DEV/SDA1 * 7 349539 52429824 7 Hpfs/ntfs
/dev/sda2 349539 3255911 435955712 f W95 Ext ' d (LBA)
/dev/sda5 349546 1803579 218104832 7 hpfs/ntfs
/dev/sda6 1803580 1804261 102299-up Linux
/dev/sda7 1804262 1824741 3071999, Linux Swap/solaris
/dev/sda8 1824742 3255910 214675349-up Linux

disk/dev/sdb:3904 MB, 3904897024 bytes
213 heads, Sectors/track, 1023 cylinders
Units = Cylinders of 7455 * 3816960 bytes

Device Boot Start End Blocks Id System
/DEV/SDB1 557 1020 1729560 C W95 FAT32 (LBA)
/DEV/SDB4 7 556 2050125 Linux

Partition table entries is not in disk order


//Show disk mount point, my USB stick mounted on/media/disk
[Email protected] tiny4412]# df-h
File system             Capacity  Used with available%Mount point
/dev/sda8 199G 59G 130G 32%/
/dev/sda6 97M 30M 63M 32%/boot
Tmpfs 1009M 0 1009M 0%/dev/shm
/DEV/SDB1 1.7G 13M 1.7G 1%/media/disk
[Email protected] tiny4412]# umount/media/*//in theDUSB drive must be unlocked before the disk    

Then run the D-Disk command
[[email protected] tiny4412]# DD If=/dev/zero of=/dev/sdb bs=1024count=102400
102400+0 Records in
102400+0 Records out
104857600 bytes (MB) copied, 42.3574 seconds, 2.5 MB/s
[Email protected] tiny4412]# fdisk-l

disk/dev/sda:500.1 GB, 500107862016 bytes
Heads, 2 sectors/track, 3255910 cylinders
Units = Cylinders = 153600 bytes

Device Boot Start End Blocks Id System
/DEV/SDA1 * 7 349539 52429824 7 Hpfs/ntfs
/dev/sda2 349539 3255911 435955712 f W95 Ext ' d (LBA)
/dev/sda5 349546 1803579 218104832 7 hpfs/ntfs
/dev/sda6 1803580 1804261 102299-up Linux
/dev/sda7 1804262 1824741 3071999, Linux Swap/solaris
/dev/sda8 1824742 3255910 214675349-up Linux

disk/dev/sdb:3904 MB, 3904897024 bytes
121 heads, Sectors/track, 1016 cylinders
Units = Cylinders of 7502 * 3841024 bytes

Disk/dev/sdb doesn ' t contain a valid partition table//D disk succeeded. There's nothing on your plate to recover.


Linux under the D-disk (for USB stick, hard disk and other mobile storage devices) strategy (than the format of the fierce, because it is not recoverable!) )

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.