When I run fdisk and change the size of a partition, fdisk says at the end of its output:
The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8)
I'd like to do so without having to reboot (and then write a script that does it) How do I use kpartx to do this correctly? I've tried:
kpartx -f -v /dev/mmcblk0
Which outputs:
mmcblk0p1 : 0 102400 /dev/mmcblk0 2048
mmcblk0p2 : 0 7657472 /dev/mmcblk0 104448
and:
kpartx -a -v /dev/mmcblk0
which outputs:
device-mapper: reload ioctl on mmcblk0p1 failed: Invalid argument
create/reload failed on mmcblk0p1
add map mmcblk0p1 (0:0): 0 102400 linear /dev/mmcblk0 2048
device-mapper: reload ioctl on mmcblk0p2 failed: Invalid argument
create/reload failed on mmcblk0p2
add map mmcblk0p2 (0:0): 0 7657472 linear /dev/mmcblk0 104448
This is for an SD card in a raspi running debian.
EDIT: To clarify what I am trying to do; I am deleting an unused p3 from an SD Card and resizing p2 to fill the card. The card currently contains a small boot partition p1 and p2 is where the OS sits.
partprobehelp?