HowTo: Reload (re-read) Partition Table In Ubuntu Linux

htt‮sp‬://www.lautturi.com
HowTo: Reload (re-read) Partition Table In Ubuntu Linux

To reload (re-read) the partition table in Ubuntu Linux, you can use the partprobe or blockdev command.

The partprobe command is a tool that allows you to inform the kernel about partition table changes on a disk. It can be used to re-read the partition table after making changes to the disk, such as creating or deleting partitions.

To use partprobe, you will need to specify the device file for the disk that you want to reload the partition table for. For example, to reload the partition table for the /dev/sda disk, you can run the following command:

sudo partprobe /dev/sda

The blockdev command is a utility that allows you to perform various operations on block devices. To reload the partition table using blockdev, you can use the --rereadpt option followed by the device file for the disk. For example:

sudo blockdev --rereadpt /dev/sda

Keep in mind that these commands will only inform the kernel about the changes to the partition table. If you have made changes to the partition table using a tool such as fdisk or parted, you will need to run the write command in the tool to actually apply the changes to the disk.

Created Time:2017-10-29 22:08:45  Author:lautturi