sonic_installer install
- Takes a path to an installable SONiC image or URL and installs the image.
- Example:
admin@sonic:~$ sonic_installer install https://sonic-jenkins.westus.cloudapp.azure.com/job/xxxx/job/buildimage-xxxx-all/xxx/artifact/target/sonic-xxxx.bin New image will be installed, continue? [y/N]: y Downloading image... ...100%, 480 MB, 3357 KB/s, 146 seconds passed Command: /tmp/sonic_image Verifying image checksum ... OK. Preparing image archive ... OK. ONIE Installer: platform: XXXX onie_platform: Installing SONiC in SONiC Installing SONiC to /host/image-xxxx Directory /host/image-xxxx/ already exists. Cleaning up... Archive: fs.zip creating: /host/image-xxxx/boot/ inflating: /host/image-xxxx/boot/vmlinuz-3.16.0-4-amd64 inflating: /host/image-xxxx/boot/config-3.16.0-4-amd64 inflating: /host/image-xxxx/boot/System.map-3.16.0-4-amd64 inflating: /host/image-xxxx/boot/initrd.img-3.16.0-4-amd64 creating: /host/image-xxxx/platform/ extracting: /host/image-xxxx/platform/firsttime inflating: /host/image-xxxx/fs.squashfs inflating: /host/image-xxxx/dockerfs.tar.gz Log file system already exists. Size: 4096MB Installed SONiC base image SONiC-OS successfully Command: cp /etc/sonic/minigraph.xml /host/ Command: grub-set-default --boot-directory=/host 0 Done
sonic_installer list
- Displays information about currently installed images. It displays a list of installed images, currently running image and image set to be loaded after reboot.
- Example:
admin@sonic:~$ sonic_installer list Current: SONiC-OS-HEAD.XXXX Next: SONiC-OS-HEAD.XXXX Available: SONiC-OS-HEAD.XXXX SONiC-OS-HEAD.YYYY
sonic_installer set_default
- Changes which image will be loaded by default after all subsequent reboots
- Example:
admin@sonic:~$ sonic_installer set_default SONiC-OS-HEAD.XXXX
sonic_installer set_next_boot
- Changes which image will be loaded after the next reboot only
- Example:
admin@sonic:~$ sonic_installer set_next_boot SONiC-OS-HEAD.XXXX
sonic_installer remove
- Removes an unused SONiC image from the disk. Note that it's not allowed to remove currently running image.
- Example:
admin@sonic:~$ sonic_installer remove SONiC-OS-HEAD.YYYY Image will be removed, continue? [y/N]: y Updating GRUB... Done Removing image root filesystem... Done Command: grub-set-default --boot-directory=/host 0 Image removed