This fixes the loop device leak. The problem is that inside the chroot, we
have /etc/mtab as a symlink to /proc/mounts. That works most of the time,
but if you mount something using "-o loop", it isn't cleaned up correctly
when you umount it. To avoid that, we either have to replace the /etc/mtab
symlink with an empty file when we create the chroot, or we have to make
sure that we never execute a "mount -o loop" command from within the chroot.
If we use an empty /etc/mtab file, the builds work fine, but then we can't
see any mounted partitions that the host creates outside the chroot (such as
USB keys), which causes other problems. Bleah.
Review URL: http://codereview.chromium.org/1594020
Change build_image to support building a factory install image. Also,
a shell script and startup script to run the factory installer.
Change software_update startup script to detect if it's a factory
install and abort if so.
BUG=2378,2379,2380
TEST=Tested factory install worked on device.
Wrapper script to perform factory install at boot.
AU: New arg to install on non-boot device partition. This is used to
install in the factory. Also, switch to shflags for argument parsing.
Review URL: http://codereview.chromium.org/1556022
The EFI System Partition is a special disk partition where EFI BIOS expects
to find the platform-specific bootloader. We need this in order to work on
the BIOS/kernel handoff. It's not needed for the final ChromeOS image and it
isn't useful for legacy BIOS systems, so right now it only makes any difference on x86
devices with development BIOSes.
This change creates the partition for ARM builds as well; it has no effect
there, either.
Review URL: http://codereview.chromium.org/1513019
I need a couple extra tools for testing purposes (about 10MB). I'd love to not add space to the rootfs for these. But...talking to sosa, it doesn't seem there's any other way.
Review URL: http://codereview.chromium.org/1576018
That way we can directly build an image onto a usb stick/sd card without a separate step.
Also, add mounting of /sys into the chroot that is needed by build_gpt on a block device.
Review URL: http://codereview.chromium.org/1521012
Remove the temporary rootfs.image file and others that are left by build_image and related scripts. Also added tool to emit scripts that can pack and unpack the combined disk image.
Review URL: http://codereview.chromium.org/1567013
This changes the disk image for both USB keys and hard-drive installs to use
the EFI GUID Partition Tables. This is a prequisite for booting with an EFI
BIOS. This change does not use the EFI Boot protocol; it still boots using
Legacy BIOS. The PMBR contains syslinux' gptmbr.bin, which searches the GPT
for a specified partition's GUID to boot.
I've tested it on my EeePC. The USB image works, chromeos-install works, and
the reimaged hard drive works. I have not yet tested the memento_updater.sh
script, but I wanted to start the review without waiting until it's all perfect.
I will also be refactoring build_gpt.sh and chromeos-install to share common
logic.
It's almost certain that all existing dogfood machines will need to be
reimaged from a USB key. We could probably figure out a way to upgrade
automatically, but not quickly or without risk.
In addition to the GPT formatting, the build_image script has changed to
emit a single usb.bin file. This can be copied directly onto a USB key and
booted. Installation of dev tools needs to happen with build_image, not
image_to_usb. I have not yet looked at the other image_to_* scripts.
Review URL: http://codereview.chromium.org/1100001