This removes everything except /boot from a disk.img.
On first boot of the disk image, the loaded initramfs in /boot
will copy itself to the target. Since /boot is not in the initramfs
there is no problem copying to the blank target.
The result of this is a disk1.img file that is much smaller.
for comparison, the output of this local build and the 20160722 daily
for x86_64:
disk.img 17961472 -> 12846080 (29% saved)
rootfs.img.gz 16744808 -> 11899176 (29% saved)
If curtin's src/init doesn't find a root filesystem (no /sbin/init) but
does find a filesystem with the right label (cirros-rootfs), then it
copies itself to the target and continues booting as if it were always
there.
src/init now uses search_for_root and search_for_blank to find root
filesystem and blank disk. It would be nice to move the "install"
hunk out of src/init also. We need to improve this too, to deal with
existing files overwriting and such.
Power bootable qcow2 images require Grub to be installed on a PreP
Boot partition. This patch enables CirrOS to boot from Grub2/PreP.
And, now produces disk images for ppc64, powerpc and ppc64le.
When user ssh's in as root and sees the 'Please login as cirros'
message, that should exit non-zero.
Here we have arbitrarily picked '43', which is somewhat like 403
which is http redirect.
In my small tests I've found the following return codes:
255: ssh -o ConnnectTimeout=3 google.com (timeout)
255: ssh brickies.net (bad auth)
255: ssh nodomainhere.example.com (host not found)
Get newer util-linux (2.27) to support gpt partition manipulation.
We do this to have a new enough sfdisk to work with GPT.
The version of 2.26.2 is not enough due to sfdisk losing uuids
of gpt partitions on recreate (LP: #1474090).