The LiveCD is equipped for “re-squashing” an SquashFS images.
Customize the NCN images by changing the root password or adding different SSH keys for the root account.
This process should be done for the “Kubernetes” image used by master and worker nodes and then repeated for the Ceph image used by the utility storage nodes.
Open the image.
The Kubernetes image will be of the form “kubernetes-0.0.53.squashfs” in /var/www/ephemeral/data/k8s.
pit# cd /var/www/ephemeral/data/k8s
pit# unsquashfs kubernetes-0.0.53.squashfs
The Ceph image will be of the form “ceph-0.0.44.squashfs” in /var/www/ephemeral/data/ceph.
pit# cd /var/www/ephemeral/data/ceph
pit# unsquashfs ceph-0.0.44.squashfs
Change into the image root
pit# chroot ./squashfs-root
Change the password
chroot-pit# passwd
Replace the SSH keys
chroot-pit# cd root
Replace the default root public and private SSH keys with your own or generate a new pair with ssh-keygen(1)
Create the new SquashFS artifact
chroot-pit# /srv/cray/scripts/common/create-kis-artifacts.sh
Exit the chroot
chroot-pit# exit
Cleanup the SquashFS creation
The Kubernetes image directory is /var/www/ephemeral/data/k8s.
pit# umount /var/www/ephemeral/data/k8s/squashfs-root/mnt/squashfs
The Ceph image directory is /var/www/ephemeral/data/ceph.
pit# umount /var/www/ephemeral/data/ceph/squashfs-root/mnt/squashfs
Save old SquashFS image.
pit# mkdir old
pit# mv *squashfs old
Move new SquashFS image, kernel, and initrd into place.
pit# mv squashfs-root/squashfs/* .
Update file permissions on initrd
pit# chmod 644 initrd.img.xz
11. Repeat the preceding steps for the other image type.
12. Set the boot links.
```bash
pit# cd
pit# set-sqfs-links.sh
The images will have the new password for the next boot.