Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use wipefs to erase the signature of a file system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to use wipefs to erase the signature of the file system", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use wipefs to erase the signature of the file system" this article.

Wipefs is a program that comes with linux and is used to erase the signature of the file system without emptying any other data in the file system or device. By default, wipefs does not erase unless the nested partition table is on the entire disk device. To do this, you need the * *-force** option.

Show disk current signature [root@localhost ~] # wipefs / dev/sdaDEVICE OFFSET TYPE UUID LABELsda 0x1fe dos [root@localhost ~] # wipefs / dev/sda1DEVICE OFFSET TYPE UUID LABELsda1 0x0 xfs f15a938f-f96d-4b56-8259-76f31c209694

How to use wipefs to delete a disk signature [root@localhost ~] # wipefs-a-f / dev/sda/dev/sda: 2 bytes were erased at offset 0x000001fe (dos): 55 aa

You can also back up a signature to the $HOME directory and clear the signature of the disk:

[root@localhost] # wipefs-a-f-b / dev/sda/dev/sda: 2 bytes were erased at offset 0x000001fe (dos): 55 aa

How to recover signature information:

[root@localhost] # dd if=~/wipefs-sda-0x000001fe.bak of=/dev/sda seek=$ ((0x000001fe)) bs=1 conv=notrunc2+0 records in2+0 records out2 bytes copied, 0.0007176 s, 2.8kB/s

Use the dd command to clear partition tables and signatures

In some cases, the signature of the disk cannot be queried using wipefs, and you can use the dd command to clear the partition table and signature:

At this point, you can use dd Ming to clear the signature:

[root@localhost ~] # dd if=/dev/zero of=/dev/sda1 bs=1M count=11+0 records in1+0 records out1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00103757 s, 1.0 GB/s

Use the following command to clear the MBR boot record:

[root@localhost ~] # dd if=/dev/zero of=/dev/sda bs=446 count=11+0 records in1+0 records out446 bytes copied, 0.000605243 s, 737 kB/s and above are all the contents of the article "how to use wipefs to erase the signature of a file system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report