0

Executing this Command :

dd if=/dev/sda1 of=/disk1/boot1.img

I got this Error :

dd: failed to open ‘/disk1/boot1.img’: Structure needs cleaning

I tried that Command on my centos machine and got that Error. How do I fix that Error? It's xfs file system. Should I do xfs_repair on disk1 by unmounting it?

PersianGulf
  • 602
  • 8
  • 21
achhainsan
  • 123
  • 7

1 Answers1

0

If your /dsik1/ mounted on /dev/sda1 It's normal error. You can't dd a disk on itelf.

PersianGulf
  • 602
  • 8
  • 21
  • What led you to that conclusion? `dd` is reading raw data and writing it to a file. It has no idea that the file is located on the same physical device. In fact, this operation is/was fairly common to extract the boot block from a disk. The `open` call also will not report this error just because of being on the same device. The Op will get a different failure when the file system runs out of space. – doneal24 Apr 17 '23 at 17:14