Insufficient storage for a PolyScope X urup update
Use this procedure when a software update cannot be installed because the SD card does not have enough free space, and the current programs, settings, and URCaps must be kept.
Products affected: PolyScope X cobots that boot from an SD card (CB5.6).
A PolyScope X system image leaves most of the card for the data partition. On the first boot that partition is expanded to fill the card, and the expand runs only that once. Copying the card onto a larger one keeps the old partition size. The extra capacity stays unused until the expand is enabled again.
Other options
- Delete data that is no longer needed, such as unused URCaps, and then run the update.
- Install a new image of the target version, then install URCaps again, reapply settings, and import programs.
SD card
Use a Class 10 card of the same quality as the card supplied with the robot. A slower or poor-quality card can cause unstable operation and degrade performance. The new card must be larger than the card currently in the robot.
Before you start
- Power off the control box before removing the SD card.
- The computer used for the copy needs free disk space for a full image of the current card.
- Keep the original card until the new card has booted and the update has finished.
- The commands below overwrite the target device. Copy the whole card. Do not copy a single partition, and do not use a tool that resizes partitions during the copy.
- The instructions here are for performing the copy from a Linux terminal. On other operating systems, it requires third-party software, such as Balena Etcher or Rufus.
Procedure
- Power off the control box and remove the SD card.
- Insert the card into a computer. Identify the whole-disk device with lsblk. It must be the disk, for example /dev/sdX or /dev/mmcblk0, not a partition such as /dev/sdX1.
- Write the card to an image file:
sudo dd if=/dev/sdX of=polyscope-x.img bs=4M status=progress conv=fsync
- Remove the original card. Insert the larger card, check the device name again, and write the image to it:
sudo dd if=polyscope-x.img of=/dev/sdY bs=4M status=progress conv=fsync
- Insert the larger card into the control box, connect power, and start the robot. Wait until PolyScope X is up.
- Attach a keyboard to a USB port on the CB5.6 and press CTRL+ALT+F1 to get a terminal.
- Log in to a terminal as root and with the password to the cobot.
- Run this command to enable expanding the filesystem:
systemctl enable expand-on-first-boot.service
- Reboot the robot with:
reboot
On that boot the data partition is expanded to fill the card. The service then disables itself. A later reboot does not expand the partition again. - Run the software update as usual.