Howto re-read a partition table on Linux?

January 29, 2009

Today I needed to partition an additional hard disk and format the partitions. I used cfdisk which is installed by default on Ubuntu to have a nice text GUI and not the plain old fdisk. But after changing the partition table and exiting cfdisk you’ll see that the entries in /dev/ are still missing for the new partitions. Sure you can reboot or reconnect hot plug devices like the onces connected via USB. But thats not elegant nor in the best Unix tradition. 😉

I use partprobe for discovering new partitions, just enter it as user with root privileges and the devices will be created and you can use mkfs.[ext3|vfat|..] to format the partitions. If your system is missing it you can easily install it (on Ubuntu/Debian) like this: apt-get install parted. I’ll guess the package is named similar on other distributions.

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. I would recommend using “blockdev –rereadpt” its always worked fine for me and should be installed by default on pretty much any distro. 🙂

    Comment by Khabi — April 17, 2009 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Powered by WordPress
Entries and comments feeds. Valid XHTML and CSS. 37 queries. 0.063 seconds.