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.

Powered by WordPress
Entries and comments feeds. Valid XHTML and CSS. 25 queries. 0.049 seconds.