3

I am working with an external HDD and trying to backup a logical partition within an extended partition using dd like this:

sudo dd if=/dev/sdb6 of=partition6.dd

it returns:

dd: opening `/dev/sdb6': No such file or directory

I used the exact same method to backup a different partition (primary) with no issues

sudo dd if=/dev/sdb1 of=partition1.dd

Both GParted and cfdisk show sdb6 but it seems dd can't see it.

How can I backup /dev/sdb6?

chaos
  • 47,463
  • 11
  • 118
  • 144
user195166
  • 143
  • 3

1 Answers1

4

It appears that the device file does not exist. You can verify this by doing ls /dev/sdb6.

Try running the command partprobe, or sudo partprobe as user. This should detect the devices and create the according device files.

This may return the error

Error informing the kernel about modifications to partition /dev/sdb5 -- Device or resource busy

If it does, try to temporarily disable SELinux with setenforce 0, then try partprobe again, then don't forget to reenable SELinux.

For an external hard disk, you can also solve this error by unplugging the disk (once everything is unmounted!) and plugging it back in.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
replay
  • 8,483
  • 1
  • 26
  • 31
  • sudo partprobe returned the following: Error: Error informing the kernel about modifications to partition /dev/sdb5 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sdb5 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. Error: Failed to add partition 5 (Device or resource busy) ---- I'm not sure what to do with that information though. – user195166 Jan 03 '14 at 17:06
  • Do you maybe have selinux enabled? – replay Jan 03 '14 at 17:13
  • Try to temporarily disable selinux with `setenforce 0`, then try `partprobe` again, then don't forget to reenable selinux. – replay Jan 03 '14 at 17:14
  • removing the HDD and reconnecting seems to have done the trick; dd is executing now; selinux was not enabled (checked with sestatus) - thanks – user195166 Jan 03 '14 at 17:16
  • ok, great it worked – replay Jan 03 '14 at 17:17