Commit Graph

12 Commits

Author SHA1 Message Date
Bill Richardson
9880ca5a03 Check for enough room in /tmp, warn about too-small USB drives.
BUG=chromium-os:10062
TEST=manual

Verify the tempdir check by specifying a working directory on a filesystem
that's too small. It should complain:

  dd if=/dev/zero bs=1M count=3 of=foo
  mkfs.ext2 foo
  mount -o loop foo /mnt
  WORKDIR=/mnt ./recovery.sh

Verify the too-small USB check by selecting one that's too small. It won't
stop you, but will warn you like this:

  I found 2 USB drives.  We need one with at least 927MB capacity.

  0 - <quit>

  1 - Use /dev/sdc 4051MB SanDisk  U3 Cruzer Micro

  2 - Use /dev/sdd 32MB M-Sys    DiskOnKey

  Tell me what to do (or just press Enter to scan again): 2

  WARNING: This drive seems too small (31MB). The recovery image is 927MB.

  Is this the device you want to put the recovery image on?

    /dev/sdd 32MB M-Sys    DiskOnKey

  You must enter 'YES' (all uppercase) to continue: ^C

Change-Id: I7cf78b5b69eba696d911ca8ee371909bcf3201c7

Review URL: http://codereview.chromium.org/5720007
2010-12-14 15:13:09 -08:00
Bill Richardson
50a75da5a1 Make curl follow redirections. wget already does.
BUG=chromium-os:10289
TEST=manual

Set up a local URL that redirects, try it out. For example:

  ./recovery.sh http://www/~scottz/recovery2.conf

should redirect to http://www.corp.google.com/~scottz/recovery2.conf

Change-Id: I0a60784f414d69b9e3371b9546666dcdc8978d25

Review URL: http://codereview.chromium.org/5818002
2010-12-13 16:21:25 -08:00
Bill Richardson
841c4115ee Print "model" instead of "HWID" when telling users about available images.
BUG=chromium-os:10207
TEST=manual

Run the recovery script. It should say something like this (note "model",
not "HWID"):

  There is 1 recovery image to choose from:

  0 - <quit>

  1 - Chrome Notebook
        channel:  beta-channel
        model:    IEC MARIO FISH 2330
        model:    IEC MARIO PONY 6101

  Please select a recovery image to download:

Change-Id: I40cc73974b9e673bae5f69739e1642a6a95d4638

Review URL: http://codereview.chromium.org/5716006
2010-12-13 16:20:13 -08:00
Doug Anderson
bcafe0cb09 Applied Bill's patch to use the "raw" version of a disk if it's there.
Change-Id: I45c2283c9677d35490b5874ede20f8fe4623955d

BUG=chromium-os:10166
TEST=Ran against http://www.corp.google.com/~scottz/recovery.conf

Review URL: http://codereview.chromium.org/5705005
2010-12-10 15:03:35 -08:00
Bill Richardson
2902623c5e Mention that case is important when prompting before writing.
Change-Id: I35cb42d4120b734f6332fb671787f1e76e0c6832

BUG=chromium-os:10093
TEST=manual

Run the installer. It should now say

  "You must enter 'YES' (all uppercase) to continue: "
  "If you're sure that's correct, enter 'DoIt' now (case is important): "

Review URL: http://codereview.chromium.org/5612009
2010-12-10 07:52:39 -08:00
Bill Richardson
a4a639e5fa Use latest format config file.
Change-Id: I21f15ea3d6c1fedd977eb254fcb767dd5fd2f4a1

BUG=chromium-os:781
TEST=manual, as before

Review URL: http://codereview.chromium.org/5535010
2010-12-09 10:30:02 -08:00
Bill Richardson
37589d4452 A few last-minute tweaks.
Change-Id: I26f20e9f50a1e4e9607529b112ec4b44b728f289

BUG=chromium-os:781
TEST=as before

TBR=scottz
2010-12-07 09:55:48 -08:00
Bill Richardson
e89970b158 Change-Id: I7d3a6d7d8b6976bcd6dda4fa1737c8d697e7937d
BUG=chromium-os:781
TEST=manual, as before

Should work on Macs now, too.
2010-12-06 20:36:47 -08:00
Bill Richardson
00a849e16e Use tr instead of sed to unDOSify the config file, so it works on Macs.
Change-Id: Ib41cdd22d542004bd776828a43ae687942bc5ccc

BUG=chromium-os:781
TEST=manual, as before.

Review URL: http://codereview.chromium.org/5516010
2010-12-06 13:56:12 -08:00
Bill Richardson
d5b3d9dacc Allow specifying an alternate config file URL on the commandline.
Change-Id: I1b73674c769027cb557b37d3533534f261521106

BUG=chromium-os:781
TEST=manual

Try running recovery.sh with no args. It should try to download the config
file from a default location (which may not actually exist). Then try
running recovery.sh with a URL as a command-line argument. It should fetch
the config file from that location instead.

Review URL: http://codereview.chromium.org/5529006
2010-12-06 12:51:18 -08:00
Bill Richardson
82d206fb89 Refactor FETCH and CHECK into functions for easier maintenance.
Change-Id: Ic5b413e18f04a208a8e313be151ffc0da8db207b

BUG=chromium-os:781
TEST=manual, same as before.
TBR=eminer@chromium.org

Ed's given me a preliminary LGTM, and people are waiting.
2010-12-06 12:27:05 -08:00
Bill Richardson
99dc586b24 Initial creation of the end-user recovery tool.
This is work in progress. I'm committing what I've got as a starting point
for futher discussion, since we're just collaborating via email at the
moment, which is painful.

Change-Id: Iff21c008b3916d9612c021e5ee5c67258357d516

BUG=chromium-os:781
TEST=manual

Download user_tools/linux/recovery.sh to a linux machine and run it.

It should walk you through the process of creating a USB recovery key.

Review URL: http://codereview.chromium.org/5562003
2010-12-03 18:14:02 -08:00