Running the shred command from Fedora on a virtual machine causes a write error in the middle

Asked 2 years ago, Updated 2 years ago, 106 views

For 932 GiB external hard drives (sdb2),

~$sudo shred-n 4-z-v/dev/sdb2

When you run , you can start writing about 30 GiB.

shred:/dev/sdb2: A write error occurred with offset 32444973056: Input/output error

occurs.

When I ran the shred command on USB 5 years ago, I didn't get this error, but this time, no matter how many times I tried, I got hit from the area where I wrote about 30 GiB.When I looked into the cause, I couldn't find any satisfactory information, so I asked you a question.

Note: It seems that the guest OS (and host?) will be unmounted after writing a random number of 30GiB.

Host OS:Windows 10
Guest OS: Fedora 29GNOME

linux command-line

2022-09-30 16:22

2 Answers

This is just a solution in my environment (ThinkPad X280), so just for your reference

As soon as it was resolved, I changed the BIOS boot setting for my laptop (ThinkPad X280) based on the Qiita article in here.Then download the Fedora 29 ISO image from the official site, burn the image to the USB memory with DD for Windows, boot it to the laptop and boot it live.

Plug the external hard drive into a USB 3.0-capable port and verify that it is mounted with df-h from the terminal (providing a descriptive drive name such as "Sotozuke HDD" makes it easier to verify).

After confirmation, shred-n2-z/dev/XXX specifies the desired device and begins the overwrite operation.

It may vary depending on the capacity, but formatting a storage device (two random numbers, one zero filling) over 900 GiB takes one day.

Finally, my virtual environment is VirtualBox 5.2.22 r126460 (Qt5.6.2).


2022-09-30 16:22

Suspect the affected disk is damaged. Check to see if fsck is checked.

In my case, when I operated on an SD card connected to the host OS (Windows 10) from Linux on VirtualBox, I/O errors occurred during the operation of the damaged SD card and the connection was frequently disconnected.


2022-09-30 16:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.