Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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 http://serverfault.com/questions/36038/reread-partition-table-without-rebooting

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.