Commit Graph

217 Commits

Author SHA1 Message Date
Brandon Philips
c003b47772 fix(build_library): properly quote fields with spaces
quote COREOS_RELEASE_DESCRIPTION since it has spaces
2013-09-05 17:35:12 -07:00
Michael Marineau
b223b45800 fix(image_to_vm): Fix upload pxe, VM_GENERATED_FILES must be an abspath 2013-09-05 16:14:02 -07:00
Michael Marineau
bbacf2f0bd fix(image_to_vm): Mount source rootfs as ro when creating cpio.
When building with a write-protected root mounting as rw, the default,
fails.
2013-09-05 16:24:45 -04:00
Michael Marineau
c8d986d408 fix(image_to_vm): Cleanup must run as root.
Failures mid-build leave root-owned files behind.
2013-09-05 16:17:14 -04:00
Michael Marineau
b52955ef00 fix(set_lsb_release): New code name suggested by @gregkh 2013-09-04 14:46:45 -07:00
Michael Marineau
2d5a0a29e4 fix(image_to_vm): Use SCSI for VMware disks. 2013-09-01 17:23:59 -07:00
Michael Marineau
1539ff334e Merge pull request #98 from marineam/image-size
Image size
2013-08-28 12:25:56 -07:00
Brandon Philips
043dfeb868 Merge pull request #94 from philips/pxe-initial
Pxe initial
2013-08-28 12:09:41 -07:00
Brandon Philips
ce445512fd fix(build_library): fixup naming for the pxe image
based on @marineam's comments fixup the naming and ensure the output
files get picked up by the build system.
2013-08-28 12:04:55 -07:00
Michael Marineau
dfb7d8d115 fix(build_library): Drop default 'base' layout to 512MB for STATE.
This will further reduce the amount of dd'ing required when using block
devices.
2013-08-28 11:55:25 -07:00
Michael Marineau
8a488f890b fix(image_to_vm): Increase STATE in vagrant images to 16GB
Vagrant users are accustomed to much larger disk sizes so lets give it
to them. I'm leaving the others as-is since it is easier to grow than
shrink disks if anyone has a particular size they need.
2013-08-28 11:52:19 -07:00
Michael Marineau
9734ac017f feat(image_to_vm): Make disk layout configurable by VM type.
Use the smaller base format for 'raw' disk images since these will
usually be dd'd to a block device to create AMIs and what not. For
images using qcow2 and vmdk stick with the larger vm size.
2013-08-28 11:35:06 -07:00
Michael Marineau
c6bbadd6e0 feat(image_to_vm): Add 'vmware_insecure' image type.
This bundles the vagrant ssh key, vmdk, and vmx into a zip file for easy
downloading and login access via ssh.
2013-08-27 21:18:12 -07:00
Brandon Philips
a840ae036c feat(build_library): pxe support
This adds support for creating a PXE image and kernel using build_image
2013-08-27 17:33:44 -07:00
Michael Marineau
8b7cc15bc6 Revert "fix(build_library): Create disk image first instead of last."
This reverts commit b97cfe126f.

The minor device numbers of loop partitions are allocated dynamically
which significantly complicates dunning under Docker which uses a static
/dev. Rolling this back until we can rely on /dev being dynamic.
2013-08-26 00:53:27 +00:00
Michael Marineau
4f18deb87f fix(build_image): Add support for using git in dev images.
If git is installed via coreos-dev in the STATE partition it will need
some help finding its install location since it was built thinking it
would be installed in /usr rather than /usr/local.
2013-08-26 00:53:21 +00:00
Brandon Philips
047e3e0df1 feat(build_library): put all of the partition stuff behind a flag
this lays the groundwork for supporting a cpio img which doesn't have
partitions.
2013-08-22 10:51:11 -07:00
Michael Marineau
b97cfe126f fix(build_library): Create disk image first instead of last.
This avoids the need to dd individual filesystem images into a complete
disk image, just mount the partitions directly from a loop device
covering the whole image. This does add the requirement that mkfs run as
root but that isn't a problem.
2013-08-21 16:54:23 -04:00
Michael Marineau
34cfe6e07e churn(build_library): Change lots of stateful references to state.
For consistency we are using 'state' these days, not 'stateful'. While
I'm mucking around in this code it seems like a good time to switch.
2013-08-20 22:36:53 -04:00
Michael Marineau
ebbd281f0d cleanup(gen_tmpfiles): Move to build_library 2013-08-20 22:19:00 -04:00
Michael Marineau
ad908d0820 fix(gen_tmpfiles): Don't include /var/tmp, systemd defines this one. 2013-08-20 22:16:37 -04:00
Michael Marineau
efac054f54 fix(build_library): Remove usb and factory_layout partition layouts.
These are just cluttering things and adding an element of "how does this
work?" because base_image_util was defaulting to the "usb" layout in
some places and "base" in others.
2013-08-20 21:47:53 -04:00
Michael Marineau
34c324cc3a fix(build_library): Remove GPT writer scripts, call cgpt directly.
This change removes /usr/sbin/write_gpt.sh from images which we have no
use for. This allows us to drop the indirection of writing partition
tables by first writing out a script to call. Now cgpt.py can call cgpt
directly to initialize the partition layout. This opens the way for
further improvements to how disk images are created.
2013-08-20 21:30:22 -04:00
Michael Marineau
1ad0ea2eab fix(cgpt.py): Remove broken 'expand' feature.
This currently does nothing because our state partition is not partition
number 1. Even if it did we don't really needed it since we rely on
expanding on boot instead.
2013-08-20 21:09:06 -04:00
Michael Marineau
325755e923 cleanup(build_image): Remove some unused flags.
Remove --verity_*: Unused, we don't support verity
Remove --usb_disk: Unused, we use PARTUUID now.
Remove --enable_serial: Unused, and serial is enabled for syslinux
2013-08-19 18:09:11 -04:00
Michael Marineau
d8e670a2b3 fix(build_image): Don't over-size root partitions in base images.
Right now the initial (pre image_to_vm) images oversize the root
partitions, creating the expected 1GB filesystem in a 2GB partition.
image_to_vm later shrinks the partition back down to match. Just start
out with 1GB partitions to begin with instead.
2013-08-19 18:09:11 -04:00
Michael Marineau
0f84e3b05f feat(image_to_vm): Add new and improved qemu wrapper script.
This one is more automagical and sets up ssh keys from ssh-agent and the
user's home directory by default. Also adds an option for setting the
ssh port so it can be something other than 2222. Script should be
sufficiently portable, tested in bash, dash, and ash.
2013-08-18 19:43:07 -04:00
Michael Marineau
81afa4f300 fix(boot): Enable serial console when booting via syslinux.
Useful for qemu -nographic or any any other situation where serial is
easier to get at than VGA. It may be possible that in some setups ttyS0
isn't appropriate but we can figure out a way to customize kernel
options if/when that ever comes up.
2013-08-16 15:18:31 -04:00
Michael Marineau
c21b8ee03d cleanup(boot): remove lingering dm-verity bits, cleanup kernel args.
Remove unused dev/dm-0 vs dm-1 logic from verity and the associated
rootwait option it required (meaningless with our initrd). Move old
cros_legacy to common instead of using it in every command line option.
We should remove it entirely soon since it isn't useful for us. Remove
unneeded intel graphics modeset option.
2013-08-16 15:00:29 -04:00
Michael Marineau
b0d2775e0a fix(image_to_vm): Fix backslash in qemu README.
Go me fixing this issue in the script while adding it in the README.
2013-08-11 23:41:05 -04:00
Michael Marineau
bef5728f6e fix(image_to_vm): Cleanup qemu script, document -virtfs 2013-08-11 22:17:20 -04:00
polvi
3a1d4dbe1b Merge pull request #80 from polvi/vagrant-vmware
feat(vagrant): vmware fusion support
2013-08-06 14:01:00 -07:00
Alex Polvi
324f4d86f2 call it --format=vagrant_vmware_fusion 2013-08-06 11:14:03 -07:00
Alex Polvi
55062ec902 feat(vagrant): vmware fusion support 2013-08-06 10:58:18 -07:00
Michael Marineau
a21a545f2e fix(set_lsb_release): Make sure $ROOT/etc exists.
Useful for generating a root filesystem overlay that catalyst can apply.
2013-08-05 22:38:34 -04:00
Michael Marineau
ff6af5ea8f feat(set_lsb_release): Add special "sdk" track without an update server.
I want to start including version info in SDK builds as an alternative
scheme to the existing "chroot_version_hooks" system which always
assumes freshly unpacked SDKs are the latest regardless of what version
they actually were.
2013-08-05 22:35:34 -04:00
Michael Marineau
f8c0033de2 feat(image_to_vm): Add openstack image, uses oem-ami and qcow2 format. 2013-08-02 15:07:12 -04:00
Michael Marineau
c7ba8cd4a4 fix(image_to_vm): Replace qemu's config file with a script.
The recommended command using the config file was triggering a massive
memory leak in qemu because it was adding both the default virtual
hardware nic as well as the virtio nic. This could be worked around by
adding something like -net none or moving all the -net commands from the
file to the command line but eh. Clearly qemu config files are used and
tested by nobody else so lets just use a trusty script instead.
2013-08-02 14:53:08 -04:00
Michael Marineau
99982182b9 feat(image_to_vm): Switch to qcow2 as default qemu disk format.
We only really need raw images for dd'ing to block devices and this
format has been requested for some cases so lets just use it!
2013-08-02 14:53:08 -04:00
Alex Polvi
9ddb254ac1 feat(vagrant) add version requirement to the vagrantfile 2013-08-01 20:29:38 -07:00
Michael Marineau
9c88c24131 fix(image_to_vm): gzip vagrant's .box files 2013-08-01 22:42:37 -04:00
Michael Marineau
ae3202da32 fix(image_to_vm): Add VM MAC address to Vagrantfile, create box image.
Vagrant should now be good to go!
2013-08-01 19:39:12 -04:00
Michael Marineau
a2046afc40 fix(image_to_vm): Use vmdk disks for vagrant and write configs.
Vagrant will need the virtualbox ovf plus its own Vagrantfile config.
After this we will need an optional "package" step to this script to
take these files and bundle them into a .box tarball. This could also be
used to switch from .ovf+vmdk for plain virtualbox images to a bundled
.ova archive which combines the two.
2013-08-01 16:35:28 -04:00
Michael Marineau
ce01e133db fix(image_to_vm): Use vmdk+ovf for virtual box images.
Now we have a config file that can be imported into VirtualBox.
2013-08-01 14:42:04 -04:00
Michael Marineau
5e1337307a feat(image_to_vm): Basic vagrant disk image support
This just generates a vdi that includes the vagrant ssh key.
2013-08-01 00:02:33 -04:00
Michael Marineau
7c48115da6 fix(image_to_vm): Use saved version info instead of parsing directory.
Trying to include version info by adding the directory name to VM image
names didn't work and a better solution is for build_image to write out
a version.txt file. This should also fix an issue where uploading from
image_to_vm.sh didn't always go to the same location as the images
uploaded from build_image did.
2013-07-31 21:22:52 -04:00
Michael Marineau
84348c39af fix(build_library): Re-enable zeroing free-space but in a sane way.
As of Linux 3.2 loopback supports discard by punching holes in the
underlying file. This doesn't actually seem to impact things right now
since we are writing to fresh filesystems but might as well do this to
prevent wasted space from sneaking in later on.
2013-07-27 16:39:52 -04:00
Michael Marineau
a1a1ed830c fix(build_library): Use sparse files for disk images, no useless sudo
Enable sparse files for all dd and cp commands and replace some dd
commands that are really better off being truncate commands.

While in the neighborhood there were a number of useless sudo commands
for things that just happen to be in sbin. Call them directly instead.
2013-07-26 23:45:10 -04:00
Michael Marineau
1ea1e8ba9b cleanup(common): Remove rarely used pv_cat_cmd
Its single use is in build_common and even then having a little progress
bar for copying images isn't that interesting, they just get lost in the
noise of the emerge output. Keep it simple, use cp.
2013-07-26 22:40:59 -04:00
Michael Marineau
42a4536d7d fix(*): Rename dev image to coreos_developer_image.bin
Remove hard-coded references and unused scripts that mentioned it.
2013-07-26 22:12:10 -04:00