Commit Graph

190 Commits

Author SHA1 Message Date
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
Michael Marineau
6697c05d0a Merge pull request #61 from marineam/vm_upload
Vm upload
2013-07-26 15:18:04 -07:00
Michael Marineau
c5cd245603 feat(image_to_vm): Add support for uploading vm images
After this I can make production AMI images available for download! :-D
2013-07-26 16:31:11 -04:00
Brandon Philips
ecb8ea259c Merge pull request #60 from philips/move-stateful-around
Move stateful around
2013-07-26 11:33:59 -07:00
Brandon Philips
3b30f8def3 fix(build_library): symlnks to stateful
add backward compat symlinks to the stateful directory
2013-07-26 10:20:29 -07:00
Brandon Philips
be72d56a50 fix(*): move dev_image to overlays
put the dev_image in overlays/usr/local
2013-07-26 10:20:18 -07:00
Brandon Philips
ca0b25028e Merge pull request #59 from philips/remove-container-stuff
chore(build_library): remove container library
2013-07-26 08:51:53 -07:00
Brandon Philips
cf8be2c320 fix(*): use /media/state and overlays dir
/mnt/stateful_partition was already a little unruly with
/mnt/stateful_partition/home and /mnt/stateful_partition/var_overlay
serving similar functional purposes.

Then we needed to also add /opt and /srv overlays.

I also have wanted to get rid of the ugly and weird
/mnt/stateful_partition name so lets just have one big move.

/mnt/stateful_partition -> /media/state
/mnt/stateful_partition/var_overlay -> /media/overlays/var
/mnt/stateful_partition/home -> /media/overlays/home

From there we add /media/overlays/srv and /media/overlays/opt
2013-07-26 08:44:47 -07:00
Brandon Philips
141d488da6 chore(build_library): remove container library
This is no longer used. It was used to debug early boot problems early
on.
2013-07-26 05:35:20 -07:00
Michael Marineau
2acc703cc8 fix(set_lsb_release): Spelling is for suckers 2013-07-26 00:02:11 -04:00
Michael Marineau
9ed620c277 fix(build_image): Fix baselayout install in final images.
The basic system directory structure including the lib symlinks were
fixed for sysroot in the following commits but the image build uses an
entirely different bit of code to do the exact same set of hacks. Port
those changes to the image building code to hopefully make all happy.

2ae0c30f4e
ac931bd088
2013-07-25 23:22:12 -04:00
Michael Marineau
fcb2a614b6 fix(set_lsb_release): swap BUILD_ID and VERSION_ID
This is what happens when you run off without finishing testing.
2013-07-25 23:18:13 -04:00
Michael Marineau
cc0873bbd8 fix(set_lsb_release): Add option for production updates, misc updates.
Add --production_track argument to set_lsb_release and
cros_make_image_bootable to support using the production update service
on developer builds of the 'prod' image. This replaces the previous hack
of setting COREOS_OFFICIAL=1 in the middle of the build.

Since lsb-release doesn't exist prior to the first call to
set_lsb_release switch to sudo_clobber instead of append. That way if it
is called a second time later the contents aren't duplicated.

Write the info to gentoo-release and os-release as well so everything
gets the same information.
2013-07-25 18:14:51 -04:00
Michael Marineau
b2b23fdaf4 Merge pull request #55 from marineam/vm
feat(image_to_vm): Refactor to make adding/changing vm formats easier.
2013-07-25 11:05:42 -07:00
Michael Marineau
9379ee19f0 fix(vm_image_util): Remove space before # comment in qemu config.
Last minute bug slipped in because of a line I commented out since the
current coreos kernel doesn't support virtio block devices (that change
coming soon). Qemu doesn't tolerate any spaces before # in comments.
2013-07-25 13:54:50 -04:00
Michael Marineau
df886c91e7 fix(vm_image_util): Remove tab characters. 2013-07-25 13:16:04 -04:00
Michael Marineau
033cf224f1 feat(image_to_vm): Refactor to make adding/changing vm formats easier.
The old script was heading towards spaghetti code realm. This breaks up
all the image variations such as hybrid MBR, OEM packages, etc into
configuration options and small functions that actually do the work.

All this is in the new vm_image_util.sh library but the command line
parsing and overall procedure remains in image_to_vm.sh

As part of this we gain support for putting some qemu options in a
config file as well as Xen virtual machines using pygrub and pvgrub.

Lots of generally unused options have been removed to simplify things
and keep output file names consistent.
2013-07-24 23:11:50 -04:00
Brandon Philips
b9568f9dce chore(*): use COREOS lsb-release variables
use the COREOS_ variables in /etc/lsb-release
2013-07-24 15:43:26 -07:00
Brandon Philips
69803d5ad6 feat(create_legacy_bootloader): add hvc0 on Xen
add console=hvc0 for systems that use pygrub/pvgrub by adding it to the
menu.lst files.
2013-07-22 17:37:51 -07:00
Brandon Philips
a923365449 chore(build_library/create_legacy_bootloader): remove old stuff
We don't need all of these args. Remove them.
2013-07-22 17:36:17 -07:00
Brandon Philips
95b2a4b8cd chore(*): use coreos_ everywhere 2013-07-21 23:20:50 -07:00
Brandon Philips
836ffc9327 feat(build_library): reintroduce A/B menu.lst
reintroduce unique A/B menu.lsts to work around the kexec problems that
we have. Essentially instead of always using boot_kernel on pvgrub
systems use the A/B kernels installed at update time to the boot
partition.
2013-07-21 22:30:46 -07:00
Michael Marineau
99089076af fix(build_image): Don't unmount when the rootfs isn't mounted
This function is never called when rootfs is mounted but leaving in a
check for it as a just in case sort of thing.
2013-07-19 02:41:52 -04:00
Michael Marineau
7564371200 hack(build_image): Make check for /usr/share/locale a warning.
Switching the toolchain to upstream Gentoo brought this directory back
and based on the Chromium OS history keeping this directory out of the
builds is a bit tedious. Keeping image sizes down isn't *that* important
right now so just let it be.
2013-07-18 10:38:16 -07:00
Brandon Philips
7ea2b4924f feat(boot_kernel): add support for the boot kernel
This adds the boot_kernel to the build boot partiton and updates the
relevant config files. Mission accomplished.

TODO: Update the installer to not worry about moving files around
anymore
2013-07-17 18:02:27 -07:00
Brandon Philips
ed037ea05c chore(build_library): remove efi image
we don't really care about booting on pure efi systems right now and I don't
think this all works so remove it for now.
2013-07-17 18:02:02 -07:00
Brandon Philips
06444a4ffc chore(build_library): strip out verity logic
remove some unused verity variables.
2013-07-17 18:00:00 -07:00
Michael Marineau
6b336e17b2 fix(bootstrap_sdk): Move gsutil code to release_util.sh
Sync up bootstrap_sdk with other tools by using the common upload
functions. As part of this refactor release_util a bit to provide a
truly generic upload function.
2013-07-17 19:25:46 -04:00