3

How do I mount a new partition on a removable disk after dd without removing and re-inserting the device?

If I use dd to write an image to a removable device, such as a usb-stick or an sd-card, the partitions on the device might change. When I use "fdisk -l" to list the partitions, the new ones are clearly visible. However, they are not visible when doing "cat /proc/partitions" and I can't mount any of the new partitions.

If I remove and re-insert the device, the partitions are "refreshed" and show up in /proc/partitions. Now it is possible to mount the new partitions. How do I trigger this refresh from a shell prompt without having to remove and re-insert the device?

1 Answer 1

4

If you have parted installed or can install it, you'll get partprobe. Use it like:

partprobe /dev/sdX

See:

http://www.cyberciti.biz/tips/re-read-the-partition-table-without-rebooting-linux-system.html Reread partition table without rebooting?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .