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

Unified Diff: src/platform/init/chromeos_startup

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
« no previous file with comments | « no previous file | src/platform/installer/chromeos-common.sh » ('j') | src/platform/installer/chromeos-common.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/init/chromeos_startup
diff --git a/src/platform/init/chromeos_startup b/src/platform/init/chromeos_startup
index b1cc786997f6f9fe9366bf22097a116f14a35720..a60384e39040e75c1eb2cd4342afbff794519186 100755
--- a/src/platform/init/chromeos_startup
+++ b/src/platform/init/chromeos_startup
@@ -36,22 +36,9 @@ mount -n -t tmpfs tmp /tmp
mount -n -t tmpfs -onosuid,nodev shmfs /dev/shm
mount -n -t devpts -onoexec,nosuid,gid=5,mode=0620 devpts /dev/pts
-# Mount our stateful partition
-ROOT_DEV=$(sed 's/.*root=\([^ ]*\).*/\1/g' /proc/cmdline)
-if [ "${ROOT_DEV#*=}" = "$ROOT_DEV" ]
-then
- # We get here if $ROOT doesn't have an = in it.
-
- # Old installations have system partitions on partitions 1 and 2. They
- # have the stateful partition on partition 4. New installations have
- # partitions 3 and 4 as system partitions and partition 1 as the stateful
- # partition.
- STATE_DEV=$(echo "$ROOT_DEV" | tr 1234 4411)
-else
- # $ROOT has an = in it, so we assume it's LABEL= or UUID=. Follow that
- # convention when specifying the stateful partition.
- STATE_DEV="/dev/disk/by-label/C-STATE"
-fi
+# Mount our stateful partition. It's always partition 1.
+ROOT_DEV=$(rootdev)
+STATE_DEV=${ROOT_DEV%%[0-9]*}1
mount -n -t ext3 "$STATE_DEV" /mnt/stateful_partition
# Make sure stateful partition has some basic directories
« no previous file with comments | « no previous file | src/platform/installer/chromeos-common.sh » ('j') | src/platform/installer/chromeos-common.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698