The problem here is that most were doing their exiting w/in a subshell;
exit within a subshell kills the subshell, not the parent. Not all scripts
were using set -e (which would pick up the failing subshell); as such
just rewriting them to remove the potential via eliminateing the subshelling.
Beyond that, removed a couple of custom (working, although non-standard)
approaches, and removed a duplicate common.sh sourc'ing w/in mk_memento_images.sh
TEST=force 'find_common_sh' to fail, note the scripts fails to exit
BUG=none
Change-Id: Ia1108a091a6399ad6aedd3cade4a107f4411686c
Reviewed-on: http://gerrit.chromium.org/gerrit/3905
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
from within the chroot.
It also fixes a number of style issues.
It changes the meaning of cros_workon "list-all" to list all available
packages, and adds "list-live" to list all live packages.
It changes things that load chromeos-common.sh from the installer to
load it from /usr/lib/installer.
BUG=chromium-os:4230
TEST=synced, rebuilt chroot, made packages, made images, built chrome
from source, and wrote an image to a USB stick.
Review URL: http://codereview.chromium.org/6240018
Change-Id: I90c34420af1a64020402bafef8e9e77f56837c02
Change-Id: Ib9b6b9ba7787fba337e71e4968a5c152b5a21e14
BUG=chromiumos:8885
TEST=Ran with default options and setting --rootfs_mountpt and stateful_mountpt
to dirs in my current workig directory ... saw cleanup correctly on unmount
Review URL: http://codereview.chromium.org/4853001
This is being remounted ro in cros_make_image_bootable so I should be checking
for the stateful mount pt not the rootfs mountpt
Change-Id: I1ee64489516fae10a6246c5d79236c8b5df090ee
BUG=8116
TEST=Ran it and ran bin/cros_start vm and inspected /usr/local
Review URL: http://codereview.chromium.org/4148013
Right now we're not fixing symlinks because mount_gpt_image thinks it's mounted ro.
Change-Id: Ie61536cd8d7bc276831c488e7ab892db14b05a94
BUG=8116
TEST=Mounted image from device and locally with both rw, and ro options.
Review URL: http://codereview.chromium.org/4048006
This change makes more of the root filesyste metadata static across builds, but
more can be done there. It also changes the root filesystem to use ext2 as
we don't need journaling in normal mode. Optionally we could use ext3 for
non-verified if desired (it's an easy change).
In particular, this change cleans up the following:
- clears the rootfs uuid
- labels it C-ROOT (instead of C-KEYFOB)
- removes reserved inodes and blocks
The major feature of this change, however, is that it adds two simple
helpers to common.sh: disable_rw_mount and enable_rw_mount. They will
set high order byte (le) in the ro compat field to be 0xff. This will
tell the kernel that the filesystem uses features R24-R31 which are safe
for use on the running kernel iff the filesystem is mounted read-only.
These functions are called in cros_make_image_bootable and
mount_gpt_image, respectively. mount_gpt_image will always
enable_rw_mount and cros_make_image_bootable will disable_rw_mount if
--enable_rootfs_verification is true.
The approach is ugly but reasonably well contained. If ext2 ever gets a
new revision and new features in the same range are introduced, then we
would be getting inconsistent behavior. That said, it is unlikely that
that churmn will happen and if the impact is negative, it will ideally
show up during testing.
N.B., this will likely result in changes needing to be made to the
signing scripts in vboot_reference to ensure that rw mounting is
enabled/disabled in the same way (E.g., during stamping).
BUG=chromium-os:7468
TEST=- built x86-generic, imaged to usb stick, attempted to mount rw /dev/sdc3 on the host and was properly bounced.
- booted to the image just fine on a dogfood device.
- mod'd for recovery, then installed and booted.
- mod_image_for_test runs with no errors; booted the resulting image as well
- booted a factory_install with the pending dm changes
- BVT passed with build_image x86-generic (vboot enabled)
- [in progress] autotest that checks if the rootdev = /dev/dm-0 and
then does a dumpe2fs | grep -q FEATURE_R31
Review URL: http://codereview.chromium.org/3916002
Change-Id: If4dcba7568a110f4e32627c916d9e5741e5e5414
Change-Id: I33ea8b2148a3e49a6c5de25f2957306130ff092e
BUG=
TEST=Ran and verified with and without flag. Checked mount and tried writing
file to rootfs (to verify it was ro). Also re-ran cros_make_image_bootable
to make sure it worked fine after changes.
Review URL: http://codereview.chromium.org/3479007
Missing check during mkdir causes failure with -e empty.
The tree broke prior to this commit, but this will break the dev
build so bypassing hooks. sorry.
TEST=reran build_image
BUG=none
TBR=adlr
Adds support for mounting the esp image.
In the future, all legacy boot loaders will live on
the ESP partition (#12) to avoid modifying the rootfs
partition with bootloader changes in the configuration or
preamble. This is needed.
TEST=manually reran mount_gpt_image.sh users.
BUG=chromium-os:327
Review URL: http://codereview.chromium.org/2811042
TEST=Tested with building a new image, looking in the output directory, running
the image and running vi.
Review URL: http://codereview.chromium.org/2075019
TEST=Tested build process. Tested dev image, test image and base image by booting all three and logging in.
Review URL: http://codereview.chromium.org/2106009
In addition unifies changes in mount_gpt_image and one-offs in mod_image_for_test
to consolidate gpt / var mounting.
Review URL: http://codereview.chromium.org/2064001