I encountered multiple issues trying to repartition my SD on my PI. Because the / directory is mounted, it never really worked safely for me to use fdisk. Morevoer some of the powerfull tools such as gparted need X11 installed, which I don’t have by default.
Hopefully the new PI3 B and B+ are able to boot from USB, hence the idea of creating a Rescue Dongle
It seems that all new PI 3B+ have OTP for USB boot mode setup by default. For the PC 3B, you have to activate using the /boot/config.txt
master-pi is a 3B+, nas-pi and home-pi are 3B:
Let’s check the /boot/config.txt
ansible picluster -i inventory/ -m shell -a "grep program_usb_boot_mode /boot/config.txt"
master-pi.kubedge.cloud | FAILED | rc=1 >>
nas-pi.kubedge.cloud | SUCCESS | rc=0 >>
program_usb_boot_mode=1
home-pi.kubedge.cloud | FAILED | rc=1 >>
The flag for OTP USB flag is set on the 3B+ (by default on master-pi) and on the 3B where I did add the entry to the config.txt (nas-pi)
ansible picluster -i inventory/ -m shell -a "vcgencmd otp_dump | grep 17:"
master-pi.kubedge.cloud | SUCCESS | rc=0 >>
17:3020000a
nas-pi.kubedge.cloud | SUCCESS | rc=0 >>
17:3020000a
home-pi.kubedge.cloud | SUCCESS | rc=0 >>
17:1020000a
The idea is to boot a PI from the Dongle and then apply the fixes to the SD card.
First step is to reboot a PI without SD card from the Dongle and connect VNC Viewer to it.
First insert the SD and close the popups
In a terminal run, sudo gparted
sudo gparted
unmount the mmc root partition
Resize the current partition (down to 16G), create an extended one and 7*2G logical partition in that 14G partition)
Apply the changes
Shutdown or Reboot. The PI should restart from the SD anyway.