Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I do a lot of live system building, which eventually involves imaging a USB drive with the built binary image:

dd if=binary.img of=/dev/sdX
sync

Where /dev/sdX is a USB drive. As part of my workflow, I like to have Ubuntu's Disk Utility open so I can verify the drive letter and unmount anything that gets mounted automatically. I also use it to create extra partitions for persistence.

The trouble is, after writing the image to the device — and even after the sync operation — Disk Utility doesn't show the new partition. It just shows free space. GParted sees it and fdisk sees it. Even after closing and opening Disk Utility, it still shows only free space.

If I click "Safe Removal" and physically unplug and replug the USB drive, Disk Utility will then see the partition.

Why do I need to remove and re-insert the drive for Disk Utility to see the partitions on it? Can I force Disk Utility to update its information without needing to do this?

(using Disk Utility 3.0.2 under Ubuntu 11.10.)

share|improve this question
    
This question appears to be abandoned and unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! –  Seth Mar 1 '13 at 0:01
    
@Seth - well, technically it still applies, in that I still use disk utility and it still retains out-of-date information. I don't really see how the question could be more detailed. But since there doesn't seem to be an answer to this, sure, it can be deleted. –  detly Mar 1 '13 at 0:04
    
Since you are still looking for an answer and are active on the site, your question isn't abandoned. I have gotten a moderator to undelete it for you. Since you're still around and looking for an answer there is no reason to have it deleted :) –  Seth Mar 1 '13 at 3:39
add comment

2 Answers 2

I have noticed that in some cases disk information is not changed without restarting system. But as you said if it is showing in gparted and fdisk then there is no question. But I would suggest you to restart your system and see if same thing happens

share|improve this answer
    
I'm not going to restart my system every time I re-image a USB stick. Anyway, I can force it to refresh by ejecting and re-inserting the drive, but I'd like to know if there's a better way than that. –  detly Mar 22 '12 at 7:55
add comment

The kernel probably doesn't know about the change. A good tool which helps in this case is partprobe. Just call it with sudo partprobe. The software will test all drives and if it finds new partitions it informs the kernel. After a successful run you'll see your image instead of free space.

share|improve this answer
add comment

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.