How Magic Wand Works

How Magic Wand Works

How Magic Wand Works

 

  1. On boot and if enabled in the fullcount config file, the fullcount-checkforupdates.service runs update_checker.sh, which pulls down the latest current_release file and updateos.sh script.
  2. update_checker.sh checks whether FCCURRENT in current_release is higher than the running OS version found in /etc/FC-release.
  3. If it is a higher version, it downloads the new squashfs based on the device_name file's DEVICE variable.
  4. It checks the SHA1 variable from the current_release file against the actual SHA1 of the downloaded squashfs, and if they match, it writes a file that flags posapp into generating the user-invoked update button in the Support Drawer.

 

  1. Once a new image is downloaded, and a user is ready to update via the Support Drawer button (or FC_OS_UPDATE_FORCE is enabled), the updateos.sh script starts.
  2. First it finds the active partition and volume group. If it is a first-time update, it creates a new partition of 30GB (and expands the original to 30GB), and if it is a subsequent update, it selects the inactive partition as the target.
  3. Next, the script unzips the squashfs to extract the .raw filesystem which already contains its own LVM volume group.
  4. It then copies the new .raw filesystem to the new partition and imports the new volume group and activates it.
  5. Next, the script mounts the new operating system, updates the fstab, copies system files (config file, NetworkManager settings, product model, serial number) to the new OS.
  6. Then, it extracts and generates the new GRUB entry name from the squashfs installer file, rebuilds GRUB using commands from the new OS, adjusts the Boot Order and adds the fallback entry.
  7. Finally, it removes the update entry that notified posapp to generate the update button, extends/resizes the filesystem, disables the update service on the old OS (to pervent a boot-loop scenario where the old OS loads and FC_OS_UPDATE_FORCE is enabled), and reboots into the new OS.

 

If there is a problem for whatever reason, the old version of the OS will remain as a fallback that is available to boot into by attaching a keyboard and selecting the "Fullcount Terminal XXXXX Previous (Fallback)" option on the GRUB screen. This will not persist on reboot unless GRUB gets rebuilt on that OS.

 

Creating a Compatible Squashfs Update File

  1. Create a new .iso using Kiwi
  2. Copy the .iso to a Windows machine.
  3. Right-click on the .iso and select Mount. A new window will appear showing the contents of the .iso image.
  4. Inside the image, a file with a .squashfs extension will exist. Drag the .squashfs to a directory onto the Windows machine.
  5. The image file will need to be renamed. For exmple, fullcount-terminal-a5term.raw.squashfs will need to be renamed to fullcount-terminal-a5term.x86_64-7.5.0.install.squashfs. Same name as the .iso, but with a squashfs extension instead.
  6. Copy the new squashfs to updatesprod0X.fullcount.net/srv/www/htdocs/updates.fullcount.net/osupdater/DEVICENAME
  7. Get the SHA1 with 'sha1sum fullcount-terminal-DEVICENAME.x86_64-7.5.0.install.squashfs'
  8. Copy the SHA1 and edit the current_release file to include the new SHA1. Also update the FCCURRENT variable to match the new image

Example below:

updatesprod02:/srv/www/htdocs/updates.fullcount.net/osupdater/a5term # cat current_release
FCCURRENT=7.6.0
INSTALLER=fullcount-terminal-a5term.x86_64-${FCCURRENT}.install.squashfs
SHA1=e33a3eaa0ea48fe610a02a3732fc1e256677e167

 

Known Issues:

1. Occasionally, an update can change the boot order to an incorrect one, where the UEFI boot menu entry is below the non-UEFI boot option. To fix this, connect a keyboard, enter the BIOS, navigate to the BOOT tab, and bump the UEFI hard disk option to Boot Option #1.


    • Related Articles

    • How To Use Magic Wand on OS Image Version 7.5.0+

      How To Use Magic Wand on OS Image Version 7.5.0+ Objectives Update FullCount OS Images to newer versions via Magic Wand. Prerequisites 1. FullCount Device with OS Image 7.5.0+ 2. A new update available 3. Device Management configured to Allow OS ...
    • How To Manually Update with Magic Wand (for Systems Team members only)

      How To Manually Update with Magic Wand (for Systems Team members only) Objectives Document instructions for a sysadmin to manually udpate terminals in the field. Prerequisites Device with remote connection Update Available finaldeps.zip listed in ...
    • Printing Process for Terminals and Tablets

      Printing Process for Terminals and Tablets The diagram below show how the process for printing receipts or requistions from a terminal or tablet to a kitchen printer or terminal works. This applies to (at least) OS image version 3 - 5.x.x on Acer, ...
    • FullCount OS Image Versions

      FullCount OS Image Versions Overview The primary method for installing software on FullCount terminals, tablets and virtual machines is a disk image that contains the operating system, applications, and all of their configuration settings. We refer ...
    • Code Review Checklist

      Before asking for code to be reviewed, the following steps should be completed. This will ensure a smooth review process and help code to get checked in more quickly. Javadocs created/updated Method and class level comments added Back office ...