Commit Graph

32 Commits

Author SHA1 Message Date
Chris Masone
d72ebe7050 image_to_usb.sh needs to pass --board to mod_image_for_test
At some point, mod_image_for_test started using emerge, but when we
call it from image_to_usb, we don't pass a --board flag...we just
assume the user is using the default_board magic file mechanism.

Review URL: http://codereview.chromium.org/2807028
2010-06-28 19:32:02 -07:00
Tom Wai-Hong Tam
0635a240d2 Sync after dd to disk in image_to_usb script.
Fix the bug happened to me that the script completed but the data haven't completely been written to disk.

Review URL: http://codereview.chromium.org/2831001
2010-06-15 10:29:05 +08:00
Paul Stewart
b227081ef5 Fixed size quotation (size is in 512 bytes blocks)
TEST=Verified against known device size and fdisk output
BUG=none

Review URL: http://codereview.chromium.org/2429004
2010-06-02 09:35:14 -07:00
Paul Stewart
5337440620 Print out disk manufacturer and product while asking user to confirm write to disk
Review URL: http://codereview.chromium.org/2363002
2010-05-28 13:43:48 -07:00
Paul Stewart
66dc143902 Add a few more safeguards to image_to_usb.sh so we don't accidentally overwrite a hard drive. Also without the --to option, list USB drives
I've updated the CL to remove the space in the "] ;".  I'm not sure I understand your "size != 0" comment as if the device is just attached for charging, it won't go through the trouble of becoming a USB storage device.  Will chat in person.

Review URL: http://codereview.chromium.org/2269003
2010-05-27 15:56:42 -07:00
Chris Sosa
d44550272c Cleanup of adding pristine image and fixing of symlinks in developer image.
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
2010-05-20 10:14:06 -07:00
Nick Sanders
7c982f7398 Update factory installer, factory test
* Fix build breaks
* Update to work with EFI bios

Review URL: http://codereview.chromium.org/2132008
2010-05-19 22:17:08 -07:00
Chris Masone
99c6a289f4 add the ability to umount automounted devices from within the chroot
Talked to kmixter, and we felt that bindmounting the directory in
which the host os creates mount points for automounted external
devices is the cleanest solution to the inside/outside the chroot problem.
By doing this, image_to_usb can be run from inside the chroot without concern.
That means that (as far as I understand) the factory install flow can all be
done inside the chroot, as well as modding images for test and everything else.

Review URL: http://codereview.chromium.org/1991006
2010-05-11 09:20:00 -07:00
Nick Sanders
7789d34e97 Allow factory install shim to be overlay installed
Make standalone package for factory install, so it can be overlayed on top of an existing image.
Modify mod_image_for_test to do the overlay.

Review URL: http://codereview.chromium.org/1945004
2010-05-05 21:21:15 -07:00
Tom Wai-Hong Tam
bf772cffaa Skip dropping caches in each test and between iterations during factory tests.
Dropping caches (writing back all dirty pages to disk and clearing all the caches) is not necessary for factory tests. It can reduce the latency significantly. The scale is about 27s -> 3s, for running 2 empty tests.

Review URL: http://codereview.chromium.org/1780011
2010-04-29 14:57:37 +08:00
Daniel Erat
dd9818aaad build: Get rid of scary /dev/sdb defaults in scripts.
Choosing a default device is no good; the user should
tell us where the image should be written.

BUG=none
TEST=wrote an image

Review URL: http://codereview.chromium.org/1730012
2010-04-26 09:16:44 -07:00
Daniel Erat
89b029c7c0 build: Re-hide pointless question in image_to_usb.sh --test_image.
Undoes a change from 5c3b457f.  Hardcoding "--yes" in the
call to mod_image_for_test.sh instead of inheriting
image_to_usb.sh's "yes" was intentional.  The user may not
pass --yes to image_to_usb.sh since they want to confirm
that they're writing to the correct device, but they already
told us that they want the image to be modified for test
with --test_image, so there's no reason to ask about it
again.

BUG=none
TEST=ran it

Review URL: http://codereview.chromium.org/1736005
2010-04-22 13:59:07 -07:00
Chris Sosa
6975c665d8 Only cache sudo if outside chroot
Review URL: http://codereview.chromium.org/1709005
2010-04-21 15:39:02 -07:00
Nick Sanders
3c8023380e Allow boot directly into mfg test.
Add feature to mod_image_for_test to patch rootfs.
Change initctl path to get network but no chrome.
./image_to_usb.sh --install_mfg --install_autotest --test_image
which calls ./mod_image_for_test.sh --manuf

Review URL: http://codereview.chromium.org/1542011
2010-04-16 19:53:55 -07:00
Daniel Erat
35aa57a305 build: Suppress stupid question in image_to_usb.sh.
No point in asking the user if they're sure they want
to modify the image for testing when they asked us to
modify it for testing in the first place.

BUG=none
TEST=tried it

Review URL: http://codereview.chromium.org/1520031
2010-04-09 18:51:08 -07:00
Chris Sosa
6c47714d93 Only mod image for test if necessary
Review URL: http://codereview.chromium.org/1606004
2010-04-01 10:51:33 -07:00
Bill Richardson
6dcea16492 Clean up temporary files and directories, add utilities.
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
2010-03-31 19:20:24 -07:00
Bill Richardson
4364a2e679 Switch to GPT-format disk images.
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
2010-03-30 14:17:34 -07:00
Chris Sosa
2a696210ca Add installation of stateful partition to scripts
Review URL: http://codereview.chromium.org/1017001
2010-03-26 17:00:07 -07:00
Nick Sanders
229bdeae7e Update location of autotest files in image_to_usb, fix loopback mounting for stateful partition
Review URL: http://codereview.chromium.org/1125004
2010-03-22 14:45:52 -07:00
Chris Sosa
3d11629b01 Changes to enable dev in stateful partition for usb and startup
Review URL: http://codereview.chromium.org/848002
2010-03-11 15:30:38 -08:00
Chris Sosa
8cf12935c5 Cleanup and add open to push test image to usb
Review URL: http://codereview.chromium.org/668170
2010-03-05 11:22:07 -08:00
Chris Sosa
acada7387b Changes to use default board when set by setup_board
Review URL: http://codereview.chromium.org/656023
2010-02-23 15:20:03 -08:00
robotboy
18ff72b913 Create a fourth partition to put the raw kernel image in.
This is a short term fix for machines that can't boot a kernel from
the root file system of an SDCard.

This issue depends on issue 602027.

Review URL: http://codereview.chromium.org/600074
2010-02-11 17:33:32 -08:00
Chris Sosa
431a7904ef Repatch
Review URL: http://codereview.chromium.org/596051
2010-02-10 17:19:24 -08:00
Eric Li
ce1ce9740a This is a resubmit. The original CL was lost due to local disk crashes.
Review URL: http://codereview.chromium.org/551087
2010-01-20 17:01:44 -08:00
Daniel Erat
afc9c8d0b9 Make image_to_usb.sh warn if given a partition.
Review URL: http://codereview.chromium.org/522014
2009-12-27 17:55:29 -08:00
djmm@google.com
dbeea200b4 Mask error if nothing to DEFAULT_FROM.
Review URL: http://chromereview.prom.corp.google.com/1188077


git-svn-id: svn://chrome-svn/chromeos/trunk@275 06c00378-0e64-4dae-be16-12b19f9950a1
2009-11-18 02:43:30 +00:00
tedbo@google.com
182c45ee72 Enable image_to_usb to be run from outside the scripts directory.
Review URL: http://chromereview.prom.corp.google.com/1180043


git-svn-id: svn://chrome-svn/chromeos/trunk@154 06c00378-0e64-4dae-be16-12b19f9950a1
2009-11-04 03:23:20 +00:00
adlr@google.com
1c98ef4e44 Fix image_to_usb.sh, build_image.sh
image_to_usb.sh didn't handle the case where the devices were being
automounted.

build_image.sh didn't handle the case where the version string > ~14
characters.

Review URL: http://chromereview.prom.corp.google.com/1173161

git-svn-id: svn://chrome-svn/chromeos/trunk@108 06c00378-0e64-4dae-be16-12b19f9950a1
2009-10-28 00:00:13 +00:00
adlr@google.com
9cb9e73b2f Install: read-only USB, resizable sys partitions
USB image:
- have a stateful partition
- use a read-only system partition

Installer:
- copy read-only system partition from USB to hard drive, skip fsck check
- make stateful partition empty

System:
- Change to tolerate empty stateful partition on bootup
- Don't keep so much of /var on stateful partition (var/lib should be in system
image)

Autoupdate:
- Fix a couple checks to allow partitions 3 and 4 to be system partitions
- Fix a misnomer in mk_memento_images.sh

Review URL: http://chromereview.prom.corp.google.com/1175102

git-svn-id: svn://chrome-svn/chromeos/trunk@87 06c00378-0e64-4dae-be16-12b19f9950a1
2009-10-26 18:29:06 +00:00
rspangler@google.com
d74220d772 Start copying over source.
git-svn-id: svn://chrome-svn/chromeos/trunk@4 06c00378-0e64-4dae-be16-12b19f9950a1
2009-10-09 20:56:14 +00:00