Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: src/platform/installer/chromeos-postinst

Issue 1100001: Switch to GPT-format disk images. (Closed)
Patch Set: Final GPT-enabling changeset. I hope. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/installer/chromeos-postinst
diff --git a/src/platform/installer/chromeos-postinst b/src/platform/installer/chromeos-postinst
index 725a7ba72325935b61bc27bae7d1f7961cef20eb..05e4f51684ec7904a05953e889f33624e514d961 100755
--- a/src/platform/installer/chromeos-postinst
+++ b/src/platform/installer/chromeos-postinst
@@ -1,19 +1,30 @@
-#!/bin/sh
+#!/bin/sh -e
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# This script is called after an AutoUpdate or USB install.
-set -e
+# This script is called after an AutoUpdate or USB install. The first argument
+# is the partition where the new rootfs is installed. The autoupdate invocation
+# will provide a second argument, specifying the partition for the new kernel.
-# update /boot/extlinux.conf
+# Update /boot/extlinux.conf.
INSTALL_ROOT=`dirname "$0"`
INSTALL_DEV="$1"
+KINSTALL_DEV="$2"
-# set default label to chromeos-hd
+
+# Set default label to chromeos-hd.
sed -i 's/^DEFAULT .*/DEFAULT chromeos-hd/' "$INSTALL_ROOT"/boot/extlinux.conf
sed -i "{ s:HDROOT:$INSTALL_DEV: }" "$INSTALL_ROOT"/boot/extlinux.conf
-# NOTE: The stateful partition will not be mounted when this is
-# called at USB-key install time.
+# NOTE: The stateful partition will not be mounted when this is called at
+# USB-key install time. It will be mounted following an upgrade. ChromeOS
+# hardware expects the kernel to be in a partition of its own. Legacy systems
+# will use syslinux to boot from the kernel image found in the rootfs.
+# TODO: The ChromeOS kernel partition will contain a signature header, a config
+# file, and the kernel image as a single blob. We'll need to revisit this to
+# ensure that gets installed properly.
+if [ -n "$KINSTALL_DEV" ]; then
+ dd if=${INSTALL_ROOT}/boot/vmlinuz of=${KINSTALL_DEV}
+fi

Powered by Google App Engine
This is Rietveld 408576698